|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjsky.util.gui.DialogUtil
public class DialogUtil
Utility class with static methods for commonly used dialogs.
Constructor Summary | |
---|---|
DialogUtil()
|
Method Summary | |
---|---|
static int |
confirm(Component parentComponent,
String msg)
Display a confirm dialog with YES, NO, CANCEL buttons and return a JOptionPane constant indicating the choice. |
static int |
confirm(String msg)
Display a confirm dialog with YES, NO, CANCEL buttons and return a JOptionPane constant indicating the choice. |
static void |
error(Component parentComponent,
Exception e)
Report an error message based on the given exception. |
static void |
error(Component parentComponent,
String msg)
Report an error message. |
static void |
error(Exception e)
Report an error message based on the given exception. |
static void |
error(String msg)
Report an error message. |
static JDesktopPane |
getDesktop()
This should be called if you want to use internal dialogs |
static String |
input(Component parentComponent,
String msg)
Get an input string from the user and return it. |
static String |
input(String msg)
Get an input string from the user and return it. |
static void |
message(Component parentComponent,
String msg)
Display an informational message. |
static void |
message(String msg)
Display an informational message. |
static void |
setDesktop(JDesktopPane d)
This should be called if you want to use internal dialogs |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DialogUtil()
Method Detail |
---|
public static void setDesktop(JDesktopPane d)
public static JDesktopPane getDesktop()
public static void error(Component parentComponent, String msg)
parentComponent
- display the dialog over the given componentmsg
- the error messagepublic static void error(String msg)
msg
- the error messagepublic static void error(Component parentComponent, Exception e)
parentComponent
- display the dialog over the given componente
- the exception containing the error informationpublic static void error(Exception e)
e
- the exception containing the error informationpublic static void message(Component parentComponent, String msg)
parentComponent
- display the dialog over the given componentmsg
- the messagepublic static void message(String msg)
msg
- the messagepublic static String input(Component parentComponent, String msg)
parentComponent
- display the dialog over the given componentmsg
- the message to display
public static String input(String msg)
msg
- the message to display
public static int confirm(Component parentComponent, String msg)
parentComponent
- display the dialog over the given componentmsg
- the message to display
public static int confirm(String msg)
msg
- the message to display
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |