Class Device


  • public class Device
    extends Object
    EXPERIMENTAL --- INTERNAL USE ONLY
    is not official API --- will not be in version 2
    • Field Detail

      • inUse

        public boolean inUse
      • keep

        public boolean keep
      • 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
    • Constructor Detail

      • Device

        public Device​(Mouse m)
      • Device

        public Device​(Screen s)
    • 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)