Added convenience constructors in GUIWire
authorDaniel Kirschten <daniel.kirschten@gmx.de>
Wed, 5 Jun 2019 11:41:04 +0000 (13:41 +0200)
committerDaniel Kirschten <daniel.kirschten@gmx.de>
Wed, 5 Jun 2019 11:41:04 +0000 (13:41 +0200)
These take a WireCrossPoint instead of a Pin as pin1/pin2.

net.mograsim.logic.ui/src/net/mograsim/logic/ui/examples/RSLatchExample.java
net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUI_rsLatch.java
net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUIand.java
net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUIand41.java
net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUIdemux2.java
net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUIdff.java
net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUIdlatch.java
net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUIdlatch4.java
net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUInand3.java
net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUIor_4.java
net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/wires/GUIWire.java

index 835d794..8c0c4ac 100644 (file)
@@ -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
index b6f030c..5e16c09 100644 (file)
@@ -50,14 +50,14 @@ public class GUI_rsLatch extends SubmodelComponent
 
                new GUIWire(submodelModifiable, _S, nand1.getInputPins().get(0));
                new GUIWire(submodelModifiable, _R, nand2.getInputPins().get(1));
-               new GUIWire(submodelModifiable, nand1.getOutputPin(), cp1.getPin());
-               new GUIWire(submodelModifiable, nand2.getOutputPin(), cp2.getPin());
-               new GUIWire(submodelModifiable, cp1.getPin(), nand2.getInputPins().get(0), new Point(120, 50), new Point(60, 75),
+               new GUIWire(submodelModifiable, nand1.getOutputPin(), cp1);
+               new GUIWire(submodelModifiable, nand2.getOutputPin(), cp2);
+               new GUIWire(submodelModifiable, cp1, nand2.getInputPins().get(0), new Point(120, 50), new Point(60, 75),
                                new Point(60, 90));
-               new GUIWire(submodelModifiable, cp2.getPin(), nand1.getInputPins().get(1), new Point(120, 75), new Point(60, 50),
+               new GUIWire(submodelModifiable, cp2, nand1.getInputPins().get(1), new Point(120, 75), new Point(60, 50),
                                new Point(60, 35));
-               new GUIWire(submodelModifiable, cp1.getPin(), Q, new Point(150, 30), new Point(150, 25));
-               new GUIWire(submodelModifiable, cp2.getPin(), _Q, new Point(150, 95), new Point(150, 100));
+               new GUIWire(submodelModifiable, cp1, Q, new Point(150, 30), new Point(150, 25));
+               new GUIWire(submodelModifiable, cp2, _Q, new Point(150, 95), new Point(150, 100));
        }
 
        public Pin getPin_S()
index c0a50f3..eb8b888 100644 (file)
@@ -45,9 +45,9 @@ public class GUIand extends SubmodelComponent
 
                new GUIWire(submodelModifiable, A, nand.getInputPins().get(0), new Point(10, 12.5), new Point(10, 26.25));
                new GUIWire(submodelModifiable, B, nand.getInputPins().get(1), new Point(10, 50), new Point(10, 36.25));
-               new GUIWire(submodelModifiable, nand.getOutputPin(), cp1.getPin());
-               new GUIWire(submodelModifiable, cp1.getPin(), not.getInputPins().get(0), new Point(45, 26.25));
-               new GUIWire(submodelModifiable, cp1.getPin(), not.getInputPins().get(1), new Point(45, 36.25));
+               new GUIWire(submodelModifiable, nand.getOutputPin(), cp1);
+               new GUIWire(submodelModifiable, cp1, not.getInputPins().get(0), new Point(45, 26.25));
+               new GUIWire(submodelModifiable, cp1, not.getInputPins().get(1), new Point(45, 36.25));
                new GUIWire(submodelModifiable, not.getOutputPin(), Y);
        }
 
index 3cb687d..8d319a1 100644 (file)
@@ -72,13 +72,13 @@ public class GUIand41 extends SubmodelComponent
                new GUIWire(submodelModifiable, A2, and2.getPinA());
                new GUIWire(submodelModifiable, A3, and3.getPinA());
                new GUIWire(submodelModifiable, A4, and4.getPinA());
-               new GUIWire(submodelModifiable, B, cpB4.getPin(), new Point(25, 125));
-               new GUIWire(submodelModifiable, cpB4.getPin(), and4.getPinB());
-               new GUIWire(submodelModifiable, cpB4.getPin(), cpB3.getPin());
-               new GUIWire(submodelModifiable, cpB3.getPin(), and3.getPinB());
-               new GUIWire(submodelModifiable, cpB3.getPin(), cpB2.getPin());
-               new GUIWire(submodelModifiable, cpB2.getPin(), and2.getPinB());
-               new GUIWire(submodelModifiable, cpB2.getPin(), and1.getPinB(), new Point(25, 27.5));
+               new GUIWire(submodelModifiable, B, cpB4, new Point(25, 125));
+               new GUIWire(submodelModifiable, cpB4, and4.getPinB());
+               new GUIWire(submodelModifiable, cpB4, cpB3);
+               new GUIWire(submodelModifiable, cpB3, and3.getPinB());
+               new GUIWire(submodelModifiable, cpB3, cpB2);
+               new GUIWire(submodelModifiable, cpB2, and2.getPinB());
+               new GUIWire(submodelModifiable, cpB2, and1.getPinB(), new Point(25, 27.5));
                new GUIWire(submodelModifiable, and1.getPinY(), Y1, new Point(75, 20), new Point(75, 12.5));
                new GUIWire(submodelModifiable, and2.getPinY(), Y2, new Point(75, 45), new Point(75, 37.5));
                new GUIWire(submodelModifiable, and3.getPinY(), Y3, new Point(75, 70), new Point(75, 62.5));
index ca9650e..3f5dbc8 100644 (file)
@@ -74,26 +74,26 @@ public class GUIdemux2 extends SubmodelComponent
                cpNotS0.moveTo(40, 12.5);
                cpNotS1.moveTo(45, 37.5);
 
-               new GUIWire(submodelModifiable, S0, cpS01.getPin());
-               new GUIWire(submodelModifiable, S1, cpS11.getPin());
-               new GUIWire(submodelModifiable, cpS01.getPin(), notS0.getInputPins().get(0), new Point(5, 7.5));
-               new GUIWire(submodelModifiable, cpS11.getPin(), notS1.getInputPins().get(0), new Point(10, 32.5));
-               new GUIWire(submodelModifiable, cpS01.getPin(), cpS02.getPin());
-               new GUIWire(submodelModifiable, cpS11.getPin(), cpS12.getPin());
-               new GUIWire(submodelModifiable, cpS02.getPin(), notS0.getInputPins().get(1));
-               new GUIWire(submodelModifiable, cpS12.getPin(), notS1.getInputPins().get(1));
-               new GUIWire(submodelModifiable, cpS02.getPin(), cpS03.getPin(), new Point(5, 67.5));
-               new GUIWire(submodelModifiable, cpS12.getPin(), cpS13.getPin(), new Point(10, 62.5), new Point(40, 62.5));
-               new GUIWire(submodelModifiable, notS0.getOutputPin(), cpNotS0.getPin());
-               new GUIWire(submodelModifiable, notS1.getOutputPin(), cpNotS1.getPin());
-               new GUIWire(submodelModifiable, cpNotS0.getPin(), andY00.getPinA(), new Point(40, 7.5));
-               new GUIWire(submodelModifiable, cpNotS1.getPin(), andY00.getPinB(), new Point(45, 22.5));
-               new GUIWire(submodelModifiable, cpS03.getPin(), andY01.getPinA(), new Point(50, 32.5));
-               new GUIWire(submodelModifiable, cpNotS1.getPin(), andY01.getPinB(), new Point(45, 47.5));
-               new GUIWire(submodelModifiable, cpNotS0.getPin(), andY10.getPinA(), new Point(40, 57.5));
-               new GUIWire(submodelModifiable, cpS13.getPin(), andY10.getPinB());
-               new GUIWire(submodelModifiable, cpS03.getPin(), andY11.getPinA(), new Point(50, 82.5));
-               new GUIWire(submodelModifiable, cpS13.getPin(), andY11.getPinB(), new Point(40, 97.5));
+               new GUIWire(submodelModifiable, S0, cpS01);
+               new GUIWire(submodelModifiable, S1, cpS11);
+               new GUIWire(submodelModifiable, cpS01, notS0.getInputPins().get(0), new Point(5, 7.5));
+               new GUIWire(submodelModifiable, cpS11, notS1.getInputPins().get(0), new Point(10, 32.5));
+               new GUIWire(submodelModifiable, cpS01, cpS02);
+               new GUIWire(submodelModifiable, cpS11, cpS12);
+               new GUIWire(submodelModifiable, cpS02, notS0.getInputPins().get(1));
+               new GUIWire(submodelModifiable, cpS12, notS1.getInputPins().get(1));
+               new GUIWire(submodelModifiable, cpS02, cpS03, new Point(5, 67.5));
+               new GUIWire(submodelModifiable, cpS12, cpS13, new Point(10, 62.5), new Point(40, 62.5));
+               new GUIWire(submodelModifiable, notS0.getOutputPin(), cpNotS0);
+               new GUIWire(submodelModifiable, notS1.getOutputPin(), cpNotS1);
+               new GUIWire(submodelModifiable, cpNotS0, andY00.getPinA(), new Point(40, 7.5));
+               new GUIWire(submodelModifiable, cpNotS1, andY00.getPinB(), new Point(45, 22.5));
+               new GUIWire(submodelModifiable, cpS03, andY01.getPinA(), new Point(50, 32.5));
+               new GUIWire(submodelModifiable, cpNotS1, andY01.getPinB(), new Point(45, 47.5));
+               new GUIWire(submodelModifiable, cpNotS0, andY10.getPinA(), new Point(40, 57.5));
+               new GUIWire(submodelModifiable, cpS13, andY10.getPinB());
+               new GUIWire(submodelModifiable, cpS03, andY11.getPinA(), new Point(50, 82.5));
+               new GUIWire(submodelModifiable, cpS13, andY11.getPinB(), new Point(40, 97.5));
                new GUIWire(submodelModifiable, andY00.getPinY(), Y00, new Point(95, 15), new Point(95, 12.5));
                new GUIWire(submodelModifiable, andY01.getPinY(), Y01, new Point(95, 40), new Point(95, 37.5));
                new GUIWire(submodelModifiable, andY10.getPinY(), Y10, new Point(95, 65), new Point(95, 62.5));
