- this.logicWidth = logicWidth;
- setSize(0, 0);
- addPin(this.pin = new Pin(this, logicWidth, 0, 0));
+ logicObs = (i) -> requestRedraw();
+
+ setSize(CIRCLE_DIAM, CIRCLE_DIAM);
+ addPin(this.pin = new Pin(this, "", logicWidth, CIRCLE_RADIUS, CIRCLE_RADIUS));
+ }
+
+ // pins
+
+ @Override
+ public Pin getPin()
+ {
+ return pin;
+ }
+
+ // "graphical" operations
+
+ /**
+ * Moves the center (and therefore the pin) of this {@link WireCrossPoint} to the given location.
+ *
+ * @author Daniel Kirschten
+ */
+ public void moveCenterTo(double x, double y)
+ {
+ moveTo(x - CIRCLE_RADIUS, y - CIRCLE_RADIUS);