X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=net.mograsim.logic.ui.am2900%2Fsrc%2Fnet%2Fmograsim%2Flogic%2Fui%2Fmodel%2Fcomponents%2Fmi%2Fnandbased%2Fam2901%2FGUIAm2901DestDecode.java;h=f6bd0bb9ffbfe656180521641b5ad58a0992924b;hb=5ece0acf049bf9af2933f513fe0206565681f622;hp=59df09bc32e1ad6bba4fb9bea37d082de757b6a6;hpb=f14ea37d69488dd51518a36413af7176916b8bd7;p=Mograsim.git diff --git a/net.mograsim.logic.ui.am2900/src/net/mograsim/logic/ui/model/components/mi/nandbased/am2901/GUIAm2901DestDecode.java b/net.mograsim.logic.ui.am2900/src/net/mograsim/logic/ui/model/components/mi/nandbased/am2901/GUIAm2901DestDecode.java index 59df09bc..f6bd0bb9 100644 --- a/net.mograsim.logic.ui.am2900/src/net/mograsim/logic/ui/model/components/mi/nandbased/am2901/GUIAm2901DestDecode.java +++ b/net.mograsim.logic.ui.am2900/src/net/mograsim/logic/ui/model/components/mi/nandbased/am2901/GUIAm2901DestDecode.java @@ -2,17 +2,23 @@ package net.mograsim.logic.ui.model.components.mi.nandbased.am2901; import net.haspamelodica.swt.helper.swtobjectwrappers.Point; import net.mograsim.logic.ui.model.ViewModelModifiable; -import net.mograsim.logic.ui.model.components.GUINandGate; -import net.mograsim.logic.ui.model.components.SimpleRectangularSubmodelComponent; +import net.mograsim.logic.ui.model.components.atomic.GUINandGate; +import net.mograsim.logic.ui.model.components.submodels.SimpleRectangularSubmodelComponent; import net.mograsim.logic.ui.model.wires.GUIWire; import net.mograsim.logic.ui.model.wires.Pin; import net.mograsim.logic.ui.model.wires.WireCrossPoint; +import net.mograsim.logic.ui.serializing.IndirectGUIComponentCreator; public class GUIAm2901DestDecode extends SimpleRectangularSubmodelComponent { public GUIAm2901DestDecode(ViewModelModifiable model) { - super(model, 1, "GUIAm2901DestDecode"); + this(model, null); + } + + public GUIAm2901DestDecode(ViewModelModifiable model, String name) + { + super(model, 1, "GUIAm2901DestDecode", name); setSubmodelScale(.25); setInputPins("I8", "I7", "I6"); setOutputPins("NSH", "RSH", "RAMWE", "YF", "LSH", "QWE"); @@ -117,8 +123,7 @@ public class GUIAm2901DestDecode extends SimpleRectangularSubmodelComponent new GUIWire(submodelModifiable, cpNotI81, cpNotI82, new Point[0]); new GUIWire(submodelModifiable, cpNotI82, nandRAMWE.getPin("A"), new Point[0]); new GUIWire(submodelModifiable, cpNotI82, nandI7NotI8.getPin("A"), new Point(45, 95)); - new GUIWire(submodelModifiable, cpI73, nandI7NotI8.getPin("B"), new Point(10, 115), new Point(45, 115), - new Point(45, 105)); + new GUIWire(submodelModifiable, cpI73, nandI7NotI8.getPin("B"), new Point(10, 115), new Point(45, 115), new Point(45, 105)); new GUIWire(submodelModifiable, nandI8I7.getPin("Y"), cpNandI8I7, new Point(40, 100)); new GUIWire(submodelModifiable, cpNandI8I7, nandLSH.getPin("A"), new Point[0]); new GUIWire(submodelModifiable, cpNandI8I7, nandLSH.getPin("B"), new Point(40, 145)); @@ -136,12 +141,17 @@ public class GUIAm2901DestDecode extends SimpleRectangularSubmodelComponent new GUIWire(submodelModifiable, cpNotI6, nandQWE.getPin("B"), new Point[0]); new GUIWire(submodelModifiable, notRSH.getPin("Y"), RSH, new Point(130, 20), new Point(130, 60)); new GUIWire(submodelModifiable, andI7NotI8.getPin("Y"), nandYF.getPin("A")); - new GUIWire(submodelModifiable, cpNotI6, nandYF.getPin("B"), new Point(75, 170), new Point(105, 170), - new Point(105, 120)); + new GUIWire(submodelModifiable, cpNotI6, nandYF.getPin("B"), new Point(75, 170), new Point(105, 170), new Point(105, 120)); new GUIWire(submodelModifiable, nandQWE.getPin("Y"), cpNandQWE, new Point(110, 155)); new GUIWire(submodelModifiable, cpNandQWE, notQWE.getPin("A"), new Point[0]); new GUIWire(submodelModifiable, cpNandQWE, notQWE.getPin("B"), new Point(110, 225)); new GUIWire(submodelModifiable, nandYF.getPin("Y"), YF); new GUIWire(submodelModifiable, notQWE.getPin("Y"), QWE, new Point[0]); } + + static + { + IndirectGUIComponentCreator.setComponentSupplier(GUIAm2901DestDecode.class.getCanonicalName(), + (m, p, n) -> new GUIAm2901DestDecode(m, n)); + } } \ No newline at end of file