X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=net.mograsim.logic.model%2Fsrc%2Fnet%2Fmograsim%2Flogic%2Fmodel%2Fmodel%2FViewModelModifiable.java;h=b4fa4f530500ddcd3cab55d1621d1e4df4e906cf;hb=95a225aed8eae0fc080440dba779abfdf867ff3d;hp=97993a7d579516343aae5ecd2f7cf6b348bac935;hpb=21ffb2a7f764069fb3c55b71647b43e8803e668c;p=Mograsim.git diff --git a/net.mograsim.logic.model/src/net/mograsim/logic/model/model/ViewModelModifiable.java b/net.mograsim.logic.model/src/net/mograsim/logic/model/model/ViewModelModifiable.java index 97993a7d..b4fa4f53 100644 --- a/net.mograsim.logic.model/src/net/mograsim/logic/model/model/ViewModelModifiable.java +++ b/net.mograsim.logic.model/src/net/mograsim/logic/model/model/ViewModelModifiable.java @@ -5,7 +5,6 @@ import java.util.Set; import net.mograsim.logic.model.model.components.GUIComponent; import net.mograsim.logic.model.model.wires.GUIWire; -//TODO a ViewModel is modifiable without casting to ViewModelModifiable via GUIWire::destroy and GUIComponent::destroy public class ViewModelModifiable extends ViewModel { public String getDefaultComponentName(GUIComponent component) @@ -41,26 +40,26 @@ public class ViewModelModifiable extends ViewModel } @Override - public void componentCreated(GUIComponent component) + public void componentCreated(GUIComponent component, Runnable destroyed) { - super.componentCreated(component); + super.componentCreated(component, destroyed); } @Override - public void componentDestroyed(GUIComponent component) + public void destroyComponent(GUIComponent component) { - super.componentDestroyed(component); + super.destroyComponent(component); } @Override - public void wireCreated(GUIWire wire) + public void wireCreated(GUIWire wire, Runnable destroyed) { - super.wireCreated(wire); + super.wireCreated(wire, destroyed); } @Override - public void wireDestroyed(GUIWire wire) + public void destroyWire(GUIWire wire) { - super.wireDestroyed(wire); + super.destroyWire(wire); } } \ No newline at end of file