|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.fest.swing.driver.JTreeLocation
public final class JTreeLocation
Understands a visible location on a
. A row index or a JTree
ified
String
(i.e. each TreePath
component is a TreePath
String
) or
a
of TreePath
Object
may be used to indicate the location. Note that if a
is used, the entire path leading up to the designated node must be viewable at the
time the location is used.
TreePath
Constructor Summary | |
---|---|
JTreeLocation()
|
Method Summary | |
---|---|
Pair<Rectangle,Point> |
pathBoundsAndCoordinates(JTree tree,
TreePath path)
Returns the bounds and visible coordinates of the given path. |
TreePath |
pathFor(JTree tree,
int row)
Returns the path for the given row. |
Pair<Rectangle,Point> |
rowBoundsAndCoordinates(JTree tree,
int row)
Returns the bounds and visible coordinates of the given row. |
int |
validIndex(JTree tree,
int row)
Validates that the given row index is valid. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JTreeLocation()
Method Detail |
---|
@RunsInCurrentThread public Pair<Rectangle,Point> rowBoundsAndCoordinates(JTree tree, int row)
Note: This method is not guaranteed to be executed in the event dispatch thread (EDT.) Clients are responsible for calling this method from the EDT.
tree
- the target JTree
.row
- the given row.
IndexOutOfBoundsException
- if the given row is less than zero or equal than or greater than the number of
visible rows in the JTree
.
LocationUnavailableException
- if a tree path for the given row cannot be found.@RunsInCurrentThread public TreePath pathFor(JTree tree, int row)
Note: This method is not guaranteed to be executed in the event dispatch thread (EDT.) Clients are responsible for calling this method from the EDT.
tree
- the target JTree
.row
- the given row.
IndexOutOfBoundsException
- if the given row is less than zero or equal than or greater than the number of
visible rows in the JTree
.
LocationUnavailableException
- if a tree path for the given row cannot be found.@RunsInCurrentThread public int validIndex(JTree tree, int row)
Note: This method is not guaranteed to be executed in the event dispatch thread (EDT.) Clients are responsible for calling this method from the EDT.
tree
- the target JTree
.row
- the row index to validate.
IndexOutOfBoundsException
- if the given row is less than zero or equal than or greater than the number of
visible rows in the JTree
.@RunsInCurrentThread public Pair<Rectangle,Point> pathBoundsAndCoordinates(JTree tree, TreePath path)
Note: This method is not guaranteed to be executed in the event dispatch thread (EDT.) Clients are responsible for calling this method from the EDT.
tree
- the target JTree
.path
- the given path.
LocationUnavailableException
- if any part of the path is not visible.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |