X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=net.mograsim.logic.ui%2Fsrc%2Fnet%2Fmograsim%2Flogic%2Fui%2Fexamples%2FRSLatchExample.java;h=0758afb98b5a13c0da26ddb567a064af170b7dd3;hb=19ee1a7fdb06a1df65cd7df78fed935124496707;hp=084db6877750c1d2fccf397f4e3d63dc541f3ef5;hpb=29948edc1851d17311c50c7eff34070a0dc36ceb;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 084db687..0758afb9 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 @@ -26,29 +26,29 @@ public class RSLatchExample GUIOrGate or1 = new GUIOrGate(model, 1); or1.moveTo(160, 102.5); - new GUIWire(model, rIn.getOutputPin(), or1.getInputPins().get(0)); + new GUIWire(model, rIn.getOutputPin(), or1.getPin("A")); GUIOrGate or2 = new GUIOrGate(model, 1); or2.moveTo(160, 192.5); - new GUIWire(model, sIn.getOutputPin(), or2.getInputPins().get(1)); + new GUIWire(model, sIn.getOutputPin(), or2.getPin("B")); GUINotGate not1 = new GUINotGate(model, 1); not1.moveTo(200, 107.5); - new GUIWire(model, or1.getOutputPin(), not1.getInputPins().get(0)); + new GUIWire(model, or1.getPin("Y"), not1.getPin("A")); GUINotGate not2 = new GUINotGate(model, 1); not2.moveTo(200, 197.5); - new GUIWire(model, or2.getOutputPin(), not2.getInputPins().get(0)); + new GUIWire(model, or2.getPin("Y"), not2.getPin("A")); WireCrossPoint p1 = new WireCrossPoint(model, 1); p1.moveCenterTo(250, 112.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)); + 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)); WireCrossPoint p2 = new WireCrossPoint(model, 1); p2.moveCenterTo(250, 202.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)); + 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)); WireCrossPoint o1 = new WireCrossPoint(model, 1); o1.moveCenterTo(270, 112.5);