Fixed a bug in Am2900; created dlatch8/80; relayouted some components
[Mograsim.git] / net.mograsim.logic.model / src / net / mograsim / logic / model / model / components / submodels / SubmodelInterface.java
index 9ac1749..331db12 100644 (file)
@@ -2,15 +2,16 @@ package net.mograsim.logic.model.model.components.submodels;
 
 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.components.GUIComponent;
+import net.mograsim.logic.model.model.LogicModelModifiable;
+import net.mograsim.logic.model.model.components.ModelComponent;
 import net.mograsim.logic.model.model.wires.Pin;
+import net.mograsim.logic.model.serializing.IdentifyParams;
 
-public class SubmodelInterface extends GUIComponent
+public class SubmodelInterface extends ModelComponent
 {
-       public SubmodelInterface(ViewModelModifiable model, String name)
+       public SubmodelInterface(LogicModelModifiable model)
        {
-               super(model, name);
+               super(model, SubmodelComponent.SUBMODEL_INTERFACE_NAME, true);
        }
 
        @Override
@@ -18,12 +19,18 @@ public class SubmodelInterface extends GUIComponent
        {// nothing to do here
        }
 
+       @Override
+       public String getIDForSerializing(IdentifyParams idParams)
+       {
+               throw new UnsupportedOperationException("A SubmodelInterface can't be serialized. Use SubmodelComponent.addSubmodelInterface");
+       }
+
        /**
         * {@inheritDoc}<br>
         * This method is only marked public in {@link SubmodelInterface} for {@link SubmodelComponent} to be able to add / remove pins to /
         * from a SubmodelInterface.<br>
         * 
-        * @see GUIComponent#removePin(Pin)
+        * @see ModelComponent#removePin(Pin)
         * 
         * @author Daniel Kirschten
         */
@@ -38,7 +45,7 @@ public class SubmodelInterface extends GUIComponent
         * This method is only marked public in {@link SubmodelInterface} for {@link SubmodelComponent} to be able to add / remove pins to /
         * from a SubmodelInterface.<br>
         * 
-        * @see GUIComponent#removePin(Pin)
+        * @see ModelComponent#removePin(Pin)
         * 
         * @author Daniel Kirschten
         */