Overview | Package | Class | Tree | Deprecated | Index | Help
| ej-technologies
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.gjt.jclasslib.util
Class GUIHelper

    java.lang.Object
      org.gjt.jclasslib.util.GUIHelper

public class GUIHelper
extends Object

Collection of GUI utility methods.

Version:
  $Revision: 1.1 $ $Date: 2003/08/18 07:46:43 $
Author:
  Ingo Kegel

Field Summary
`static Icon` | `ICON_EMPTY` Empty icon 16x16.
`static String` | `MESSAGE_TITLE` The title for message boxes.
`static String[]` | `YES_NO_OPTIONS` "Yes" and "No" Options for showOptionDialog.

Constructor Summary
`GUIHelper()`

Method Summary
`static void` | `centerOnParentWindow(Window window, Window parentWindow)` Center a window on another window.
`static void` | `setDefaultScrollbarUnits(JScrollPane scrollPane)` Set reasonable unit increments for a scroll pane that does not contain a `Scrollable`.
`static void` | `showMessage(Component parent, String message, int messageType)` Show a `JOptionPane` message dialog.
`static int` | `showOptionDialog(Component parent, String message, 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

### MESSAGE_TITLE

    public static final String MESSAGE_TITLE

  The title for message boxes.

  See Also:
    Constant Field Values

### YES_NO_OPTIONS

    public static final String[] YES_NO_OPTIONS

  "Yes" and "No" Options for showOptionDialog.

### ICON_EMPTY

    public static final Icon ICON_EMPTY

  Empty icon 16x16.

Constructor Detail

### GUIHelper

    public GUIHelper()

Method Detail

### showOptionDialog

    public static int showOptionDialog(Component parent,
                                       String message,
                                       String[] options,
                                       int messageType)

  Show a `JOptionPane` option dialog.

  Parameters:
    `parent` - parent component
    `message` - the message string
    `options` - the array of option strings
    `messageType` - the message type as defined in `JOptionPane`
  Returns:
    the result code of the dialog

### showMessage

    public static void showMessage(Component parent,
                                   String message,
                                   int messageType)

  Show a `JOptionPane` message dialog.

  Parameters:
    `parent` - parent component
    `message` - the message string
    `messageType` - the message type as defined in `JOptionPane`

### centerOnParentWindow

    public static void centerOnParentWindow(Window window,
                                            Window parentWindow)

  Center a window on another window.

  Parameters:
    `window` - the window to be centered.
    `parentWindow` - the parent window on which the window is to be centered.

### setDefaultScrollbarUnits

    public static void setDefaultScrollbarUnits(JScrollPane scrollPane)

  Set reasonable unit increments for a scroll pane that does not contain a `Scrollable`.

  Parameters:
    `scrollPane` -

Overview | Package | Class | Tree | Deprecated | Index | Help
| ej-technologies
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD