|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.metamatrix.console.util.DialogUtility
public class DialogUtility
This class consists of convenient static methods for displaying common and oft-used dialog boxes, such as confirmation dialogs, message dialogs, etc. Confirm dialogs are in yes/no mode, and return a boolean indicating if yes was selected.
TODO - add company icons to dialog boxes
Field Summary | |
---|---|
static int |
CANCEL
|
static java.lang.String |
CONFIRM_DELETE_HDR
|
static int |
NO
|
static int |
YES
|
Constructor Summary | |
---|---|
DialogUtility()
|
Method Summary | |
---|---|
static int |
displayYesNoDialog(java.awt.Component c,
java.lang.String header,
java.lang.String message)
Put up a dialog with YES or NO options. |
static javax.swing.JFrame |
getDefaultComponent()
|
static void |
setDefaultComponent(java.awt.Component c)
Set the default java.awt.Component which is used if null is passed in for an argument on any of the public methods. |
static int |
showPendingChangesDialog(java.lang.String msg,
java.lang.String url,
java.lang.String userName)
Static method to show a dialog inquiring about saving the pending changes. |
static boolean |
yesNoDialog(java.awt.Component c,
java.lang.Object message,
java.lang.String title)
Generic implementation of a yes/no dialog box, used by other methods of this class (which simply supply the necessary text and title) |
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 CONFIRM_DELETE_HDR
public static final int YES
public static final int NO
public static final int CANCEL
Constructor Detail |
---|
public DialogUtility()
Method Detail |
---|
public static void setDefaultComponent(java.awt.Component c)
public static javax.swing.JFrame getDefaultComponent()
public static boolean yesNoDialog(java.awt.Component c, java.lang.Object message, java.lang.String title)
c
- java.awt.Component needed by the Dialog Windowmessage
- Object displayed in window (usually a String, but
JOptionPane will take an Object)title
- String displayed in title bar
public static int displayYesNoDialog(java.awt.Component c, java.lang.String header, java.lang.String message)
public static int showPendingChangesDialog(java.lang.String msg, java.lang.String url, java.lang.String userName)
msg
- The message to be displayed
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |