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 Details

  • 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

      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)