org.sikuli.api.robot.desktop
Class DesktopMouse

java.lang.Object
  extended by org.sikuli.api.robot.desktop.DesktopMouse
All Implemented Interfaces:
Mouse

public class DesktopMouse
extends Object
implements Mouse


Constructor Summary
DesktopMouse()
           
 
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 dest)
          Hover the mouse cursor to a screen location.
 void mouseDown(int buttons)
           
 void mouseUp()
           
 void mouseUp(int buttons)
           
 void move(ScreenLocation dest)
          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
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DesktopMouse

public DesktopMouse()
Method Detail

hover

public void hover(ScreenLocation dest)
Description copied from interface: Mouse
Hover the mouse cursor to a screen location. The movement is seen smoothly by the user.

Specified by:
hover in interface Mouse
Parameters:
dest - the screen location for the mouse cursor to hover to

move

public void move(ScreenLocation dest)
Description copied from interface: Mouse
Move the mouse cursor to a destination screen location immediately. The user won't see any mouse movement.

Specified by:
move in interface Mouse
Parameters:
dest - the screen location for the mouse cursor to move to

drag

public void drag(ScreenLocation screenLoc)
Description copied from interface: Mouse
Drag at a given screen location

Specified by:
drag in interface Mouse
Parameters:
screenLoc - the screen location to drag

drop

public void drop(ScreenLocation screenLoc)
Description copied from interface: Mouse
Drop at a given screen location

Specified by:
drop in interface Mouse
Parameters:
screenLoc - the screen location to drop

rightClick

public void rightClick(ScreenLocation screenLoc)
Description copied from interface: Mouse
Right-click on a given screen location

Specified by:
rightClick in interface Mouse
Parameters:
screenLoc - the screen location to click on

doubleClick

public void doubleClick(ScreenLocation screenLoc)
Description copied from interface: Mouse
Double-click on a given screen location

Specified by:
doubleClick in interface Mouse
Parameters:
screenLoc - the screen location to click on

click

public void click(ScreenLocation screenLoc)
Description copied from interface: Mouse
Left-click on a given screen location

Specified by:
click in interface Mouse
Parameters:
screenLoc - the screen location to click on

press

public void press()
Description copied from interface: Mouse
Press the left button

Specified by:
press in interface Mouse

rightPress

public void rightPress()
Description copied from interface: Mouse
Press the right button

Specified by:
rightPress in interface Mouse

release

public void release()
Description copied from interface: Mouse
Release the left button

Specified by:
release in interface Mouse

rightRelease

public void rightRelease()
Description copied from interface: Mouse
Release the right button

Specified by:
rightRelease in interface Mouse

wheel

public void wheel(int direction,
                  int steps)
Description copied from interface: Mouse
Move the wheel at the current position

Specified by:
wheel in interface Mouse
Parameters:
direction - the direction applied
steps - the number of step

mouseDown

public void mouseDown(int buttons)
Specified by:
mouseDown in interface Mouse

mouseUp

public void mouseUp()
Specified by:
mouseUp in interface Mouse

mouseUp

public void mouseUp(int buttons)
Specified by:
mouseUp in interface Mouse

getLocation

public ScreenLocation getLocation()
Description copied from interface: Mouse
Get the screen location the mouse cursor is currently at

Specified by:
getLocation in interface Mouse


Copyright © 2014. All rights reserved.