Component and Control Classes: JSComponent


With the suntest.javastar.lib.JSComponent class, you can send events to components, or find related subcomponents--such as those it contains, associated dialogs, and so on. While you can't instantiate a JSComponent, many of the methods of the JS class return JSComponents. Also, if you have a component you want to wrap into a JSComponent, you can use wrap(Component).

This section describes JSComponent by:

Syntax

Methods

This section provides two ways to view methods. You can use:

If you are viewing this documentation on-line, you can click on any method name to jump to the full description, syntax, and parameter specification.

Methods by Name

JSComponent methods by name

Method Category Description
absolute(int) Scrolling methods Scrolls to the position you specify.
action() Send event methods Sends an ACTION event to a Button or Textfield.
action(String) Send event methods Sends an action event to Button, Choice, List, or TextField.
ageDifferentiation(int, int) Find methods Disambiguates based on relative construction time (approximately).
button(String) Find methods Finds contained buttons which have an exact label match.
buttonPress() Send event methods Sends MOUSE_PRESSED, MOUSE_RELEASED, MOUSE_CLICKED, and the ActionEvent. Valid only for Buttons.
buttonRE(String) Find methods Finds contained buttons which have labels matching this regular expression.
buttonRX(String) Deprecated methods Finds contained buttons which have labels matching this regular expression. Uses old syntax for regular expressions.
center(String, String) Find methods Returns the Center member that meets the specified type and label requirements.
child(int, String, String) Find methods Returns a child component that meets the specified type and label requirements.
choosefile(String, String) Send event methods FileDialog simulation event.
deiconify() Send event methods Sends a WINDOW_DEICONIFY event.
deselect() Send event methods Sends a DESELECTED ItemEvent to a Checkbox.
deselect(int) Send event methods Deselects the indexed entry of a List.
deselect(String) Send event methods Deselects an item in a List.
deselect(int, String) Send event methods Deselects the indexed entry of a List. Requires that the text of the item match.
destroy() Send event methods Sends a WINDOW_CLOSING event.
dialog(String) Find methods Returns dialogs of this Frame whose title matches title.
dialog(String, String) Find methods Returns dialogs of this Frame that meet specified type and title requirements.
dialogRE(String) Find methods Returns dialogs that have title matching regular expression.
dialogRE(String, String) Find methods Returns dialogs of this Frame of the specified type that have title matching regular expression.
dialogRX(String) Deprecated methods Returns dialogs that have a title matching this regular expression.
dialogRX(String, String) Deprecated methods Returns dialogs that meet specified type and title matching regular expression.
east(String, String) Find methods Returns the East member, requiring that it meet specified type and label requirements.
fkey(int, int) Send event methods Sends a KEY_ACTION KeyEvent.
fkeyUp(int, int) Send event methods Sends a KEY_ACTION_RELEASE KeyEvent.
getAll() Query methods Returns all Components pointed to by this JSComponent.
getAllValid() Query methods Returns all Components pointed to by this JSComponent which are capable of receiving events.
getAnyField(String) Convenience methods Returns the value of the data member name on the contained Component.
getAnyMethod(String) Convenience methods Returns the value of the method name() on the contained Component.
getUnique() Query methods Returns the Component pointed to by this JSComponent.
getValidUnique() Query methods Returns the only Component pointed to by this JSComponent which is capable of receiving events.
gotFocus() Send event methods Sends a FOCUS_GAINED FocusEvent.
hasMember(String) Find methods Returns any components of JSComponent that match the type you specify.
hasMember(String, String) Find methods Returns a JSComponent that contains the subset of this JSComponent's Components which contain at least one member matching the specification.
hasMemberRE(String, String) Find methods Same as hasMember(), except this method accepts regular expressions for the Component title.
hasMemberRX(String, String) Deprecated methods Equivalent to hasMemberRE(), except that this method uses the old regular expression syntax.
iconify() Send event methods Sends a WINDOW_ICONIFY event.
isUnique() Query methods Returns true if there is exactly one Component contained by this JSComponent.
isValidUnique() Query methods Returns true if there is one valid match that can receive events.
key(int, int) Send event methods Sends a KEY_PRESSED KeyEvent.
key(int, int, int, int) Send event methods Typing simulation event.
keyPressed(int, char, int) Send event methods Sends a KEY_PRESSED KeyEvent.
keyReleased(int, char, int) Send event methods Sends a KEY_RELEASED KeyEvent.
keyTyped(char) Send event methods Sends a KEY_TYPED KeyEvent.
keyTyped(int, int) Deprecated methods Sends a KEY_TYPED KeyEvent. Replaced by keyTyped(char).
keyUp(int, int) Send event methods Sends a KEY_RELEASED KeyEvent.
lineDown(int) Scrolling methods Scrolls down one line.
lineUp(int) Scrolling methods Scrolls up one line.
lookup(String) Find methods Finds any components with a matching name contained in the components.
lostFocus() Send event methods Sends a FOCUS_LOST FocusEvent.
member(String) Find methods Finds contained members which have an exact type match.
member(String, String) Find methods Finds contained members which have exact type and label matches.
member(String, int) Find methods Finds a member which have an exact type match.
member(String, String, int) Find methods Finds a member which has an exact type and label match. Uses a depth-first seach.
memberRE(String, String) Find methods Finds contained members which have a type and a label matching a regular expression.
memberRX(String, String) Deprecated methods Finds contained members which have a type and a label matching regular expression. Uses old regular expression syntax.
menubar() Find methods Returns the menubar. Valid only for Frames.
mouseClick(int, int, int) Deprecated methods Sends a MOUSE_CLICKED event.
mouseClicked(int, int, int) Send event methods Sends a MOUSE_CLICKED MouseEvent.
mouseDown(int, int, int) Deprecated methods Sends a MOUSE_DOWN event.
mouseDrag(int, int, int) Deprecated methods Sends a MOUSE_DRAG event.
mouseDragged(int, int, int) Send event methods Sends a MOUSE_DRAGGED MouseEvent.
mouseEnter(int, int) Deprecated methods Sends a MOUSE_ENTER event.
mouseEntered(int, int) Send event methods Sends a MOUSE_ENTERED MouseEvent.
mouseExit(int, int) Deprecated methods Sends a MOUSE_EXIT event.
mouseExited(int, int) Send event methods Sends a MOUSE_EXITED MouseEvent.
mouseMove(int, int, int) Deprecated methods Sends a MOUSE_MOVE event.
mouseMoved(int, int) Send event methods Sends a MOUSE_MOVED MouseEvent.
mousePressed(int, int, int) Send event methods Sends a MOUSE_PRESSED MouseEvent.
mouseReleased(int, int, int) Send event methods Sends a MOUSE_RELEASED MouseEvent.
mouseUp(int, int, int) Deprecated methods Sends a MOUSE_UP event.
multiClick(int, int, int, int) Send event methods Sends multiple groups of MOUSE_PRESSED, MOUSE_RELEASED, and MOUSE_CLICKED events.
north(String, String) Find methods Returns the North member, requiring that it meet specified type and label requirements.
orphan(String) Deprecated methods Finds Components whose ancestor is this, but who are not children of this, and that have an exact type match.
pageDown(int) Scrolling methods Scrolls down a page.
pageUp(int) Scrolling methods Scrolls up a page.
popup(String) Find methods Returns all popups with the specified label.
popup(String, int) Find methods Returns all popups with the specified label, and includes a count.
popupTrigger(int, int) Send event methods Sends the PopupTrigger MouseEvent appropriate for the platform.
readString() Convenience methods Returns the String value of the component.
relativefile(String, String) Send event methods FileDialog simulation event,
select() Send event methods Sets the state of a Checkbox (sends a SELECTED ItemEvent).
select(int) Send event methods Selects the indexed entry of a List.
select(String) Send event methods Selects an item in a List.
select(int, String) Send event methods Selects the indexed entry of a List. Requires that the text of the item match.
south(String, String) Find methods Returns the South member, requiring that it meet specified type and label requirements.
synchronize(Script, String, String) Comparison methods Waits until the component matches the specified gold file. If timeout occurs before a match, SyncException occurs.
typeString(String) Send event methods Sends KEY_PRESS and KEY_RELEASE events for each character in the String, to type the entire string.
typeString(String, int, int) Send event methods Same as typeString(String), except that you specify the start and end position for the string.
verify(Script, boolean, String) Comparison methods Verify whether or not the component is capable of receiving events (see isValidUnique).
verify(Script, String, String) Comparison methods Verify that the component has the specified string value.
verifyWithFile(Script, String, String) Comparison methods Verify the component against the specified gold file.
verifyAnyField(Script, boolean, boolean, String, Object, String) Comparison methods Reads the data member name on the contained Component and compares this against the expected value.
verifyAnyMethod(Script, boolean, boolean, String, Object, String) Comparison methods Calls the method name() on the contained Component and compares it against the expected value.
waitFor(boolean, String) Comparison methods Waits until a Component pointed to by this JSComponent is correctly enabled or disabled.
waitFor(String) Comparison methods Waits until a Component pointed to by this JSComponent is capable of receiving events.
west(String, String) Find methods Waits until a Component pointed to by this JSComponent contains str.
west(String, String) Find methods Returns the West member, requiring that it meet specified type and label requirements.
windowMoved(int, int, int, int) Send event methods Window simulation event that reshapes the Window as specified.

