X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=net.mograsim.logic.model%2Fsrc%2Fnet%2Fmograsim%2Flogic%2Fmodel%2Fsnippets%2Fhighlevelstatehandlers%2Fstandard%2Fatomic%2FDelegatingAtomicHighLevelStateHandler.java;h=621dde31249ab6c85e29457e06c0c833e56281e7;hb=1ce42890e85c1a114bf647002d1aa2743ff9871a;hp=2529179790910c6f2d1c6efcbd7a30c19f5085ff;hpb=039f31334c661633b71e945aa4332cedb7055526;p=Mograsim.git diff --git a/net.mograsim.logic.model/src/net/mograsim/logic/model/snippets/highlevelstatehandlers/standard/atomic/DelegatingAtomicHighLevelStateHandler.java b/net.mograsim.logic.model/src/net/mograsim/logic/model/snippets/highlevelstatehandlers/standard/atomic/DelegatingAtomicHighLevelStateHandler.java index 25291797..621dde31 100644 --- a/net.mograsim.logic.model/src/net/mograsim/logic/model/snippets/highlevelstatehandlers/standard/atomic/DelegatingAtomicHighLevelStateHandler.java +++ b/net.mograsim.logic.model/src/net/mograsim/logic/model/snippets/highlevelstatehandlers/standard/atomic/DelegatingAtomicHighLevelStateHandler.java @@ -1,6 +1,6 @@ package net.mograsim.logic.model.snippets.highlevelstatehandlers.standard.atomic; -import net.mograsim.logic.model.model.components.GUIComponent; +import net.mograsim.logic.model.model.components.ModelComponent; import net.mograsim.logic.model.model.components.submodels.SubmodelComponent; import net.mograsim.logic.model.serializing.IdentifyParams; import net.mograsim.logic.model.snippets.SnippetDefinintion; @@ -10,7 +10,7 @@ import net.mograsim.logic.model.snippets.highlevelstatehandlers.standard.Standar public class DelegatingAtomicHighLevelStateHandler implements AtomicHighLevelStateHandler { private final SubmodelComponent parentComponent; - private GUIComponent delegateTarget; + private ModelComponent delegateTarget; private String subStateID; public DelegatingAtomicHighLevelStateHandler(HighLevelStateHandlerContext context) @@ -32,17 +32,17 @@ public class DelegatingAtomicHighLevelStateHandler implements AtomicHighLevelSta } } - public void set(GUIComponent delegateTarget, String subStateID) + public void set(ModelComponent delegateTarget, String subStateID) { setDelegateTarget(delegateTarget); setSubStateID(subStateID); } - public void setDelegateTarget(GUIComponent delegateTarget) + public void setDelegateTarget(ModelComponent delegateTarget) { if (delegateTarget == null) this.delegateTarget = parentComponent; - else if (parentComponent.submodel.getComponentsByName().get(delegateTarget.name) != delegateTarget) + else if (parentComponent.submodel.getComponentsByName().get(delegateTarget.getName()) != delegateTarget) throw new IllegalArgumentException( "Can only set components belonging to the submodel of the parent component of this handler as the delegate target"); this.delegateTarget = delegateTarget; @@ -75,7 +75,7 @@ public class DelegatingAtomicHighLevelStateHandler implements AtomicHighLevelSta public DelegatingAtomicHighLevelStateHandlerParams getParamsForSerializing(IdentifyParams idParams) { DelegatingAtomicHighLevelStateHandlerParams params = new DelegatingAtomicHighLevelStateHandlerParams(); - params.delegateTarget = delegateTarget.name; + params.delegateTarget = delegateTarget.getName(); params.subStateID = subStateID; return params; }