Pins now have names
[Mograsim.git] / net.mograsim.logic.ui / src / net / mograsim / logic / ui / model / components / GUIBitDisplay.java
index fd2f736..82399c1 100644 (file)
@@ -28,7 +28,7 @@ public class GUIBitDisplay extends GUIComponent
                logicObs = (i) -> requestRedraw();
 
                setSize(width, height);
-               addPin(this.inputPin = new Pin(this, 1, 0, height / 2));
+               addPin(this.inputPin = new Pin(this, "", 1, 0, height / 2));
        }
 
        @Override
@@ -38,7 +38,7 @@ public class GUIBitDisplay extends GUIComponent
                double posY = getBounds().y;
 
                // TODO maybe draw switch state too?
-               gc.drawRectangle(posX, posY, width, height);
+               gc.drawRectangle(getBounds());
                String label = bitDisplay == null ? BitVectorFormatter.formatAsString(null)
                                : BitVectorFormatter.formatAsString(bitDisplay.getDisplayedValue());
                Font oldFont = gc.getFont();