public BMFGroupGUI(IBMFGroup igroup) { if (igroup != null) { this.igroup = igroup; this.name = igroup.getName(); this.nodes = new ArrayList<BMFNodeGUI>(); ID = igroup.getGroupID(); path = null; } else this.name = "Groups"; }
public void removeAll() { for (int i = 0; i < nodes.size(); i++) { nodes.get(i).deleteGroup(this); } igroup.getNodes().clear(); nodes.clear(); }
public boolean removeNode(BMFNodeGUI n) { if (nodes.contains(n)) { nodes.remove(n); igroup.deleteNode(n.getInode()); return true; } else { return false; } }
public boolean addNode(BMFNodeGUI n) { if (!nodes.contains(n)) { nodes.add(n); igroup.addNode(n.getInode()); return true; } else { return false; } }