Lines Matching refs:node
67 * The root node of the internal cache of nodes that have been shown.
69 * there may be one cached node for each path to a modeled node.
112 * Determines whether or not the root node from
115 * @param rootVisible true if the root node of the tree is to be displayed
119 * description: Whether or not the root node
183 TreeStateNode node = getNodeForPath(path, false, true);
185 if(node != null) {
186 node.makeVisible();
187 node.collapse();
198 TreeStateNode node = getNodeForPath(path, true, false);
200 return (node != null) ? (node.isVisible() && node.isExpanded()) :
211 * if the node could not be ascertained
214 TreeStateNode node = getNodeForPath(path, true, false);
216 if(node != null) {
219 return node.getNodeBounds(placeIn);
273 TreeStateNode node = getNodeForPath(path, true, false);
275 if(node != null) {
276 node.markSizeInvalid();
277 if(node.isVisible())
278 updateYLocationsFrom(node.getRow());
291 TreeStateNode node = getNode(rowCount - 1);
293 return node.getYOrigin() + node.getPreferredHeight();
312 * Returns the path to the node that is closest to x,y. If
321 * @return the path to the node that is closest to x, y
345 TreeStateNode node = getNodeForPath(path, true, false);
347 if(node != null) {
348 return new VisibleTreeStateNodeEnumeration(node);
358 TreeStateNode node = getNodeForPath(path, true, false);
360 return (node != null) ? node.getVisibleChildCount() : 0;
395 * Invoked after a node (or a set of siblings) has changed in some
396 * way. The node(s) have not changed locations in the tree or
403 * changed node(s).
406 * changed node(s).
420 /* Update the size of the changed node, as well as all the
470 /* Only need to update the children if the node has been
618 * given node down. If the path returned by <code>e.getPath</code>
620 * current root node the first element should become the new root
623 * <p><code>e.path</code> holds the path to the node.
653 /* Remove the current node and recreate a new one. */
689 * Adds a mapping for node.
691 private void addMapping(TreeStateNode node) {
692 treePathMapping.put(node.getTreePath(), node);
696 * Removes the mapping for a previously added node.
698 private void removeMapping(TreeStateNode node) {
699 treePathMapping.remove(node.getTreePath());
703 * Returns the node previously added for <code>path</code>. This may
704 * return null, if you to create a node use getNodeForPath.
726 * Completely rebuild the tree, all expanded state, and node caches are
763 * Creates a new node to represent the node at <I>childIndex</I> in
764 * <I>parent</I>s children. This should be called if the node doesn't
766 * The newly created node will be made visible if <I>parent</I> is
787 /* Find the new row to insert this newly visible node at. */
817 TreeStateNode node;
819 node = getMapping(path);
820 if(node != null) {
821 if(onlyIfVisible && !node.isVisible())
823 return node;
839 node = null;
841 node = getMapping(path);
842 if(node != null) {
845 while(node != null && paths.size() > 0) {
847 node.getLoadedChildren(shouldCreate);
850 getIndexOfChild(node.getUserObject(),
854 childIndex >= node.getChildCount() ||
855 (onlyIfVisible && !node.isVisible())) {
856 node = null;
859 node = (TreeStateNode)node.getChildAt
862 return node;
909 TreeStateNode node;
914 node = (TreeStateNode)visibleNodes.elementAt(counter);
915 node.setYOrigin(aY);
916 if(updateAll || !node.hasValidSize())
917 node.updatePreferredSize(counter);
918 aY += node.getPreferredHeight();
936 TreeStateNode node;
943 node = (TreeStateNode)visibleNodes.elementAt(mid);
944 minY = node.getYOrigin();
945 maxY = minY + node.getPreferredHeight();
997 * Returns the maximum node width.
1003 TreeStateNode node;
1006 node = this.getNode(counter);
1007 nodeWidth = node.getPreferredWidth() + node.getXOrigin();
1039 /** Is this node currently expanded? */
1042 /** Has this node been expanded at least once? */
1045 /** Path of this node. */
1058 * Messaged when this node is added somewhere, resets the path
1059 * and adds a mapping from path to this node.
1071 * Messaged when this node is removed from its parent, this messages
1075 TreeStateNode node = (TreeStateNode)getChildAt(childIndex);
1077 node.removeFromMapping();
1121 * Returns the location and size of this node.
1138 * @return x location to draw node at.
1181 * Returns true if this node has a valid size.
1195 * Returns true if this node has been expanded at least once.
1209 * Returns the last visible node that is a child of this
1213 TreeStateNode node = this;
1215 while(node.isExpanded() && node.getChildCount() > 0)
1216 node = (TreeStateNode)node.getLastChild();
1217 return node;
1306 * Returns a TreePath instance for this node.
1460 * Expands this node in the tree. This will load the children
1461 * from the treeModel if this node has not previously been
1556 * Collapses this node in the tree. If <I>adjustTree</I> is
1576 TreeStateNode node = (TreeStateNode)cursor.
1578 if (node.isVisible()) {
1580 //visibleNodes.removeElement(node);
1581 lastYEnd = node.getYOrigin() +
1582 node.getPreferredHeight();
1588 TreeStateNode node = (TreeStateNode)cursor.
1590 if (node.isVisible()) {
1592 //visibleNodes.removeElement(node);
1662 protected VisibleTreeStateNodeEnumeration(TreeStateNode node) {
1663 this(node, -1);
1693 TreeStateNode node = (TreeStateNode)parent.
1696 retObject = node.getTreePath();