Methods by Category

JSComponent Methods by Category

Category Method Description
Comparison methods These methods compare component state to expected values or verify the state of attributes. synchronize(Script, String, String) Waits until the component matches the specified gold file. If timeout occurs before a match, SyncException occurs.
verify(Script, boolean, String) Verify whether or not the component is capable of receiving events (see isValidUnique).
verify(Script, String, String) Verify that the component has the specified string value.
verifyWithFile(Script, String, String) Verify the component against the specified gold file.
verifyAnyField(Script, boolean, boolean, String, Object, String) Reads the data member name on the contained Component and compares this against the expected value.
verifyAnyMethod(Script, boolean, boolean, String, Object, String) Calls the method name() on the contained Component and compares it against the expected value.
waitFor(boolean, String) Waits until a Component pointed to by this JSComponent is correctly enabled or disabled.
waitFor(String) Waits until a Component pointed to by this JSComponent is capable of receiving events.
Convenience methods Convenience methods are a grouping of miscellaneous methods that perform functions on Components. getAnyField(String) Returns the value of the data member name on the contained Component.
readString() Returns the String value of the component.
getAnyMethod(String) Returns the value of the method name() on the contained Component.
Deprecated methods These methods will be phased out of JavaStar in the future, but are included in this release to support scripts written with earlier versions of the JavaStar library. buttonRX(String) Finds contained buttons which have labels matching this regular expression. Uses old syntax for regular expressions.
dialogRX(String) Returns dialogs that have a title matching this regular expression.
dialogRX(String, String) Returns dialogs that meet specified type and title matching regular expression.
hasMemberRX(String, String) Equivalent to hasMemberRE(), except that this method uses the old regular expression syntax.
keyTyped(int, int) Sends a KEY_TYPED KeyEvent. Replaced by keyTyped(char).
memberRX(String, String) Finds contained members which have a type and a label matching regular expression. Uses old regular expression syntax.
mouseClick(int, int, int) Sends a MOUSE_CLICKED event.
mouseDown(int, int, int) Sends a MOUSE_DOWN event.
mouseDrag(int, int, int) Sends a MOUSE_DRAG event.
mouseEnter(int, int) Sends a MOUSE_ENTER event.
mouseExit(int, int) Sends a MOUSE_EXIT event.
mouseMove(int, int, int) Sends a MOUSE_MOVE event.
mouseUp(int, int, int) Sends a MOUSE_UP event.
orphan(String) Finds Components whose ancestor is this, but who are not children of this, and that have an exact type match.
Find methods Find methods locate a component based on its label, position, or other attributes. Most find methods return a JSComponent or JSMenuComponent. ageDifferentiation(int, int) Disambiguates based on relative construction time (approximately).
button(String) Finds contained buttons which have an exact label match.
buttonRE(String) Finds contained buttons which have labels matching this regular expression.
center(String, String) Returns the Center member that meets the specified type and label requirements.
child(int, String, String) Returns a child component that meets the specified type and label requirements.
dialog(String) Returns dialogs of this Frame whose title matches title.
dialog(String, String) Returns dialogs of this Frame that meet specified type and title requirements.
dialogRE(String) Returns dialogs that have title matching regular expression.
dialogRE(String, String) Returns dialogs of this Frame of the specified type that have title matching regular expression.
east(String, String) Returns the East member, requiring that it meet specified type and label requirements.
hasMember(String) Returns any components of JSComponent that match the type you specify.
hasMember(String, String) Returns a JSComponent that contains the subset of this JSComponent's Components which contain at least one member matching the specification.
hasMemberRE(String, String) Same as hasMember(), except this method accepts regular expressions for the Component title.
lookup(String) Finds any components with a matching name contained in the components.
member(String) Finds contained members which have an exact type match.
member(String, String) Finds contained members which have exact type and label matches.
member(String, String, int) Finds a member which has an exact type and label match. Uses a depth-first seach.
member(String, int) Finds a member which have an exact type match.
memberRE(String, String) Finds contained members which have a type and a label matching a regular expression.
menubar() Returns the menubar. Valid only for Frames.
north(String, String) Returns the North member, requiring that it meet specified type and label requirements.
popup(String) Returns all popups with the specified label.
popup(String, int) Returns all popups with the specified label, and includes a count.
south(String, String) Returns the South member, requiring that it meet specified type and label requirements.
west(String, String) Waits until a Component pointed to by this JSComponent contains str.
west(String, String) Returns the West member, requiring that it meet specified type and label requirements.
Query methods These methods return Components pointed to by a JSComponent. getAll() Returns all Components pointed to by this JSComponent.
getAllValid() Returns all Components pointed to by this JSComponent which are capable of receiving events.
getUnique() Returns the Component pointed to by this JSComponent.
getValidUnique() Returns the only Component pointed to by this JSComponent which is capable of receiving events.
isUnique() Returns true if there is exactly one Component contained by this JSComponent.
isValidUnique() Returns true if there is one valid match that can receive events.
Scrolling methods These methods scroll a TextComponent to the position you specify. absolute(int) Scrolls to the position you specify.
pageDown(int) Scrolls down a page.
pageUp(int) Scrolls up a page.
lineDown(int) Scrolls down one line.
lineUp(int) Scrolls up one line.
Send event methods These methods send events to GUI components. action() Sends an ACTION event to a Button or Textfield.
action(String) Sends an action event to Button, Choice, List, or TextField.
buttonPress() Sends MOUSE_PRESSED, MOUSE_RELEASED, MOUSE_CLICKED, and the ActionEvent. Valid only for Buttons.
choosefile(String, String) FileDialog simulation event.
deiconify() Sends a WINDOW_DEICONIFY event.
deselect() Sends a DESELECTED ItemEvent to a Checkbox.
deselect(int) Deselects the indexed entry of a List.
deselect(String) Deselects an item in a List.
deselect(int, String) Deselects the indexed entry of a List. Requires that the text of the item match.
destroy() Sends a WINDOW_CLOSING event.
fkey(int, int) Sends a KEY_ACTION KeyEvent.
Send event methods, continued fkeyUp(int, int) Sends a KEY_ACTION_RELEASE KeyEvent.
gotFocus() Sends a FOCUS_GAINED FocusEvent.
iconify() Sends a WINDOW_ICONIFY event.
key(int, int) Sends a KEY_PRESSED KeyEvent.
key(int, int, int, int) Typing simulation event.
keyPressed(int, char, int) Sends a KEY_PRESSED KeyEvent.
keyReleased(int, char, int) Sends a KEY_RELEASED KeyEvent.
keyTyped(char) Sends a KEY_TYPED KeyEvent.
keyUp(int, int) Sends a KEY_RELEASED KeyEvent.
lostFocus() Sends a FOCUS_LOST FocusEvent.
mouseClicked(int, int, int) Sends a MOUSE_CLICKED MouseEvent.
mouseDragged(int, int, int) Sends a MOUSE_DRAGGED MouseEvent.
mouseEntered(int, int) Sends a MOUSE_ENTERED MouseEvent.
mouseExited(int, int) Sends a MOUSE_EXITED MouseEvent.
mouseMoved(int, int) Sends a MOUSE_MOVED MouseEvent.
mousePressed(int, int, int) Sends a MOUSE_PRESSED MouseEvent.
mouseReleased(int, int, int) Sends a MOUSE_RELEASED MouseEvent.
multiClick(int, int, int, int) Sends multiple groups of MOUSE_PRESSED, MOUSE_RELEASED, and MOUSE_CLICKED events.
popupTrigger(int, int) Sends the PopupTrigger MouseEvent appropriate for the platform.
relativefile(String, String) FileDialog simulation event,
select() Sets the state of a Checkbox (sends a SELECTED ItemEvent).
select(int) Selects the indexed entry of a List.
select(String) Selects an item in a List.
select(int, String) Selects the indexed entry of a List. Requires that the text of the item match.
typeString(String) Sends KEY_PRESS and KEY_RELEASE events for each character in the String, to type the entire string.
typeString(String, int, int) Same as typeString(String), except that you specify the start and end position for the string.
Send event methods, continued windowMoved(int, int, int, int) Window simulation event that reshapes the Window as specified.

action()

Syntax

Category

Send event method

Description

Valid only for Buttons and TextFields: sends an ACTION event with the appropriate String arg (the current button label or textfield text).

action(String)

Syntax

Category

Send event method

Description

Sends an action event to Button, Choice, List, TextField.

Parameters

buttonPress()

Syntax

Category

Send event method

Description

Valid only for Buttons. Sends MOUSE_PRESSED, MOUSE_RELEASED, MOUSE_CLICKED, and the ActionEvent. For non-Buttons, sends only the three mouse events, at the center of the Component.

choosefile(String, String)

Syntax

Category

Send event method

Description

FileDialog simulation event. Valid only for FileDialogs.

Parameters

deiconify()

Syntax

Category

Send event method

Description

Sends a WINDOW_DEICONIFY event.

deselect()

Syntax

Category

Send event method

Description

Sets the state of a Checkbox (sends a DESELECTED ItemEvent).

deselect(int)

Syntax

Category

Send event method

Description

Deselects the indexed entry of a List.

Parameters

deselect(String)

Syntax

Category

Send event method

Description

Deselects an item in a List.

Parameters

deselect(int, String)

Syntax

Category

Send event method

Description

Deselects the indexed entry of a List. Requires that the text of the item match.

Parameters

destroy()

Syntax

