Module FXDialogs

Class AlertDialog

java.lang.Object
javafx.stage.Window
javafx.stage.Stage
com.amirali.fxdialogs.AlertDialog
All Implemented Interfaces:
javafx.event.EventTarget

public final class AlertDialog extends javafx.stage.Stage
  • Property Summary

    Properties
    Type
    Property
    Description
    javafx.beans.property.StringProperty
    StringProperty of AlertDialog title
    javafx.beans.property.StringProperty
    StringProperty of AlertDialog title

    Properties inherited from class javafx.stage.Stage

    alwaysOnTop, fullScreenExitHint, fullScreenExitKey, fullScreen, iconified, maxHeight, maximized, maxWidth, minHeight, minWidth, resizable, title

    Properties inherited from class javafx.stage.Window

    eventDispatcher, focused, forceIntegerRenderScale, height, onCloseRequest, onHidden, onHiding, onShowing, onShown, opacity, outputScaleX, outputScaleY, renderScaleX, renderScaleY, scene, showing, width, x, y
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    AlertDialog builder
  • Constructor Summary

    Constructors
    Constructor
    Description
    AlertDialog(@NotNull AlertDialog.Builder builder)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    javafx.beans.property.StringProperty
    StringProperty of AlertDialog title
    javafx.beans.property.StringProperty
    StringProperty of AlertDialog title
     
     
    void
    setDialogMessage(@NotNull String message)
    sets message of the AlertDialog
    void
    setDialogTitle(@NotNull String title)
    sets title of the AlertDialog
    void
    setSound(@NotNull Sounds sound)
    sets the notification sound from Sounds and plays when stage is shown
    Note: You need to add javafx.media dependency to use sounds
    void
    setSound(@NotNull String path)
    sets the notification sound from custom file path and plays when stage is shown
    Note: You need to add javafx.media dependency to use sounds

    Methods inherited from class javafx.stage.Stage

    alwaysOnTopProperty, close, fullScreenExitHintProperty, fullScreenExitKeyProperty, fullScreenProperty, getFullScreenExitHint, getFullScreenExitKeyCombination, getIcons, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getModality, getOwner, getStyle, getTitle, iconifiedProperty, initModality, initOwner, initStyle, isAlwaysOnTop, isFullScreen, isIconified, isMaximized, isResizable, maxHeightProperty, maximizedProperty, maxWidthProperty, minHeightProperty, minWidthProperty, resizableProperty, setAlwaysOnTop, setFullScreen, setFullScreenExitHint, setFullScreenExitKeyCombination, setIconified, setMaxHeight, setMaximized, setMaxWidth, setMinHeight, setMinWidth, setResizable, setScene, setTitle, show, showAndWait, titleProperty, toBack, toFront

    Methods inherited from class javafx.stage.Window

    addEventFilter, addEventHandler, buildEventDispatchChain, centerOnScreen, eventDispatcherProperty, fireEvent, focusedProperty, forceIntegerRenderScaleProperty, getEventDispatcher, getHeight, getOnCloseRequest, getOnHidden, getOnHiding, getOnShowing, getOnShown, getOpacity, getOutputScaleX, getOutputScaleY, getProperties, getRenderScaleX, getRenderScaleY, getScene, getUserData, getWidth, getWindows, getX, getY, hasProperties, heightProperty, hide, isFocused, isForceIntegerRenderScale, isShowing, onCloseRequestProperty, onHiddenProperty, onHidingProperty, onShowingProperty, onShownProperty, opacityProperty, outputScaleXProperty, outputScaleYProperty, removeEventFilter, removeEventHandler, renderScaleXProperty, renderScaleYProperty, requestFocus, sceneProperty, setEventDispatcher, setEventHandler, setForceIntegerRenderScale, setHeight, setOnCloseRequest, setOnHidden, setOnHiding, setOnShowing, setOnShown, setOpacity, setRenderScaleX, setRenderScaleY, setUserData, setWidth, setX, setY, showingProperty, sizeToScene, widthProperty, xProperty, yProperty

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Property Details

  • Constructor Details

    • AlertDialog

      public AlertDialog(@NotNull @NotNull AlertDialog.Builder builder)
      Parameters:
      builder - AlertDialog builder
  • Method Details

    • setDialogTitle

      public void setDialogTitle(@NotNull @NotNull String title)
      sets title of the AlertDialog
      Parameters:
      title - title of the AlertDialog
    • getDialogTitle

      public String getDialogTitle()
      Returns:
      title of the AlertDialog
    • dialogTitleProperty

      public javafx.beans.property.StringProperty dialogTitleProperty()
      StringProperty of AlertDialog title
      See Also:
    • setDialogMessage

      public void setDialogMessage(@NotNull @NotNull String message)
      sets message of the AlertDialog
      Parameters:
      message - message of the AlertDialog
    • getDialogMessage

      public String getDialogMessage()
      Returns:
      message of the AlertDialog
    • dialogMessageProperty

      public javafx.beans.property.StringProperty dialogMessageProperty()
      StringProperty of AlertDialog title
      See Also:
    • setSound

      public void setSound(@NotNull @NotNull Sounds sound)
      sets the notification sound from Sounds and plays when stage is shown
      Note: You need to add javafx.media dependency to use sounds
      Parameters:
      sound - default notification sounds
    • setSound

      public void setSound(@NotNull @NotNull String path)
      sets the notification sound from custom file path and plays when stage is shown
      Note: You need to add javafx.media dependency to use sounds
      Parameters:
      path - custom file path