SimpleRectangularSubmodelComponent now supports pin names
[Mograsim.git] / net.mograsim.logic.ui / src / net / mograsim / logic / ui / model / components / mi / nandbased / GUIand41.java
index 66fbbef..45ba337 100644 (file)
@@ -13,8 +13,8 @@ public class GUIand41 extends SimpleRectangularSubmodelComponent
        {
                super(model, 1, "GUIand41");
                setSubmodelScale(.4);
-               setInputCount(5);
-               setOutputCount(4);
+               setInputPins("A1", "A2", "A3", "A4", "B");
+               setOutputPins("Y1", "Y2", "Y3", "Y4");
                initSubmodelComponents();
        }
 
@@ -44,9 +44,9 @@ public class GUIand41 extends SimpleRectangularSubmodelComponent
                and2.moveTo(30, 32.5);
                and3.moveTo(30, 57.5);
                and4.moveTo(30, 82.5);
-               cpB2.moveTo(25, 47.5);
-               cpB3.moveTo(25, 72.5);
-               cpB4.moveTo(25, 97.5);
+               cpB2.moveCenterTo(25, 47.5);
+               cpB3.moveCenterTo(25, 72.5);
+               cpB4.moveCenterTo(25, 97.5);
 
                new GUIWire(submodelModifiable, A1, and1.getInputPins().get(0), new Point[0]);
                new GUIWire(submodelModifiable, A2, and2.getInputPins().get(0), new Point[0]);