1 package net.mograsim.logic.model.model;
5 import net.mograsim.logic.model.model.components.GUIComponent;
6 import net.mograsim.logic.model.model.wires.GUIWire;
8 public class ViewModelModifiable extends ViewModel
10 public String getDefaultComponentName(GUIComponent component)
12 Set<String> componentNames = getComponentsByName().keySet();
13 String nameBase = component.getClass().getSimpleName() + '#';
16 String nameCandidate = nameBase + i;
17 if (!componentNames.contains(nameCandidate))
22 public String getDefaultWireName()
24 Set<String> wireNames = getWiresByName().keySet();
27 String nameCandidate = "unnamedWire#" + i;
28 if (!wireNames.contains(nameCandidate))
34 public void componentCreated(GUIComponent component)
36 super.componentCreated(component);
40 public void componentDestroyed(GUIComponent component)
42 super.componentDestroyed(component);
46 public void wireCreated(GUIWire wire)
48 super.wireCreated(wire);
52 public void wireDestroyed(GUIWire wire)
54 super.wireDestroyed(wire);