java.lang.Object
is.codion.plugin.swing.robot.Controller

public final class Controller extends Object
Keyboard controller with high-level operations, based on Robot
  • Method Details

    • autoDelay

      public void autoDelay(int autoDelay)
      Parameters:
      autoDelay - the robot auto delay in ms
      See Also:
    • type

      public void type(String text)
      Types the given text.
      Parameters:
      text - the text to type
    • type

      public void type(String text, @Nullable String description)
      Types the given text.
      Parameters:
      text - the text to type
      description - the description
    • key

      public void key(String keyStroke)
      Processes the given keystroke.
      Parameters:
      keyStroke - the AWT formatted keystroke
      See Also:
    • key

      public void key(String keyStroke, int repeat)
      Processes the given keystroke.
      Parameters:
      keyStroke - the AWT formatted keystroke
      repeat - the number of times to repeat the keystroke
      See Also:
    • key

      public void key(String keyStroke, @Nullable String description)
      Processes the given keystroke.
      Parameters:
      keyStroke - the AWT formatted keystroke
      description - the description
      See Also:
    • key

      public void key(String keyStroke, int repeat, @Nullable String description)
      Processes the given keystroke.
      Parameters:
      keyStroke - the AWT formatted keystroke
      repeat - the number of times to repeat the keystroke
      description - the description
      See Also:
    • pause

      public void pause(int milliseconds)
    • controller

      public static Controller controller()
      Returns:
      a Controller for the default screen device
    • controller

      public static Controller controller(GraphicsDevice device)
      Parameters:
      device - the screen device
      Returns:
      a Controller for the given screen device