|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.alee.utils.WindowUtils
public final class WindowUtils
This class provides a set of utilities to modify application windows.
Constructor Summary | |
---|---|
WindowUtils()
|
Method Summary | ||
---|---|---|
static
|
center(W window)
Centers window relative to screen center. |
|
static
|
center(W window,
java.awt.Component relativeTo)
Centers window relative to the specified component center. |
|
static
|
center(W window,
java.awt.Component relativeTo,
int width,
int height)
Changes window size and centers it relative to screen center. |
|
static
|
center(W window,
int width,
int height)
Changes window size and centers it relative to screen center. |
|
static
|
getWindowOpacity(W window)
Returns window opacity. |
|
static
|
isWindowOpaque(W window)
Returns whether window is opaque or not. |
|
static
|
packAndCenter(W window)
Packs and centers specified window relative to old position. |
|
static
|
packAndCenter(W window,
boolean animate)
Packs and centers specified window relative to old position. |
|
static
|
packToHeight(W window,
int height)
Packs window to its preffered width and specified height. |
|
static
|
packToWidth(W window,
int width)
Packs window to its preffered height and specified width. |
|
static
|
setWindowOpacity(W window,
float opacity)
Sets window opacity if that option is supported by the underlying system. |
|
static
|
setWindowOpaque(W window,
boolean opaque)
Sets window opaque if that option is supported by the underlying system. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WindowUtils()
Method Detail |
---|
public static <W extends java.awt.Window> W setWindowOpaque(W window, boolean opaque)
W
- window typewindow
- window to modifyopaque
- whether should make window opaque or not
public static <W extends java.awt.Window> boolean isWindowOpaque(W window)
W
- window typewindow
- window to process
public static <W extends java.awt.Window> W setWindowOpacity(W window, float opacity)
W
- window typewindow
- window to modifyopacity
- new window opacity
public static <W extends java.awt.Window> float getWindowOpacity(W window)
W
- window typewindow
- window to process
public static <W extends java.awt.Window> W center(W window)
W
- window typewindow
- window to process
public static <W extends java.awt.Window> W center(W window, java.awt.Component relativeTo)
W
- window typewindow
- window to processrelativeTo
- component used to center window
public static <W extends java.awt.Window> W center(W window, int width, int height)
W
- window typewindow
- window to processwidth
- new window widthheight
- new window height
public static <W extends java.awt.Window> W center(W window, java.awt.Component relativeTo, int width, int height)
W
- window typewindow
- window to processrelativeTo
- component used to center windowwidth
- new window widthheight
- new window height
public static <W extends java.awt.Window> W packToWidth(W window, int width)
W
- window typewindow
- window to processwidth
- new window width
public static <W extends java.awt.Window> W packToHeight(W window, int height)
W
- window typewindow
- window to processheight
- new window height
public static <W extends java.awt.Window> W packAndCenter(W window)
W
- window typewindow
- window to process
StyleConstants.animate
public static <W extends java.awt.Window> W packAndCenter(W window, boolean animate)
W
- window typewindow
- window to processanimate
- whether should animate window size changes or not
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |