*
* @author Daniel Kirschten
*/
-public class WireCrossPoint extends GUIComponent implements ConnectionPoint
+public class WireCrossPoint extends GUIComponent
{
private static final int CIRCLE_RADIUS = 1;
private static final int CIRCLE_DIAM = CIRCLE_RADIUS * 2;
public WireCrossPoint(ViewModelModifiable model, int logicWidth)
{
- super(model);
+ this(model, logicWidth, null);
+ }
+
+ public WireCrossPoint(ViewModelModifiable model, int logicWidth, String name)
+ {
+ super(model, name);
logicObs = (i) -> requestRedraw();
setSize(CIRCLE_DIAM, CIRCLE_DIAM);
// pins
- @Override
public Pin getPin()
{
return pin;
static
{
- IndirectGUIComponentCreator.setComponentProvider(WireCrossPoint.class.getCanonicalName(),
- (m, p) -> new WireCrossPoint(m, p.getAsInt()));
+ IndirectGUIComponentCreator.setComponentSupplier(WireCrossPoint.class.getCanonicalName(),
+ (m, p, n) -> new WireCrossPoint(m, p.getAsInt(), n));
}
}
\ No newline at end of file