|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.sdm.quasar.client.swing.common.util.GUIUtilities
This class contains useful functionality concerning Swing in form of static methods.
| Constructor Summary | |
GUIUtilities()
|
|
| Method Summary | |
static void |
centerWindow(java.awt.Window window,
java.awt.Component parentComponent)
Centers a given Window to the given parent component. |
static java.awt.Window |
findFrame()
Returns a frame that may be used as a parent for modal dialogs. |
static java.awt.Window |
getWindow(java.awt.Component component)
Returns the Window of the given Component or null, if
the Component is not contained inside a Window. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public GUIUtilities()
| Method Detail |
public static java.awt.Window findFrame()
Note: Usually you know which frame or dialog is responsible for you and you should use that dialog as a parent if you display a modal dialog.
Tries to find a frame that is showing. If that fails it returns any existing frame. If no frame exists, it returns null.
public static void centerWindow(java.awt.Window window,
java.awt.Component parentComponent)
Window to the given parent component.
window - the Window to centerparentComponent - the Component in the window to center
against or null to center to the screenpublic static java.awt.Window getWindow(java.awt.Component component)
Window of the given Component or null, if
the Component is not contained inside a Window.
component - the Component to locate
Window of the given Component or null, if
the Component is not contained inside a Window.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||