Made LogicUI compatible with ReadEnd and ReadWriteEnd
[Mograsim.git] / LogicUI / src / era / mi / gui / components / GUIMux.java
index c615539..2da1501 100644 (file)
@@ -6,7 +6,8 @@ import java.util.Collections;
 import java.util.List;\r
 \r
 import era.mi.logic.components.Mux;\r
-import era.mi.logic.wires.Wire.WireEnd;\r
+import era.mi.logic.wires.Wire.ReadEnd;\r
+import era.mi.logic.wires.Wire.ReadWriteEnd;\r
 import net.haspamelodica.swt.helper.gcs.GeneralGC;\r
 import net.haspamelodica.swt.helper.swtobjectwrappers.Point;\r
 import net.haspamelodica.swt.helper.swtobjectwrappers.Rectangle;\r
@@ -14,10 +15,10 @@ import net.haspamelodica.swt.helper.swtobjectwrappers.Rectangle;
 public class GUIMux extends Mux implements BasicGUIComponent\r
 {\r
        private final double height;\r
-       private final List<WireEnd> connectedWireEnds;\r
+       private final List<ReadEnd> connectedWireEnds;\r
        private final List<Point> WireEndConnectionPoints;\r
 \r
-       public GUIMux(int processTime, WireEnd out, WireEnd select, WireEnd... inputs)\r
+       public GUIMux(int processTime, ReadWriteEnd out, ReadEnd select, ReadEnd... inputs)\r
        {\r
                super(processTime, out, select, inputs);\r
 \r
@@ -26,7 +27,7 @@ public class GUIMux extends Mux implements BasicGUIComponent
                        height = 10;\r
                this.height = height;\r
 \r
-               List<WireEnd> connectedWireEndsModifiable = new ArrayList<>();\r
+               List<ReadEnd> connectedWireEndsModifiable = new ArrayList<>();\r
                List<Point> WireEndConnectionPointsModifiable = new ArrayList<>();\r
 \r
                connectedWireEndsModifiable.add(out);\r
@@ -66,7 +67,7 @@ public class GUIMux extends Mux implements BasicGUIComponent
        }\r
 \r
        @Override\r
-       public WireEnd getConnectedWireEnd(int connectionIndex)\r
+       public ReadEnd getConnectedWireEnd(int connectionIndex)\r
        {\r
                return connectedWireEnds.get(connectionIndex);\r
        }\r