X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=net.mograsim.logic.model%2Fsrc%2Fnet%2Fmograsim%2Flogic%2Fmodel%2Fmodel%2Fcomponents%2FModelComponent.java;fp=net.mograsim.logic.model%2Fsrc%2Fnet%2Fmograsim%2Flogic%2Fmodel%2Fmodel%2Fcomponents%2FModelComponent.java;h=d2ead7445dac0aa3cb3be2f3b46a1b3ac82e3558;hb=3a52b6bffe52db5dd5ca907b4b3dfd368a58e14f;hp=6853e382ccf44083ff906ae834d50e7be313c930;hpb=552986fd8718d5f2db00802015fdd1ecd58a5a2f;p=Mograsim.git diff --git a/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/ModelComponent.java b/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/ModelComponent.java index 6853e382..d2ead744 100644 --- a/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/ModelComponent.java +++ b/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/ModelComponent.java @@ -9,7 +9,7 @@ import java.util.function.Consumer; import net.haspamelodica.swt.helper.gcs.GeneralGC; import net.haspamelodica.swt.helper.swtobjectwrappers.Rectangle; -import net.mograsim.logic.model.model.ViewModelModifiable; +import net.mograsim.logic.model.model.LogicModelModifiable; import net.mograsim.logic.model.model.wires.Pin; import net.mograsim.logic.model.serializing.IdentifyParams; import net.mograsim.logic.model.serializing.JSONSerializable; @@ -17,7 +17,7 @@ import net.mograsim.logic.model.snippets.HighLevelStateHandler; /** * The base class for all model components.
- * A ModelComponent has a reference to the ViewModel it belongs to.
+ * A ModelComponent has a reference to the LogicModel it belongs to.
* A ModelComponent has a name. This name is unique in the model the ModelComponent belongs to.
* A ModelComponent has a position and size. The size can only be modified by subclasses. * @@ -28,7 +28,7 @@ public abstract class ModelComponent implements JSONSerializable /** * The model this component is a part of. */ - protected final ViewModelModifiable model; + protected final LogicModelModifiable model; /** * The name of this component. Is unique for all components in its model. */ @@ -52,7 +52,7 @@ public abstract class ModelComponent implements JSONSerializable // creation and destruction - public ModelComponent(ViewModelModifiable model, String name) + public ModelComponent(LogicModelModifiable model, String name) { this.model = model; this.name = name == null ? model.getDefaultComponentName(this) : name; @@ -66,13 +66,13 @@ public abstract class ModelComponent implements JSONSerializable this.pinRemovedListeners = new ArrayList<>(); // TODO this will crash the high level state debug shell because submodel is not yet set. - // The same problem exists in ViewModelModifiable.getDefaultComponentName; see there + // The same problem exists in LogicModelModifiable.getDefaultComponentName; see there model.componentCreated(this, this::destroyed); } /** - * Destroys this component. This method is called from {@link ViewModelModifiable#componentDestroyed(ModelComponent) destroyComponent()} - * of the model this component is a part of.
+ * Destroys this component. This method is called from {@link LogicModelModifiable#componentDestroyed(ModelComponent) + * destroyComponent()} of the model this component is a part of.
* When overriding, make sure to also call the original implementation. * * @author Daniel Kirschten