Made classes in package "nandbased" usable for JSON
[Mograsim.git] / net.mograsim.logic.ui.am2900 / src / net / mograsim / logic / ui / model / components / mi / nandbased / GUIhalfadder.java
index d68c892..7a80a95 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 GUIhalfadder extends SimpleRectangularSubmodelComponent
 {
@@ -58,4 +59,9 @@ public class GUIhalfadder extends SimpleRectangularSubmodelComponent
                new GUIWire(submodelModifiable, nandYB.getPin("Y"), nandY.getPin("B"), new Point(62.5, 37.5), new Point(62.5, 17.5));
                new GUIWire(submodelModifiable, nandY.getPin("Y"), Y, new Point[0]);
        }
+
+       static
+       {
+               IndirectGUIComponentCreator.setComponentProvider(GUIhalfadder.class.getCanonicalName(), (m, p) -> new GUIhalfadder(m));
+       }
 }
\ No newline at end of file