index 4470b46..484f61e 100644 (file)
@@ -56,19 +56,19 @@ public class GUIdff extends SubmodelComponent
                cp3.moveTo(100, 35);
                cp4.moveTo(100, 55);
 
-               new GUIWire(submodelModifiable, C, cp1.getPin());
-               new GUIWire(submodelModifiable, cp1.getPin(), _rsLatch1.getPin_R());
-               new GUIWire(submodelModifiable, cp1.getPin(), nand3.getPinB(), new Point(10, 55));
+               new GUIWire(submodelModifiable, C, cp1);
+               new GUIWire(submodelModifiable, cp1, _rsLatch1.getPin_R());
+               new GUIWire(submodelModifiable, cp1, nand3.getPinB(), new Point(10, 55));
                new GUIWire(submodelModifiable, D, nand2.getInputPins().get(1));
-               new GUIWire(submodelModifiable, nand2.getOutputPin(), cp2.getPin(), new Point(65, 95), new Point(65, 75), new Point(20, 75));
-               new GUIWire(submodelModifiable, cp2.getPin(), _rsLatch1.getPin_S(), new Point(20, 10));
-               new GUIWire(submodelModifiable, cp2.getPin(), nand3.getPinC());
-               new GUIWire(submodelModifiable, _rsLatch1.getPin_Q(), cp3.getPin(), new Point(100, 25));
-               new GUIWire(submodelModifiable, cp3.getPin(), nand3.getPinA(), new Point(30, 35), new Point(30, 45));
-               new GUIWire(submodelModifiable, cp3.getPin(), _rsLatch2.getPin_S(), new Point(100, 40));
-               new GUIWire(submodelModifiable, nand3.getPinY(), cp4.getPin());
-               new GUIWire(submodelModifiable, cp4.getPin(), _rsLatch2.getPin_R());
-               new GUIWire(submodelModifiable, cp4.getPin(), nand2.getInputPins().get(0), new Point(100, 80), new Point(30, 80),
+               new GUIWire(submodelModifiable, nand2.getOutputPin(), cp2, new Point(65, 95), new Point(65, 75), new Point(20, 75));
+               new GUIWire(submodelModifiable, cp2, _rsLatch1.getPin_S(), new Point(20, 10));
+               new GUIWire(submodelModifiable, cp2, nand3.getPinC());
+               new GUIWire(submodelModifiable, _rsLatch1.getPin_Q(), cp3, new Point(100, 25));
+               new GUIWire(submodelModifiable, cp3, nand3.getPinA(), new Point(30, 35), new Point(30, 45));
+               new GUIWire(submodelModifiable, cp3, _rsLatch2.getPin_S(), new Point(100, 40));
+               new GUIWire(submodelModifiable, nand3.getPinY(), cp4);
+               new GUIWire(submodelModifiable, cp4, _rsLatch2.getPin_R());
+               new GUIWire(submodelModifiable, cp4, nand2.getInputPins().get(0), new Point(100, 80), new Point(30, 80),
                                new Point(30, 90));
                new GUIWire(submodelModifiable, _rsLatch2.getPinQ(), Q, new Point(165, 40), new Point(165, 25));
                new GUIWire(submodelModifiable, _rsLatch2.getPin_Q(), _Q, new Point(165, 55), new Point(165, 100));
index 1a9d3a0..4e04f80 100644 (file)
@@ -51,12 +51,12 @@ public class GUIdlatch extends SubmodelComponent
                cp2.moveTo(35, 17.5);
 
                new GUIWire(submodelModifiable, D, nand1.getInputPins().get(0));
-               new GUIWire(submodelModifiable, E, cp1.getPin());
-               new GUIWire(submodelModifiable, cp1.getPin(), nand1.getInputPins().get(1), new Point(5, 22.5));
-               new GUIWire(submodelModifiable, cp1.getPin(), nand2.getInputPins().get(1));
-               new GUIWire(submodelModifiable, nand1.getOutputPin(), cp2.getPin());
-               new GUIWire(submodelModifiable, cp2.getPin(), nand2.getInputPins().get(0), new Point(35, 30), new Point(10, 30), new Point(10, 40));
-               new GUIWire(submodelModifiable, cp2.getPin(), _rsLatch.getPin_S(), new Point(35, 12.5));
+               new GUIWire(submodelModifiable, E, cp1);
+               new GUIWire(submodelModifiable, cp1, nand1.getInputPins().get(1), new Point(5, 22.5));
+               new GUIWire(submodelModifiable, cp1, nand2.getInputPins().get(1));
+               new GUIWire(submodelModifiable, nand1.getOutputPin(), cp2);
+               new GUIWire(submodelModifiable, cp2, nand2.getInputPins().get(0), new Point(35, 30), new Point(10, 30), new Point(10, 40));
+               new GUIWire(submodelModifiable, cp2, _rsLatch.getPin_S(), new Point(35, 12.5));
                new GUIWire(submodelModifiable, nand2.getOutputPin(), _rsLatch.getPin_R(), new Point(40, 45), new Point(40, 27.5));
                new GUIWire(submodelModifiable, _rsLatch.getPinQ(), Q);
                new GUIWire(submodelModifiable, _rsLatch.getPin_Q(), _Q, new Point(82.5, 27.5), new Point(82.5, 50));
index 282bb4b..1447291 100644 (file)
@@ -68,13 +68,13 @@ public class GUIdlatch4 extends SubmodelComponent
                cp3.moveTo(15, 77.5);
                cp4.moveTo(15, 102.5);
 
-               new GUIWire(submodelModifiable, C, cp4.getPin(), new Point(15, 125));
-               new GUIWire(submodelModifiable, cp4.getPin(), dlatch4.getPinE());
-               new GUIWire(submodelModifiable, cp4.getPin(), cp3.getPin());
-               new GUIWire(submodelModifiable, cp3.getPin(), dlatch3.getPinE());
-               new GUIWire(submodelModifiable, cp3.getPin(), cp2.getPin());
-               new GUIWire(submodelModifiable, cp2.getPin(), dlatch2.getPinE());
-               new GUIWire(submodelModifiable, cp2.getPin(), dlatch1.getPinE(), new Point(15, 27.5));
+               new GUIWire(submodelModifiable, C, cp4, new Point(15, 125));
+               new GUIWire(submodelModifiable, cp4, dlatch4.getPinE());
+               new GUIWire(submodelModifiable, cp4, cp3);
+               new GUIWire(submodelModifiable, cp3, dlatch3.getPinE());
+               new GUIWire(submodelModifiable, cp3, cp2);
+               new GUIWire(submodelModifiable, cp2, dlatch2.getPinE());
+               new GUIWire(submodelModifiable, cp2, dlatch1.getPinE(), new Point(15, 27.5));
                new GUIWire(submodelModifiable, D1, dlatch1.getPinD());
                new GUIWire(submodelModifiable, D2, dlatch2.getPinD());
                new GUIWire(submodelModifiable, D3, dlatch3.getPinD());
index 8caf990..d126dfe 100644 (file)
@@ -50,9 +50,9 @@ public class GUInand3 extends SubmodelComponent
 
                new GUIWire(submodelModifiable, A, nandAB.getInputPins().get(0), new Point(5, 12.5), new Point(5, 20));
                new GUIWire(submodelModifiable, B, nandAB.getInputPins().get(1), new Point(5, 37.5), new Point(5, 30));
-               new GUIWire(submodelModifiable, nandAB.getOutputPin(), cpNandAB.getPin());
-               new GUIWire(submodelModifiable, cpNandAB.getPin(), andAB.getInputPins().get(0), new Point(35, 20));
-               new GUIWire(submodelModifiable, cpNandAB.getPin(), andAB.getInputPins().get(1), new Point(35, 30));
+               new GUIWire(submodelModifiable, nandAB.getOutputPin(), cpNandAB);
+               new GUIWire(submodelModifiable, cpNandAB, andAB.getInputPins().get(0), new Point(35, 20));
+               new GUIWire(submodelModifiable, cpNandAB, andAB.getInputPins().get(1), new Point(35, 30));
                new GUIWire(submodelModifiable, andAB.getOutputPin(), nandABC.getInputPins().get(0), new Point(65, 25), new Point(65, 32.5));
                new GUIWire(submodelModifiable, C, nandABC.getInputPins().get(1), new Point(65, 62.5), new Point(65, 42.5));
                new GUIWire(submodelModifiable, nandABC.getOutputPin(), Y);
index 96b681b..aff35ff 100644 (file)
@@ -104,30 +104,30 @@ public class GUIor_4 extends SubmodelComponent
                cpB3.moveTo(7.5, 162.5);
                cpB4.moveTo(7.5, 187.5);
 
-               new GUIWire(submodelModifiable, A1, cpA1.getPin());
-               new GUIWire(submodelModifiable, A2, cpA2.getPin());
-               new GUIWire(submodelModifiable, A3, cpA3.getPin());
-               new GUIWire(submodelModifiable, A4, cpA4.getPin());
-               new GUIWire(submodelModifiable, B1, cpB1.getPin());
-               new GUIWire(submodelModifiable, B2, cpB2.getPin());
-               new GUIWire(submodelModifiable, B3, cpB3.getPin());
-               new GUIWire(submodelModifiable, B4, cpB4.getPin());
-               new GUIWire(submodelModifiable, cpA1.getPin(), notA1.getInputPins().get(0), new Point(7.5, 7.5));
-               new GUIWire(submodelModifiable, cpA1.getPin(), notA1.getInputPins().get(1), new Point(7.5, 17.5));
-               new GUIWire(submodelModifiable, cpA2.getPin(), notA2.getInputPins().get(0), new Point(7.5, 32.5));
-               new GUIWire(submodelModifiable, cpA2.getPin(), notA2.getInputPins().get(1), new Point(7.5, 42.5));
-               new GUIWire(submodelModifiable, cpA3.getPin(), notA3.getInputPins().get(0), new Point(7.5, 57.5));
-               new GUIWire(submodelModifiable, cpA3.getPin(), notA3.getInputPins().get(1), new Point(7.5, 67.5));
-               new GUIWire(submodelModifiable, cpA4.getPin(), notA4.getInputPins().get(0), new Point(7.5, 82.5));
-               new GUIWire(submodelModifiable, cpA4.getPin(), notA4.getInputPins().get(1), new Point(7.5, 92.5));
-               new GUIWire(submodelModifiable, cpB1.getPin(), notB1.getInputPins().get(0), new Point(7.5, 107.5));
-               new GUIWire(submodelModifiable, cpB1.getPin(), notB1.getInputPins().get(1), new Point(7.5, 117.5));
-               new GUIWire(submodelModifiable, cpB2.getPin(), notB2.getInputPins().get(0), new Point(7.5, 132.5));
-               new GUIWire(submodelModifiable, cpB2.getPin(), notB2.getInputPins().get(1), new Point(7.5, 142.5));
-               new GUIWire(submodelModifiable, cpB3.getPin(), notB3.getInputPins().get(0), new Point(7.5, 157.5));
-               new GUIWire(submodelModifiable, cpB3.getPin(), notB3.getInputPins().get(1), new Point(7.5, 167.5));
-               new GUIWire(submodelModifiable, cpB4.getPin(), notB4.getInputPins().get(0), new Point(7.5, 182.5));
-               new GUIWire(submodelModifiable, cpB4.getPin(), notB4.getInputPins().get(1), new Point(7.5, 192.5));
+               new GUIWire(submodelModifiable, A1, cpA1);
+               new GUIWire(submodelModifiable, A2, cpA2);
+               new GUIWire(submodelModifiable, A3, cpA3);
+               new GUIWire(submodelModifiable, A4, cpA4);
+               new GUIWire(submodelModifiable, B1, cpB1);
+               new GUIWire(submodelModifiable, B2, cpB2);
+               new GUIWire(submodelModifiable, B3, cpB3);
+               new GUIWire(submodelModifiable, B4, cpB4);
+               new GUIWire(submodelModifiable, cpA1, notA1.getInputPins().get(0), new Point(7.5, 7.5));
+               new GUIWire(submodelModifiable, cpA1, notA1.getInputPins().get(1), new Point(7.5, 17.5));
+               new GUIWire(submodelModifiable, cpA2, notA2.getInputPins().get(0), new Point(7.5, 32.5));
+               new GUIWire(submodelModifiable, cpA2, notA2.getInputPins().get(1), new Point(7.5, 42.5));
+               new GUIWire(submodelModifiable, cpA3, notA3.getInputPins().get(0), new Point(7.5, 57.5));
+               new GUIWire(submodelModifiable, cpA3, notA3.getInputPins().get(1), new Point(7.5, 67.5));
+               new GUIWire(submodelModifiable, cpA4, notA4.getInputPins().get(0), new Point(7.5, 82.5));
+               new GUIWire(submodelModifiable, cpA4, notA4.getInputPins().get(1), new Point(7.5, 92.5));
+               new GUIWire(submodelModifiable, cpB1, notB1.getInputPins().get(0), new Point(7.5, 107.5));
+               new GUIWire(submodelModifiable, cpB1, notB1.getInputPins().get(1), new Point(7.5, 117.5));
+               new GUIWire(submodelModifiable, cpB2, notB2.getInputPins().get(0), new Point(7.5, 132.5));
+               new GUIWire(submodelModifiable, cpB2, notB2.getInputPins().get(1), new Point(7.5, 142.5));
+               new GUIWire(submodelModifiable, cpB3, notB3.getInputPins().get(0), new Point(7.5, 157.5));
+               new GUIWire(submodelModifiable, cpB3, notB3.getInputPins().get(1), new Point(7.5, 167.5));
+               new GUIWire(submodelModifiable, cpB4, notB4.getInputPins().get(0), new Point(7.5, 182.5));
+               new GUIWire(submodelModifiable, cpB4, notB4.getInputPins().get(1), new Point(7.5, 192.5));
                new GUIWire(submodelModifiable, notA1.getOutputPin(), nandY1.getInputPins().get(0), new Point(40, 12.5), new Point(40, 7.5));
                new GUIWire(submodelModifiable, notB1.getOutputPin(), nandY1.getInputPins().get(1), new Point(50, 112.5), new Point(50, 17.5));
                new GUIWire(submodelModifiable, notA2.getOutputPin(), nandY2.getInputPins().get(0), new Point(40, 37.5), new Point(40, 32.5));
index 771e2e3..b69c810 100644 (file)
@@ -25,6 +25,21 @@ public class GUIWire
        private final LogicObserver logicObs;
        private ReadEnd end;
 
+       public GUIWire(ViewModelModifiable model, WireCrossPoint pin1, WireCrossPoint pin2, Point... path)
+       {
+               this(model, pin1.getPin(), pin2.getPin(), path);
+       }
+
+       public GUIWire(ViewModelModifiable model, WireCrossPoint pin1, Pin pin2, Point... path)
+       {
+               this(model, pin1.getPin(), pin2, path);
+       }
+
+       public GUIWire(ViewModelModifiable model, Pin pin1, WireCrossPoint pin2, Point... path)
+       {
+               this(model, pin1, pin2.getPin(), path);
+       }
+
        public GUIWire(ViewModelModifiable model, Pin pin1, Pin pin2, Point... path)
        {
                logicObs = (i) -> callRedrawListeners();