1 package net.mograsim.logic.model.model.components.submodels;
3 import net.haspamelodica.swt.helper.gcs.GeneralGC;
4 import net.haspamelodica.swt.helper.swtobjectwrappers.Rectangle;
5 import net.mograsim.logic.model.model.LogicModelModifiable;
6 import net.mograsim.logic.model.model.components.ModelComponent;
7 import net.mograsim.logic.model.model.wires.Pin;
8 import net.mograsim.logic.model.serializing.IdentifyParams;
10 public class SubmodelInterface extends ModelComponent
12 public SubmodelInterface(LogicModelModifiable model, String name)
14 super(model, name, true);
18 public void render(GeneralGC gc, Rectangle visibleRegion)
19 {// nothing to do here
23 public String getIDForSerializing(IdentifyParams idParams)
25 throw new UnsupportedOperationException("A SubmodelInterface can't be serialized. Use SubmodelComponent.addSubmodelInterface");
30 * This method is only marked public in {@link SubmodelInterface} for {@link SubmodelComponent} to be able to add / remove pins to /
31 * from a SubmodelInterface.<br>
33 * @see ModelComponent#removePin(Pin)
35 * @author Daniel Kirschten
38 public void addPin(Pin pin)
45 * This method is only marked public in {@link SubmodelInterface} for {@link SubmodelComponent} to be able to add / remove pins to /
46 * from a SubmodelInterface.<br>
48 * @see ModelComponent#removePin(Pin)
50 * @author Daniel Kirschten
53 protected void removePin(String name)
55 super.removePin(name);