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
is not official API --- will not be in version 2
-
Field Summary
Fields Modifier and Type Field Description ObserverCallBackcallbackbooleaninUsebooleanisMousebooleankeepLocationlastPosintMouseMovedActionObserverCallBackmouseMovedCallbackbooleanMouseMovedHighlightintMouseMovedIgnoreintMouseMovedPauseintmouseMovedResponseintMouseMovedShowObjectowner -
Constructor Summary
-
Method Summary
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 Details
-
inUse
public boolean inUse -
keep
public boolean keep -
owner
-
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
-
callback
-
-
Constructor Details
-
Method Details
-
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
-
block
public boolean block()to block the device globally
only the contained device methods without owner will be granted- Returns:
- success
-
block
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
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
-
keep
-
let
public boolean let() -
let
-
getLocation
-
setCallback
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)
-