Exemple #1
0
 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";
 }
Exemple #2
0
 public void removeAll() {
   for (int i = 0; i < nodes.size(); i++) {
     nodes.get(i).deleteGroup(this);
   }
   igroup.getNodes().clear();
   nodes.clear();
 }
Exemple #3
0
 public boolean removeNode(BMFNodeGUI n) {
   if (nodes.contains(n)) {
     nodes.remove(n);
     igroup.deleteNode(n.getInode());
     return true;
   } else {
     return false;
   }
 }
Exemple #4
0
 public boolean addNode(BMFNodeGUI n) {
   if (!nodes.contains(n)) {
     nodes.add(n);
     igroup.addNode(n.getInode());
     return true;
   } else {
     return false;
   }
 }