Category

Send event method

Description

Sends a WINDOW_CLOSING event.

fkey(int, int)

Syntax

Category

Send event method

Description

Sends a KEY_ACTION KeyEvent.

Parameters

fkeyUp(int, int)

Syntax

Category

Send event method

Description

Sends a KEY_ACTION_RELEASE KeyEvent.

Parameters

gotFocus()

Syntax

Category

Send event method

Description

Sends a FOCUS_GAINED FocusEvent.

iconify()

Syntax

Category

Send event method

Description

Sends a WINDOW_ICONIFY event.

key(int, int)

Syntax

Category

Send event method

Description

Sends a KEY_PRESSED KeyEvent.

Parameters

key(int, int, int, int)

Syntax

Category

Send event method

Description

Typing simulation event--valid only for TextComponents.

Parameters

keyPressed(int, char, int)

Syntax

Category

Send event method

Description

Sends a KEY_PRESSED KeyEvent.

Parameters

keyReleased(int, char, int)

Syntax

Category

Send event method

Description

Sends a KEY_RELEASED KeyEvent.

Parameters

keyTyped(char)

Syntax

Category

Send event method

Description

Sends a KEY_TYPED KeyEvent.

Parameters

keyUp(int, int)

Syntax

Category

Send event method

Description

Sends a KEY_RELEASED KeyEvent.

