|Method from javax.swing.tree.FixedHeightLayoutCache$FHTreeStateNode Detail:|
protected void addNode(FHTreeStateNode newChild)
Adds newChild to this nodes children at the appropriate location.
The location is determined from the childIndex of newChild.
protected void adjustChildIndexs(int index,
Adjusts the child indexs of the receivers children by
amount, starting at
protected void adjustRowBy(int amount)
Adjusts the receiver, and all its children rows by
protected void adjustRowBy(int amount,
Adjusts this node, its child, and its parent starting at
an index of
index index is the index of the child
to start adjusting from, which is not necessarily the model
protected void childInsertedAtModelIndex(int index,
Messaged when a child has been inserted at index. For all the
children that have a childIndex >= index their index is incremented
protected void collapse(boolean adjustRows)
Collapses the receiver. If
adjustRows is true,
the rows of nodes after the receiver are adjusted.
protected FHTreeStateNode createChildFor(Object userObject)
Creates a new node to represent
This does NOT check to ensure there isn't already a child node
protected void didAdjustTree()
Messaged when this node either expands or collapses.
protected void didExpand()
Messaged when the node has expanded. This updates all of
the receivers children rows, as well as the total row count.
protected void expand()
protected void expandParentAndReceiver()
expandParentAndReceiver on the parent,
and expands the receiver.
public FHTreeStateNode getChildAtModelIndex(int index)
Returns the child for the passed in model index, this will
null if the child for
has not yet been created (expanded).
public int getChildIndex()
Returns the index of the receiver in the model.
protected int getCountTo(int stopIndex)
Asks all the children of the receiver for their totalChildCount
and returns this value (plus stopIndex).
protected int getNumExpandedChildrenTo(int stopIndex)
Returns the number of children that are expanded to
stopIndex. This does not include the number
of children that the child at
protected boolean getPathForRow(int row,
Returns true if there is a row for
nextRow gives the bounds of the receiver.
Information about the found row is returned in
This should be invoked on root with
public int getRow()
Returns the row of the receiver.
public int getRowToModelIndex(int index)
Returns the row of the child with a model index of
public int getTotalChildCount()
Returns the number of children in the receiver by descending all
expanded nodes and messaging them with getTotalChildCount.
public TreePath getTreePath()
TreePath of the receiver.
public int getVisibleLevel()
The highest visible nodes have a depth of 0.
public boolean isExpanded()
Returns true if this node is expanded.
public boolean isLeaf()
Returns true if the receiver is a leaf.
public boolean isVisible()
Returns true if this node is visible. This is determined by
asking all the parents if they are expanded.
protected void makeVisible()
Makes the receiver visible, but invoking
expandParentAndReceiver on the superclass.
public void remove(int childIndex)
Messaged when this node is removed from its parent, this messages
removedFromMapping to remove all the children.
protected void removeChildAtModelIndex(int modelIndex,
Removes the child at
isChildVisible should be true if the receiver
is visible and expanded.
protected void removeFromMapping()
Removes the receiver, and all its children, from the mapping
protected void resetChildrenPaths(TreePath parentPath)
Recreates the receivers path, and all its childrens paths.
protected void resetChildrenRowsFrom(int newRow,
Resets the receivers childrens rows. Starting with the child
newRow. This uses
to recursively descend children, and uses
resetRowSelection to ascend parents.
public void setParent(MutableTreeNode parent)
Messaged when this node is added somewhere, resets the path
and adds a mapping from path to this node.
protected int setRowAndChildren(int nextRow)
Sets the receivers row to
nextRow and recursively
updates all the children of the receivers rows. The index the
next row is to be placed as is returned.
public void setUserObject(Object o)
Messaged to set the user object. This resets the path.