Made classes in package "nandbased" usable for JSON
[Mograsim.git] / net.mograsim.logic.ui.am2900 / src / net / mograsim / logic / ui / model / components / mi / nandbased / GUIand.java
index 637750f..b21474e 100644 (file)
@@ -7,6 +7,7 @@ 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
 {
@@ -42,4 +43,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.setComponentProvider(GUIand.class.getCanonicalName(), (m, p) -> new GUIand(m));
+       }
 }
\ No newline at end of file