import net.haspamelodica.swt.helper.swtobjectwrappers.Rectangle;
import net.mograsim.logic.model.model.ViewModelModifiable;
import net.mograsim.logic.model.model.wires.Pin;
+import net.mograsim.logic.model.serializing.IdentifierGetter;
+import net.mograsim.logic.model.serializing.JSONSerializable;
import net.mograsim.logic.model.snippets.HighLevelStateHandler;
/**
*
* @author Daniel Kirschten
*/
-public abstract class GUIComponent
+public abstract class GUIComponent implements JSONSerializable
{
/**
* The model this component is a part of.
redrawListenerForSubcomponents = this::requestRedraw;
+ // 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
model.componentCreated(this);
}
this.highLevelStateHandler = highLevelStateHandler;
}
+ public HighLevelStateHandler getHighLevelStateHandler()
+ {
+ return highLevelStateHandler;
+ }
+
/**
* Gets the current value of the given high-level state. <br>
* See {@link HighLevelStateHandler} for an explanation of high-level state IDs.
// serializing
- @SuppressWarnings("static-method") // this method is intended to be overridden
- public JsonElement getParamsForSerializing()
+ @Override
+ public JsonElement getParamsForSerializing(IdentifierGetter idGetter)
{
return JsonNull.INSTANCE;
}