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