Parameters

lostFocus()

Syntax

Category

Send event method

Description

Sends a FOCUS_LOST FocusEvent.

mouseClicked(int, int, int)

Syntax

Category

Send event method

Category

Send event method

Description

Sends a MOUSE_CLICKED MouseEvent.

Parameters

mouseDragged(int, int, int)

Syntax

Category

Send event method

Description

Sends a MOUSE_DRAGGED MouseEvent.

Parameters

mouseEntered(int, int)

Syntax

Category

Send event method

Description

Sends a MOUSE_ENTERED MouseEvent.

Parameters

mouseExited(int, int)

Syntax

Category

Send event method

Description

Sends a MOUSE_EXITED MouseEvent.

Parameters

mouseMoved(int, int)

Syntax

Category

Send event method

Description

Sends a MOUSE_MOVED MouseEvent.

Parameters

mousePressed(int, int, int)

Syntax

Category

Send event method

Description

Sends a MOUSE_PRESSED MouseEvent.

Parameters

mouseReleased(int, int, int)

Syntax

Category

Send event method

Description

Sends a MOUSE_RELEASED MouseEvent.

Parameters

multiClick(int, int, int, int)

Syntax

Category

Send event method

Description

Simulation event. This method sends multiple groups of MOUSE_PRESSED, MOUSE_RELEASED, and MOUSE_CLICKED events.

You can use this method to simulate a double-click--for example, multiClick(x, y, 0, 2). For Buttons, this method sends an ACTION even after each CLICKED.

Parameters

popupTrigger(int, int)

Syntax

Category

Send event method

Description

Sends the PopupTrigger MouseEvent appropriate for the platform. (On Solaris, a MOUSE_RELEASED; on Windows, a MOUSE_PRESSED).

Parameters

select()

Syntax

Category

Send event method

Description

Sets the state of a Checkbox (sends a SELECTED ItemEvent).

select(int)

Syntax

Category

Send event method

Description

Selects the indexed entry of a List.

Parameters

select(String)

Syntax

Category

Send event method

Description

Selects an item in a List.

Parameters

select(int, String)

Syntax

Category

Send event method

Description

Selects the indexed entry of a List. Requires that the text of the item match.

Parameters

typeString(String)

Syntax

Category

Send event method

Description

Sends KEY_PRESS and KEY_RELEASE events for each character, to type the entire string. For TextComponents, this will select the entire contents and overwrites it.

Parameters

typeString(String, int, int)

Syntax

Category

Send event method

Description

Valid only for TextComponents: sends KEY_PRESS and KEY_RELEASE events for each character, to type the entire string into the TextComponent.

Parameters

relativefile(String, String)

Syntax

Category

Send event method

Description

FileDialog simulation event - valid only for FileDialogs.

Parameters

windowMoved(int, int, int, int)

Syntax

Category

Send event method

Description

Window simulation event that sizes and positions the Window as specified. Valid only for Window Components.

Parameters

ageDifferentiation(int, int)

Syntax

Category

Find method

Description

Disambiguates Components based on their relative construction time.

Parameters

button(String)

Syntax

Category

Find method

Description

Finds contained buttons which have an exact label match.

Parameters

buttonRE(String)

Syntax

Category

Find method

Description

Finds contained buttons which have labels matching this regular expression. See Current Syntax in the chapter "Syntax for Regular Expressions."

Parameters

center(String, String)

Syntax

Category

Find method

Description

Returns the Center member that meets the specified type and label requirements. Valid only for Containers with BorderLayouts.

Parameters

child(int, String, String)

Syntax

Category

Find method

Description

Returns a child component that meets the specified type and label requirements. Valid only for Containers.

Parameters

dialog(String)

Syntax

Category

Find method

Description

Returns dialogs of this Frame whose title matches title. Valid only for Frames.

Parameters

dialog(String, String)

Syntax

Category

Find method

Description

Returns dialogs of this Frame that meet specified type and title requirements. Valid only for Frames.

Parameters

dialogRE(String)

Syntax

Category

Find method

Description

Returns dialogs that have title matching regular expression. See Current Syntax in the chapter "Syntax for Regular Expressions." Valid only for Frames.

Parameters

dialogRE(String, String)

Syntax

Category

Find method

Description

Returns dialogs of this Frame of the specified type that have title matching regular expression. See Current Syntax in the chapter "Syntax for Regular Expressions." Valid only for Frames.

Parameters

east(String, String)

Syntax

Category

Find method

Description

Returns the East member, requiring that it meet specified type and label requirements. Valid only for Containers with BorderLayouts.

Parameters

hasMember(String)

Syntax

Category

Find method

Description

Disambiguates - finds the subset of this JSComponent's Component that contian at least one member of the type you specify. Returns a JSComponent containing this subset.

Parameters

hasMember(String, String)

Syntax

Category

Find method

Description

Disambiguates - looks for a member of a this JSComponent that contains at least one member matching the type and val. Returns a JSComponent containing this subset.

Parameters

hasMemberRE(String, String)

Syntax

Category

Find method

Description

Disambiguates - looks for a member of a this JSComponent that contains at least one member matching this type and have a label matching this regular expression. (See Current Syntax in the chapter "Syntax for Regular Expressions.") Returns a JSComponent containing this subset.

lookup(String)

Syntax

Category

Find method

Description

Finds any components with a matching name (return of the getName() method) contained in the components returned by the getAll() method.

