Class BaseAlert

  • All Implemented Interfaces:
    javafx.event.EventTarget
    Direct Known Subclasses:
    ExceptionAlert

    public abstract class BaseAlert
    extends javafx.scene.control.Alert
    Base alert type class.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class javafx.scene.control.Alert

        javafx.scene.control.Alert.AlertType
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected javafx.stage.Stage alertStage
      Alert stage window
    • Constructor Summary

      Constructors 
      Constructor Description
      BaseAlert​(javafx.scene.control.Alert.AlertType alertType)
      Create simple alert.
      BaseAlert​(javafx.scene.control.Alert.AlertType alertType, java.lang.String contentText, javafx.scene.control.ButtonType... buttons)
      Create custom alert.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      BaseAlert addAction​(java.lang.String name)
      Add action to alert dialog.
      BaseAlert addAction​(javafx.scene.control.ButtonType action)
      Add action to alert dialog.
      protected void clearDefaultActions()
      Clear default alert actions.
      @Nullable javafx.scene.Scene getAlertScene()
      Get alert internal scene.
      javafx.stage.Stage getAlertStage()
      Get alert stage.
      protected void setBasicConfiguration()
      Set basic alert configuration.
      • Methods inherited from class javafx.scene.control.Alert

        alertTypeProperty, getAlertType, getButtonTypes, setAlertType
      • Methods inherited from class javafx.scene.control.Dialog

        buildEventDispatchChain, close, contentTextProperty, dialogPaneProperty, getContentText, getDialogPane, getGraphic, getHeaderText, getHeight, getModality, getOnCloseRequest, getOnHidden, getOnHiding, getOnShowing, getOnShown, getOwner, getResult, getResultConverter, getTitle, getWidth, getX, getY, graphicProperty, headerTextProperty, heightProperty, hide, initModality, initOwner, initStyle, isResizable, isShowing, onCloseRequestProperty, onHiddenProperty, onHidingProperty, onShowingProperty, onShownProperty, resizableProperty, resultConverterProperty, resultProperty, setContentText, setDialogPane, setGraphic, setHeaderText, setHeight, setOnCloseRequest, setOnHidden, setOnHiding, setOnShowing, setOnShown, setResizable, setResult, setResultConverter, setTitle, setWidth, setX, setY, show, showAndWait, showingProperty, titleProperty, widthProperty, xProperty, yProperty
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • alertStage

        protected javafx.stage.Stage alertStage
        Alert stage window
    • Constructor Detail

      • BaseAlert

        public BaseAlert​(javafx.scene.control.Alert.AlertType alertType)
        Create simple alert.
        Parameters:
        alertType - Alert type.
      • BaseAlert

        public BaseAlert​(javafx.scene.control.Alert.AlertType alertType,
                         java.lang.String contentText,
                         javafx.scene.control.ButtonType... buttons)
        Create custom alert.
        Parameters:
        alertType - Alert type.
        contentText - Alert content description.
        buttons - Alert action buttons.
    • Method Detail

      • addAction

        public BaseAlert addAction​(javafx.scene.control.ButtonType action)
        Add action to alert dialog.
        Parameters:
        action - Button action to add.
        Returns:
        BaseAlert current instance.
      • addAction

        public BaseAlert addAction​(java.lang.String name)
        Add action to alert dialog.
        Parameters:
        name - Button text action.
        Returns:
        BaseAlert current instance.
      • getAlertStage

        public javafx.stage.Stage getAlertStage()
        Get alert stage.
        Returns:
        Stage alert window.
      • getAlertScene

        @Nullable
        public @Nullable javafx.scene.Scene getAlertScene()
        Get alert internal scene.
        Returns:
        Get internal Scene or null if scene is not initialize.
      • setBasicConfiguration

        protected void setBasicConfiguration()
        Set basic alert configuration.
      • clearDefaultActions

        protected void clearDefaultActions()
        Clear default alert actions.