Made connection point markers smaller
[Mograsim.git] / LogicUI / src / LogicUI.java
index 3bce12d..515bdb4 100644 (file)
@@ -9,12 +9,12 @@ import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.Shell;\r
 \r
 import era.mi.components.gui.BasicGUIComponent;\r
+import era.mi.components.gui.GUIMerger;\r
 import era.mi.components.gui.GUIMux;\r
+import era.mi.components.gui.GUINotGate;\r
+import era.mi.components.gui.GUISplitter;\r
 import era.mi.logic.Simulation;\r
-import era.mi.logic.components.Merger;\r
-import era.mi.logic.components.Splitter;\r
 import era.mi.logic.components.gates.AndGate;\r
-import era.mi.logic.components.gates.NotGate;\r
 import era.mi.logic.wires.WireArray;\r
 import net.haspamelodica.swt.helper.gcs.GeneralGC;\r
 import net.haspamelodica.swt.helper.gcs.TranslatedGC;\r
@@ -51,10 +51,10 @@ public class LogicUI
                WireArray a = new WireArray(1, 1), b = new WireArray(1, 1), c = new WireArray(1, 10), d = new WireArray(2, 1), e = new WireArray(1, 1),\r
                                f = new WireArray(1, 1), g = new WireArray(1, 1), h = new WireArray(2, 1), i = new WireArray(2, 1), j = new WireArray(1, 1), k = new WireArray(1, 1);\r
                new AndGate(1, f, a, b);\r
-               new NotGate(1, f, g);\r
-               new Merger(h, c, g);\r
+               addComponent(new GUINotGate(1, f, g), 100, 10);\r
+               addComponent(new GUIMerger(h, c, g), 70, 10);\r
                addComponent(new GUIMux(1, i, e, h, d), 10, 10);\r
-               new Splitter(i, k, j);\r
+               addComponent(new GUISplitter(i, k, j), 40, 10);\r
        }\r
        private void addComponent(BasicGUIComponent component, double x, double y)\r
        {\r
@@ -70,7 +70,7 @@ public class LogicUI
                {\r
                        Point connectionPoint = component.getWireArrayConnectionPoint(i);\r
                        if(connectionPoint != null)\r
-                               tgc.fillOval(connectionPoint.x - 2, connectionPoint.y - 2, 4, 4);\r
+                               tgc.fillOval(connectionPoint.x - 1, connectionPoint.y - 1, 2, 2);\r
                }\r
        }\r
        public void run()\r