Package org.sikuli.script.support
Class Device
- java.lang.Object
-
- org.sikuli.script.support.Device
-
public class Device extends Object
EXPERIMENTAL --- INTERNAL USE ONLY
is not official API --- will not be in version 2
-
-
Field Summary
Fields Modifier and Type Field Description ObserverCallBackcallbackbooleaninUsebooleanisMousebooleankeepLocationlastPosintMouseMovedActionObserverCallBackmouseMovedCallbackbooleanMouseMovedHighlightintMouseMovedIgnoreintMouseMovedPauseintmouseMovedResponseintMouseMovedShowObjectowner
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanblock()to block the device globally
only the contained device methods without owner will be grantedbooleanblock(Object owner)to block the device globally for the given owner
only the contained mouse methods having the same owner will be grantedstatic voiddelay(int time)LocationgetLocation()booleanisBlocked()booleanisInUse()booleanisNotLocal(Object owner)booleanisShouldRunCallback()booleanisSuspended()booleankeep(Object ownerGiven)booleanlet()booleanlet(Object owner)voidsetCallback(Object givenCallBack)what to do if mouse is moved outside Sikuli's mouse protection
in case of event the user provided callBack.happened is calledvoidsetShouldRunCallback(boolean shouldRunCallback)static voidsetShouldTerminate()booleanunblock()free the mouse globally after a block()booleanunblock(Object ownerGiven)free the mouse globally for this owner after a block(owner)booleanuse()booleanuse(Object owner)
-
-
-
Field Detail
-
inUse
public boolean inUse
-
keep
public boolean keep
-
owner
public Object owner
-
lastPos
public Location lastPos
-
isMouse
public boolean isMouse
-
MouseMovedIgnore
public int MouseMovedIgnore
-
MouseMovedShow
public int MouseMovedShow
-
MouseMovedPause
public int MouseMovedPause
-
MouseMovedAction
public int MouseMovedAction
-
mouseMovedResponse
public int mouseMovedResponse
-
MouseMovedHighlight
public boolean MouseMovedHighlight
-
mouseMovedCallback
public ObserverCallBack mouseMovedCallback
-
callback
public ObserverCallBack callback
-
-
Method Detail
-
setShouldTerminate
public static void setShouldTerminate()
-
isShouldRunCallback
public boolean isShouldRunCallback()
-
setShouldRunCallback
public void setShouldRunCallback(boolean shouldRunCallback)
-
isInUse
public boolean isInUse()
-
isSuspended
public boolean isSuspended()
-
isBlocked
public boolean isBlocked()
-
isNotLocal
public boolean isNotLocal(Object owner)
-
block
public boolean block()
to block the device globally
only the contained device methods without owner will be granted- Returns:
- success
-
block
public boolean block(Object owner)
to block the device globally for the given owner
only the contained mouse methods having the same owner will be granted- Parameters:
owner- Object- Returns:
- success
-
unblock
public boolean unblock()
free the mouse globally after a block()- Returns:
- success (false means: not blocked currently)
-
unblock
public boolean unblock(Object ownerGiven)
free the mouse globally for this owner after a block(owner)- Parameters:
ownerGiven- Object- Returns:
- success (false means: not blocked currently for this owner)
-
use
public boolean use()
-
use
public boolean use(Object owner)
-
keep
public boolean keep(Object ownerGiven)
-
let
public boolean let()
-
let
public boolean let(Object owner)
-
getLocation
public Location getLocation()
-
setCallback
public void setCallback(Object givenCallBack)
what to do if mouse is moved outside Sikuli's mouse protection
in case of event the user provided callBack.happened is called- Parameters:
givenCallBack-
-
delay
public static void delay(int time)
-
-