Class SwingWindow
java.lang.Object
com.inductiveautomation.snap.swing.SwingWindow
A class to manage the Window of a SwingOwner.
- 
Nested Class SummaryNested Classes
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddWindowListener(WindowListener aListener) Add window listener.protected WindowCreates a window for this panel from window class.Returns the content pane.Returns the Callable that provides the ContentPane.Returns the name of the default button associated with this window.Returns the document file for the window title bar proxy icon.static FilegetDocumentFile(Window aWindow) Returns the document file for the window title bar proxy icon.intReturns the window x.Returns the icon image for the window.Returns the menu bar associated with this window.Returns the window MinimumSize.Returns the window PreferredSize.Returns the root pane for the window.static JRootPanegetRootPane(Window aWin) Returns the root pane for a window, if available.getSize()Returns the window size.getStyle()Returns the window style.getTitle()Returns the title of the window.intgetWidth()Returns the window width.Returns the window associated with this panel, creating it if necessary.Returns the call to create the window.Returns the class of the window associated with this panel.intgetX()Returns the window x.intgetY()Returns the window y.booleanReturns whether the window is always on top.booleanReturns whether the window will hide on deactivate.booleanisModal()Returns the modal mode of the window.booleanReturns whether the window is resizable.booleanReturns true if the window has no title bar or other decorations.booleanReturns whether window is visible.booleanReturns whether window has been created.voidpack()Packs the window.voidRequests focus on the window.voidsetAlwaysOnTop(boolean aValue) Sets whether the window is always on top.voidsetContentPane(Container aContainer) Sets the content pane.voidsetContentPaneCall(Callable<JComponent> aCall) Sets the Callable that provides the ContentPane.voidsetDefaultButton(JButton aButton) Sets the name of the default button associated with this window.static voidsetDocumentFile(Window aWindow, File aFile) Returns the document file for the window title bar proxy icon.voidsetDocumentFile(File aFile) Returns the document file for the window title bar proxy icon.voidsetHideOnDeactivate(boolean aValue) Sets whether the window will hide on deacativate.voidsetIconImage(Image anImage) Sets the icon image for the window.voidsetMaximizedBounds(Rectangle aRect) Set Maximized bounds.voidsetMenuBar(JMenuBar aMenuBar) Sets the menu bar associated with this window.voidsetModal(boolean aValue) Sets the modal mode of the window (defaults to false).voidsetResizable(boolean aValue) Sets whether the window is resizable (default to true).voidReturns the window size.voidsetStyle(SwingWindow.Style aStyle) Sets the window style.voidSets the title of the window.voidsetUndecorated(boolean flag) Sets whether the window has a title bar and decorations or not.voidsetVisible(boolean aValue) This method sets the window to be visible or invisible.voidsetVisible(SwingWindow.Pos aPos, int x, int y, String fsaveName, boolean doSize) This method set the window associated with this panel to be visible at some given x and y away from a given corner.static voidsetVisible(Component aWin, SwingWindow.Pos aPos, int dx, int dy, String aFrmSvName, boolean doSize) Makes a window visible with the given corner at the given x & y.protected voidSets a new window for this panel.voidsetWindowCall(Callable<Window> aCall) Sets the call to create the window.voidsetWindowClass(Class<? extends Window> aClass) Sets the window class.voidtoFront()Order window to front.voidThis method disposes the window associated with this panel.
- 
Constructor Details- 
SwingWindowpublic SwingWindow()
 
- 
- 
Method Details- 
isWindowSetpublic boolean isWindowSet()Returns whether window has been created.
- 
getWindowReturns the window associated with this panel, creating it if necessary.
- 
setWindowSets a new window for this panel.
- 
createWindowCreates a window for this panel from window class.
- 
getWindowCallReturns the call to create the window.
- 
setWindowCallSets the call to create the window.
- 
getContentPaneCallReturns the Callable that provides the ContentPane.
- 
setContentPaneCallSets the Callable that provides the ContentPane.
- 
getWindowClassReturns the class of the window associated with this panel.
- 
setWindowClassSets the window class.
- 
getTitleReturns the title of the window.
- 
setTitleSets the title of the window.
- 
isResizablepublic boolean isResizable()Returns whether the window is resizable.
- 
setResizablepublic void setResizable(boolean aValue) Sets whether the window is resizable (default to true).
- 
getStyleReturns the window style.
- 
setStyleSets the window style.
- 
getMenuBarReturns the menu bar associated with this window.
- 
setMenuBarSets the menu bar associated with this window.
- 
isAlwaysOnToppublic boolean isAlwaysOnTop()Returns whether the window is always on top.
- 
setAlwaysOnToppublic void setAlwaysOnTop(boolean aValue) Sets whether the window is always on top.
- 
getDocumentFileReturns the document file for the window title bar proxy icon.
- 
setDocumentFileReturns the document file for the window title bar proxy icon.
- 
isHideOnDeactivatepublic boolean isHideOnDeactivate()Returns whether the window will hide on deactivate.
- 
setHideOnDeactivatepublic void setHideOnDeactivate(boolean aValue) Sets whether the window will hide on deacativate.
- 
getIconImageReturns the icon image for the window.
- 
setIconImageSets the icon image for the window.
- 
isModalpublic boolean isModal()Returns the modal mode of the window.
- 
setModalpublic void setModal(boolean aValue) Sets the modal mode of the window (defaults to false).
- 
getDefaultButtonReturns the name of the default button associated with this window.
- 
setDefaultButtonSets the name of the default button associated with this window.
- 
isUndecoratedpublic boolean isUndecorated()Returns true if the window has no title bar or other decorations.
- 
setUndecoratedpublic void setUndecorated(boolean flag) Sets whether the window has a title bar and decorations or not. This must be done before the first call to getWindow() or an IllegalComponentStateException will be thrown.
- 
addWindowListenerAdd window listener.
- 
getRootPaneReturns the root pane for the window.
- 
getContentPaneReturns the content pane.
- 
setContentPaneSets the content pane.
- 
getXpublic int getX()Returns the window x.
- 
getYpublic int getY()Returns the window y.
- 
getWidthpublic int getWidth()Returns the window width.
- 
getHeightpublic int getHeight()Returns the window x.
- 
getSizeReturns the window size.
- 
setSizeReturns the window size.
- 
getPreferredSizeReturns the window PreferredSize.
- 
getMinimumSizeReturns the window MinimumSize.
- 
packpublic void pack()Packs the window.
- 
requestFocuspublic void requestFocus()Requests focus on the window.
- 
toFrontpublic void toFront()Order window to front.
- 
setMaximizedBoundsSet Maximized bounds.
- 
windowDisposepublic void windowDispose()This method disposes the window associated with this panel.
- 
isVisiblepublic boolean isVisible()Returns whether window is visible.
- 
setVisiblepublic void setVisible(boolean aValue) This method sets the window to be visible or invisible.
- 
setVisibleThis method set the window associated with this panel to be visible at some given x and y away from a given corner. It also allows you to provide a "frame save name" which causes the frame's location and size to be saved between sessions (in which case it will override the default position provided).
- 
setVisiblepublic static void setVisible(Component aWin, SwingWindow.Pos aPos, int dx, int dy, String aFrmSvName, boolean doSize) Makes a window visible with the given corner at the given x & y.
- 
getRootPaneReturns the root pane for a window, if available.
- 
getDocumentFileReturns the document file for the window title bar proxy icon.
- 
setDocumentFileReturns the document file for the window title bar proxy icon.
 
-