|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.pf.swing.SwingUtil
public class SwingUtil
Provides support and convenience and helper methods for Swing based UI.
| Method Summary | |
|---|---|
void |
centerFrame(javax.swing.JFrame frame)
Change the given frames upper left corner coordinates, so that it will be shown in the center of the screen. |
void |
centerFrame(javax.swing.JFrame frame,
int width,
int height)
Change the given frame's upper left corner coordinates, so that it will be shown in the center of the screen according to the specified width and height. |
void |
centerWindow(java.awt.Window window)
Change the given window's upper left corner coordinates, so that it will be shown in the center of the screen. |
void |
centerWindow(java.awt.Window window,
int width,
int height)
Change the given window's upper left corner coordinates, so that it will be shown in the center of the screen according to the specified width and height. |
static SwingUtil |
current()
Returns the single instance of this class. |
java.awt.Component |
findComponent(java.awt.Container container,
java.lang.Class componentType,
java.lang.String componentName)
Searches for the component with the specified type and name in the given container and all sub containers. |
java.awt.Component |
findComponent(java.awt.Container container,
java.lang.String componentName)
Searches for the component with the specified name in the given container and all sub containers. |
void |
setSystemLookAndFeel()
Activates the look & feel for the current operating system. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static SwingUtil current()
public void centerWindow(java.awt.Window window,
int width,
int height)
window - The window that must be centeredwidth - The width of the windowheight - The height of the windowpublic void centerWindow(java.awt.Window window)
window - The window that must be centered
public void centerFrame(javax.swing.JFrame frame,
int width,
int height)
frame - The frame that must be centeredwidth - The width of the frameheight - The height of the framepublic void centerFrame(javax.swing.JFrame frame)
frame - The frame that must be centeredpublic void setSystemLookAndFeel()
public java.awt.Component findComponent(java.awt.Container container,
java.lang.String componentName)
container - The container in which to searchcomponentName - The name of the component
public java.awt.Component findComponent(java.awt.Container container,
java.lang.Class componentType,
java.lang.String componentName)
container - The container in which to searchcomponentType - The type of the component (may be null)componentName - The name of the component (may be null)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||