| java.lang.Object abbot.tester.ComponentLocation abbot.tester.JTreeLocation
Constructor Summary | |
public | JTreeLocation() Create an uninitialized JTreeLocation. | public | JTreeLocation(int row) Create a JTreeLocation corresponding to the given row, by index. | public | JTreeLocation(int row, boolean inExpansion) Create a JTreeLocation corresponding to the given row, by index. | public | JTreeLocation(TreePath treePath) Create a JTreeLocation corresponding to the given TreePath. | public | JTreeLocation(TreePath treePath, boolean inExpansion) Create a JTreeLocation corresponding to the given TreePath. | public | JTreeLocation(Point p) |
Method Summary | |
protected String | badFormat(String encoded) | public boolean | equals(Object o) | public static TreePath | findMatchingPath(JTree tree, TreePath path) Given a
TreePath (which may be composed of objects, string
representations of objects, or regular expressions), return the
equivalent
TreePath for the given
JTree constructed
from objects from the tree's model.
For each element,
Object.equals is attempted first (a
null pattern matches everything), followed by a comparison
of the pattern as a
String (via
Object.toString ). | public Rectangle | getBounds(Component c) | TreePath | getPath(JTree tree) Return the path represented by this JTree location. | public Point | getPoint(Component c) Return a concrete point for the abstract location. | int | getRow(JTree tree) Return the row represented by this JTree location. | public boolean | isInExpansion() | public ComponentLocation | parse(String encoded) | protected Point | pathToPoint(JTree tree, TreePath path) Convert the given path to an x, y coordinate.
throws: LocationUnavailableException - if any part of the path ishidden. | protected Point | rowToPoint(JTree tree, int row) Convert the given row to an x, y coordinate. | public void | setInExpansion(boolean in) | public String | toString() |
JTreeLocation | public JTreeLocation()(Code) | | Create an uninitialized JTreeLocation. If queried for its
Point will return the default location.
|
JTreeLocation | public JTreeLocation(int row)(Code) | | Create a JTreeLocation corresponding to the given row, by index.
|
JTreeLocation | public JTreeLocation(int row, boolean inExpansion)(Code) | | Create a JTreeLocation corresponding to the given row, by index.
|
JTreeLocation | public JTreeLocation(TreePath treePath)(Code) | | Create a JTreeLocation corresponding to the given TreePath. The
TreePath must consist of usable String representations that can be
used in later comparisons. The default
<classname>@<hashcode> returned by
Object.toString is not usable; if that is all that is
available, refer to the row number instead.
|
JTreeLocation | public JTreeLocation(TreePath treePath, boolean inExpansion)(Code) | | Create a JTreeLocation corresponding to the given TreePath. The
TreePath must consist of usable String representations that can be
used in later comparisons. The default
<classname>@<hashcode> format returned by
Object.toString is not usable; if that is all that is
available, refer to the row number instead.
|
findMatchingPath | public static TreePath findMatchingPath(JTree tree, TreePath path)(Code) | | Given a
TreePath (which may be composed of objects, string
representations of objects, or regular expressions), return the
equivalent
TreePath for the given
JTree constructed
from objects from the tree's model.
For each element,
Object.equals is attempted first (a
null pattern matches everything), followed by a comparison
of the pattern as a
String (via
Object.toString ). The
pattern may be a regular expression bounded by forward slashes.
throws: LocationUnavailableException - if no matching path is found. |
getPath | TreePath getPath(JTree tree)(Code) | | Return the path represented by this JTree location.
null if the path can not be found. |
getRow | int getRow(JTree tree)(Code) | | Return the row represented by this JTree location.
-1 if the row is not found. |
isInExpansion | public boolean isInExpansion()(Code) | | |
setInExpansion | public void setInExpansion(boolean in)(Code) | | |
|
|