|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.ibm.as400.ui.framework.java.MessageBoxDialog
A utility class used to display message boxes. MessageBoxDialog
automatically splits long message strings into multiple lines so that the message
box doesn't become too wide. You can display a simple message with an OK button,
or a complex message box with multiple messages and push buttons.
JOptionPane| Field Summary | |
static int |
ERROR
Used to specify an error message. |
static int |
INFORMATION
Used to specify an informational message. |
static int |
PLAIN
Used to specify a plain message. |
static int |
QUESTION
Used to specify a question message. |
static int |
WARNING
Used to specify a warning message. |
| Method Summary | |
static void |
dispose()
Disposes the message dialog. |
static java.lang.Object |
showMessageDialog(java.awt.Component parent,
java.lang.Object[] message,
java.lang.String title,
int type,
boolean showIcon,
java.lang.Object[] options,
java.lang.Object initial)
Displays a message dialog with user-defined options. |
static java.lang.Object |
showMessageDialog(java.awt.Component parent,
java.lang.String msg,
java.lang.String title,
int type)
Displays a message dialog with an OK button. |
static java.lang.Object |
showMessageDialog(java.awt.Component parent,
java.lang.String msg,
java.lang.String title,
int type,
boolean showIcon)
Displays a message dialog with an OK button. |
static java.lang.Object |
showMessageDialog(java.awt.Component parent,
java.lang.String msg,
java.lang.String title,
int type,
boolean showIcon,
java.lang.Object[] options,
java.lang.Object initial)
Displays a message dialog with user-defined options. |
static java.lang.Object |
showMessageDialog(java.awt.Component parent,
java.lang.String msg,
java.lang.String title,
int type,
java.lang.Object[] options,
java.lang.Object initial)
Displays a message dialog with user-defined options. |
static java.util.Vector |
splitString(java.lang.String str,
int lineLength)
Splits a string of text into a vector of strings. |
static java.util.Vector |
splitString(java.lang.String str,
int lineLength,
java.awt.FontMetrics fm)
Splits a string of text into a vector of strings. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int ERROR
public static final int INFORMATION
public static final int WARNING
public static final int QUESTION
public static final int PLAIN
| Method Detail |
public static java.lang.Object showMessageDialog(java.awt.Component parent,
java.lang.String msg,
java.lang.String title,
int type)
parent - Determines the Frame in which the dialog is displayed.
If null, or if the parent component has no Frame, a default Frame is used.msg - Localized message to display.title - Localized titlebar text.type - the type of message that is to be displayed:
MessageBoxDialog.ERROR, MessageBoxDialog.INFORMATION, MessageBoxDialog.WARNING,
MessageBoxDialog.QUESTION, or MessageBoxDialog.PLAIN.
public static java.lang.Object showMessageDialog(java.awt.Component parent,
java.lang.String msg,
java.lang.String title,
int type,
boolean showIcon)
parent - Determines the Frame in which the dialog is displayed.
If null, or if the parent component has no Frame, a default Frame is used.msg - Localized message to display.title - Localized titlebar text.type - the type of message that is to be displayed:
MessageBoxDialog.ERROR, MessageBoxDialog.INFORMATION, MessageBoxDialog.WARNING,
MessageBoxDialog.QUESTION, or MessageBoxDialog.PLAIN.showIcon - Determines whether the icon will be displayed on the dialog window
public static java.lang.Object showMessageDialog(java.awt.Component parent,
java.lang.String msg,
java.lang.String title,
int type,
java.lang.Object[] options,
java.lang.Object initial)
parent - Determines the Frame in which the dialog is displayed.
If null, or if the parent component has no Frame, a default Frame is used.msg - Localized message to display.title - Localized titlebar text.type - the type of message that is to be displayed:
MessageBoxDialog.ERROR, MessageBoxDialog.INFORMATION, MessageBoxDialog.WARNING,
MessageBoxDialog.QUESTION, or MessageBoxDialog.PLAIN.options - An array of options. For example, {"Yes", "No", "Details"}.initial - The initially selected option in the array supplied. Defaults to the first option.
public static java.lang.Object showMessageDialog(java.awt.Component parent,
java.lang.String msg,
java.lang.String title,
int type,
boolean showIcon,
java.lang.Object[] options,
java.lang.Object initial)
parent - Determines the Frame in which the dialog is displayed.
If null, or if the parent component has no Frame, a default Frame is used.msg - Localized message to display.title - Localized titlebar text.type - the type of message that is to be displayed:
MessageBoxDialog.ERROR, MessageBoxDialog.INFORMATION, MessageBoxDialog.WARNING,
MessageBoxDialog.QUESTION, or MessageBoxDialog.PLAIN.showIcon - Determines whether the icon will be displayed on the dialog windowoptions - An array of options. For example, {"Yes", "No", "Details"}.initial - The initially selected option in the array supplied. Defaults to the first option.
public static java.lang.Object showMessageDialog(java.awt.Component parent,
java.lang.Object[] message,
java.lang.String title,
int type,
boolean showIcon,
java.lang.Object[] options,
java.lang.Object initial)
parent - Determines the Frame in which the dialog is displayed.
If null, or if the parent component has no Frame, a default Frame is used.message - Localized message to display.title - Localized titlebar text.type - the type of message that is to be displayed:
MessageBoxDialog.ERROR, MessageBoxDialog.INFORMATION, MessageBoxDialog.WARNING,
MessageBoxDialog.QUESTION, or MessageBoxDialog.PLAIN.showIcon - Determines whether the icon will be displayed on the dialog windowoptions - An array of options. For example, {"Yes", "No", "Details"}.initial - The initially selected option in the array supplied. Defaults to the first option.public static void dispose()
public static java.util.Vector splitString(java.lang.String str,
int lineLength)
str - the string to be splitlineLength - optimal number of characters on a line
public static java.util.Vector splitString(java.lang.String str,
int lineLength,
java.awt.FontMetrics fm)
str - the string to be splitlineLength - optimal number of characters on a linefm - font metrics of the font used to calculate the splits
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||