X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=LogicUI%2Fsrc%2Fera%2Fmi%2Fgui%2Fwires%2FWireConnectionPoint.java;h=916ceabfc37329154e6f63bb7ec9d8514c7c26ee;hb=373b945917f9d573e4b1bd0e97f98b02fb0d9c07;hp=6c585a47dcd16e7a1c7b4b7e641f0a1304f1a9a9;hpb=16322f272d5a7e16980ede3481f2a1c9d271e5df;p=Mograsim.git diff --git a/LogicUI/src/era/mi/gui/wires/WireConnectionPoint.java b/LogicUI/src/era/mi/gui/wires/WireConnectionPoint.java index 6c585a47..916ceabf 100644 --- a/LogicUI/src/era/mi/gui/wires/WireConnectionPoint.java +++ b/LogicUI/src/era/mi/gui/wires/WireConnectionPoint.java @@ -10,8 +10,8 @@ import net.haspamelodica.swt.helper.swtobjectwrappers.Rectangle; public class WireConnectionPoint implements BasicGUIComponent { - private final WireArray wa; - private final int wiresCrossing; + private final WireArray wa; + private final int wiresCrossing; public WireConnectionPoint(WireArray wa, int wiresCrossing) { @@ -23,26 +23,30 @@ public class WireConnectionPoint implements BasicGUIComponent public void render(GeneralGC gc) { Color oldBG = gc.getBackground(); - if(wa.length == 1) + if (wa.length == 1) gc.setBackground(gc.getDevice().getSystemColor(GUIWire.getSWTColorConstantForBit(wa.getValue()))); - gc.fillOval(-2, -2, 4, 4); + gc.fillOval(-1, -1, 2, 2); gc.setBackground(oldBG); } + @Override public Rectangle getBounds() { return new Rectangle(0, 0, 0, 0); } + @Override public int getConnectedWireArraysCount() { return wiresCrossing; } + @Override public WireArray getConnectedWireArray(int connectionIndex) { return wa; } + @Override public Point getWireArrayConnectionPoint(int connectionIndex) {