|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gjt.jclasslib.util.GUIHelper
public class GUIHelper
Collection of GUI utility methods.
Field Summary | |
---|---|
static javax.swing.Icon |
ICON_EMPTY
Empty icon 16x16. |
static java.lang.String |
MESSAGE_TITLE
The title for message boxes. |
static java.lang.String[] |
YES_NO_OPTIONS
"Yes" and "No" Options for showOptionDialog. |
Constructor Summary | |
---|---|
GUIHelper()
|
Method Summary | |
---|---|
static void |
centerOnParentWindow(java.awt.Window window,
java.awt.Window parentWindow)
Center a window on another window. |
static void |
setDefaultScrollbarUnits(javax.swing.JScrollPane scrollPane)
Set reasonable unit increments for a scroll pane that does not contain a Scrollable. |
static void |
showMessage(java.awt.Component parent,
java.lang.String message,
int messageType)
Show a JOptionPane message dialog. |
static int |
showOptionDialog(java.awt.Component parent,
java.lang.String message,
java.lang.String[] options,
int messageType)
Show a JOptionPane option dialog. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String MESSAGE_TITLE
public static final java.lang.String[] YES_NO_OPTIONS
public static final javax.swing.Icon ICON_EMPTY
Constructor Detail |
---|
public GUIHelper()
Method Detail |
---|
public static int showOptionDialog(java.awt.Component parent, java.lang.String message, java.lang.String[] options, int messageType)
parent
- parent componentmessage
- the message stringoptions
- the array of option stringsmessageType
- the message type as defined in JOptionPane
public static void showMessage(java.awt.Component parent, java.lang.String message, int messageType)
parent
- parent componentmessage
- the message stringmessageType
- the message type as defined in JOptionPanepublic static void centerOnParentWindow(java.awt.Window window, java.awt.Window parentWindow)
window
- the window to be centered.parentWindow
- the parent window on which the window is to be centered.public static void setDefaultScrollbarUnits(javax.swing.JScrollPane scrollPane)
scrollPane
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |