|
org.netbeans.modules.jellytools.platform/3 3.13 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.netbeans.jemmy.operators.Operator
org.netbeans.jellytools.widgets.WidgetOperator
public class WidgetOperator
Handle org.netbeans.api.visual.widget.Widget object which represents some graphical content.
Usage:
TopComponentOperator tco = new TopComponentOperator("My scene");
LabelWidgetOperator lwo0 = new LabelWidgetOperator(tco, "Label 0");
lwo0.performPopupAction("An action");
LabelWidgetOperator lwo1 = new LabelWidgetOperator(tco, "Label 1");
// drag from one widget to another
lwo0.dragNDrop(lwo1);
| Nested Class Summary | |
|---|---|
static interface |
WidgetOperator.WidgetChooser
You can implement this interface if you want to find some specific widget and then you can use it in WidgetOperator constructor. |
| Field Summary | |
|---|---|
protected Widget |
widget
|
| Fields inherited from class org.netbeans.jemmy.operators.Operator |
|---|
CLASS_DPROP, TO_STRING_DPROP |
| Constructor Summary | |
|---|---|
WidgetOperator(TopComponentOperator tco,
int index)
Waits for index-th Widget in given TopComponent. |
|
WidgetOperator(TopComponentOperator tco,
WidgetOperator.WidgetChooser widgetChooser)
Waits for Widget specified by WidgetChooser implementation in given TopComponent. |
|
WidgetOperator(TopComponentOperator tco,
WidgetOperator.WidgetChooser widgetChooser,
int index)
Waits for index-th Widget specified by WidgetChooser implementation in given TopComponent. |
|
WidgetOperator(Widget widget)
Creates operator for given Widget. |
|
WidgetOperator(WidgetOperator parentWidgetOper,
int index)
Waits for index-th Widget under given parent. |
|
WidgetOperator(WidgetOperator parentWidgetOper,
WidgetOperator.WidgetChooser widgetChooser)
Waits for Widget specified by WidgetChooser implementation under given parent. |
|
WidgetOperator(WidgetOperator parentWidgetOper,
WidgetOperator.WidgetChooser widgetChooser,
int index)
Waits for index-th Widget specified by WidgetChooser implementation under given parent. |
|
| Method Summary | |
|---|---|
void |
clickMouse(int clickCount)
Clicks mouse in the center of widget. |
static WidgetOperator |
createOperator(Widget widget)
Creates WidgetOperator for given widget. |
void |
dragNDrop(int relativeX,
int relativeY)
Drag from the center of this widget and drop at new position. |
void |
dragNDrop(int x1,
int y1,
int x2,
int y2)
Drag from start coordinates and drop at end coordinates. |
void |
dragNDrop(WidgetOperator widgetOperator)
Drag from the center widget and drop at the center of given widget. |
static Widget |
findWidget(Widget parentWidget,
WidgetOperator.WidgetChooser widgetChooser,
int index)
Finds index-th widget specified by WidgetChooser under given parent widget. |
Rectangle |
getBounds()
Returns bounds occupied by widget. |
Point |
getCenter()
Returns center of this widget in underlying view coordinates. |
List<WidgetOperator> |
getChildren()
Returns List of WidgetOperators representing children of this Widget. |
Point |
getLocation()
Returns relative location of this widget to its parent. |
WidgetOperator |
getParent()
Returns WidgetOperator for parent Widget of this operator or null if parent doesn't exist. |
WidgetOperator |
getSceneOperator()
Returns operator for Scene widget which is parent of all other widgets. |
Component |
getSource()
Returns undelying component which hosts this widget. |
org.netbeans.jemmy.operators.JComponentOperator |
getViewOperator()
Returns operator of underlying component which hosts this widget. |
Widget |
getWidget()
Returns Widget represented by this operator. |
void |
performPopupAction(String popupPath)
Performs popup action on this widget. |
void |
performPopupActionNoBlock(String popupPath)
Performs popup action on this widget and no block further execution. |
void |
printDump()
Prints information about this widget and its children. |
String |
toString()
Returns class name of this widget, its location and bounds. |
| Methods inherited from class org.netbeans.jemmy.operators.Operator |
|---|
addOperatorPackage, addToDump, addToDump, copyEnvironment, createOperator, getCharBindingMap, getCharKey, getCharModifiers, getCharsKeys, getCharsKeys, getCharsModifiers, getCharsModifiers, getComparator, getDefaultComponentVisualizer, getDefaultMouseButton, getDefaultPathParser, getDefaultStringComparator, getDefaultVerification, getDump, getEnvironmentOperator, getOutput, getParentPath, getParentPath, getPathParser, getPopupMouseButton, getProperties, getQueueTool, getTimeouts, getVerification, getVisualizer, isCaptionEqual, isCaptionEqual, isCaptionEqual, lockQueue, parseString, parseString, produceNoBlocking, produceNoBlocking, produceTimeRestricted, produceTimeRestricted, runMapping, runMapping, runMapping, runMapping, runMapping, runMapping, runMapping, runMapping, runMapping, setCharBindingMap, setComparator, setDefaultComponentVisualizer, setDefaultPathParser, setDefaultStringComparator, setDefaultVerification, setOutput, setPathParser, setProperties, setTimeouts, setVerification, setVisualizer, toStringSource, unlockAndThrow, unlockQueue, waitState |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected Widget widget
| Constructor Detail |
|---|
public WidgetOperator(Widget widget)
widget - Widget to create operator for
public WidgetOperator(WidgetOperator parentWidgetOper,
WidgetOperator.WidgetChooser widgetChooser)
parentWidgetOper - parent WidgetOperatorwidgetChooser - implementation of WidgetChooser
public WidgetOperator(WidgetOperator parentWidgetOper,
int index)
parentWidgetOper - parent WidgetOperatorindex - index of widget to be found
public WidgetOperator(WidgetOperator parentWidgetOper,
WidgetOperator.WidgetChooser widgetChooser,
int index)
parentWidgetOper - parent WidgetOperatorwidgetChooser - implementation of WidgetChooserindex - index of widget to be found
public WidgetOperator(TopComponentOperator tco,
WidgetOperator.WidgetChooser widgetChooser)
tco - TopComponentOperator to find widgets inwidgetChooser - implementation of WidgetChooser
public WidgetOperator(TopComponentOperator tco,
int index)
tco - TopComponentOperator to find widgets inindex - index of widget to be found
public WidgetOperator(TopComponentOperator tco,
WidgetOperator.WidgetChooser widgetChooser,
int index)
tco - TopComponentOperator to find widgets inwidgetChooser - implementation of WidgetChooserindex - index of widget to be found| Method Detail |
|---|
public static Widget findWidget(Widget parentWidget,
WidgetOperator.WidgetChooser widgetChooser,
int index)
parentWidget - parent WidgetwidgetChooser - WidgetChooser implementationindex - index to be found
public WidgetOperator getSceneOperator()
public List<WidgetOperator> getChildren()
public WidgetOperator getParent()
public Component getSource()
getSource in class org.netbeans.jemmy.operators.Operatorpublic org.netbeans.jemmy.operators.JComponentOperator getViewOperator()
public Widget getWidget()
public Point getCenter()
public Point getLocation()
public Rectangle getBounds()
public String toString()
toString in class Objectpublic void printDump()
printDump in class org.netbeans.jemmy.operators.Operatorpublic static WidgetOperator createOperator(Widget widget)
widget - Widget to create operator for
public void performPopupAction(String popupPath)
popupPath - path of popup menu item (e.g. 'Go|Next')public void performPopupActionNoBlock(String popupPath)
popupPath - path of popup menu item (e.g. 'Go|Next')public void clickMouse(int clickCount)
clickCount - number of clicks
public void dragNDrop(int relativeX,
int relativeY)
relativeX - relative distance of movement along x axisrelativeY - relative distance of movement along y axispublic void dragNDrop(WidgetOperator widgetOperator)
widgetOperator - target widget where to drop
public void dragNDrop(int x1,
int y1,
int x2,
int y2)
x1 - start x positiony1 - start y positionx2 - end x positiony2 - end y position
|
org.netbeans.modules.jellytools.platform/3 3.13 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||