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%2FGUIand.java;h=064fee392dfc3c4a320582cbb68227348237265d;hb=5ece0acf049bf9af2933f513fe0206565681f622;hp=637750f87102af9312781078a8a3ea047fbeb29e;hpb=01c5d7035474a5eb58f216b6831b2c0d8c174efa;p=Mograsim.git diff --git a/net.mograsim.logic.ui.am2900/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUIand.java b/net.mograsim.logic.ui.am2900/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUIand.java index 637750f8..064fee39 100644 --- a/net.mograsim.logic.ui.am2900/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUIand.java +++ b/net.mograsim.logic.ui.am2900/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUIand.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 GUIand extends SimpleRectangularSubmodelComponent { public GUIand(ViewModelModifiable model) { - super(model, 1, "GUIand"); + this(model, null); + } + + public GUIand(ViewModelModifiable model, String name) + { + super(model, 1, "GUIand", name); setSubmodelScale(.4); setInputPins("A", "B"); setOutputPins("Y"); @@ -42,4 +48,9 @@ public class GUIand extends SimpleRectangularSubmodelComponent new GUIWire(submodelModifiable, cp1, not.getPin("B"), new Point(45, 30)); new GUIWire(submodelModifiable, not.getPin("Y"), Y); } + + static + { + IndirectGUIComponentCreator.setComponentSupplier(GUIand.class.getCanonicalName(), (m, p, n) -> new GUIand(m, n)); + } } \ No newline at end of file