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 voidsetDefaultParent(javafx.stage.Window newDefaultParent) static booleanshowConfirmationMessage(javafx.stage.Window parent, String message) static voidshowErrorMessage(javafx.stage.Window parent, String message) static voidshowErrorMessage(javafx.stage.Window parent, String message, Throwable t) static <T> TshowOptionsMessage(javafx.stage.Window parent, String message, Collection<javafx.util.Pair<T, String>> choices) static <T> TshowOptionsMessage(javafx.stage.Window parent, String message, T... choices) static voidshowProgressBar(javafx.stage.Window parent, String title, javafx.concurrent.Task<?> task) static booleanshowQuestionMessage(javafx.stage.Window parent, String message) static voidshowWarningMessage(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-Throwableshown 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 wherePairvalue 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
-