public void useNodes(Collection<Node> nodes) { // forces creation of the array ChildrenArray arr = getArray(null); arr.useNodes(this, nodes); // assign all there nodes the new children for (Node n : nodes) { n.assignTo(EntrySupportDefault.this.children, -1); n.fireParentNodeChange(null, children.parent); } }
/** Notifies that a set of nodes has been add to * children. It is necessary that the system is already * in consistent state, so any callbacks will return * valid values. * * @param nodes list of removed nodes */ void notifyAdd(Collection<Node> nodes) { if (LOGGER.isLoggable(Level.FINER)) { LOGGER.finer("notifyAdd: " + nodes); } // notify about parent change for (Node n : nodes) { n.assignTo(children, -1); n.fireParentNodeChange(null, children.parent); } Node[] arr = nodes.toArray(new Node[nodes.size()]); Node n = children.parent; if (n != null && children.getEntrySupport() == this) { n.fireSubNodesChange(true, arr, null); } }
n.assignTo(children, i); n.fireParentNodeChange(null, children.parent);
node.assignTo(ch, -1); node.fireParentNodeChange(null, ch.parent); return node;
/** This method can be called by subclasses that * directly modify the nodes collection to update the * state of the nodes appropriatelly. * This method should be called under * MUTEX.writeAccess. */ final void refreshImpl() { if (isInitialized()) { Array.this.entrySupport().refreshEntry(getNodesEntry()); entrySupport().getNodes(false); } else if (nodes != null) { for (Node n : nodes) { n.assignTo(this, -1); } } }
node.assignTo(Children.this, i); node.fireParentNodeChange(null, parent);
public void useNodes (Collection nodes) { // forces creation of the array ChildrenArray arr = getArray (null); arr.useNodes (this, nodes); // assign all there nodes the new children Iterator it = nodes.iterator (); while (it.hasNext ()) { Node n = (Node)it.next (); n.assignTo (Children.this, -1); n.fireParentNodeChange (null, parent); } }
public void useNodes (Collection nodes) { // forces creation of the array ChildrenArray arr = getArray (null); arr.useNodes (this, nodes); // assign all there nodes the new children Iterator it = nodes.iterator (); while (it.hasNext ()) { Node n = (Node)it.next (); n.assignTo (Children.this, -1); n.fireParentNodeChange (null, parent); } }
/** Notifies that a set of nodes has been add to * children. It is necessary that the system is already * in consistent state, so any callbacks will return * valid values. * * @param nodes list of removed nodes */ private void notifyAdd (Collection nodes) { // notify about parent change Iterator it = nodes.iterator (); while (it.hasNext ()) { Node n = (Node)it.next (); n.assignTo (this, -1); n.fireParentNodeChange (null, parent); } Node[] arr = (Node[])nodes.toArray (new Node[nodes.size ()]); Node n = parent; if (n != null) { n.fireSubNodesChange ( true, arr, null ); } }
/** Notifies that a set of nodes has been add to * children. It is necessary that the system is already * in consistent state, so any callbacks will return * valid values. * * @param nodes list of removed nodes */ private void notifyAdd (Collection nodes) { // notify about parent change Iterator it = nodes.iterator (); while (it.hasNext ()) { Node n = (Node)it.next (); n.assignTo (this, -1); n.fireParentNodeChange (null, parent); } Node[] arr = (Node[])nodes.toArray (new Node[nodes.size ()]); Node n = parent; if (n != null) { n.fireSubNodesChange ( true, arr, null ); } }
/** Computes the nodes now. */ final Node[] justComputeNodes () { if (map == null) { map = new HashMap (17); // debug.append ("Map initialized\n"); // NOI18N // printStackTrace(); } LinkedList l = new LinkedList (); Iterator it = entries.iterator (); while (it.hasNext ()) { Entry entry = (Entry)it.next (); Info info = findInfo (entry); try { l.addAll (info.nodes ()); } catch (RuntimeException ex) { NodeOp.warning (ex); } } Node[] arr = (Node[])l.toArray (new Node[l.size ()]); // initialize parent nodes for (int i = 0; i < arr.length; i++) { Node n = arr[i]; n.assignTo (this, i); n.fireParentNodeChange (null, parent); } return arr; }
/** Computes the nodes now. */ final Node[] justComputeNodes () { if (map == null) { map = new HashMap (17); // debug.append ("Map initialized\n"); // NOI18N // printStackTrace(); } LinkedList l = new LinkedList (); Iterator it = entries.iterator (); while (it.hasNext ()) { Entry entry = (Entry)it.next (); Info info = findInfo (entry); try { l.addAll (info.nodes ()); } catch (RuntimeException ex) { NodeOp.warning (ex); } } Node[] arr = (Node[])l.toArray (new Node[l.size ()]); // initialize parent nodes for (int i = 0; i < arr.length; i++) { Node n = arr[i]; n.assignTo (this, i); n.fireParentNodeChange (null, parent); } return arr; }
/** This method can be called by subclasses that * directly modify the nodes collection to update the * state of the nodes appropriatelly. * This method should be called under * MUTEX.writeAccess. */ final void refreshImpl () { if ( isInitialized() ) { Array.this.refreshEntry (getNodesEntry ()); super.getArray (null).nodes (); } else if ( nodes != null ) { for( Iterator it = nodes.iterator(); it.hasNext(); ) { Node n = (Node)it.next(); n.assignTo( this, -1 ); } } }
/** This method can be called by subclasses that * directly modify the nodes collection to update the * state of the nodes appropriatelly. * This method should be called under * MUTEX.writeAccess. */ final void refreshImpl () { if ( isInitialized() ) { Array.this.refreshEntry (getNodesEntry ()); super.getArray (null).nodes (); } else if ( nodes != null ) { for( Iterator it = nodes.iterator(); it.hasNext(); ) { Node n = (Node)it.next(); n.assignTo( this, -1 ); } } }
node.assignTo (Children.this, i); node.fireParentNodeChange (null, parent);
node.assignTo (Children.this, i); node.fireParentNodeChange (null, parent);