X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=LogicUI%2Fsrc%2Fera%2Fmi%2Fgui%2Fcomponents%2FGUIOrGate.java;h=039dbe3bbb96b41b3da1294ee089f4197e429939;hb=32a3d41c11b96c2530c25b6059b4341a8b34a2e2;hp=e3ff8f395f5d98831d8bb384a9fec7058fc20495;hpb=9c31e87700d7a4872f9caaa8bd3afe1f023d9926;p=Mograsim.git diff --git a/LogicUI/src/era/mi/gui/components/GUIOrGate.java b/LogicUI/src/era/mi/gui/components/GUIOrGate.java index e3ff8f39..039dbe3b 100644 --- a/LogicUI/src/era/mi/gui/components/GUIOrGate.java +++ b/LogicUI/src/era/mi/gui/components/GUIOrGate.java @@ -14,12 +14,12 @@ import net.haspamelodica.swt.helper.swtobjectwrappers.Rectangle; public class GUIOrGate extends OrGate implements BasicGUIComponent { - private static final String LABEL = "\u22651";//>=1 + private static final String LABEL = "\u22651";// >=1 - private final int inputCount; - private final double height; - private final List connectedWireArrays; - private final List wireArrayConnectionPoints; + private final int inputCount; + private final double height; + private final List connectedWireArrays; + private final List wireArrayConnectionPoints; public GUIOrGate(int processTime, WireArray out, WireArray... in) { @@ -34,7 +34,7 @@ public class GUIOrGate extends OrGate implements BasicGUIComponent { connectedWireArraysModifiable.addAll(Arrays.asList(in)); double inputHeight = 5; - for(int i = 0; i < inputCount; i ++, inputHeight += 10) + for (int i = 0; i < inputCount; i++, inputHeight += 10) wireArrayConnectionPointsModifiable.add(new Point(0, inputHeight)); } @@ -50,6 +50,7 @@ public class GUIOrGate extends OrGate implements BasicGUIComponent { return new Rectangle(0, 0, 20, height); } + @Override public void render(GeneralGC gc) { @@ -67,11 +68,13 @@ public class GUIOrGate extends OrGate implements BasicGUIComponent { return connectedWireArrays.size(); } + @Override public WireArray getConnectedWireArray(int connectionIndex) { return connectedWireArrays.get(connectionIndex); } + @Override public Point getWireArrayConnectionPoint(int connectionI) {