|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object charvax.swing.tree.TreePath
Represents a path to a node. A TreePath is an array of Objects that are vended from a TreeModel. The elements of the array are ordered such that the root is always the first element (index 0) of the array.
Constructor Summary | |
protected |
TreePath()
Primarily provided for subclasses that represent paths in a different manner. |
|
TreePath(java.lang.Object singlePath)
Constructs a TreePath containing only a single element. |
|
TreePath(java.lang.Object[] path)
Constructs a path from an array of Objects, uniquely identifying the path from the root of the tree to a specific node, as returned by the tree's data model. |
protected |
TreePath(java.lang.Object[] path,
int length)
Constructs a new TreePath with the identified path components of length length. |
protected |
TreePath(TreePath parent,
java.lang.Object lastElement)
Constructs a new TreePath, which is the path identified by parent ending in lastElement. |
Method Summary | |
boolean |
equals(java.lang.Object o)
Tests two TreePaths for equality by checking each element of the paths for equality. |
java.lang.Object |
getLastPathComponent()
Returns the last component of this path. |
TreePath |
getParentPath()
Returns a path containing all the elements of this object, except the last path component. |
java.lang.Object[] |
getPath()
Returns an ordered array of Objects containing the components of this TreePath. |
java.lang.Object |
getPathComponent(int element)
Returns the path component at the specified index. |
int |
getPathCount()
Returns the number of elements in the path. |
int |
hashCode()
Returns the hashCode for the object. |
boolean |
isDescendant(TreePath aTreePath)
Returns true if aTreePath is a descendant of this TreePath. |
TreePath |
pathByAddingChild(java.lang.Object child)
Returns a new path containing all the elements of this object plus child. |
java.lang.String |
toString()
Returns a string that displays and identifies this object's properties. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
protected TreePath()
public TreePath(java.lang.Object singlePath)
public TreePath(java.lang.Object[] path)
protected TreePath(java.lang.Object[] path, int length)
protected TreePath(TreePath parent, java.lang.Object lastElement)
Method Detail |
public boolean equals(java.lang.Object o)
public java.lang.Object getLastPathComponent()
public TreePath getParentPath()
public java.lang.Object[] getPath()
public java.lang.Object getPathComponent(int element)
public int getPathCount()
public int hashCode()
public boolean isDescendant(TreePath aTreePath)
public TreePath pathByAddingChild(java.lang.Object child)
public java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |