|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.pzgui.DialogHelper
public abstract class DialogHelper
Provides some generic GUI helper functions for popping up Dialog boxes.
| Constructor Summary | |
|---|---|
DialogHelper()
|
|
| Method Summary | |
|---|---|
static int |
confirmDialog(java.lang.String title,
java.lang.String msg,
int type)
Displays an confirm dialog box |
static void |
displayError(java.lang.Exception e)
Displays an error message from a thrown Excpetion |
static void |
displayError(java.lang.String msg)
Displays an error message |
static void |
displayMessage(java.lang.String msg)
Displays a message |
static void |
displayMessage(java.lang.String title,
java.lang.String msg)
Displays a message |
static java.lang.String |
getInput(java.lang.String msg)
Displays an input dialog box with no default value set |
static java.lang.String |
getInput(java.lang.String msg,
java.lang.String defaultValue)
Displays an input dialog box |
static int |
getIntFromUser(java.lang.String msg,
int min,
int def,
int max)
Gets an integer from the user within the specified range. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DialogHelper()
| Method Detail |
|---|
public static void displayError(java.lang.Exception e)
e - the exception whose message will be shown in a JOptionPane MessageDialog boxpublic static void displayError(java.lang.String msg)
msg - the message which will be shown in a JOptionPane MessageDialog boxpublic static java.lang.String getInput(java.lang.String msg)
msg - the message which will be shown in a JOptionPane InputDialog box
public static java.lang.String getInput(java.lang.String msg,
java.lang.String defaultValue)
msg - the message which will be shown in a JOptionPane InputDialog boxdefaultValue - the default value for the InputDialog box
public static int confirmDialog(java.lang.String title,
java.lang.String msg,
int type)
title - the title of the message boxmsg - the message which will be shown in a JOptionPane MessageDialog boxtype - what kind of JOptionPane to use
public static void displayMessage(java.lang.String msg)
msg - the message which will be shown in a JOptionPane MessageDialog box
public static void displayMessage(java.lang.String title,
java.lang.String msg)
title - the title of the message boxmsg - the message which will be shown in a JOptionPane MessageDialog box
public static int getIntFromUser(java.lang.String msg,
int min,
int def,
int max)
msg - The prompt to show the user.min - The minimum allowed value.def - The default value/max - The maximum allowed value.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||