org.sikuli.api.robot
Interface Mouse

All Known Implementing Classes:
DesktopMouse

public interface Mouse

Mouse interface provides definitions for generating native mouse events.


Method Summary
 void click(ScreenLocation screenLoc)
          Left-click on a given screen location
 void doubleClick(ScreenLocation screenLoc)
          Double-click on a given screen location
 void drag(ScreenLocation screenLoc)
          Drag at a given screen location
 void drop(ScreenLocation screenLoc)
          Drop at a given screen location
 ScreenLocation getLocation()
          Get the screen location the mouse cursor is currently at
 void hover(ScreenLocation screenLoc)
          Hover the mouse cursor to a screen location.
 void mouseDown(int buttons)
           
 void mouseUp()
           
 void mouseUp(int buttons)
           
 void move(ScreenLocation screenLoc)
          Move the mouse cursor to a destination screen location immediately.
 void press()
          Press the left button
 void release()
          Release the left button
 void rightClick(ScreenLocation screenLoc)
          Right-click on a given screen location
 void rightPress()
          Press the right button
 void rightRelease()
          Release the right button
 void wheel(int direction, int steps)
          Move the wheel at the current position
 

Method Detail

drag

void drag(ScreenLocation screenLoc)
Drag at a given screen location

Parameters:
screenLoc - the screen location to drag

drop

void drop(ScreenLocation screenLoc)
Drop at a given screen location

Parameters:
screenLoc - the screen location to drop

click

void click(ScreenLocation screenLoc)
Left-click on a given screen location

Parameters:
screenLoc - the screen location to click on

rightClick

void rightClick(ScreenLocation screenLoc)
Right-click on a given screen location

Parameters:
screenLoc - the screen location to click on

doubleClick

void doubleClick(ScreenLocation screenLoc)
Double-click on a given screen location

Parameters:
screenLoc - the screen location to click on

hover

void hover(ScreenLocation screenLoc)
Hover the mouse cursor to a screen location. The movement is seen smoothly by the user.

Parameters:
screenLoc - the screen location for the mouse cursor to hover to

move

void move(ScreenLocation screenLoc)
Move the mouse cursor to a destination screen location immediately. The user won't see any mouse movement.

Parameters:
screenLoc - the screen location for the mouse cursor to move to

press

void press()
Press the left button


rightPress

void rightPress()
Press the right button


release

void release()
Release the left button


rightRelease

void rightRelease()
Release the right button


wheel

void wheel(int direction,
           int steps)
Move the wheel at the current position

Parameters:
direction - the direction applied
steps - the number of step

mouseDown

void mouseDown(int buttons)

mouseUp

void mouseUp()

mouseUp

void mouseUp(int buttons)

getLocation

ScreenLocation getLocation()
Get the screen location the mouse cursor is currently at



Copyright © 2014. All rights reserved.