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.model.wires.WireCrossPoint;
+import net.mograsim.logic.ui.serializing.IndirectGUIComponentCreator;
public class GUIor4 extends SimpleRectangularSubmodelComponent
{
public GUIor4(ViewModelModifiable model)
{
- super(model, 1, "GUIor4");
+ this(model, null);
+ }
+
+ public GUIor4(ViewModelModifiable model, String name)
+ {
+ super(model, 1, "GUIor4", name);
setSubmodelScale(.2);
setInputPins("A1", "A2", "A3", "A4");
setOutputPins("Y");
new GUIWire(submodelModifiable, nor34.getPin("Y"), or1234.getPin("B"));
new GUIWire(submodelModifiable, or1234.getPin("Y"), Y);
}
+
+ static
+ {
+ IndirectGUIComponentCreator.setComponentSupplier(GUIor4.class.getCanonicalName(), (m, p, n) -> new GUIor4(m, n));
+ }
}
\ No newline at end of file