X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=net.mograsim.logic.ui%2Fsrc%2Fnet%2Fmograsim%2Flogic%2Fui%2Fmodel%2Fcomponents%2Fmi%2Fnandbased%2FGUIfulladder.java;h=12bddce7910e8bd50a19087f88bc828a0d568941;hb=19ee1a7fdb06a1df65cd7df78fed935124496707;hp=1f424a9d0d3065e0e258feab748523b5ce30acae;hpb=29948edc1851d17311c50c7eff34070a0dc36ceb;p=Mograsim.git diff --git a/net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUIfulladder.java b/net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUIfulladder.java index 1f424a9d..12bddce7 100644 --- a/net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUIfulladder.java +++ b/net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUIfulladder.java @@ -21,11 +21,11 @@ public class GUIfulladder extends SimpleRectangularSubmodelComponent @SuppressWarnings("unused") // for GUIWires being created private void initSubmodelComponents() { - Pin A = getInputSubmodelPins().get(0); - Pin B = getInputSubmodelPins().get(1); - Pin C = getInputSubmodelPins().get(2); - Pin Y = getOutputSubmodelPins().get(0); - Pin Z = getOutputSubmodelPins().get(1); + Pin A = getSubmodelPin("A"); + Pin B = getSubmodelPin("B"); + Pin C = getSubmodelPin("C"); + Pin Y = getSubmodelPin("Y"); + Pin Z = getSubmodelPin("Z"); GUIhalfadder halfBC = new GUIhalfadder(submodelModifiable); GUIhalfadder halfAY = new GUIhalfadder(submodelModifiable); @@ -35,14 +35,14 @@ public class GUIfulladder extends SimpleRectangularSubmodelComponent halfBC.moveTo(5, 40); nandZ.moveTo(57.5, 40); - new GUIWire(submodelModifiable, A, halfAY.getInputPins().get(0), new Point[0]); - new GUIWire(submodelModifiable, B, halfBC.getInputPins().get(0)); - new GUIWire(submodelModifiable, C, halfBC.getInputPins().get(1)); - new GUIWire(submodelModifiable, halfBC.getOutputPins().get(0), halfAY.getInputPins().get(1)); - new GUIWire(submodelModifiable, halfBC.getOutputPins().get(1), nandZ.getInputPins().get(1), new Point[0]); - new GUIWire(submodelModifiable, halfAY.getOutputPins().get(0), Y, new Point[0]); - new GUIWire(submodelModifiable, halfAY.getOutputPins().get(1), nandZ.getInputPins().get(0), new Point(82.5, 22.5), - new Point(82.5, 35), new Point(52.5, 35), new Point(52.5, 45)); - new GUIWire(submodelModifiable, nandZ.getOutputPin(), Z); + new GUIWire(submodelModifiable, A, halfAY.getPin("A"), new Point[0]); + new GUIWire(submodelModifiable, B, halfBC.getPin("A")); + new GUIWire(submodelModifiable, C, halfBC.getPin("B")); + new GUIWire(submodelModifiable, halfBC.getPin("Y"), halfAY.getPin("B")); + new GUIWire(submodelModifiable, halfBC.getPin("_Z"), nandZ.getPin("B"), new Point[0]); + new GUIWire(submodelModifiable, halfAY.getPin("Y"), Y, new Point[0]); + new GUIWire(submodelModifiable, halfAY.getPin("_Z"), nandZ.getPin("A"), new Point(82.5, 22.5), new Point(82.5, 35), + new Point(52.5, 35), new Point(52.5, 45)); + new GUIWire(submodelModifiable, nandZ.getPin("Y"), Z); } } \ No newline at end of file