X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=net.mograsim.logic.ui%2Fsrc%2Fnet%2Fmograsim%2Flogic%2Fui%2Fmodel%2Fcomponents%2Fmi%2Fnandbased%2FGUInot4.java;h=e3db01033dc69ec154d4645b156abb2164631629;hb=19ee1a7fdb06a1df65cd7df78fed935124496707;hp=75e6398ee2f9fc779574bb84e235c08b43091b95;hpb=29948edc1851d17311c50c7eff34070a0dc36ceb;p=Mograsim.git diff --git a/net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUInot4.java b/net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUInot4.java index 75e6398e..e3db0103 100644 --- a/net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUInot4.java +++ b/net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUInot4.java @@ -22,14 +22,14 @@ public class GUInot4 extends SimpleRectangularSubmodelComponent @SuppressWarnings("unused") // for GUIWires being created private void initSubmodelComponents() { - Pin A1 = getInputSubmodelPins().get(0); - Pin A2 = getInputSubmodelPins().get(1); - Pin A3 = getInputSubmodelPins().get(2); - Pin A4 = getInputSubmodelPins().get(3); - Pin Y1 = getOutputSubmodelPins().get(0); - Pin Y2 = getOutputSubmodelPins().get(1); - Pin Y3 = getOutputSubmodelPins().get(2); - Pin Y4 = getOutputSubmodelPins().get(3); + Pin A1 = getSubmodelPin("A1"); + Pin A2 = getSubmodelPin("A2"); + Pin A3 = getSubmodelPin("A3"); + Pin A4 = getSubmodelPin("A4"); + Pin Y1 = getSubmodelPin("Y1"); + Pin Y2 = getSubmodelPin("Y2"); + Pin Y3 = getSubmodelPin("Y3"); + Pin Y4 = getSubmodelPin("Y4"); GUINandGate nand1 = new GUINandGate(submodelModifiable, 1); GUINandGate nand2 = new GUINandGate(submodelModifiable, 1); @@ -54,17 +54,17 @@ public class GUInot4 extends SimpleRectangularSubmodelComponent new GUIWire(submodelModifiable, A2, cp2, new Point[0]); new GUIWire(submodelModifiable, A3, cp3, new Point[0]); new GUIWire(submodelModifiable, A4, cp4, new Point[0]); - new GUIWire(submodelModifiable, cp1, nand1.getInputPins().get(0), new Point(15, 7.5)); - new GUIWire(submodelModifiable, cp2, nand2.getInputPins().get(0), new Point(15, 32.5)); - new GUIWire(submodelModifiable, cp3, nand3.getInputPins().get(0), new Point(15, 57.5)); - new GUIWire(submodelModifiable, cp4, nand4.getInputPins().get(0), new Point(15, 82.5)); - new GUIWire(submodelModifiable, cp1, nand1.getInputPins().get(1), new Point(15, 17.5)); - new GUIWire(submodelModifiable, cp2, nand2.getInputPins().get(1), new Point(15, 42.5)); - new GUIWire(submodelModifiable, cp3, nand3.getInputPins().get(1), new Point(15, 67.5)); - new GUIWire(submodelModifiable, cp4, nand4.getInputPins().get(1), new Point(15, 92.5)); - new GUIWire(submodelModifiable, nand1.getOutputPin(), Y1, new Point[0]); - new GUIWire(submodelModifiable, nand2.getOutputPin(), Y2, new Point[0]); - new GUIWire(submodelModifiable, nand3.getOutputPin(), Y3, new Point[0]); - new GUIWire(submodelModifiable, nand4.getOutputPin(), Y4, new Point[0]); + new GUIWire(submodelModifiable, cp1, nand1.getPin("A"), new Point(15, 7.5)); + new GUIWire(submodelModifiable, cp2, nand2.getPin("A"), new Point(15, 32.5)); + new GUIWire(submodelModifiable, cp3, nand3.getPin("A"), new Point(15, 57.5)); + new GUIWire(submodelModifiable, cp4, nand4.getPin("A"), new Point(15, 82.5)); + new GUIWire(submodelModifiable, cp1, nand1.getPin("B"), new Point(15, 17.5)); + new GUIWire(submodelModifiable, cp2, nand2.getPin("B"), new Point(15, 42.5)); + new GUIWire(submodelModifiable, cp3, nand3.getPin("B"), new Point(15, 67.5)); + new GUIWire(submodelModifiable, cp4, nand4.getPin("B"), new Point(15, 92.5)); + new GUIWire(submodelModifiable, nand1.getPin("Y"), Y1, new Point[0]); + new GUIWire(submodelModifiable, nand2.getPin("Y"), Y2, new Point[0]); + new GUIWire(submodelModifiable, nand3.getPin("Y"), Y3, new Point[0]); + new GUIWire(submodelModifiable, nand4.getPin("Y"), Y4, new Point[0]); } } \ No newline at end of file