Similar to the JSComponent
interface. Objects of this type represent some sub-part of a Component of the user's GUI and allow sending only mouse events. The mouse events are the same as for JSComponent
, except they are adjusted by the offfset given by the JSNonComponentLocator
(getOffset()
) then sent to the containing Component.
suntest.javastar.lib.JSNonComponent
public interface JSNonComponent
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.
Method | Category | Description |
---|---|---|
getAnyField(String)
|
Comparison methods | Returns the value of the field name specified on a non-component object. |
getAnyField(String)
|
Comparison methods | Returns the value of a method name specified on a non-component object. |
getOffset()
|
Get methods |
Returns the offset given by the locator of this JSNonComponent .
|
getReference()
|
Get methods |
Returns the reference given by the locator of this JSNonComponent .
|
mouseClicked(int, int, int)
|
Send event methods | Equivalent of JSComponent.mouseClicked, but for a non-component. |
mouseDragged(int, int, int)
|
Send event methods | Equivalent of JSComponent.mouseDragged, but for a non-component. |
mouseMoved(int, int, int)
|
Send event methods | Equivalent of JSComponent.mouseMoved, but for a non-component. |
mousePressed(int, int, int)
|
Send event methods | Equivalent of JSComponent.mousePressed, but for a non-component. |
mouseReleased(int, int, int)
|
Send event methods | Equivalent of JSComponent.mouseReleased, but for a non-component. |
multiClick(int, int, int, int)
|
Send event methods | Equivalent of JSComponent.multiClick, but for a non-component. |
verifyAnyField(Script, Boolean, Boolean, String, Object, String)
|
Comparison methods | Reads the field name() on an object and compares it against expected value. |
verifyAnyMethod(Script, Boolean, Boolean, String, Object, String)
|
Comparison methods | Calls the method name() on an object and compares against the expected value. |
Category | Method | Description |
---|---|---|
Comparison methods These methods compare the state of components. | getAnyField(String) | Returns the value of the field name specified on a non-component object. |
getAnyMethod(String) | Returns the value of a method name specified on a non-component object. | |
verifyAnyField(Script, Boolean, Boolean, String, Object, String) | Reads the field name() on an object and compares it against expected value. | |
verifyAnyMethod(Script, Boolean, Boolean, String, Object, String) | Calls the method name() on an object and compares against the expected value. | |
Get methods These methods read specific non-component values. | getOffset() |
Returns the offset given by the locator of this JSNonComponent .
|
getReference() |
Returns the reference given by the locator of this JSNonComponent .
|
|
Send event methods These methods send events to GUI components. | mouseClicked(int, int, int) | Equivalent of JSComponent.mouseClicked, but for a non-component. |
mouseDragged(int, int, int) | Equivalent of JSComponent.mouseDragged, but for a non-component. | |
mouseMoved(int, int, int) | Equivalent of JSComponent.mouseMoved, but for a non-component. | |
mousePressed(int, int, int) | Equivalent of JSComponent.mousePressed, but for a non-component. | |
mouseReleased(int, int, int) | Equivalent of JSComponent.mouseReleased, but for a non-component. | |
multiClick(int, int, int, int) | Equivalent of JSComponent.multiClick, but for a non-component. |
public boolean verifyAnyField(Script sc, boolean sync, boolean retry, String name, Object expected, String purpose)
Comparison method
Reads the field 'name' on the getReference()
object, and compares it against expected value. Returns true
or false
depending on the comparison results.
public boolean verifyAnyMethod(Script sc, boolean sync, boolean retry, String name, Object expected, String purpose)
Comparison method
Calls the method name()
on the getReference()
object and compares against the expected value. Returns true
or false
depending on the comparison results.
public Point getOffset()
Get method
Returns the offset given by the locator of this JSNonComponent
.
public Object getReference()
Get method
Returns the reference given by the locator of this JSNonComponent
. Could be null.
public Object getAnyField(String name) throws NoSuchFieldException, IllegalAccessException
Comparison method
Returns the value of field name on the getReference()
Object.
public Object getAnyMethod(String name) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException
Comparison method
Returns the value of method name()
on the getReference()
Object.
public void mouseClicked(int x, int y, int modifiers)
Send event method
Equivalent of JSComponent.
mouseClicked(int, int, int) for a JSNonComponent
.
JSNonComponent
)
JSNonComponent
)
public void mouseDragged(int x, int y, int modifiers)
Send event method
Equivalent of JSComponent.
mouseDragged(int, int, int) for a JSNonComponent.
JSNonComponent
)
JSNonComponent
)
public void mouseMoved(int x, int y, int modifiers)
Send event method
Equivalent of JSComponent.
mouseMoved(int, int) for a JSNonComponent.
JSNonComponent
)
JSNonComponent
)
public void mousePressed(int x, int y, int modifiers)
Send event method
Equivalent of JSComponent.
mousePressed(int, int, int) for a JSNonComponent
JSNonComponent
)
JSNonComponent
)
public void mouseReleased(int x, int y, int modifiers)
Send event method
JSComponent.
mouseReleased(int, int, int) for a JSNonComponent.
JSNonComponent
)
JSNonComponent
)
public void multiClick(int x, int y, int modifiers, int count)
Send event method
Equivalent of JSComponent
.multiClick(int, int, int, int) for a JSNonComponent
. Sends multiple groups of MOUSE_PRESSED
, MOUSE_RELEASED
, and MOUSE_CLICKED
events. For example, to simulate a double-click, use multiClick(x, y, 0, 2)
.
JSNonComponent
)
JSNonComponent
)
Send feedback to
JavaStar-feedback@suntest.com
Copyright © 1998
Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, CA 94303.
All rights reserved.