|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jurvis.awt.JvAWTUtilities
public final class JvAWTUtilities
Various utility methods useful in creating AWT and Swing GUIs.
| Constructor Summary | |
|---|---|
JvAWTUtilities()
|
|
| Method Summary | |
|---|---|
static void |
centerWindow(Window w)
Center the given component within the screen. |
static void |
centerWindow(Window parent,
Window w)
Center the given component within the bounds of another window. |
static Dimension |
getMaxSize(Collection components)
Return the largest size of the component in the given collection. |
static Dimension |
getSize(JComponent comp,
int numColumns)
Return the amount of space needed to render the given number of columns. |
static void |
setEnabled(Component component,
boolean enabled)
Enable or disable the specified component and, if it's a Container, its children components. |
static void |
setFixedSize(JComponent comp,
Dimension dim)
Fix the size of the component to the given dimension. |
static void |
setFixedSize(JComponent comp,
int numColumns)
Fix the fixed size of the component to the amount of space needed to render the given number of columns. |
static void |
setSameSize(Collection components)
Fix the size of all the components in the collection to the size of the largest component. |
static void |
setSameSize(Collection components,
Dimension size)
Fix the size of all the components in the collection. |
static void |
setSameSize(Component[] components)
Fix the size of all the components in the array to the size of the largest component. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JvAWTUtilities()
| Method Detail |
|---|
public static void centerWindow(Window w)
w - the window to center
public static void centerWindow(Window parent,
Window w)
w - the window to centerparent - the window to center within
public static void setEnabled(Component component,
boolean enabled)
Container, its children components.
component - the component to modifyenabled - the enabled statepublic static Dimension getMaxSize(Collection components)
components - the collection of componentspublic static void setSameSize(Component[] components)
components - the array of componentspublic static void setSameSize(Collection components)
components - the collection of components
public static void setSameSize(Collection components,
Dimension size)
components - the collection of componentssize - the size to fix
public static void setFixedSize(JComponent comp,
Dimension dim)
comp - the component whose size to fixdim - the dimension to fix the size of the component to
public static Dimension getSize(JComponent comp,
int numColumns)
comp - the component whose size is desirednumColumns - the number of columns to size the label to
public static void setFixedSize(JComponent comp,
int numColumns)
comp - the component whose size to fixnumColumns - the number of columns to size the label to
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||