Completely changed the structure and switched to Eclipse Plugin.
[Mograsim.git] / net.mograsim.logic.ui / src / net / mograsim / logic / ui / model / ViewModel.java
index 1f69acf..445810a 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
+public class ViewModel implements Visitable
 {
        private final List<GUIComponent> components;
        private final List<GUIComponent> componentsUnmodifiable;
@@ -105,6 +105,12 @@ public class ViewModel
                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);}