All Packages Class Hierarchy This Package Previous Next Index
Class jp.kyasu.awt.Dialog
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Window
|
+----java.awt.Dialog
|
+----jp.kyasu.awt.Dialog
- public class Dialog
- extends Dialog
The Dialog
class produces a dialog - a window that takes
input from the user. The default layout for a dialog is
BorderLayout
.
If the JDK has the sun.awt.windows.WWindowPeer#getFocusPeer()
bug (the JDK for Windows 95/NT version 1.1.4 or before), an application
that uses the jp.kyasu.awt
package should use this class
instead of java.awt.Dialog
.
Because of this bug, if a lightwight component is focus traversable,
an application will be hung up.
- Version:
- 15 May 1999
- Author:
- Kazuki YASUMATSU
- See Also:
- Dialog, HAS_FOCUS_BUG
-
CONFIRM
- The confirm message type.
-
ERROR
- The error message type.
-
INFORM
- The inform message type.
-
MESSAGE
- The normal message type.
-
WARN
- The warn message type.
-
Dialog(Frame)
- Constructs an initially invisible Dialog with an empty title.
-
Dialog(Frame, boolean)
- Constructs an initially invisible Dialog with an empty title.
-
Dialog(Frame, String)
- Constructs an initially invisible Dialog with a title.
-
Dialog(Frame, String, boolean)
- Constructs an initially invisible Dialog with a title.
-
choice(int, Frame, String, String, String[], Object[], int)
- Prompts a user to select a value from the specified values with a dialog.
-
choice(int, Frame, String, Visualizable, String[], Object[], int)
- Prompts a user to select a value from the specified values with a dialog.
-
confirm(Frame, String)
- Prompts a user to confirm the specified message with a dialog.
-
confirm(Frame, Visualizable)
- Prompts a user to confirm the specified message with a dialog.
-
confirm(String)
- Prompts a user to confirm the specified message with a dialog.
-
confirm(Visualizable)
- Prompts a user to confirm the specified message with a dialog.
-
error(Frame, String)
- Errors a user with a dialog.
-
error(Frame, Visualizable)
- Errors a user with a dialog.
-
error(String)
- Errors a user with a dialog.
-
error(Visualizable)
- Errors a user with a dialog.
-
getErrorIcon()
- Returns the error icon.
-
getFocusOwner()
- Returns the child component of this Window which has focus if and
only if this Window is active.
-
getInformIcon()
- Returns the information icon.
-
getQuestionIcon()
- Returns the question icon.
-
getWarnIcon()
- Returns the warning icon.
-
inform(Frame, String)
- Informs a user with a dialog.
-
inform(Frame, Visualizable)
- Informs a user with a dialog.
-
inform(String)
- Informs a user with a dialog.
-
inform(Visualizable)
- Informs a user with a dialog.
-
main(String[])
- Executes the examples.
-
message(Frame, String)
- Shows the message with a dialog.
-
message(Frame, String, String)
- Shows the message with a dialog.
-
message(Frame, String, Visualizable)
- Shows the message with a dialog.
-
message(Frame, Visualizable)
- Shows the message with a dialog.
-
message(String)
- Shows the message with a dialog.
-
message(Visualizable)
- Shows the message with a dialog.
-
request(Frame, String)
- Prompts a user to input a string with a dialog.
-
request(Frame, String, int)
- Prompts a user to input a string with a dialog.
-
request(Frame, String, String)
- Prompts a user to input a string with a dialog.
-
request(Frame, String, String, int)
- Prompts a user to input a string with a dialog.
-
request(String)
- Prompts a user to input a string with a dialog.
-
request(String, int)
- Prompts a user to input a string with a dialog.
-
request(String, String)
- Prompts a user to input a string with a dialog.
-
request(String, String, int)
- Prompts a user to input a string with a dialog.
-
show()
- Shows the dialog.
-
showKFCCopyright()
- Shows the KFC copyright message with a dialog.
-
showKFCCopyright(Frame)
- Shows the KFC copyright message with a dialog.
-
update(Graphics)
- Updates this component.
-
warn(Frame, String)
- Warns a user with a dialog.
-
warn(Frame, Visualizable)
- Warns a user with a dialog.
-
warn(String)
- Warns a user with a dialog.
-
warn(Visualizable)
- Warns a user with a dialog.
MESSAGE
public static final int MESSAGE
- The normal message type.
INFORM
public static final int INFORM
- The inform message type.
WARN
public static final int WARN
- The warn message type.
ERROR
public static final int ERROR
- The error message type.
CONFIRM
public static final int CONFIRM
- The confirm message type.
Dialog
public Dialog(Frame parent)
- Constructs an initially invisible Dialog with an empty title.
- Parameters:
- parent - the owner of the dialog.
Dialog
public Dialog(Frame parent,
boolean modal)
- Constructs an initially invisible Dialog with an empty title.
A modal Dialog grabs all the input to the parent frame from the user.
- Parameters:
- parent - the owner of the dialog.
- modal - if true, dialog blocks input to the parent window when
shown.
Dialog
public Dialog(Frame parent,
String title)
- Constructs an initially invisible Dialog with a title.
- Parameters:
- parent - the owner of the dialog.
- title - the title of the dialog.
Dialog
public Dialog(Frame parent,
String title,
boolean modal)
- Constructs an initially invisible Dialog with a title.
A modal Dialog grabs all the input to the parent frame from the user.
- Parameters:
- parent - the owner of the dialog.
- title - the title of the dialog.
- modal - if true, dialog blocks input to the parent window when
shown.
getInformIcon
public VImage getInformIcon()
- Returns the information icon.
getWarnIcon
public VImage getWarnIcon()
- Returns the warning icon.
getQuestionIcon
public VImage getQuestionIcon()
- Returns the question icon.
getErrorIcon
public VImage getErrorIcon()
- Returns the error icon.
request
public static String request(String message)
- Prompts a user to input a string with a dialog.
- Parameters:
- message - the message string shown in the dialog.
- Returns:
- the inputted string, or an empty string if the dialog is
canceled.
request
public static String request(String message,
String initialStr)
- Prompts a user to input a string with a dialog.
- Parameters:
- message - the message string shown in the dialog.
- initialStr - the initial inputted string.
- Returns:
- the inputted string, or an empty string if the dialog is
canceled.
request
public static String request(String message,
int columns)
- Prompts a user to input a string with a dialog.
- Parameters:
- message - the message string shown in the dialog.
- columns - the columns for the input text field.
- Returns:
- the inputted string, or an empty string if the dialog is
canceled.
request
public static String request(String message,
String initialStr,
int columns)
- Prompts a user to input a string with a dialog.
- Parameters:
- message - the message string shown in the dialog.
- initialStr - the initial inputted string.
- columns - the columns for the input text field.
- Returns:
- the inputted string, or an empty string if the dialog is
canceled.
request
public static String request(Frame frame,
String message)
- Prompts a user to input a string with a dialog.
- Parameters:
- frame - the owner of the dialog.
- message - the message string shown in the dialog.
- Returns:
- the inputted string, or an empty string if the dialog is
canceled.
request
public static String request(Frame frame,
String message,
String initialStr)
- Prompts a user to input a string with a dialog.
- Parameters:
- frame - the owner of the dialog.
- message - the message string shown in the dialog.
- initialStr - the initial inputted string.
- Returns:
- the inputted string, or an empty string if the dialog is
canceled.
request
public static String request(Frame frame,
String message,
int columns)
- Prompts a user to input a string with a dialog.
- Parameters:
- frame - the owner of the dialog.
- message - the message string shown in the dialog.
- columns - the columns for the input text field.
- Returns:
- the inputted string, or an empty string if the dialog is
canceled.
request
public static String request(Frame frame,
String message,
String initialStr,
int columns)
- Prompts a user to input a string with a dialog.
- Parameters:
- frame - the owner of the dialog.
- message - the message string shown in the dialog.
- initialStr - the initial inputted string.
- columns - the columns for the input text field.
- Returns:
- the inputted string, or an empty string if the dialog is
canceled.
message
public static void message(String message)
- Shows the message with a dialog.
- Parameters:
- message - the message string shown in the dialog.
message
public static void message(Visualizable message)
- Shows the message with a dialog.
- Parameters:
- message - the visual message shown in the dialog.
message
public static void message(Frame frame,
String message)
- Shows the message with a dialog.
- Parameters:
- frame - the owner of the dialog.
- message - the message string shown in the dialog.
message
public static void message(Frame frame,
String label,
String message)
- Shows the message with a dialog.
- Parameters:
- frame - the owner of the dialog.
- label - the label of the dialog.
- message - the message string shown in the dialog.
message
public static void message(Frame frame,
Visualizable message)
- Shows the message with a dialog.
- Parameters:
- frame - the owner of the dialog.
- message - the visual message shown in the dialog.
message
public static void message(Frame frame,
String label,
Visualizable message)
- Shows the message with a dialog.
- Parameters:
- frame - the owner of the dialog.
- label - the label of the dialog.
- message - the visual message shown in the dialog.
inform
public static void inform(String message)
- Informs a user with a dialog.
- Parameters:
- message - the message string shown in the dialog.
inform
public static void inform(Visualizable message)
- Informs a user with a dialog.
- Parameters:
- message - the visual message shown in the dialog.
inform
public static void inform(Frame frame,
String message)
- Informs a user with a dialog.
- Parameters:
- frame - the owner of the dialog.
- message - the message string shown in the dialog.
inform
public static void inform(Frame frame,
Visualizable message)
- Informs a user with a dialog.
- Parameters:
- frame - the owner of the dialog.
- message - the visual message shown in the dialog.
warn
public static void warn(String message)
- Warns a user with a dialog.
- Parameters:
- message - the message string shown in the dialog.
warn
public static void warn(Visualizable message)
- Warns a user with a dialog.
- Parameters:
- message - the visual message shown in the dialog.
warn
public static void warn(Frame frame,
String message)
- Warns a user with a dialog.
- Parameters:
- frame - the owner of the dialog.
- message - the message string shown in the dialog.
warn
public static void warn(Frame frame,
Visualizable message)
- Warns a user with a dialog.
- Parameters:
- frame - the owner of the dialog.
- message - the visual message shown in the dialog.
error
public static void error(String message)
- Errors a user with a dialog.
- Parameters:
- message - the message string shown in the dialog.
error
public static void error(Visualizable message)
- Errors a user with a dialog.
- Parameters:
- message - the visual message shown in the dialog.
error
public static void error(Frame frame,
String message)
- Errors a user with a dialog.
- Parameters:
- frame - the owner of the dialog.
- message - the message string shown in the dialog.
error
public static void error(Frame frame,
Visualizable message)
- Errors a user with a dialog.
- Parameters:
- frame - the owner of the dialog.
- message - the visual message shown in the dialog.
confirm
public static boolean confirm(String message)
- Prompts a user to confirm the specified message with a dialog.
- Parameters:
- message - the message string shown in the dialog.
- Returns:
-
true
if confirmed, or false
otherwise.
confirm
public static boolean confirm(Visualizable message)
- Prompts a user to confirm the specified message with a dialog.
- Parameters:
- message - the visual message shown in the dialog.
- Returns:
-
true
if confirmed, or false
otherwise.
confirm
public static boolean confirm(Frame frame,
String message)
- Prompts a user to confirm the specified message with a dialog.
- Parameters:
- frame - the owner of the dialog.
- message - the message string shown in the dialog.
- Returns:
-
true
if confirmed, or false
otherwise.
confirm
public static boolean confirm(Frame frame,
Visualizable message)
- Prompts a user to confirm the specified message with a dialog.
- Parameters:
- frame - the owner of the dialog.
- message - the visual message shown in the dialog.
- Returns:
-
true
if confirmed, or false
otherwise.
choice
public static Object choice(int type,
Frame frame,
String title,
String message,
String labels[],
Object values[],
int defaultIndex)
- Prompts a user to select a value from the specified values with a dialog.
- Parameters:
- type - the dialog type.
- frame - the owner of the dialog.
- title - the title of the dialog.
- message - the message string shown in the dialog.
- labels - the labels associated with the values.
- values - the values.
- defaultIndex - the default selected index of the values.
- Returns:
- the selected value, or null if the dialog is canceled.
choice
public static Object choice(int type,
Frame frame,
String title,
Visualizable message,
String labels[],
Object values[],
int defaultIndex)
- Prompts a user to select a value from the specified values with a dialog.
- Parameters:
- type - the dialog type.
- frame - the owner of the dialog.
- title - the title of the dialog.
- message - the visual message shown in the dialog.
- labels - the labels associated with the values.
- values - the values.
- defaultIndex - the default selected index of the values.
- Returns:
- the selected value, or null if the dialog is canceled.
showKFCCopyright
public static void showKFCCopyright()
- Shows the KFC copyright message with a dialog.
showKFCCopyright
public static void showKFCCopyright(Frame frame)
- Shows the KFC copyright message with a dialog.
- Parameters:
- frame - the owner of the dialog.
update
public void update(Graphics g)
- Updates this component.
- Overrides:
- update in class Container
getFocusOwner
public Component getFocusOwner()
- Returns the child component of this Window which has focus if and
only if this Window is active.
- Returns:
- the component with focus, or null if no children have focus
assigned to them.
- Overrides:
- getFocusOwner in class Window
- See Also:
- HAS_FOCUS_BUG
show
public void show()
- Shows the dialog. This will bring the dialog to the front
if the dialog is already visible.
- Overrides:
- show in class Dialog
main
public static void main(String arg[])
- Executes the examples.
All Packages Class Hierarchy This Package Previous Next Index