X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=net.mograsim.logic.ui%2Fsrc%2Fnet%2Fmograsim%2Flogic%2Fui%2Fexamples%2FRSLatchExample.java;h=8c0c4ac291f86a2dd794d92b22025361774d7859;hb=f84fb965a1f4dc6d6675445426d4e68aa5b989fb;hp=af91d1f1ecadddd08c0cace8d0d4b1865b45d4e5;hpb=07faf07e3acb8b2afdc2bf65a46bc868faaed0f8;p=Mograsim.git diff --git a/net.mograsim.logic.ui/src/net/mograsim/logic/ui/examples/RSLatchExample.java b/net.mograsim.logic.ui/src/net/mograsim/logic/ui/examples/RSLatchExample.java index af91d1f1..8c0c4ac2 100644 --- a/net.mograsim.logic.ui/src/net/mograsim/logic/ui/examples/RSLatchExample.java +++ b/net.mograsim.logic.ui/src/net/mograsim/logic/ui/examples/RSLatchExample.java @@ -1,13 +1,13 @@ package net.mograsim.logic.ui.examples; +import net.haspamelodica.swt.helper.swtobjectwrappers.Point; import net.mograsim.logic.ui.SimpleLogicUIStandalone; -import net.mograsim.logic.ui.model.ViewModel; +import net.mograsim.logic.ui.model.ViewModelModifiable; import net.mograsim.logic.ui.model.components.GUIManualSwitch; import net.mograsim.logic.ui.model.components.GUINotGate; import net.mograsim.logic.ui.model.components.GUIOrGate; import net.mograsim.logic.ui.model.wires.GUIWire; import net.mograsim.logic.ui.model.wires.WireCrossPoint; -import net.haspamelodica.swt.helper.swtobjectwrappers.Point; public class RSLatchExample { @@ -17,7 +17,7 @@ public class RSLatchExample } @SuppressWarnings("unused") // for GUIWires being created - public static void createRSLatchExample(ViewModel model) + public static void createRSLatchExample(ViewModelModifiable model) { GUIManualSwitch rIn = new GUIManualSwitch(model); rIn.moveTo(100, 100); @@ -42,20 +42,20 @@ public class RSLatchExample WireCrossPoint p1 = new WireCrossPoint(model, 1); p1.moveTo(250, 112.5); - new GUIWire(model, not1.getOutputPin(), p1.getPin()); - new GUIWire(model, p1.getPin(), or2.getInputPins().get(0), new Point(250, 130), new Point(140, 185), new Point(140, 197.5)); + new GUIWire(model, not1.getOutputPin(), p1); + new GUIWire(model, p1, or2.getInputPins().get(0), new Point(250, 130), new Point(140, 185), new Point(140, 197.5)); WireCrossPoint p2 = new WireCrossPoint(model, 1); p2.moveTo(250, 202.5); - new GUIWire(model, not2.getOutputPin(), p2.getPin()); - new GUIWire(model, p2.getPin(), or1.getInputPins().get(1), new Point(250, 185), new Point(140, 130), new Point(140, 117.5)); + new GUIWire(model, not2.getOutputPin(), p2); + new GUIWire(model, p2, or1.getInputPins().get(1), new Point(250, 185), new Point(140, 130), new Point(140, 117.5)); WireCrossPoint o1 = new WireCrossPoint(model, 1); o1.moveTo(270, 112.5); - new GUIWire(model, p1.getPin(), o1.getPin()); + new GUIWire(model, p1, o1); WireCrossPoint o2 = new WireCrossPoint(model, 1); o2.moveTo(270, 202.5); - new GUIWire(model, p2.getPin(), o2.getPin()); + new GUIWire(model, p2, o2); } } \ No newline at end of file