projects
/
Mograsim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Simple...HardcodedModelComponent now has a constructor without callInit
[Mograsim.git]
/
net.mograsim.logic.model
/
src
/
net
/
mograsim
/
logic
/
model
/
model
/
components
/
atomic
/
SimpleRectangularHardcodedModelComponent.java
diff --git
a/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/SimpleRectangularHardcodedModelComponent.java
b/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/SimpleRectangularHardcodedModelComponent.java
index
4314a43
..
8971285
100644
(file)
--- a/
net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/SimpleRectangularHardcodedModelComponent.java
+++ b/
net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/SimpleRectangularHardcodedModelComponent.java
@@
-7,7
+7,7
@@
import net.haspamelodica.swt.helper.gcs.GeneralGC;
import net.haspamelodica.swt.helper.swtobjectwrappers.Rectangle;
import net.mograsim.logic.core.wires.CoreWire.ReadEnd;
import net.mograsim.logic.core.wires.CoreWire.ReadWriteEnd;
import net.haspamelodica.swt.helper.swtobjectwrappers.Rectangle;
import net.mograsim.logic.core.wires.CoreWire.ReadEnd;
import net.mograsim.logic.core.wires.CoreWire.ReadWriteEnd;
-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.wires.Pin;
import net.mograsim.logic.model.modeladapter.LogicCoreAdapter;
import net.mograsim.logic.model.model.components.ModelComponent;
import net.mograsim.logic.model.model.wires.Pin;
import net.mograsim.logic.model.modeladapter.LogicCoreAdapter;
@@
-38,9
+38,14
@@
public abstract class SimpleRectangularHardcodedModelComponent extends ModelComp
// creation and destruction
// creation and destruction
- public SimpleRectangularHardcodedModelComponent(
View
ModelModifiable model, String id, String name, String centerText)
+ public SimpleRectangularHardcodedModelComponent(
Logic
ModelModifiable model, String id, String name, String centerText)
{
{
- super(model, name);
+ this(model, id, name, centerText, true);
+ }
+
+ public SimpleRectangularHardcodedModelComponent(LogicModelModifiable model, String id, String name, String centerText, boolean callInit)
+ {
+ super(model, name, false);
this.id = id;
this.outlineRenderer = new DefaultOutlineRenderer(this);
CenteredTextParams centeredTextParams = new CenteredTextParams();
this.id = id;
this.outlineRenderer = new DefaultOutlineRenderer(this);
CenteredTextParams centeredTextParams = new CenteredTextParams();
@@
-79,6
+84,9
@@
public abstract class SimpleRectangularHardcodedModelComponent extends ModelComp
recalculate.run();
}
});
recalculate.run();
}
});
+
+ if (callInit)
+ init();
}
// pins
}
// pins