import net.haspamelodica.swt.helper.swtobjectwrappers.Rectangle;
import net.mograsim.logic.core.LogicObserver;
import net.mograsim.logic.core.components.CoreClock;
-import net.mograsim.logic.model.model.ViewModelModifiable;
+import net.mograsim.logic.model.model.LogicModelModifiable;
import net.mograsim.logic.model.model.components.ModelComponent;
import net.mograsim.logic.model.model.components.Orientation;
import net.mograsim.logic.model.model.components.OrientationCalculator;
private OrientationCalculator oc;
private CoreClock clock;
- public ModelClock(ViewModelModifiable model, ModelClockParams params)
+ public ModelClock(LogicModelModifiable model, ModelClockParams params)
{
this(model, params, null);
}
- public ModelClock(ViewModelModifiable model, ModelClockParams params, String name)
+ public ModelClock(LogicModelModifiable model, ModelClockParams params, String name)
{
- super(model, name);
+ super(model, name, false);
this.params = params;
logicObs = (i) -> model.requestRedraw();
oc = new OrientationCalculator(params.orientation, width, height);
setSize(oc.width(), oc.height());
- this.outputPin = new Pin(this, "", 1, PinUsage.OUTPUT, oc.newX(width, height / 2), oc.newY(width, height / 2));
+ this.outputPin = new Pin(model, this, "", 1, PinUsage.OUTPUT, oc.newX(width, height / 2), oc.newY(width, height / 2));
addPin(outputPin);
+
+ init();
}
@Override