projects
/
Mograsim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Made formatting uniform - commit for logicui
[Mograsim.git]
/
LogicUI
/
src
/
era
/
mi
/
gui
/
wires
/
WireConnectionPoint.java
diff --git
a/LogicUI/src/era/mi/gui/wires/WireConnectionPoint.java
b/LogicUI/src/era/mi/gui/wires/WireConnectionPoint.java
index
9c1aae1
..
916ceab
100644
(file)
--- 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
{
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)
{
public WireConnectionPoint(WireArray wa, int wiresCrossing)
{
@@
-23,26
+23,30
@@
public class WireConnectionPoint implements BasicGUIComponent
public void render(GeneralGC gc)
{
Color oldBG = gc.getBackground();
public void render(GeneralGC gc)
{
Color oldBG = gc.getBackground();
- Color fg = gc.getForeground();
-
gc.setBackground(fg
);
- gc.fillOval(-
2, -2, 4, 4
);
+ if (wa.length == 1)
+
gc.setBackground(gc.getDevice().getSystemColor(GUIWire.getSWTColorConstantForBit(wa.getValue()))
);
+ gc.fillOval(-
1, -1, 2, 2
);
gc.setBackground(oldBG);
}
gc.setBackground(oldBG);
}
+
@Override
public Rectangle getBounds()
{
return new Rectangle(0, 0, 0, 0);
}
@Override
public Rectangle getBounds()
{
return new Rectangle(0, 0, 0, 0);
}
+
@Override
public int getConnectedWireArraysCount()
{
return wiresCrossing;
}
@Override
public int getConnectedWireArraysCount()
{
return wiresCrossing;
}
+
@Override
public WireArray getConnectedWireArray(int connectionIndex)
{
return wa;
}
@Override
public WireArray getConnectedWireArray(int connectionIndex)
{
return wa;
}
+
@Override
public Point getWireArrayConnectionPoint(int connectionIndex)
{
@Override
public Point getWireArrayConnectionPoint(int connectionIndex)
{