Removed old code
[Mograsim.git] / net.mograsim.logic.ui / src / net / mograsim / logic / ui / model / components / Am2901NANDBased.java
index 7aace4d..4035795 100644 (file)
@@ -6,7 +6,7 @@ import net.haspamelodica.swt.helper.gcs.GeneralGC;
 import net.haspamelodica.swt.helper.swtobjectwrappers.Font;
 import net.haspamelodica.swt.helper.swtobjectwrappers.Point;
 import net.haspamelodica.swt.helper.swtobjectwrappers.Rectangle;
-import net.mograsim.logic.ui.model.ViewModel;
+import net.mograsim.logic.ui.model.ViewModelModifiable;
 import net.mograsim.logic.ui.model.wires.Pin;
 
 // TODO make a superclass
@@ -15,7 +15,7 @@ public class Am2901NANDBased extends GUIComponent
        public final List<String> inputNames;
        public final List<String> outputNames;
 
-       public Am2901NANDBased(ViewModel model)
+       public Am2901NANDBased(ViewModelModifiable model)
        {
                super(model);
 
@@ -35,10 +35,10 @@ public class Am2901NANDBased extends GUIComponent
                double posX = getBounds().x;
                double posY = getBounds().y;
 
+               gc.drawRectangle(getBounds());
                Font oldFont = gc.getFont();
                Font labelFont = new Font(oldFont.getName(), 4, oldFont.getStyle());
                gc.setFont(labelFont);
-               gc.drawRectangle(posX, posY, 50, getBounds().height);
                for (int i = 0; i < inputNames.size(); i++)
                {
                        Point textExtent = gc.textExtent(inputNames.get(i));