Package com.deltawalker.script
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 TypeMethodDescriptionReturns the bounds - position and size - of the main window.booleanAnswers whether the main window is in full screen mode.booleanAnswers whether the main window is maximized.booleanAnswers whether the main window is minimized.booleanAnswers whether the main window is visible.voidsetBounds(int x, int y, int width, int height) Sets the bounds - position and size - of the main window.voidSets the bounds - position and size - of the main window.voidsetFullScreen(boolean fullScreen) Switches the main window into or out of full screen mode.voidsetMaximized(boolean maximized) Maximizes the main window or restores it from the maximized state.voidsetMinimized(boolean minimized) Minimizes the main window or restores it from the minimized state.voidsetVisible(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
Rectangleholding 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:
trueif the main window is in full screen mode,falseotherwise- Since:
- 2.0
- See Also:
-
isMaximized
boolean isMaximized()Answers whether the main window is maximized.- Returns:
trueif the main window is maximized,falseotherwise- Since:
- 2.0
- See Also:
-
isMinimized
boolean isMinimized()Answers whether the main window is minimized.- Returns:
trueif the main window is minimized,falseotherwise- Since:
- 2.0
- See Also:
-
isVisible
boolean isVisible()Answers whether the main window is visible.- Returns:
trueif the main window is visible,falseotherwise- 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 windowy- the vertical position, in screen coordinates, of the top-left corner of the windowwidth- the width of the windowheight- the height of the window- Since:
- 2.0
-
setBounds
Sets the bounds - position and size - of the main window.- Parameters:
bounds- aRectangleholding the new position and size of the window; cannot benull- Throws:
NullPointerException- ifboundsisnullIllegalArgumentException- 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)andsetMinimized(true)varies by platform; avoid mixing them if possible.- Parameters:
fullScreen-trueto switch to full screen mode;falseto 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-trueto maximize,falseto restore- Since:
- 2.0
- See Also:
-
setMinimized
void setMinimized(boolean minimized) Minimizes the main window or restores it from the minimized state.- Parameters:
minimized-trueto minimize,falseto restore- Since:
- 2.0
- See Also:
-
setVisible
void setVisible(boolean visible) Shows or hides the main window.- Parameters:
visible-trueto show,falseto hide- Since:
- 2.0
- See Also:
-