Package org.netbeans.jemmy.drivers
Interface MouseDriver
-
- All Known Implementing Classes:
MouseEventDriver,MouseRobotDriver
public interface MouseDriverDefines how to simulate mouse operations.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclickMouse(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.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.
-
-
-
Method Detail
-
pressMouse
void pressMouse(ComponentOperator oper, int x, int y, int mouseButton, int modifiers)
Presses mouse.- Parameters:
oper- Component operator.x- Relative x coordinate.y- Relative y coordinate.mouseButton- mouse button (InputEvent.BUTTON*_MASKfield)modifiers- a combination ofInputEvent.*_MASKfields.
-
releaseMouse
void releaseMouse(ComponentOperator oper, int x, int y, int mouseButton, int modifiers)
Releases mouse.- Parameters:
oper- Component operator.x- Relative x coordinate.y- Relative y coordinate.mouseButton- mouse button (InputEvent.BUTTON*_MASKfield)modifiers- a combination ofInputEvent.*_MASKfields.
-
clickMouse
void clickMouse(ComponentOperator oper, int x, int y, int clickCount, int mouseButton, int modifiers, Timeout mouseClick)
Clicks mouse.- 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.
-
moveMouse
void moveMouse(ComponentOperator oper, int x, int y)
Moves mouse.- Parameters:
oper- Component operator.x- Relative x coordinate.y- Relative y coordinate.
-
dragMouse
void dragMouse(ComponentOperator oper, int x, int y, int mouseButton, int modifiers)
Drags mouse.- Parameters:
oper- Component operator.x- Relative x coordinate.y- Relative y coordinate.mouseButton- mouse button (InputEvent.BUTTON*_MASKfield)modifiers- a combination ofInputEvent.*_MASKfields.
-
dragNDrop
void dragNDrop(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.- 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
void enterMouse(ComponentOperator oper)
Moves mouse inside a component.- Parameters:
oper- Component operator.
-
exitMouse
void exitMouse(ComponentOperator oper)
Moves mouse outside a component.- Parameters:
oper- Component operator.
-
-