|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JOptionPane PIRL.Viewers.Dialog_Box
public class Dialog_Box
The Dialog_Box class provides a collection of static methods that are convenient for producing commonly used Dialog_Boxes.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JOptionPane |
---|
JOptionPane.AccessibleJOptionPane |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
static int |
MAX_LINE_LENGTH
The maximum number of characters per line in a dialog box. |
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Method Summary | |
---|---|
static int |
Check(String message)
Displays a ConfirmDialog box centered on the screen with a "Check" title and a Yes, No and Cancel button. |
static int |
Check(String message,
Component parent)
Displays a ConfirmDialog box with a "Check" title and a Yes, No and Cancel button. |
static boolean |
Confirm(String message)
Displays a ConfirmDialog box centered on the screen with a "Confirm" title and an OK and Cancel button. |
static boolean |
Confirm(String message,
Component parent)
Displays a ConfirmDialog box with a "Confirm" title and an OK and Cancel button. |
static void |
Error(String message)
Displays an ERROR_MESSAGE MessageDialog box centered on the screen, preceeded by an audible beep, with an "Error" title and an OK button. |
static void |
Error(String message,
Component parent)
Displays an ERROR_MESSAGE MessageDialog box, preceeded by an audible beep, with an "Error" title and an OK button. |
static String |
Fit_to_Width(String string)
Fits a String to the MAX_LINE_LENGTH. |
static String |
Fit_to_Width(String in_string,
int width)
Fits (wraps using NL sequences) a String to a given width. |
static void |
Notice(String message)
Displays an INFORMATION_MESSAGE MessageDialog box centered on the screen with a "Notice" title and an OK button. |
static void |
Notice(String message,
Component parent)
Displays an INFORMATION_MESSAGE MessageDialog box with a "Notice" title and an OK button. |
static String |
Password(String prompt)
Displays a Password_Dialog with a password input field preceded by a prompt. |
static String |
Password(String prompt,
Frame parent)
Displays a Password_Dialog with a password input field preceded by a prompt. |
static void |
Warning(String message)
Displays a WARNING_MESSAGE MessageDialog box centered on the screen, preceeded by an audible beep, with a "Warning" title and an OK button. |
static void |
Warning(String message,
Component parent)
Displays a WARNING_MESSAGE MessageDialog box, preceeded by an audible beep, with a "Warning" title and an OK button. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static int MAX_LINE_LENGTH
Method Detail |
---|
public static void Notice(String message, Component parent)
message
- A String message that will be displayed in the
dialog box.parent
- The parent Component relative to which the dialog
box will be positioned. This may be null in which case the
Dialog_Box will be centered on the display.public static void Notice(String message)
message
- A String message that will be displayed in the
dialog box.public static void Warning(String message, Component parent)
message
- A String message that will be displayed in the
dialog box.parent
- The parent Component relative to which the dialog
box will be positioned. This may be null in which case the
Dialog_Box will be centered on the display.public static void Warning(String message)
message
- A String message that will be displayed in the
dialog box.public static void Error(String message, Component parent)
message
- A String message that will be displayed in the
dialog box.parent
- The parent Component relative to which the dialog
box will be positioned. This may be null in which case the
Dialog_Box will be centered on the display.public static void Error(String message)
message
- A String message that will be displayed in the
dialog box.public static boolean Confirm(String message, Component parent)
message
- A String message that will be displayed in the
dialog box.parent
- The parent Component relative to which the dialog
box will be positioned. This may be null in which case the
Dialog_Box will be centered on the display.
public static boolean Confirm(String message)
message
- A String message that will be displayed in the
dialog box.
public static int Check(String message, Component parent)
message
- A String message that will be displayed in the
dialog box.parent
- The parent Component relative to which the dialog
box will be positioned. This may be null in which case the
Dialog_Box will be centered on the display.
public static int Check(String message)
message
- A String message that will be displayed in the
dialog box.
public static String Password(String prompt, Frame parent)
prompt
- The text preceding the password input field. If
null, "Password" will be used by default.parent
- The parent Frame relative to which the dialog
box will be positioned. This may be null.public static String Password(String prompt)
prompt
- The text preceding the password input field. If
null, "Password" will be used by default.public static String Fit_to_Width(String in_string, int width)
A NL replaces the last whitespace sequence before the width of the current line is reached. If there is no whitespace, then the NL is inserted at the width. A width <= 0 is an unlimited width.
public static String Fit_to_Width(String string)
string
- The String to be fitted.
Fit_to_Width(String, int)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |