|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcds.gui.GuiUtils
Class containing static utility functions usefull in developping Graphical User Interfaces
Constructor Summary | |
GuiUtils()
|
Method Summary | |
static java.awt.Rectangle |
absBounds(java.awt.Component c)
Computes the absolute rectangle bounding a Component. |
static void |
centerWindow(java.awt.Window win)
Center a Frame on the screen |
static void |
centerWindow(java.awt.Window win,
int offX,
int offY)
Center a Frame on the screen with an offset |
static java.awt.Dimension |
stringDimension(java.lang.String str,
java.awt.Component c)
Computes the size of a string for a given Component |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public GuiUtils()
Method Detail |
public static java.awt.Dimension stringDimension(java.lang.String str, java.awt.Component c)
str
- string to use for the calculationc
- Component for which the size of the String will be computed
public static java.awt.Rectangle absBounds(java.awt.Component c)
c
- component
public static void centerWindow(java.awt.Window win, int offX, int offY)
offX
- horizontal offset. a positive value leads to a right offsetoffY
- vertical offset. a positive value leads to a down offsetpublic static void centerWindow(java.awt.Window win)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |