import net.haspamelodica.swt.helper.swtobjectwrappers.Point;
import net.mograsim.logic.ui.model.ViewModelModifiable;
-import net.mograsim.logic.ui.model.components.GUINandGate;
-import net.mograsim.logic.ui.model.components.SimpleRectangularSubmodelComponent;
+import net.mograsim.logic.ui.model.components.atomic.GUINandGate;
+import net.mograsim.logic.ui.model.components.submodels.SimpleRectangularSubmodelComponent;
import net.mograsim.logic.ui.model.wires.GUIWire;
import net.mograsim.logic.ui.model.wires.Pin;
+import net.mograsim.logic.ui.serializing.IndirectGUIComponentCreator;
public class GUIfulladder extends SimpleRectangularSubmodelComponent
{
public GUIfulladder(ViewModelModifiable model)
{
- super(model, 1, "GUIfulladder");
+ this(model, null);
+ }
+
+ public GUIfulladder(ViewModelModifiable model, String name)
+ {
+ super(model, 1, "GUIfulladder", name);
setSubmodelScale(.4);
setInputPins("A", "B", "C");
setOutputPins("Y", "Z");
new Point(52.5, 35), new Point(52.5, 45));
new GUIWire(submodelModifiable, nandZ.getPin("Y"), Z);
}
+
+ static
+ {
+ IndirectGUIComponentCreator.setComponentSupplier(GUIfulladder.class.getCanonicalName(), (m, p, n) -> new GUIfulladder(m, n));
+ }
}
\ No newline at end of file