Class Alert
All Packages Class Hierarchy This Package Previous Next Index
Class Alert
public class netscape.application.Alert
extends java.lang.Object
{
/* Fields
*/
public final static int DEFAULT_OPTION;
public final static int SECOND_OPTION;
public final static int THIRD_OPTION;
/* Methods
*/
public static Image notificationImage();
public static Image questionImage();
public static int runAlertExternally(String, String, String, String, String);
public static int runAlertExternally(Image, String, String, String, String, String);
public static int runAlertInternally(String, String, String, String, String);
public static int runAlertInternally(Image, String, String, String, String, String);
public static Image warningImage();
}
Object subclass containing a collection of static methods that create an
"Alert": a modal Window presenting the user with
a simple question with up to three possible answers. When run, an
InternalWindow or ExternalWindow appears, centered, that will not
disappear until the user clicks one of the three answer Buttons.
Fields
DEFAULT_OPTION
public final static int DEFAULT_OPTION
- Value returned when the user chooses the default option.
SECOND_OPTION
public final static int SECOND_OPTION
- Value returned when the user chooses the 2nd option.
THIRD_OPTION
public final static int THIRD_OPTION
- Value returned when the user chooses the 3rd option.
Methods
notificationImage
public static Image notificationImage()
- Return an image for a notification
questionImage
public static Image questionImage()
- Return an image for a question
warningImage
public static Image warningImage()
- Return an image for a warning
runAlertInternally
public static int runAlertInternally(String title,
String message,
String defaultOption,
String secondOption,
String thirdOption)
- Runs an Alert using an InternalWindow. title is the
Alert's title and message is the message that
should be displayed. defaultOption, secondOption and
thirdOption are the Alert's Button titles. If
secondOption or thirdOption are null, their
Buttons will not appear. Returns the Button the user clicked.
This method does not return until the user clicks a Button.
runAlertExternally
public static int runAlertExternally(String title,
String message,
String defaultOption,
String secondOption,
String thirdOption)
- Runs an Alert using an ExternalWindow. title is the
Alert's title and message is the message that
should be displayed. defaultOption, secondOption and
thirdOption are the Alert's Button titles. If
secondOption or thirdOption are null, their
Buttons will not appear. Returns the Button the user clicked.
This method does not return until the user clicks a Button.
runAlertInternally
public static int runAlertInternally(Image image,
String title,
String message,
String defaultOption,
String secondOption,
String thirdOption)
- Runs an alert using an InternalWindow. image is the Image
displayed near the title. title is the
Alert's title and message is the message that
should be displayed. defaultOption, secondOption and
thirdOption are the Alert's Button titles. If
secondOption or thirdOption are null, their
Buttons will not appear. Returns the Button the user clicked.
This method does not return until the user clicks a Button.
runAlertExternally
public static int runAlertExternally(Image image,
String title,
String message,
String defaultOption,
String secondOption,
String thirdOption)
- Runs an Alert using an ExternalWindow. image is the Image
displayed near the title. title is the
Alert's title and message is the message that
should be displayed. defaultOption, secondOption and
thirdOption are the Alert's Button titles. If
secondOption or thirdOption are null, their
Buttons will not appear. Returns the Button the user clicked.
This method does not return until the user clicks a Button.
All Packages Class Hierarchy This Package Previous Next Index