X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=net.mograsim.logic.ui%2Fsrc%2Fnet%2Fmograsim%2Flogic%2Fui%2Fmodel%2Fcomponents%2Fmi%2Fnandbased%2FGUIand.java;h=018e9bb1b244adb1d9ffa63197c557cb3ec9a452;hb=19ee1a7fdb06a1df65cd7df78fed935124496707;hp=cb7f6b688795c6340432fbf80cae3ae69d0d57db;hpb=29948edc1851d17311c50c7eff34070a0dc36ceb;p=Mograsim.git diff --git a/net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUIand.java b/net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUIand.java index cb7f6b68..018e9bb1 100644 --- a/net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUIand.java +++ b/net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUIand.java @@ -22,9 +22,9 @@ public class GUIand 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 nand = new GUINandGate(submodelModifiable, 1); GUINandGate not = new GUINandGate(submodelModifiable, 1); @@ -35,11 +35,11 @@ public class GUIand extends SimpleRectangularSubmodelComponent not.moveTo(50, 15); cp1.moveCenterTo(45, 25); - new GUIWire(submodelModifiable, A, nand.getInputPins().get(0)); - new GUIWire(submodelModifiable, B, nand.getInputPins().get(1)); - new GUIWire(submodelModifiable, nand.getOutputPin(), cp1, new Point[0]); - new GUIWire(submodelModifiable, cp1, not.getInputPins().get(0), new Point(45, 20)); - new GUIWire(submodelModifiable, cp1, not.getInputPins().get(1), new Point(45, 30)); - new GUIWire(submodelModifiable, not.getOutputPin(), Y); + new GUIWire(submodelModifiable, A, nand.getPin("A")); + new GUIWire(submodelModifiable, B, nand.getPin("B")); + new GUIWire(submodelModifiable, nand.getPin("Y"), cp1, new Point[0]); + new GUIWire(submodelModifiable, cp1, not.getPin("A"), new Point(45, 20)); + new GUIWire(submodelModifiable, cp1, not.getPin("B"), new Point(45, 30)); + new GUIWire(submodelModifiable, not.getPin("Y"), Y); } } \ No newline at end of file