X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=net.mograsim.logic.ui.am2900%2Fsrc%2Fnet%2Fmograsim%2Flogic%2Fui%2Fmodel%2Fcomponents%2Fmi%2Fnandbased%2FGUIand.java;fp=net.mograsim.logic.ui.am2900%2Fsrc%2Fnet%2Fmograsim%2Flogic%2Fui%2Fmodel%2Fcomponents%2Fmi%2Fnandbased%2FGUIand.java;h=0000000000000000000000000000000000000000;hb=b5d8c2d71e27350ea7c9314e40df5bb0584271cd;hp=064fee392dfc3c4a320582cbb68227348237265d;hpb=69cb6725ef670328959d55649257ded6ac924b33;p=Mograsim.git diff --git a/net.mograsim.logic.ui.am2900/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUIand.java b/net.mograsim.logic.ui.am2900/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUIand.java deleted file mode 100644 index 064fee39..00000000 --- a/net.mograsim.logic.ui.am2900/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUIand.java +++ /dev/null @@ -1,56 +0,0 @@ -package net.mograsim.logic.ui.model.components.mi.nandbased; - -import net.haspamelodica.swt.helper.swtobjectwrappers.Point; -import net.mograsim.logic.ui.model.ViewModelModifiable; -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 GUIand extends SimpleRectangularSubmodelComponent -{ - public GUIand(ViewModelModifiable model) - { - this(model, null); - } - - public GUIand(ViewModelModifiable model, String name) - { - super(model, 1, "GUIand", name); - setSubmodelScale(.4); - setInputPins("A", "B"); - setOutputPins("Y"); - initSubmodelComponents(); - } - - @SuppressWarnings("unused") // for GUIWires being created - private void initSubmodelComponents() - { - Pin A = getSubmodelPin("A"); - Pin B = getSubmodelPin("B"); - Pin Y = getSubmodelPin("Y"); - - GUINandGate nand = new GUINandGate(submodelModifiable, 1); - GUINandGate not = new GUINandGate(submodelModifiable, 1); - - WireCrossPoint cp1 = new WireCrossPoint(submodelModifiable, 1); - - nand.moveTo(20, 15); - not.moveTo(50, 15); - cp1.moveCenterTo(45, 25); - - new GUIWire(submodelModifiable, A, nand.getPin("A")); - new GUIWire(submodelModifiable, B, nand.getPin("B")); - new GUIWire(submodelModifiable, nand.getPin("Y"), cp1, new Point[0]); - new GUIWire(submodelModifiable, cp1, not.getPin("A"), new Point(45, 20)); - new GUIWire(submodelModifiable, cp1, not.getPin("B"), new Point(45, 30)); - new GUIWire(submodelModifiable, not.getPin("Y"), Y); - } - - static - { - IndirectGUIComponentCreator.setComponentSupplier(GUIand.class.getCanonicalName(), (m, p, n) -> new GUIand(m, n)); - } -} \ No newline at end of file