javafx.scene.control
Enum Alert.AlertType
- java.lang.Enum<Alert.AlertType>
-
- javafx.scene.control.Alert.AlertType
All Implemented Interfaces:
Enclosing class:
public static enum Alert.AlertType extends Enum<Alert.AlertType>
An enumeration containing the available, pre-built alert types that the
Alert class can use to pre-populate various properties.Since:
JavaFX 8u40
-
Enum Constant Summary
Enum Constants Enum Constant and Description CONFIRMATIONThe CONFIRMATION alert type configures the Alert dialog to appear in a way that suggests the content of the dialog is seeking confirmation from the user.ERRORThe ERROR alert type configures the Alert dialog to appear in a way that suggests that something has gone wrong.INFORMATIONThe INFORMATION alert type configures the Alert dialog to appear in a way that suggests the content of the dialog is informing the user of a piece of information.NONEThe NONE alert type has the effect of not setting any default properties in the Alert.WARNINGThe WARNING alert type configures the Alert dialog to appear in a way that suggests the content of the dialog is warning the user about some fact or action.
-
Method Summary
All MethodsStatic MethodsConcrete Methods Modifier and Type Method and Description static Alert.AlertTypevalueOf(String name)Returns the enum constant of this type with the specified name.static Alert.AlertType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Detail
-
NONE
public static final Alert.AlertType NONE
The NONE alert type has the effect of not setting any default properties in the Alert.
-
INFORMATION
public static final Alert.AlertType INFORMATION
The INFORMATION alert type configures the Alert dialog to appear in a way that suggests the content of the dialog is informing the user of a piece of information. This includes an 'information' image, an appropriate title and header, and just an OK button for the user to click on to dismiss the dialog.
-
WARNING
public static final Alert.AlertType WARNING
The WARNING alert type configures the Alert dialog to appear in a way that suggests the content of the dialog is warning the user about some fact or action. This includes a 'warning' image, an appropriate title and header, and just an OK button for the user to click on to dismiss the dialog.
-
CONFIRMATION
public static final Alert.AlertType CONFIRMATION
The CONFIRMATION alert type configures the Alert dialog to appear in a way that suggests the content of the dialog is seeking confirmation from the user. This includes a 'confirmation' image, an appropriate title and header, and both OK and Cancel buttons for the user to click on to dismiss the dialog.
-
ERROR
public static final Alert.AlertType ERROR
The ERROR alert type configures the Alert dialog to appear in a way that suggests that something has gone wrong. This includes an 'error' image, an appropriate title and header, and just an OK button for the user to click on to dismiss the dialog.
-
-
Method Detail
-
values
public static Alert.AlertType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Alert.AlertType c : Alert.AlertType.values()) System.out.println(c);
Returns:
an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Alert.AlertType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)Parameters:
name- the name of the enum constant to be returned.Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException- if this enum type has no constant with the specified name
-
© 2008, 2025, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from JavaFX API Documentation.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Java, JavaFX and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.