private static final double height = 15;
private static final double fontHeight = 5;
+ public final int logicWidth;
private final Pin inputPin;
private final LogicObserver logicObs;
public GUIBitDisplay(ViewModelModifiable model, int logicWidth, String name)
{
super(model, name);
+ this.logicWidth = logicWidth;
logicObs = (i) -> model.requestRedraw();
setSize(width, height);
@Override
public JsonElement getParamsForSerializing(IdentifierGetter idGetter)
{
- return new JsonPrimitive(inputPin.logicWidth);
+ return new JsonPrimitive(logicWidth);
}
static
private static final double height = 15;
private static final double fontHeight = 5;
+ public final int logicWidth;
private final Pin outputPin;
private final LogicObserver logicObs;
public GUIManualSwitch(ViewModelModifiable model, int logicWidth, String name)
{
super(model, name);
+ this.logicWidth = logicWidth;
logicObs = (i) -> model.requestRedraw();
setSize(width, height);
@Override
public JsonElement getParamsForSerializing(IdentifierGetter idGetter)
{
- return new JsonPrimitive(outputPin.logicWidth);
+ return new JsonPrimitive(logicWidth);
}
static
private static final int CIRCLE_RADIUS = 1;
private static final int CIRCLE_DIAM = CIRCLE_RADIUS * 2;
+ /**
+ * The logical width of this cross point.
+ */
+ public final int logicWidth;
/**
* The (single) pin of this cross point.
*/
public WireCrossPoint(ViewModelModifiable model, int logicWidth, String name)
{
super(model, name);
+ this.logicWidth = logicWidth;
logicObs = (i) -> model.requestRedraw();
setSize(CIRCLE_DIAM, CIRCLE_DIAM);
@Override
public JsonElement getParamsForSerializing(IdentifierGetter idGetter)
{
- return new JsonPrimitive(pin.logicWidth);
+ return new JsonPrimitive(logicWidth);
}
static