< prev index next >

modules/javafx.controls/src/main/java/javafx/scene/control/Alert.java

Print this page

        

@@ -212,10 +212,11 @@
      * default value set, and which therefore the developer must set, is the
      * {@link #contentTextProperty() content text} property (or alternatively,
      * the developer may call {@code alert.getDialogPane().setContent(Node)} if
      * they want a more complex alert). If the contentText (or content) properties
      * are not set, there is no useful information presented to end users.
+     * @param alertType an alert with the given AlertType
      */
     public Alert(@NamedArg("alertType") AlertType alertType) {
         this(alertType, "");
     }
 

@@ -232,10 +233,13 @@
      * <p>By passing in an AlertType, default values for the
      * {@link #titleProperty() title}, {@link #headerTextProperty() headerText},
      * and {@link #graphicProperty() graphic} properties are set. Once the Alert
      * is instantiated, developers are able to modify the values of the alert as
      * desired.
+     * @param alertType the alert type
+     * @param contentText the content text
+     * @param buttons the button types
      */
     public Alert(@NamedArg("alertType") AlertType alertType,
                  @NamedArg("contentText") String contentText,
                  @NamedArg("buttonTypes") ButtonType... buttons) {
         super();

@@ -280,10 +284,11 @@
      */
     // --- alertType
     private final ObjectProperty<AlertType> alertType = new SimpleObjectProperty<AlertType>(null) {
         final String[] styleClasses = new String[] { "information", "warning", "error", "confirmation" };
 
+        @Override
         protected void invalidated() {
             String newTitle = "";
             String newHeader = "";
 //            Node newGraphic = null;
             String styleClass = "";

@@ -364,10 +369,12 @@
      *
      * <p>Readers should refer to the {@link ButtonType} class documentation for more details,
      * but at a high level, each ButtonType instance is converted to
      * a Node (although most commonly a {@link Button}) via the (overridable)
      * {@link DialogPane#createButton(ButtonType)} method on {@link DialogPane}.
+     * @return an {@link ObservableList} of all {@link ButtonType} instances that
+     * are currently set inside this Alert instance
      */
     // --- buttonTypes
     public final ObservableList<ButtonType> getButtonTypes() {
         return getDialogPane().getButtonTypes();
     }
< prev index next >