Interface Window


public interface Window
The main DeltaWalker window, obtained with App.getWindow().

 const Rectangle = Java.type('com.deltawalker.script.Rectangle');

 const win = App.getWindow();
 console.log('Bounds: ' + win.getBounds());
 win.setBounds(new Rectangle(200, 200, 1000, 800));
 
Since:
2.0
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the bounds - position and size - of the main window.
    boolean
    Answers whether the main window is in full screen mode.
    boolean
    Answers whether the main window is maximized.
    boolean
    Answers whether the main window is minimized.
    boolean
    Answers whether the main window is visible.
    void
    setBounds(int x, int y, int width, int height)
    Sets the bounds - position and size - of the main window.
    void
    Sets the bounds - position and size - of the main window.
    void
    setFullScreen(boolean fullScreen)
    Switches the main window into or out of full screen mode.
    void
    setMaximized(boolean maximized)
    Maximizes the main window or restores it from the maximized state.
    void
    setMinimized(boolean minimized)
    Minimizes the main window or restores it from the minimized state.
    void
    setVisible(boolean visible)
    Shows or hides the main window.
  • Method Details

    • getBounds

      Rectangle getBounds()
      Returns the bounds - position and size - of the main window.
      Returns:
      a Rectangle holding the position and size of the window
      Since:
      2.0
      See Also:
    • isFullScreen

      boolean isFullScreen()
      Answers whether the main window is in full screen mode.
      Returns:
      true if the main window is in full screen mode, false otherwise
      Since:
      2.0
      See Also:
    • isMaximized

      boolean isMaximized()
      Answers whether the main window is maximized.
      Returns:
      true if the main window is maximized, false otherwise
      Since:
      2.0
      See Also:
    • isMinimized

      boolean isMinimized()
      Answers whether the main window is minimized.
      Returns:
      true if the main window is minimized, false otherwise
      Since:
      2.0
      See Also:
    • isVisible

      boolean isVisible()
      Answers whether the main window is visible.
      Returns:
      true if the main window is visible, false otherwise
      Since:
      2.0
      See Also:
    • setBounds

      void setBounds(int x, int y, int width, int height)
      Sets the bounds - position and size - of the main window.
      Parameters:
      x - the horizontal position, in screen coordinates, of the top-left corner of the window
      y - the vertical position, in screen coordinates, of the top-left corner of the window
      width - the width of the window
      height - the height of the window
      Since:
      2.0
    • setBounds

      Sets the bounds - position and size - of the main window.
      Parameters:
      bounds - a Rectangle holding the new position and size of the window; cannot be null
      Throws:
      NullPointerException - if bounds is null
      IllegalArgumentException - declared for compatibility
      Since:
      2.0
    • setFullScreen

      void setFullScreen(boolean fullScreen)
      Switches the main window into or out of full screen mode.

      The result of combining setFullScreen(true), setMaximized(true) and setMinimized(true) varies by platform; avoid mixing them if possible.

      Parameters:
      fullScreen - true to switch to full screen mode; false to return from full screen mode to the maximized or normal state the window had before
      Since:
      2.0
      See Also:
    • setMaximized

      void setMaximized(boolean maximized)
      Maximizes the main window or restores it from the maximized state.
      Parameters:
      maximized - true to maximize, false to restore
      Since:
      2.0
      See Also:
    • setMinimized

      void setMinimized(boolean minimized)
      Minimizes the main window or restores it from the minimized state.
      Parameters:
      minimized - true to minimize, false to restore
      Since:
      2.0
      See Also:
    • setVisible

      void setVisible(boolean visible)
      Shows or hides the main window.
      Parameters:
      visible - true to show, false to hide
      Since:
      2.0
      See Also: