Ejemplo n.º 1
0
 public void addNodes(NodeLayout[] nodes) {
   super.addNodes(nodes);
   HashSet nodesToUpdate = new HashSet();
   for (int i = 0; i < nodes.length; i++) {
     nodesToUpdate.addAll(Arrays.asList(nodes[i].getPredecessingNodes()));
   }
   for (Iterator iterator = nodesToUpdate.iterator(); iterator.hasNext(); ) {
     InternalNodeLayout nodeToUpdate = (InternalNodeLayout) iterator.next();
     updateNodeLabel(nodeToUpdate);
   }
 }
Ejemplo n.º 2
0
 public void removeNodes(NodeLayout[] nodes) {
   super.removeNodes(nodes);
   HashSet nodesToUpdate = new HashSet();
   for (int i = 0; i < nodes.length; i++) {
     nodesToUpdate.addAll(Arrays.asList(nodes[i].getPredecessingNodes()));
     if (((InternalNodeLayout) nodes[i]).isDisposed()) {
       removeFigureForNode((InternalNodeLayout) nodes[i]);
     } else {
       nodesToUpdate.add(nodes[i]);
     }
   }
   for (Iterator iterator = nodesToUpdate.iterator(); iterator.hasNext(); ) {
     InternalNodeLayout predecessor = (InternalNodeLayout) iterator.next();
     updateNodeLabel(predecessor);
   }
 }