public SimpleRectangularSubmodelComponent(LogicModelModifiable model, int logicWidth, String label, String name)
{
- super(model, name);
+ this(model, logicWidth, label, name, true);
+ }
+
+ protected SimpleRectangularSubmodelComponent(LogicModelModifiable model, int logicWidth, String label, String name, boolean callInit)
+ {
+ super(model, name, false);
this.label = label;
this.logicWidth = logicWidth;
this.inputPinNames = new ArrayList<>();
rendererParams.pinLabelMargin = pinNameMargin;
setSymbolRenderer(new SimpleRectangularLikeSymbolRenderer(this, rendererParams));
setOutlineRenderer(new DefaultOutlineRenderer(this));
+
+ if (callInit)
+ init();
}
protected void setInputPins(String... pinNames)
String pinName = newPinNames[i];
int oldPinIndex = pinNamesListThisSide.indexOf(pinName);
if (oldPinIndex == -1)
- super.addSubmodelInterface(new MovablePin(this, pinName, logicWidth, usage, relX, pinDistance / 2 + i * pinDistance));
+ super.addSubmodelInterface(
+ new MovablePin(model, this, pinName, logicWidth, usage, relX, pinDistance / 2 + i * pinDistance));
else
getSupermodelMovablePin(pinName).setRelPos(relX, pinDistance / 2 + i * pinDistance);
}