Added debug shell for setHighLevelState; improved ViewModel comments
[Mograsim.git] / net.mograsim.logic.ui / src / net / mograsim / logic / ui / model / ViewModel.java
index 445810a..55402c2 100644 (file)
@@ -8,7 +8,7 @@ import java.util.function.Consumer;
 import net.mograsim.logic.ui.model.components.GUIComponent;
 import net.mograsim.logic.ui.model.wires.GUIWire;
 
-public class ViewModel implements Visitable
+public class ViewModel
 {
        private final List<GUIComponent> components;
        private final List<GUIComponent> componentsUnmodifiable;
@@ -41,7 +41,7 @@ public class ViewModel implements Visitable
 
        /**
         * Adds the given component to the list of components and calls all componentAddedListeners. Don't call this method from application
-        * code as it is automatically called in GUIComponent::new.
+        * code as it is automatically called in {@link GUIComponent}'s constructor.
         */
        protected void componentCreated(GUIComponent component)
        {
@@ -55,7 +55,7 @@ public class ViewModel implements Visitable
 
        /**
         * Removes the given component from the list of components and calls all componentRemovedListeners. Don't call this method from
-        * application code as it is automatically called in GUIComponent::destroy.
+        * application code as it is automatically called in {@link GUIComponent#destroy()}.
         */
        protected void componentDestroyed(GUIComponent component)
        {
@@ -69,7 +69,7 @@ public class ViewModel implements Visitable
 
        /**
         * Adds the given wire to the list of wires and calls all wireAddedListeners. Don't call this method from application code as it is
-        * automatically called in GUIWire::new.
+        * automatically called in {@link GUIWire}'s constructor(s).
         */
        protected void wireCreated(GUIWire wire)
        {
@@ -83,7 +83,7 @@ public class ViewModel implements Visitable
 
        /**
         * Removes the given wire from the list of wires and calls all wireRemovedListeners. Don't call this method from application code as it
-        * is automatically called in GUIWire::destroy.
+        * is automatically called in {@link GUIWire#destroy()}.
         */
        protected void wireDestroyed(GUIWire wire)
        {
@@ -105,12 +105,6 @@ public class ViewModel implements Visitable
                return wiresUnmodifiable;
        }
 
-       @Override
-       public void accept(ModelVisitor mv)
-       {
-               mv.visit(this);
-       }
-
        // @formatter:off
        public void addComponentAddedListener     (Consumer<? super GUIComponent> listener) {componentAddedListeners  .add   (listener);}
        public void addComponentRemovedListener   (Consumer<? super GUIComponent> listener) {componentRemovedListeners.add   (listener);}