public class SwingWindow
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
SwingWindow.Pos |
static class |
SwingWindow.Style |
Constructor and Description |
---|
SwingWindow() |
Modifier and Type | Method and Description |
---|---|
void |
addWindowListener(java.awt.event.WindowListener aListener)
Add window listener.
|
protected java.awt.Window |
createWindow()
Creates a window for this panel from window class.
|
java.awt.Container |
getContentPane()
Returns the content pane.
|
java.util.concurrent.Callable<javax.swing.JComponent> |
getContentPaneCall()
Returns the Callable that provides the ContentPane.
|
javax.swing.JButton |
getDefaultButton()
Returns the name of the default button associated with this window.
|
java.io.File |
getDocumentFile()
Returns the document file for the window title bar proxy icon.
|
static java.io.File |
getDocumentFile(java.awt.Window aWindow)
Returns the document file for the window title bar proxy icon.
|
int |
getHeight()
Returns the window x.
|
java.awt.Image |
getIconImage()
Returns the icon image for the window.
|
javax.swing.JMenuBar |
getMenuBar()
Returns the menu bar associated with this window.
|
java.awt.Dimension |
getMinimumSize()
Returns the window MinimumSize.
|
java.awt.Dimension |
getPreferredSize()
Returns the window PreferredSize.
|
javax.swing.JRootPane |
getRootPane()
Returns the root pane for the window.
|
static javax.swing.JRootPane |
getRootPane(java.awt.Window aWin)
Returns the root pane for a window, if available.
|
java.awt.Dimension |
getSize()
Returns the window size.
|
SwingWindow.Style |
getStyle()
Returns the window style.
|
java.lang.String |
getTitle()
Returns the title of the window.
|
int |
getWidth()
Returns the window width.
|
java.awt.Window |
getWindow()
Returns the window associated with this panel, creating it if necessary.
|
java.util.concurrent.Callable<java.awt.Window> |
getWindowCall()
Returns the call to create the window.
|
java.lang.Class<? extends java.awt.Window> |
getWindowClass()
Returns the class of the window associated with this panel.
|
int |
getX()
Returns the window x.
|
int |
getY()
Returns the window y.
|
boolean |
isAlwaysOnTop()
Returns whether the window is always on top.
|
boolean |
isHideOnDeactivate()
Returns whether the window will hide on deactivate.
|
boolean |
isModal()
Returns the modal mode of the window.
|
boolean |
isResizable()
Returns whether the window is resizable.
|
boolean |
isUndecorated()
Returns true if the window has no title bar or other decorations.
|
boolean |
isVisible()
Returns whether window is visible.
|
boolean |
isWindowSet()
Returns whether window has been created.
|
void |
pack()
Packs the window.
|
void |
requestFocus()
Requests focus on the window.
|
void |
setAlwaysOnTop(boolean aValue)
Sets whether the window is always on top.
|
void |
setContentPane(java.awt.Container aContainer)
Sets the content pane.
|
void |
setContentPaneCall(java.util.concurrent.Callable<javax.swing.JComponent> aCall)
Sets the Callable that provides the ContentPane.
|
void |
setDefaultButton(javax.swing.JButton aButton)
Sets the name of the default button associated with this window.
|
void |
setDocumentFile(java.io.File aFile)
Returns the document file for the window title bar proxy icon.
|
static void |
setDocumentFile(java.awt.Window aWindow,
java.io.File aFile)
Returns the document file for the window title bar proxy icon.
|
void |
setHideOnDeactivate(boolean aValue)
Sets whether the window will hide on deacativate.
|
void |
setIconImage(java.awt.Image anImage)
Sets the icon image for the window.
|
void |
setMaximizedBounds(java.awt.Rectangle aRect)
Set Maximized bounds.
|
void |
setMenuBar(javax.swing.JMenuBar aMenuBar)
Sets the menu bar associated with this window.
|
void |
setModal(boolean aValue)
Sets the modal mode of the window (defaults to false).
|
void |
setResizable(boolean aValue)
Sets whether the window is resizable (default to true).
|
void |
setSize(java.awt.Dimension aSize)
Returns the window size.
|
void |
setStyle(SwingWindow.Style aStyle)
Sets the window style.
|
void |
setTitle(java.lang.String aValue)
Sets the title of the window.
|
void |
setUndecorated(boolean flag)
Sets whether the window has a title bar and decorations or not.
|
void |
setVisible(boolean aValue)
This method sets the window to be visible or invisible.
|
static void |
setVisible(java.awt.Component aWin,
SwingWindow.Pos aPos,
int dx,
int dy,
java.lang.String aFrmSvName,
boolean doSize)
Makes a window visible with the given corner at the given x & y.
|
void |
setVisible(SwingWindow.Pos aPos,
int x,
int y,
java.lang.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.
|
protected void |
setWindow(java.awt.Window aWindow)
Sets a new window for this panel.
|
void |
setWindowCall(java.util.concurrent.Callable<java.awt.Window> aCall)
Sets the call to create the window.
|
void |
setWindowClass(java.lang.Class<? extends java.awt.Window> aClass)
Sets the window class.
|
void |
toFront()
Order window to front.
|
void |
windowDispose()
This method disposes the window associated with this panel.
|
public boolean isWindowSet()
public java.awt.Window getWindow()
protected void setWindow(java.awt.Window aWindow)
protected java.awt.Window createWindow()
public java.util.concurrent.Callable<java.awt.Window> getWindowCall()
public void setWindowCall(java.util.concurrent.Callable<java.awt.Window> aCall)
public java.util.concurrent.Callable<javax.swing.JComponent> getContentPaneCall()
public void setContentPaneCall(java.util.concurrent.Callable<javax.swing.JComponent> aCall)
public java.lang.Class<? extends java.awt.Window> getWindowClass()
public void setWindowClass(java.lang.Class<? extends java.awt.Window> aClass)
public java.lang.String getTitle()
public void setTitle(java.lang.String aValue)
public boolean isResizable()
public void setResizable(boolean aValue)
public SwingWindow.Style getStyle()
public void setStyle(SwingWindow.Style aStyle)
public javax.swing.JMenuBar getMenuBar()
public void setMenuBar(javax.swing.JMenuBar aMenuBar)
public boolean isAlwaysOnTop()
public void setAlwaysOnTop(boolean aValue)
public java.io.File getDocumentFile()
public void setDocumentFile(java.io.File aFile)
public boolean isHideOnDeactivate()
public void setHideOnDeactivate(boolean aValue)
public java.awt.Image getIconImage()
public void setIconImage(java.awt.Image anImage)
public boolean isModal()
public void setModal(boolean aValue)
public javax.swing.JButton getDefaultButton()
public void setDefaultButton(javax.swing.JButton aButton)
public boolean isUndecorated()
public void setUndecorated(boolean flag)
public void addWindowListener(java.awt.event.WindowListener aListener)
public javax.swing.JRootPane getRootPane()
public java.awt.Container getContentPane()
public void setContentPane(java.awt.Container aContainer)
public int getX()
public int getY()
public int getWidth()
public int getHeight()
public java.awt.Dimension getSize()
public void setSize(java.awt.Dimension aSize)
public java.awt.Dimension getPreferredSize()
public java.awt.Dimension getMinimumSize()
public void pack()
public void requestFocus()
public void toFront()
public void setMaximizedBounds(java.awt.Rectangle aRect)
public void windowDispose()
public boolean isVisible()
public void setVisible(boolean aValue)
public void setVisible(SwingWindow.Pos aPos, int x, int y, java.lang.String fsaveName, boolean doSize)
public static void setVisible(java.awt.Component aWin, SwingWindow.Pos aPos, int dx, int dy, java.lang.String aFrmSvName, boolean doSize)
public static javax.swing.JRootPane getRootPane(java.awt.Window aWin)
public static java.io.File getDocumentFile(java.awt.Window aWindow)
public static void setDocumentFile(java.awt.Window aWindow, java.io.File aFile)