This method uses `.' as a scope separator. For example, name of A.B refers to a component named B contained in a component named A, where A is contained within the current component. '#' must be used to escape '.'

Parameters

member(String)

Syntax

Category

Find method

Description

Finds contained members which have an exact type match.

Parameters

member(String, String)

Syntax

Category

Find method

Description

Finds contained members which have exact type and label matches.

Parameters

member(String, String, int)

Syntax

Category

Find method

Description

Finds a member which has an exact type and label match. Uses a depth-first search of the tree, return the position'th Component that matches.

Parameters

member(String, int)

Syntax

Category

Find method

Description

Finds a member which have an exact type match. With a depth-first search of the tree, returns the position of the Component matching the given type.

Parameters

memberRE(String, String)

Syntax

Category

Find method

Description

Finds contained members which have a type matching type and a label matching this regular expression. See Current Syntax in the chapter "Syntax for Regular Expressions."

Parameters

menubar()

Syntax

Category

Find method

Description

Returns the menubar. Valid only for Frames.

north(String, String)

Syntax

Category

Find method

Description

Returns the North member, requiring that it meet specified type and label requirements. Valid only for Containers with BorderLayouts.

Parameters

popup(String)

Syntax

Category

Find method

Description

Returns all popups with the specified label.

Parameters

popup(String, int)

Syntax

Category

Find method

Description

Returns all popups with the specified label.

Parameters

south(String, String)

Syntax

Category

Find method

Description

Returns the South member, requiring that it meet specified type and label requirements. Valid only for Containers with BorderLayouts.

Parameters

west(String, String)

Syntax

Category

Find method

Description

Returns the West member, requiring that it meet specified type and label requirements. Valid only for Containers with BorderLayouts.

Parameters

getAll()

Syntax

Category

Query method

Description

Returns all Components pointed to by this JSComponent.

getAllValid()

Syntax

Category

Query method

Description

Returns all Components pointed to by this JSComponent which are capable of receiving events.

getUnique()

Syntax

Description

Returns the Component pointed to by this JSComponent. This requires that there is exactly one match, throwing an exception otherwise.

getValidUnique()

Syntax

Category

Query method

Description

Returns the only Component pointed to by this JSComponent which is capable of receiving events. If there are no components capable of receiving events, or if more than one is capable of receiving, this method throws an exception.

isUnique()

Syntax

Category

Query method

Description

Returns true if there is exactly one Component contained by this JSComponent.

isValidUnique()

Syntax

Category

Query method

Description

Returns true if there is one valid match that can receive events.

synchronize(Script, String, String)

Syntax

Category

Comparison method

Description

Waits until the component matches the specified gold file. If timeout occurs before a match, SyncException occurs.

Parameters

verify(Script, boolean, String)

Syntax

Category

Comparison method

Description

Verify whether or not the component is capable of receiving events (see isValidUnique). Returns true if the verify succeeds.

Parameters

verify(Script, String, String)

Syntax

Category

Comparison method

Description

Verify that the component has the specified string value. Returns true if verify succeeds.

Parameters

verifyAnyField(Script, boolean, boolean, String, Object, String)

Syntax

Category

Comparison method

Description

Reads the data member name on the contained Component and compares this against the expected value.

Parameters

verifyAnyMethod(Script, boolean, boolean, String, Object, String)

Syntax

Category

Comparison method

Description

Calls the method name() on the contained Component and compares it against the expected value. Returns true or false depending on the comparison results.

Parameters

verifyWithFile(Script, String, String)

Syntax

Category

Comparison method

Description

Verify the component against the specified gold file. Returns true if the verify succeeds.

Parameters

waitFor(boolean, String)

Syntax

Category

Comparison method

Description

Waits until a Component pointed to by this JSComponent is correctly enabled or disabled. If a timeout occurs, this method throws a GUINotAcceptingException.

Parameters

waitFor(String)

Syntax

Category

Comparison method

Description

Waits until a Component pointed to by this JSComponent is capable of receiving events. If timeout occurs, this method throw a GUINotAcceptingException.

Parameters

waitFor(String, String)

Syntax

Category

Comparison method

Description

Waits until a Component pointed to by this JSComponent contains str. Valid for Frames, Dialogs, Labels, Buttons, TextAreas, and TextFields. Timeout will cause GUINotAcceptingException.

Parameters

absolute(int)

Syntax

Category

Scrolling method

Description

Scrolls to position and sends a TRACK AdjustmentEvent.

Parameters

lineDown(int)

Syntax

Category

Scrolling method

Description

Scrolls to position and sends a UNIT_DECREMENT AdjustmentEvent.

Parameters

lineUp(int)

Syntax

Category

Scrolling method

Description

Scrolls to position and sends a UNIT_INCREMENT AdjustmentEvent.

Parameters

pageDown(int)

Syntax

Category

Scrolling method

Description

Scrolls to position and sends a BLOCK_DECREMENT AdjustmentEvent.

Parameters

pageUp(int)

Syntax

Category

Scrolling method

Description

Scrolls to position and sends a BLOCK_INCREMENT AdjustmentEvent.

Parameters

getAnyField(String)

Syntax

Category

Convenience method

Description

This convenience function returns the value of the data member name on the contained Component.

Parameters

getAnyMethod(String)

Syntax

Category

Convenience method

Description

This convenience function returns the value of the method name() on the contained Component.

Parameters

readString()

Syntax

Category

Convenience method

Description

Returns the String value of the component. The value returned is based on the component type:

buttonRX(String)

Syntax

Category

Deprecated method

Description

Replaced by buttonRE(String).

Finds contained buttons which have labels matching this regular expression (see Current Syntax in the chapter "Syntax for Regular Expressions.").

Parameters

orphan(String)

Syntax

Category

Deprecated method

Description

This method is obsolete; there is no replacement.

Finds Components whose ancestor is this, but who are not children of this, and that have an exact type match.

Note - This may be generated by a record. Usually this indicates unusual usage of the AWT (such as overriding getComponents() or getParent() methods).

Parameters

dialogRX(String)

Syntax

Category

Deprecated method

Description

Replaced by dialogRE(String).

Returns dialogs that have a title matching this regular expression (see Current Syntax in the chapter "Syntax for Regular Expressions"). Valid only for Frames.

Parameters

dialogRX(String, String)

Syntax

Category

Deprecated method

Description

Replaced by dialogRE(String, String).

Returns dialogs that meet specified type and title matching regular expression (see Current Syntax in the chapter "Syntax for Regular Expressions"). Valid only for Frames.

Parameters

hasMemberRX(String, String)

Syntax

Category

Deprecated method

Description

Replaced by hasMemberRE(String, String).

Disambiguates - returns a JSComponent that contains the subset of this JSComponent's Components which contain at least one member which have type & label matching regular expression (see Current Syntax in the chapter "Syntax for Regular Expressions").

Parameters

keyTyped(int, int)

Syntax

Category

Deprecated method

Description

Replaced by keyTyped(char).

Backward-compatibility only - not recommended. Sends a KEY_TYPED KeyEvent.

Parameters

memberRX(String, String)

Syntax

Category

Deprecated method

Description

Replaced by memberRE(String, String).

Finds contained members which have a type and a label matching regular expression (see the chapter "Syntax for Regular Expressions").

Parameters

mouseClick(int, int, int)

Syntax

Category

Deprecated method

Description

Replaced by mouseClicked(int, int, int).

Sends a MOUSE_CLICKED event.

Parameters

mouseDown(int, int, int)

Syntax

Category

Deprecated method

Description

Replaced by mousePressed(int, int, int).

Sends a MOUSE_DOWN event.

Parameters

mouseDrag(int, int, int)

Syntax

Category

Deprecated method

Description

Replaced by mouseDragged(int, int, int).

Sends a MOUSE_DRAG event.

Parameters

mouseEnter(int, int)

Syntax

Category

Deprecated method

Description

Replaced by mouseEntered(int, int).

Sends a MOUSE_ENTER event.

Parameters

mouseExit(int, int)

Syntax

Category

Deprecated method

Description

Replaced by mouseExited(int, int).

Sends a MOUSE_EXIT event.

Parameters

mouseMove(int, int, int)

Syntax

Category

Deprecated method

Description

Replaced by mouseMoved(int, int).

Sends a MOUSE_MOVE event.

Parameters

mouseUp(int, int, int)

Syntax

Category

Deprecated method

Description

Replaced by mouseReleased(int, int, int).

Sends a MOUSE_UP event.

Parameters




Send feedback to JavaStar-feedback@suntest.com
Copyright © 1998 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, CA 94303. All rights reserved.