Class DialogUtility

java.lang.Object
bayern.steinbrecher.javaUtility.DialogUtility

public final class DialogUtility
extends java.lang.Object
  • Field Summary

    Fields 
    Modifier and Type Field Description
    static int SIZE
    Width/height of the alert type identifying icon.
  • Method Summary

    Modifier and Type Method Description
    static @NotNull javafx.scene.control.Alert createConfirmationAlert​(javafx.scene.control.Alert.AlertType alertType, @NotNull java.lang.String... args)
    Creates an Alert with given settings.
    static @NotNull javafx.scene.control.Alert createErrorAlert​(@NotNull java.lang.String... args)  
    static @NotNull javafx.scene.control.Alert createInfoAlert​(@NotNull java.lang.String... args)  
    static @NotNull javafx.scene.control.Alert createInteractiveAlert​(javafx.scene.control.Alert.AlertType type, @Nullable java.lang.String message, @NotNull javafx.scene.control.ButtonType... buttons)  
    static @NotNull javafx.scene.control.Alert createMessageAlert​(@Nullable java.lang.String message, @NotNull java.lang.String... args)  
    static @NotNull javafx.scene.control.Alert createStacktraceAlert​(@NotNull java.lang.Throwable cause, @NotNull java.lang.String... args)  
    static @NotNull javafx.scene.control.Alert createWarningAlert​(@NotNull java.lang.String... args)  
    static @NotNull java.util.Optional<javafx.scene.control.ButtonType> showAndWait​(@NotNull javafx.scene.control.Alert alert)  

    Methods inherited from class java.lang.Object

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

  • Method Details

    • createConfirmationAlert

      @NotNull public static @NotNull javafx.scene.control.Alert createConfirmationAlert​(@NotNull javafx.scene.control.Alert.AlertType alertType, @NotNull @NotNull java.lang.String... args) throws DialogCreationException
      Creates an Alert with given settings.
      Parameters:
      alertType - The type of the alert.
      args - The arguments containing the content, title and the header. NOTE: The order is important. If you specify less elements or an element is null these elements will have the default value according to Alert. If you specify more elements they will be ignored.
      Returns:
      The created Alert.
      Throws:
      DialogCreationException - Thrown if the creation of the dialog got interrupted on the JavaFX main application thread or if the internal dialog creation process is erroneous.
    • createInteractiveAlert

      @NotNull public static @NotNull javafx.scene.control.Alert createInteractiveAlert​(@NotNull javafx.scene.control.Alert.AlertType type, @Nullable @Nullable java.lang.String message, @NotNull @NotNull javafx.scene.control.ButtonType... buttons) throws DialogCreationException
      Throws:
      DialogCreationException
    • createStacktraceAlert

      @NotNull public static @NotNull javafx.scene.control.Alert createStacktraceAlert​(@NotNull @NotNull java.lang.Throwable cause, @NotNull @NotNull java.lang.String... args) throws DialogCreationException
      Throws:
      DialogCreationException
    • createWarningAlert

      @NotNull public static @NotNull javafx.scene.control.Alert createWarningAlert​(@NotNull @NotNull java.lang.String... args) throws DialogCreationException
      Throws:
      DialogCreationException
    • createErrorAlert

      @NotNull public static @NotNull javafx.scene.control.Alert createErrorAlert​(@NotNull @NotNull java.lang.String... args) throws DialogCreationException
      Throws:
      DialogCreationException
    • createInfoAlert

      @NotNull public static @NotNull javafx.scene.control.Alert createInfoAlert​(@NotNull @NotNull java.lang.String... args) throws DialogCreationException
      Throws:
      DialogCreationException
    • createMessageAlert

      @NotNull public static @NotNull javafx.scene.control.Alert createMessageAlert​(@Nullable @Nullable java.lang.String message, @NotNull @NotNull java.lang.String... args) throws DialogCreationException
      Throws:
      DialogCreationException
    • showAndWait

      @NotNull public static @NotNull java.util.Optional<javafx.scene.control.ButtonType> showAndWait​(@NotNull @NotNull javafx.scene.control.Alert alert)