X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=net.mograsim.logic.ui%2Fsrc%2Fnet%2Fmograsim%2Flogic%2Fui%2Fmodel%2Fcomponents%2FGUIComponent.java;h=5f74dadd9a411636a3f50039502b5de20379224f;hb=47f890be22d1b184e059c92ef9f94caff18f3306;hp=ca21622a8fc8ac8f290507b07c7ccd434655f919;hpb=e7193d1fb16edc79e9cc3d8adcfb71caecd8463b;p=Mograsim.git diff --git a/net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/GUIComponent.java b/net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/GUIComponent.java index ca21622a..5f74dadd 100644 --- a/net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/GUIComponent.java +++ b/net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/GUIComponent.java @@ -5,14 +5,14 @@ import java.util.Collections; import java.util.List; import java.util.function.Consumer; -import net.mograsim.logic.ui.model.ViewModel; -import net.mograsim.logic.ui.model.wires.Pin; import net.haspamelodica.swt.helper.gcs.GeneralGC; import net.haspamelodica.swt.helper.swtobjectwrappers.Rectangle; +import net.mograsim.logic.ui.model.ViewModelModifiable; +import net.mograsim.logic.ui.model.wires.Pin; public abstract class GUIComponent { - protected final ViewModel model; + protected final ViewModelModifiable model; private final Rectangle bounds; private final List pins; protected final List pinsUnmodifiable; @@ -24,7 +24,7 @@ public abstract class GUIComponent private final Runnable redrawListenerForSubcomponents; - public GUIComponent(ViewModel model) + public GUIComponent(ViewModelModifiable model) { this.model = model; this.bounds = new Rectangle(0, 0, 0, 0); @@ -129,4 +129,9 @@ public abstract class GUIComponent pin.removeRedrawListener(redrawListenerForSubcomponents); callRedrawListeners(); } + + public String getIdentifier() + { + return "class:".concat(getClass().getCanonicalName()); + } } \ No newline at end of file