Provides encapsulation of a visible Component-relative location.
"Visible" in this context means currently accessible by the pointer
(possibly via scrolling). A hidden node in a collapsed tree path
would not be considered visible.
This class the specifics of location so that
ComponentTester
primitives
(
ComponentTester.actionClick(ComponentComponentLocation) ,
ComponentTester.actionShowPopupMenu(ComponentComponentLocation) ,
etc) may be directed to specific elements of
substructure on a Component (list rows, tree paths, table
cells, substructure values, etc.).
Classes derived from ComponentLocation should provide
constructors for each type of location indication, e.g. value, index, and
Point . The
ComponentLocation.toString() method should provide an encoded
String suitable for use by the
ComponentLocation.parse(String) method, which
must convert the
String encoding back into a proper
ComponentLocation .
By convention,
Point locations are specified with (x,y) notation.
Indexed locations should use square brackets, e.g. [i] or [r,c] and
value locations should use a quoted
String , e.g.
'"cuckoo for cocoa puffs"'. The specific syntax allowed will vary by
specific ComponentLocation type. The base
ComponentLocation implementation
supports only the explicit (x,y) notation.
Recorders
should use the
String value by default for consistency. The
special value
ComponentLocation.CENTER is provided to indicate the center of a
Component .
The method
ComponentLocation.badFormat(String) should provide usage-like information
indicating the acceptable forms of input for this class.
See Also: JListLocation See Also: JTreeLocation See Also: JTableLocation |