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%2FGUIAm2901SourceDecode.java;h=f579a83f97b222970ee76aa0beb4027290cfd1b0;hb=5ece0acf049bf9af2933f513fe0206565681f622;hp=832d9951218a952a393f02be938e82b19d2fc954;hpb=01c5d7035474a5eb58f216b6831b2c0d8c174efa;p=Mograsim.git diff --git a/net.mograsim.logic.ui.am2900/src/net/mograsim/logic/ui/model/components/mi/nandbased/am2901/GUIAm2901SourceDecode.java b/net.mograsim.logic.ui.am2900/src/net/mograsim/logic/ui/model/components/mi/nandbased/am2901/GUIAm2901SourceDecode.java index 832d9951..f579a83f 100644 --- a/net.mograsim.logic.ui.am2900/src/net/mograsim/logic/ui/model/components/mi/nandbased/am2901/GUIAm2901SourceDecode.java +++ b/net.mograsim.logic.ui.am2900/src/net/mograsim/logic/ui/model/components/mi/nandbased/am2901/GUIAm2901SourceDecode.java @@ -7,12 +7,18 @@ import net.mograsim.logic.ui.model.components.submodels.SimpleRectangularSubmode 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 GUIAm2901SourceDecode extends SimpleRectangularSubmodelComponent { public GUIAm2901SourceDecode(ViewModelModifiable model) { - super(model, 1, "Am2901SourceDecode"); + this(model, null); + } + + public GUIAm2901SourceDecode(ViewModelModifiable model, String name) + { + super(model, 1, "Am2901SourceDecode", name); setSubmodelScale(.25); setInputPins("I2", "I1", "I0"); setOutputPins("SQ", "RA", "SB", "SA", "RD"); @@ -111,8 +117,7 @@ public class GUIAm2901SourceDecode extends SimpleRectangularSubmodelComponent new GUIWire(submodelModifiable, cpI01, notI0.getPin("A"), new Point(7.5, 95)); new GUIWire(submodelModifiable, cpI01, cpI02, new Point[0]); new GUIWire(submodelModifiable, cpI02, notI0.getPin("B"), new Point[0]); - new GUIWire(submodelModifiable, cpI02, nand23.getPin("B"), new Point(7.5, 112.5), new Point(32.5, 112.5), - new Point(32.5, 105)); + new GUIWire(submodelModifiable, cpI02, nand23.getPin("B"), new Point(7.5, 112.5), new Point(32.5, 112.5), new Point(32.5, 105)); new GUIWire(submodelModifiable, notI2.getPin("Y"), cpNotI2, new Point(32.5, 20)); new GUIWire(submodelModifiable, cpNotI2, nand22.getPin("A"), new Point[0]); new GUIWire(submodelModifiable, cpNotI2, nand23.getPin("A"), new Point(32.5, 95)); @@ -149,4 +154,10 @@ public class GUIAm2901SourceDecode extends SimpleRectangularSubmodelComponent new GUIWire(submodelModifiable, nand41.getPin("Y"), SQ, new Point[0]); new GUIWire(submodelModifiable, nand42.getPin("Y"), RD, new Point[0]); } + + static + { + IndirectGUIComponentCreator.setComponentSupplier(GUIAm2901SourceDecode.class.getCanonicalName(), + (m, p, n) -> new GUIAm2901SourceDecode(m, n)); + } } \ No newline at end of file