|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object abbot.tester.ComponentLocation abbot.tester.extensions.JGraphLocation
public class JGraphLocation
Provides encapsulation of the location of vertices and edges in a
JGraph
(a coordinate or item index).
This class provides an example of a ComponentLocation
extension.
Note that all bounds information must be converted to screen coordinates
with JGraph#toScreen(Point2D)
or
JGraph#toScreen(Rectangle2D)
before use in actions.
Field Summary |
---|
Fields inherited from class abbot.tester.ComponentLocation |
---|
CENTER |
Constructor Summary | |
---|---|
JGraphLocation()
|
|
JGraphLocation(int index)
|
|
JGraphLocation(Point where)
|
Method Summary | |
---|---|
protected String |
badFormat(String encoded)
|
boolean |
equals(Object o)
Returns whether the given object is an equivalent ComponentLocation . |
Rectangle |
getBounds(Component c)
Return the bounds of this location. |
protected Rectangle |
getCellBounds(JGraph graph,
Object o)
Return the bounds of the cell in screen coordinates. |
Point |
getPoint(Component c)
Return a concrete point for the abstract location. |
protected Point |
indexToPoint(JGraph graph,
int index)
Convert the given object index into a screen coordinate. |
ComponentLocation |
parse(String encoded)
Convert the given encoding into the proper location. |
protected Point |
toScreen(JGraph graph,
int x,
int y)
|
protected Rectangle |
toScreen(JGraph graph,
Rectangle2D rect)
|
String |
toString()
|
Methods inherited from class abbot.tester.ComponentLocation |
---|
encodeIndex, encodeValue, isIndex, isValue, parseIndex, parseValue |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public JGraphLocation()
public JGraphLocation(int index)
public JGraphLocation(Point where)
Method Detail |
---|
protected String badFormat(String encoded)
badFormat
in class ComponentLocation
protected Rectangle getCellBounds(JGraph graph, Object o)
protected Point indexToPoint(JGraph graph, int index)
public Point getPoint(Component c)
getPoint
in class ComponentLocation
public Rectangle getBounds(Component c)
getBounds
in class ComponentLocation
public boolean equals(Object o)
ComponentLocation
ComponentLocation
.
equals
in class ComponentLocation
public String toString()
toString
in class ComponentLocation
public ComponentLocation parse(String encoded)
ComponentLocation
parse
in class ComponentLocation
protected Point toScreen(JGraph graph, int x, int y)
protected Rectangle toScreen(JGraph graph, Rectangle2D rect)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |