|
Extension SDK | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectoracle.ide.dialogs.MessageDialog
A utility class for displaying alerts. The behavior of alerts is specified in the Oracle User Interface Design Guidelines for Desktop Applications revision 3.3 in section 6.3:
Alert Guidelines (Oracle internal)
To display an alert, call one of the following methods on this class:
For each of these dialog types, you must supply a parent component (for modality), message and a title. The javadoc for each method contains the relevant guidelines from the UIDS for titling and providing the text for alerts.
You can optionally specify a help topic. The help button will only be displayed if a topic is provided. You only need to provide a help topic if additional information is available to help the user with the alert.
Method Summary | |
static void |
alert(java.awt.Component parent,
java.lang.Object message)
Deprecated. use error( Component, Object, String, String ) |
static void |
alert(java.awt.Component parent,
java.lang.Object message,
java.lang.String helptopic)
Deprecated. use error( Component, Object, String, String ) |
static void |
alert(java.awt.Component parent,
java.lang.Object message,
java.lang.String title,
java.lang.String helptopic)
Deprecated. use error( Component, Object, String, String ) |
static void |
alert(java.lang.Object message)
Deprecated. use error( Component, Object, String, String ) |
static boolean |
ask(java.awt.Component parent,
java.lang.Object message)
Deprecated. use confirm( Component, Object, String, String ) |
static boolean |
ask(java.awt.Component parent,
java.lang.Object message,
java.lang.String helptopic)
Deprecated. use confirm( Component, Object, String, String ) |
static boolean |
ask(java.awt.Component parent,
java.lang.Object message,
java.lang.String title,
java.lang.String helptopic)
Deprecated. use confirm( Component, Object, String, String ) |
static boolean |
ask(java.awt.Component parent,
java.lang.Object message,
java.lang.String title,
java.lang.String helptopic,
boolean noIsDefault)
Deprecated. use confirm( Component, Object, String, String, boolean ) |
static boolean |
ask(java.lang.Object message)
Deprecated. use confirm( Component, Object, String, String ) |
static boolean |
confirm(java.awt.Component parent,
java.lang.Object message,
java.lang.String title,
java.lang.String helptopic)
Display a warning / confirmation alert. |
static boolean |
confirm(java.awt.Component parent,
java.lang.Object message,
java.lang.String title,
java.lang.String helptopic,
boolean isDestructive)
Display a warning / confirmation alert. |
static boolean |
confirm(java.awt.Component parent,
java.lang.Object message,
java.lang.String title,
java.lang.String helptopic,
boolean isDestructive,
java.lang.String yesText,
java.lang.String noText)
Display a warning / confirmation alert. |
static void |
critical(java.awt.Component parent,
java.lang.Object message,
java.lang.String title,
java.lang.String helptopic)
Display a critical alert. |
static void |
error(java.awt.Component parent,
java.lang.Object message,
java.lang.String title,
java.lang.String helpTopic)
Display an error alert. |
static void |
information(java.awt.Component parent,
java.lang.Object message)
Deprecated. use information( Component, Object, String, String ); |
static void |
information(java.awt.Component parent,
java.lang.Object message,
java.lang.String helptopic)
Deprecated. use information( Component, Object, String, String ); |
static void |
information(java.awt.Component parent,
java.lang.Object message,
java.lang.String title,
java.lang.String helptopic)
Display an information alert. |
static void |
information(java.lang.Object message)
Deprecated. use information( Component, Object, String, String ); |
static void |
internalError(java.awt.Component parent,
java.lang.Object message)
Deprecated. use critical( Component, Object, String, String ) |
static void |
internalError(java.awt.Component parent,
java.lang.Object message,
java.lang.String helptopic)
Deprecated. use critical( Component, Object, String, String ) |
static void |
internalError(java.awt.Component parent,
java.lang.Object message,
java.lang.String title,
java.lang.String helptopic)
Deprecated. use critical( Component, Object, String, String ) |
static void |
internalError(java.lang.Object message)
Deprecated. use critical( Component, Object, String, String ) |
static boolean |
okcancel(java.awt.Component parent,
java.lang.Object message)
Deprecated. use confirm( Component, Object, String, String, boolean, String, String ) |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static void alert(java.lang.Object message)
message
- the message to displaypublic static void alert(java.awt.Component parent, java.lang.Object message)
parent
- the parent component.message
- the message to displaypublic static void alert(java.awt.Component parent, java.lang.Object message, java.lang.String helptopic)
parent
- the parent componentmessage
- the message to displayhelptopic
- the help topic for the help buttonpublic static void alert(java.awt.Component parent, java.lang.Object message, java.lang.String title, java.lang.String helptopic)
parent
- the parent componentmessage
- the message to displaytitle
- the title of the dialog, or null
to use
the default.helptopic
- the help topic for the help buttonpublic static void error(java.awt.Component parent, java.lang.Object message, java.lang.String title, java.lang.String helpTopic)
parent
- a parent componentmessage
- the message text should contain three parts: what the
error is, why the error occurred and how the error can be
fixed (if known). Each part should be one to three short sentences.title
- a title for the alert. The title bar text of an error
alert should be a one to three word summary of the error.
Null or "" are NOT valid values.helpTopic
- the help topic ID. If you pass null, the help button
will not be displayed.public static boolean ask(java.lang.Object message)
message
- the message to display
public static boolean ask(java.awt.Component parent, java.lang.Object message)
parent
- the parent componentmessage
- the message to display
public static boolean ask(java.awt.Component parent, java.lang.Object message, java.lang.String helptopic)
parent
- the parent componentmessage
- the message to displayhelptopic
- the helptopic for the help button
public static boolean ask(java.awt.Component parent, java.lang.Object message, java.lang.String title, java.lang.String helptopic)
parent
- the parent componentmessage
- the message to displaytitle
- the title of the dialog, or null
to use
the default.helptopic
- the helptopic for the help button
public static boolean ask(java.awt.Component parent, java.lang.Object message, java.lang.String title, java.lang.String helptopic, boolean noIsDefault)
parent
- the parent componentmessage
- the message to displaytitle
- the title of the dialog, or null
to use
the default.helptopic
- the helptopic for the help buttonnoIsDefault
- whether to make cancel the default option
public static boolean confirm(java.awt.Component parent, java.lang.Object message, java.lang.String title, java.lang.String helptopic)
parent
- the parent componentmessage
- the message text of the alert should explain the known
consequences of the action, and conclude with a question that presents
a choice to the user.title
- the title bar text should be in the form "Confirm [Action]",
for example "Confirm Drop". Null or "" are NOT valid values.helptopic
- the help topic. If null, the button is not displayed.
public static boolean confirm(java.awt.Component parent, java.lang.Object message, java.lang.String title, java.lang.String helptopic, boolean isDestructive)
parent
- the parent componentmessage
- the message text of the alert should explain the known
consequences of the action, and conclude with a question that presents
a choice to the user.title
- the title bar text should be in the form "Confirm [Action]",
for example "Confirm Drop". Null or "" are NOT valid values.helptopic
- the help topic. If null, the button is not displayed.isDestructive
- if the operation the confirmation is for is
destructive (e.g. file deletion), the No button will be the default
public static boolean confirm(java.awt.Component parent, java.lang.Object message, java.lang.String title, java.lang.String helptopic, boolean isDestructive, java.lang.String yesText, java.lang.String noText)
parent
- the parent componentmessage
- the message text of the alert should explain the known
consequences of the action, and conclude with a question that presents
a choice to the user.title
- the title bar text should be in the form "Confirm [Action]",
for example "Confirm Drop". Null or "" are NOT valid values.helptopic
- the help topic. If null, the button is not displayed.isDestructive
- if the operation the confirmation is for is
destructive (e.g. file deletion), the No button will be the defaultyesText
- the label for the Yes button in the dialog. You can use
the ampersand (&) to indicate the mnemonic.
public static void information(java.lang.Object message)
message
- the message to displaypublic static void information(java.awt.Component parent, java.lang.Object message)
parent
- the parent of the dialogmessage
- the message to displaypublic static void information(java.awt.Component parent, java.lang.Object message, java.lang.String helptopic)
parent
- the parent of the dialogmessage
- the message to displayhelptopic
- the help topicpublic static void information(java.awt.Component parent, java.lang.Object message, java.lang.String title, java.lang.String helptopic)
parent
- the parent of the dialogmessage
- the message to display. This should contain an extended
narrative of the event.title
- the title of the dialog. This should be a one to three
word summary of the event. Null or "" are NOT valid values.helptopic
- the help topic. If null, no Help button will be
displayed.public static void internalError(java.lang.Object message)
message
- the message to displaypublic static void internalError(java.awt.Component parent, java.lang.Object message)
parent
- the parent component for the dialogmessage
- the message to displaypublic static void internalError(java.awt.Component parent, java.lang.Object message, java.lang.String helptopic)
parent
- the parent component for the dialogmessage
- the message to displayhelptopic
- the help topicpublic static void internalError(java.awt.Component parent, java.lang.Object message, java.lang.String title, java.lang.String helptopic)
parent
- the parent component for the dialogmessage
- the message to displaytitle
- the title of the dialog, or null
to use
the default.helptopic
- the help topicpublic static void critical(java.awt.Component parent, java.lang.Object message, java.lang.String title, java.lang.String helptopic)
parent
- the parent component for the dialogmessage
- The message text should explain what the problem is
including an error number if available, and any known reasons
for why the error might have occurred. It is also useful to suggest
some possible solution to help the user understand what might need
to be done to fix the condition (if known)title
- The title bar text should be a one to three word summary
of the problem condition. Null or "" are NOT valid values.helptopic
- an optional help topic, if null no Help button is
shown.public static boolean okcancel(java.awt.Component parent, java.lang.Object message)
|
Extension SDK | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright ©1997, 2003, Oracle. All rights reserved.