Class MouseRobotDriver
java.lang.Object
org.netbeans.jemmy.drivers.LightSupportiveDriver
org.netbeans.jemmy.drivers.input.RobotDriver
org.netbeans.jemmy.drivers.input.MouseRobotDriver
- All Implemented Interfaces:
LightDriver, MouseDriver
MouseDriver using robot operations.
- Author:
- Alexandre Iline(alexandre.iline@sun.com)
-
Field Summary
Fields inherited from class RobotDriver
autoDelay, qtool, robotReference -
Constructor Summary
ConstructorsConstructorDescriptionMouseRobotDriver(Timeout autoDelay) Constructs a MouseRobotDriver object.MouseRobotDriver(Timeout autoDelay, boolean smooth) Constructs a MouseRobotDriver object.MouseRobotDriver(Timeout autoDelay, String[] supported) Constructs a MouseRobotDriver object.MouseRobotDriver(Timeout autoDelay, String[] supported, boolean smooth) Constructs a MouseRobotDriver object. -
Method Summary
Modifier and TypeMethodDescriptionvoidclickMouse(ComponentOperator oper, int x, int y, int clickCount, int mouseButton, int modifiers, Timeout mouseClick) Clicks mouse.voiddragMouse(ComponentOperator oper, int x, int y, int mouseButton, int modifiers) Drags mouse.voiddragNDrop(ComponentOperator oper, int start_x, int start_y, int end_x, int end_y, int mouseButton, int modifiers, Timeout before, Timeout after) Performs drag'n'drop.voidenterMouse(ComponentOperator oper) Moves mouse inside a component.voidexitMouse(ComponentOperator oper) Moves mouse outside a component.protected intgetAbsoluteX(ComponentOperator oper, int x) Returns absolute x coordinate for relative x coordinate.protected intgetAbsoluteY(ComponentOperator oper, int y) Returns absolute y coordinate for relative y coordinate.voidmoveMouse(ComponentOperator oper, int x, int y) Moves mouse.voidpressMouse(ComponentOperator oper, int x, int y, int mouseButton, int modifiers) Presses mouse.voidreleaseMouse(ComponentOperator oper, int x, int y, int mouseButton, int modifiers) Releases mouse.Methods inherited from class RobotDriver
clickMouse, dragMouse, dragNDrop, makeAnOperation, moveMouse, pressKey, pressModifiers, pressMouse, releaseKey, releaseModifiers, releaseMouse, synchronizeRobotMethods inherited from class LightSupportiveDriver
checkSupported, getSupported
-
Constructor Details
-
MouseRobotDriver
Constructs a MouseRobotDriver object.- Parameters:
autoDelay- Time forRobot.setAutoDelay(long)method.
-
MouseRobotDriver
Constructs a MouseRobotDriver object.- Parameters:
autoDelay- Time forRobot.setAutoDelay(long)method.smooth- - whether to move mouse smooth from one ppoint to another.supported- an array of supported class names
-
MouseRobotDriver
-
MouseRobotDriver
-
-
Method Details
-
pressMouse
Description copied from interface:MouseDriverPresses mouse.- Specified by:
pressMousein interfaceMouseDriver- Parameters:
oper- Component operator.x- Relative x coordinate.y- Relative y coordinate.mouseButton- mouse button (InputEvent.BUTTON*_MASKfield)modifiers- a combination ofInputEvent.*_MASKfields.
-
releaseMouse
Description copied from interface:MouseDriverReleases mouse.- Specified by:
releaseMousein interfaceMouseDriver- Parameters:
oper- Component operator.x- Relative x coordinate.y- Relative y coordinate.mouseButton- mouse button (InputEvent.BUTTON*_MASKfield)modifiers- a combination ofInputEvent.*_MASKfields.
-
moveMouse
Description copied from interface:MouseDriverMoves mouse.- Specified by:
moveMousein interfaceMouseDriver- Parameters:
oper- Component operator.x- Relative x coordinate.y- Relative y coordinate.
-
clickMouse
public void clickMouse(ComponentOperator oper, int x, int y, int clickCount, int mouseButton, int modifiers, Timeout mouseClick) Description copied from interface:MouseDriverClicks mouse.- Specified by:
clickMousein interfaceMouseDriver- Parameters:
oper- Component operator.x- Relative x coordinate.y- Relative y coordinate.clickCount- How many times to click.mouseButton- mouse button (InputEvent.BUTTON*_MASKfield)modifiers- a combination ofInputEvent.*_MASKfields.mouseClick- Time between pressing and releasing mouse.
-
dragMouse
Description copied from interface:MouseDriverDrags mouse.- Specified by:
dragMousein interfaceMouseDriver- Parameters:
oper- Component operator.x- Relative x coordinate.y- Relative y coordinate.mouseButton- mouse button (InputEvent.BUTTON*_MASKfield)modifiers- a combination ofInputEvent.*_MASKfields.
-
dragNDrop
public void dragNDrop(ComponentOperator oper, int start_x, int start_y, int end_x, int end_y, int mouseButton, int modifiers, Timeout before, Timeout after) Description copied from interface:MouseDriverPerforms drag'n'drop.- Specified by:
dragNDropin interfaceMouseDriver- Parameters:
oper- Component operator.start_x- Relative x coordinate of start point.start_y- Relative y coordinate of start point.end_x- Relative x coordinate of end point.end_y- Relative y coordinate of end point.mouseButton- mouse button (InputEvent.BUTTON*_MASKfield)modifiers- a combination ofInputEvent.*_MASKfields.before- Time to sleep after taking (before dragging)after- Time to sleep before dropping (after dragging)
-
enterMouse
Description copied from interface:MouseDriverMoves mouse inside a component.- Specified by:
enterMousein interfaceMouseDriver- Parameters:
oper- Component operator.
-
exitMouse
Description copied from interface:MouseDriverMoves mouse outside a component.- Specified by:
exitMousein interfaceMouseDriver- Parameters:
oper- Component operator.
-
getAbsoluteX
Returns absolute x coordinate for relative x coordinate.- Parameters:
oper- an operatorx- a relative x coordinate.- Returns:
- an absolute x coordinate.
-
getAbsoluteY
Returns absolute y coordinate for relative y coordinate.- Parameters:
oper- an operatory- a relative y coordinate.- Returns:
- an absolute y coordinate.
-