X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=net.mograsim.logic.ui%2Fsrc%2Fnet%2Fmograsim%2Flogic%2Fui%2Fmodel%2Fcomponents%2Fmi%2Fnandbased%2FGUIxor.java;h=d3568e49be1bc384916cc824a38bbaf5058ed04f;hb=19ee1a7fdb06a1df65cd7df78fed935124496707;hp=c8adf057f5081696a6183e3835ac3e15f9f4966d;hpb=29948edc1851d17311c50c7eff34070a0dc36ceb;p=Mograsim.git diff --git a/net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUIxor.java b/net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUIxor.java index c8adf057..d3568e49 100644 --- a/net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUIxor.java +++ b/net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUIxor.java @@ -22,9 +22,9 @@ public class GUIxor extends SimpleRectangularSubmodelComponent @SuppressWarnings("unused") // for GUIWires being created private void initSubmodelComponents() { - Pin A = getInputSubmodelPins().get(0); - Pin B = getInputSubmodelPins().get(1); - Pin Y = getOutputSubmodelPins().get(0); + Pin A = getSubmodelPin("A"); + Pin B = getSubmodelPin("B"); + Pin Y = getSubmodelPin("Y"); GUINandGate nandAB = new GUINandGate(submodelModifiable, 1); GUINandGate nandYA = new GUINandGate(submodelModifiable, 1); @@ -45,15 +45,15 @@ public class GUIxor extends SimpleRectangularSubmodelComponent new GUIWire(submodelModifiable, A, cpA, new Point[0]); new GUIWire(submodelModifiable, B, cpB, new Point[0]); - new GUIWire(submodelModifiable, cpA, nandAB.getInputPins().get(0), new Point(5, 20)); - new GUIWire(submodelModifiable, cpB, nandAB.getInputPins().get(1), new Point(5, 30)); - new GUIWire(submodelModifiable, nandAB.getOutputPin(), cpAB); - new GUIWire(submodelModifiable, cpAB, nandYA.getInputPins().get(1), new Point(30, 17.5)); - new GUIWire(submodelModifiable, cpAB, nandYB.getInputPins().get(0), new Point(30, 32.5)); - new GUIWire(submodelModifiable, cpA, nandYA.getInputPins().get(0), new Point(5, 7.5)); - new GUIWire(submodelModifiable, cpB, nandYB.getInputPins().get(1), new Point(5, 42.5)); - new GUIWire(submodelModifiable, nandYA.getOutputPin(), nandY.getInputPins().get(0)); - new GUIWire(submodelModifiable, nandYB.getOutputPin(), nandY.getInputPins().get(1)); - new GUIWire(submodelModifiable, nandY.getOutputPin(), Y); + new GUIWire(submodelModifiable, cpA, nandAB.getPin("A"), new Point(5, 20)); + new GUIWire(submodelModifiable, cpB, nandAB.getPin("B"), new Point(5, 30)); + new GUIWire(submodelModifiable, nandAB.getPin("Y"), cpAB); + new GUIWire(submodelModifiable, cpAB, nandYA.getPin("B"), new Point(30, 17.5)); + new GUIWire(submodelModifiable, cpAB, nandYB.getPin("A"), new Point(30, 32.5)); + new GUIWire(submodelModifiable, cpA, nandYA.getPin("A"), new Point(5, 7.5)); + new GUIWire(submodelModifiable, cpB, nandYB.getPin("B"), new Point(5, 42.5)); + new GUIWire(submodelModifiable, nandYA.getPin("Y"), nandY.getPin("A")); + new GUIWire(submodelModifiable, nandYB.getPin("Y"), nandY.getPin("B")); + new GUIWire(submodelModifiable, nandY.getPin("Y"), Y); } } \ No newline at end of file