X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=net.mograsim.logic.ui%2Fsrc%2Fnet%2Fmograsim%2Flogic%2Fui%2Fmodel%2Fcomponents%2Fmi%2Fnandbased%2FGUImux1.java;h=0b920d6c3c94e23fc5328dd934c9d5a29bbabeb6;hb=20aa3391efe7ae7d99861741f8b5594f88eae1d9;hp=72b96b6a6fbe018ba08b51d0e000a9705d5fd7d4;hpb=b5db210e5d556427e467dbf6a141aa6193428343;p=Mograsim.git diff --git a/net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUImux1.java b/net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUImux1.java index 72b96b6a..0b920d6c 100644 --- a/net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUImux1.java +++ b/net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUImux1.java @@ -13,10 +13,9 @@ public class GUImux1 extends SimpleRectangularSubmodelComponent public GUImux1(ViewModelModifiable model) { super(model, 1, "GUImux1"); - setSize(80, 40); setSubmodelScale(.4); - setInputCount(3); - setOutputCount(1); + setInputPins("S0", "I0", "I1"); + setOutputPins("Y"); initSubmodelComponents(); } @@ -33,31 +32,26 @@ public class GUImux1 extends SimpleRectangularSubmodelComponent GUINandGate nandI1 = new GUINandGate(submodelModifiable, 1); GUINandGate nandY = new GUINandGate(submodelModifiable, 1); + WireCrossPoint cp0 = new WireCrossPoint(submodelModifiable, 1); + WireCrossPoint cp1 = new WireCrossPoint(submodelModifiable, 1); + nandS0.moveTo(10, 7.5); nandI0.moveTo(35, 22.5); nandI1.moveTo(35, 47.5); nandY.moveTo(60, 30); - - WireCrossPoint cp0 = new WireCrossPoint(submodelModifiable, 1); - WireCrossPoint cp1 = new WireCrossPoint(submodelModifiable, 1); - - cp0.moveTo(5, 12.5); - cp1.moveTo(5, 22.5); + cp0.moveCenterTo(5, 12.5); + cp1.moveCenterTo(5, 22.5); new GUIWire(submodelModifiable, S0, cp0, new Point[0]); new GUIWire(submodelModifiable, cp0, nandS0.getInputPins().get(0), new Point[0]); new GUIWire(submodelModifiable, cp0, cp1, new Point[0]); new GUIWire(submodelModifiable, cp1, nandS0.getInputPins().get(1), new Point[0]); - new GUIWire(submodelModifiable, nandS0.getOutputPin(), nandI0.getInputPins().get(0)); new GUIWire(submodelModifiable, I0, nandI0.getInputPins().get(1), new Point[0]); - new GUIWire(submodelModifiable, cp1, nandI1.getInputPins().get(0), new Point(5, 52.5)); new GUIWire(submodelModifiable, I1, nandI1.getInputPins().get(1), new Point[0]); - new GUIWire(submodelModifiable, nandI0.getOutputPin(), nandY.getInputPins().get(0)); new GUIWire(submodelModifiable, nandI1.getOutputPin(), nandY.getInputPins().get(1)); - new GUIWire(submodelModifiable, nandY.getOutputPin(), Y); } } \ No newline at end of file