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
{
public GUIhalfadder(ViewModelModifiable model)
{
- super(model, 1, "GUIhalfadder");
+ this(model, null);
+ }
+
+ public GUIhalfadder(ViewModelModifiable model, String name)
+ {
+ super(model, 1, "GUIhalfadder", name);
setSubmodelScale(.4);
setInputPins("A", "B");
setOutputPins("Y", "_Z");
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.setComponentSupplier(GUIhalfadder.class.getCanonicalName(), (m, p, n) -> new GUIhalfadder(m, n));
+ }
}
\ No newline at end of file