API Overview API Index Package Overview Direct link to this page
JDK 1.6
  javax.swing.tree. TreePath View Source
Author(s)
Scott Violet
Philip Milne
Since
Version
1.31 11/17/05
Serial
Hierarchy
 Object
      TreePath
Implements
 Serializable
Subclasses
Description
public class TreePath
  Represents a path to a node.
See also:   
Constructors
protected TreePath ()
  Primarily provided for subclasses that represent paths in a different manner.
public TreePath (Object singlePath)
  Constructs a TreePath containing only a single element.
public TreePath (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 (Object path, int length)
Constructs a new TreePath with the identified path components of length length.
protected TreePath (TreePath parent, Object lastElement)
Constructs a new TreePath, which is the path identified by parent ending in lastElement.
Methods
Hide/Show inherited methods
public boolean equals (Object o)
  Tests two TreePaths for equality by checking each element of the paths for equality.
public Object getLastPathComponent ()
  Returns the last component of this path.
public TreePath getParentPath ()
Returns a path containing all the elements of this object, except the last path component.
public Object getPath ()
  Returns an ordered array of Objects containing the components of this TreePath.
public Object getPathComponent (int element)
  Returns the path component at the specified index.
public int getPathCount ()
  Returns the number of elements in the path.
public int hashCode ()
  Returns the hashCode for the object.
public boolean isDescendant (TreePath aTreePath)
  Returns true if aTreePath is a descendant of this TreePath.
public TreePath pathByAddingChild (Object child)
  Returns a new path containing all the elements of this object plus child.
public String toString ()
  Returns a string that displays and identifies this object's properties.
Fields
Hide/Show inherited fields
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar