projects
/
Mograsim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Cleaned up initializing of ModelComponents (also improved HLSDebugShell)
[Mograsim.git]
/
net.mograsim.logic.model
/
src
/
net
/
mograsim
/
logic
/
model
/
model
/
components
/
atomic
/
ModelClock.java
diff --git
a/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/ModelClock.java
b/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/ModelClock.java
index
e26e3ff
..
3896353
100644
(file)
--- a/
net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/ModelClock.java
+++ b/
net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/ModelClock.java
@@
-10,7
+10,7
@@
import net.haspamelodica.swt.helper.swtobjectwrappers.Point;
import net.haspamelodica.swt.helper.swtobjectwrappers.Rectangle;
import net.mograsim.logic.core.LogicObserver;
import net.mograsim.logic.core.components.CoreClock;
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.
View
ModelModifiable;
+import net.mograsim.logic.model.model.
Logic
ModelModifiable;
import net.mograsim.logic.model.model.components.ModelComponent;
import net.mograsim.logic.model.model.components.Orientation;
import net.mograsim.logic.model.model.components.OrientationCalculator;
import net.mograsim.logic.model.model.components.ModelComponent;
import net.mograsim.logic.model.model.components.Orientation;
import net.mograsim.logic.model.model.components.OrientationCalculator;
@@
-36,22
+36,24
@@
public class ModelClock extends ModelComponent
private OrientationCalculator oc;
private CoreClock clock;
private OrientationCalculator oc;
private CoreClock clock;
- public ModelClock(
View
ModelModifiable model, ModelClockParams params)
+ public ModelClock(
Logic
ModelModifiable model, ModelClockParams params)
{
this(model, params, null);
}
{
this(model, params, null);
}
- public ModelClock(
View
ModelModifiable model, ModelClockParams params, String name)
+ public ModelClock(
Logic
ModelModifiable 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.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);
addPin(outputPin);
+
+ init();
}
@Override
}
@Override