|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectabbot.tester.ComponentLocation
abbot.tester.JTreeLocation
Provides encapsulation of a visible location on a JTree. A row may be indicated with [row] or a tree path [root, parent, child].
Constructor Summary | |
JTreeLocation()
Create an uninitialized JTreeLocation. |
|
JTreeLocation(int row)
Create a JTreeLocation corresponding to the given row, by index. |
|
JTreeLocation(int row,
boolean inExpansion)
Create a JTreeLocation corresponding to the given row, by index. |
|
JTreeLocation(Point p)
|
|
JTreeLocation(TreePath treePath)
Create a JTreeLocation corresponding to the given TreePath. |
|
JTreeLocation(TreePath treePath,
boolean inExpansion)
Create a JTreeLocation corresponding to the given TreePath. |
Method Summary | |
protected String |
badFormat(String encoded)
|
boolean |
equals(Object o)
|
static TreePath |
findMatchingPath(JTree tree,
TreePath path)
Given a TreePath of Strings, return the equivalent TreePath for the given JTree constructed from objects from the tree's model. |
Rectangle |
getBounds(Component c)
Convert the abstract location into a concrete area. |
(package private) TreePath |
getPath(JTree tree)
Return the path represented by this JTree location. |
Point |
getPoint(Component c)
Return a concrete point for the abstract location. |
(package private) int |
getRow(JTree tree)
Return the row represented by this JTree location. |
boolean |
isInExpansion()
|
ComponentLocation |
parse(String encoded)
Convert the given encoding into the proper location. |
protected Point |
pathToPoint(JTree tree,
TreePath path)
Convert the given path to an x, y coordinate. |
protected Point |
rowToPoint(JTree tree,
int row)
Convert the given row to an x, y coordinate. |
void |
setInExpansion(boolean in)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public JTreeLocation()
public JTreeLocation(int row)
public JTreeLocation(int row, boolean inExpansion)
public JTreeLocation(TreePath treePath)
public JTreeLocation(TreePath treePath, boolean inExpansion)
public JTreeLocation(Point p)
Method Detail |
public void setInExpansion(boolean in)
public boolean isInExpansion()
protected Point rowToPoint(JTree tree, int row)
LocationUnavailableException
- if the row is not visible.protected Point pathToPoint(JTree tree, TreePath path)
LocationUnavailableException
- if any part of the path is
hidden.TreePath getPath(JTree tree)
int getRow(JTree tree)
public Point getPoint(Component c)
getPoint
in class ComponentLocation
public Rectangle getBounds(Component c)
ComponentLocation
getBounds
in class ComponentLocation
public boolean equals(Object o)
equals
in class ComponentLocation
public String toString()
toString
in class ComponentLocation
public ComponentLocation parse(String encoded)
ComponentLocation
parse
in class ComponentLocation
protected String badFormat(String encoded)
badFormat
in class ComponentLocation
public static TreePath findMatchingPath(JTree tree, TreePath path)
LocationUnavailableException
- if no matching path is found.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |