Package com.ben12.reta.view.control
Class MessageDialog
java.lang.Object
com.ben12.reta.view.control.MessageDialog
- Author:
- BenoƮt Moreau (ben.12)
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
setDefaultParent
(javafx.stage.Window newDefaultParent) static boolean
showConfirmationMessage
(javafx.stage.Window parent, String message) static void
showErrorMessage
(javafx.stage.Window parent, String message) static void
showErrorMessage
(javafx.stage.Window parent, String message, Throwable t) static <T> T
showOptionsMessage
(javafx.stage.Window parent, String message, Collection<javafx.util.Pair<T, String>> choices) static <T> T
showOptionsMessage
(javafx.stage.Window parent, String message, T... choices) static void
showProgressBar
(javafx.stage.Window parent, String title, javafx.concurrent.Task<?> task) static boolean
showQuestionMessage
(javafx.stage.Window parent, String message) static void
showWarningMessage
(javafx.stage.Window parent, String message)
-
Method Details
-
setDefaultParent
public static void setDefaultParent(javafx.stage.Window newDefaultParent) - Parameters:
newDefaultParent
- the defaultParent to set
-
showErrorMessage
- Parameters:
parent
- dialog parent, if null default parent is usedmessage
- Error message to show
-
showErrorMessage
- Parameters:
parent
- dialog parent, if null default parent is usedmessage
- Error message to showt
-Throwable
shown as details
-
showWarningMessage
- Parameters:
parent
- dialog parent, if null default parent is usedmessage
- Warning message to show
-
showConfirmationMessage
- Parameters:
parent
- dialog parent, if null default parent is usedmessage
- Confirmation message to show- Returns:
- true if confirmed by "yes" option, false otherwise
-
showQuestionMessage
- Parameters:
parent
- dialog parent, if null default parent is usedmessage
- Question message to show- Returns:
- true if confirmed by "ok" option, false otherwise
-
showOptionsMessage
@SafeVarargs public static <T> T showOptionsMessage(javafx.stage.Window parent, String message, T... choices) - Type Parameters:
T
- choice type- Parameters:
parent
- dialog parent, if null default parent is usedmessage
- Question message to showchoices
- possible choices- Returns:
- selected choice or null if canceled
-
showOptionsMessage
public static <T> T showOptionsMessage(javafx.stage.Window parent, String message, Collection<javafx.util.Pair<T, String>> choices) - Type Parameters:
T
- choice type- Parameters:
parent
- dialog parent, if null default parent is usedmessage
- Question message to showchoices
- possible choices wherePair
value is the choice label displayed- Returns:
- selected choice or null if canceled
-
showProgressBar
public static void showProgressBar(javafx.stage.Window parent, String title, javafx.concurrent.Task<?> task) - Parameters:
parent
- dialog parent, if null default parent is usedtitle
- dialog titletask
- progress task
-