X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=net.mograsim.logic.model%2Fsrc%2Fnet%2Fmograsim%2Flogic%2Fmodel%2Fexamples%2FRSLatchExample.java;h=2c71dc11b87e116ed70141c795fbcd08c19d279a;hb=93b398d6271a538a2a4c9f4de07a3b4a8a2a7fd4;hp=005b39ac6d2766bd6fbf7ada2122d58f09de3921;hpb=b5d8c2d71e27350ea7c9314e40df5bb0584271cd;p=Mograsim.git diff --git a/net.mograsim.logic.model/src/net/mograsim/logic/model/examples/RSLatchExample.java b/net.mograsim.logic.model/src/net/mograsim/logic/model/examples/RSLatchExample.java index 005b39ac..2c71dc11 100644 --- a/net.mograsim.logic.model/src/net/mograsim/logic/model/examples/RSLatchExample.java +++ b/net.mograsim.logic.model/src/net/mograsim/logic/model/examples/RSLatchExample.java @@ -3,11 +3,11 @@ package net.mograsim.logic.model.examples; import net.haspamelodica.swt.helper.swtobjectwrappers.Point; import net.mograsim.logic.model.SimpleLogicUIStandalone; import net.mograsim.logic.model.model.ViewModelModifiable; -import net.mograsim.logic.model.model.components.atomic.GUIManualSwitch; -import net.mograsim.logic.model.model.components.atomic.GUINotGate; -import net.mograsim.logic.model.model.components.atomic.GUIOrGate; -import net.mograsim.logic.model.model.wires.GUIWire; -import net.mograsim.logic.model.model.wires.WireCrossPoint; +import net.mograsim.logic.model.model.components.atomic.ModelManualSwitch; +import net.mograsim.logic.model.model.components.atomic.ModelNotGate; +import net.mograsim.logic.model.model.components.atomic.ModelOrGate; +import net.mograsim.logic.model.model.wires.ModelWire; +import net.mograsim.logic.model.model.wires.ModelWireCrossPoint; public class RSLatchExample { @@ -16,46 +16,46 @@ public class RSLatchExample SimpleLogicUIStandalone.executeVisualisation(RSLatchExample::createRSLatchExample); } - @SuppressWarnings("unused") // for GUIWires being created + @SuppressWarnings("unused") // for Wires being created public static void createRSLatchExample(ViewModelModifiable model) { - GUIManualSwitch rIn = new GUIManualSwitch(model); + ModelManualSwitch rIn = new ModelManualSwitch(model, 1); rIn.moveTo(100, 100); - GUIManualSwitch sIn = new GUIManualSwitch(model); + ModelManualSwitch sIn = new ModelManualSwitch(model, 1); sIn.moveTo(100, 200); - GUIOrGate or1 = new GUIOrGate(model, 1); + ModelOrGate or1 = new ModelOrGate(model, 1); or1.moveTo(160, 102.5); - new GUIWire(model, rIn.getOutputPin(), or1.getPin("A")); + new ModelWire(model, rIn.getOutputPin(), or1.getPin("A")); - GUIOrGate or2 = new GUIOrGate(model, 1); + ModelOrGate or2 = new ModelOrGate(model, 1); or2.moveTo(160, 192.5); - new GUIWire(model, sIn.getOutputPin(), or2.getPin("B")); + new ModelWire(model, sIn.getOutputPin(), or2.getPin("B")); - GUINotGate not1 = new GUINotGate(model, 1); + ModelNotGate not1 = new ModelNotGate(model, 1); not1.moveTo(200, 107.5); - new GUIWire(model, or1.getPin("Y"), not1.getPin("A")); + new ModelWire(model, or1.getPin("Y"), not1.getPin("A")); - GUINotGate not2 = new GUINotGate(model, 1); + ModelNotGate not2 = new ModelNotGate(model, 1); not2.moveTo(200, 197.5); - new GUIWire(model, or2.getPin("Y"), not2.getPin("A")); + new ModelWire(model, or2.getPin("Y"), not2.getPin("A")); - WireCrossPoint p1 = new WireCrossPoint(model, 1); + ModelWireCrossPoint p1 = new ModelWireCrossPoint(model, 1); p1.moveCenterTo(250, 112.5); - new GUIWire(model, not1.getPin("Y"), p1); - new GUIWire(model, p1, or2.getPin("A"), new Point(250, 130), new Point(140, 185), new Point(140, 197.5)); + new ModelWire(model, not1.getPin("Y"), p1); + new ModelWire(model, p1, or2.getPin("A"), new Point(250, 130), new Point(140, 185), new Point(140, 197.5)); - WireCrossPoint p2 = new WireCrossPoint(model, 1); + ModelWireCrossPoint p2 = new ModelWireCrossPoint(model, 1); p2.moveCenterTo(250, 202.5); - new GUIWire(model, not2.getPin("Y"), p2); - new GUIWire(model, p2, or1.getPin("B"), new Point(250, 185), new Point(140, 130), new Point(140, 117.5)); + new ModelWire(model, not2.getPin("Y"), p2); + new ModelWire(model, p2, or1.getPin("B"), new Point(250, 185), new Point(140, 130), new Point(140, 117.5)); - WireCrossPoint o1 = new WireCrossPoint(model, 1); + ModelWireCrossPoint o1 = new ModelWireCrossPoint(model, 1); o1.moveCenterTo(270, 112.5); - new GUIWire(model, p1, o1); + new ModelWire(model, p1, o1); - WireCrossPoint o2 = new WireCrossPoint(model, 1); + ModelWireCrossPoint o2 = new ModelWireCrossPoint(model, 1); o2.moveCenterTo(270, 202.5); - new GUIWire(model, p2, o2); + new ModelWire(model, p2, o2); } } \ No newline at end of file