- Color oldBG = gc.getBackground();
- gc.setBackground(gc.getDevice().getSystemColor(GUIWire.getSWTColorConstantForWire(wire)));
- gc.fillOval(-1, -1, 2, 2);
- gc.setBackground(oldBG);
+ Rectangle bounds = getBounds();
+ ColorHelper.executeWithDifferentBackground(gc, BitVectorFormatter.formatAsColor(end),
+ () -> gc.fillOval(bounds.x - 1, bounds.y - 1, 2, 2));
+ }
+
+ public void setLogicModelBinding(ReadEnd end)
+ {
+ this.end = end;
+ end.addObserver((i, o) -> callComponentLookChangedListeners());
+ }
+
+ public int getLogicWidth()
+ {
+ return logicWidth;