|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--allensoft.util.AWTUtilities
A collection of miscelaneous useful methods for working with AWT components. All methods are static.
Constructor Summary | |
AWTUtilities()
|
Method Summary | |
static void |
centreOnScreen(java.awt.Component c)
Centres a component on the screen. |
static void |
disable(java.awt.Component c)
Disables all components recursively. |
static void |
enable(java.awt.Component c)
Enables all components recursively. |
static java.awt.Frame |
getFrameAncestor(java.awt.Component c)
|
static java.lang.String |
getKeyStrokeString(javax.swing.KeyStroke keyStroke)
Converts the keystroke to a string which can be used by KeyStroke.getKeyStroke(String) . |
static java.awt.Component |
getRoot(java.awt.Component c,
java.lang.Class type)
Returns the root component for the current component tree. |
static java.awt.Window |
getWindowAncestor(java.awt.Component c)
|
static void |
limitToScreenSize(java.awt.Component c)
Limits the size of the component to be no greater than the screen size. |
static void |
setEnabled(java.awt.Component c,
boolean enabled)
|
static void |
setMnemonics(java.awt.Component root)
Sets the mnemonics (keyboard shortcuts) for all buttons, and labels that are labels for a component, in the speciifed container. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AWTUtilities()
Method Detail |
public static void setMnemonics(java.awt.Component root)
public static void centreOnScreen(java.awt.Component c)
public static void limitToScreenSize(java.awt.Component c)
public static void setEnabled(java.awt.Component c, boolean enabled)
public static void disable(java.awt.Component c)
public static void enable(java.awt.Component c)
public static java.lang.String getKeyStrokeString(javax.swing.KeyStroke keyStroke)
KeyStroke.getKeyStroke(String)
.public static java.awt.Component getRoot(java.awt.Component c, java.lang.Class type)
public static java.awt.Window getWindowAncestor(java.awt.Component c)
public static java.awt.Frame getFrameAncestor(java.awt.Component c)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |