public class MessageDialog extends Dialog
Modifier and Type | Class and Description |
---|---|
static class |
MessageDialog.ConfirmResult
Confirmation result
|
static class |
MessageDialog.QuestionCancelResult
Result of a dialog of type
MessageDialog.QuestionCancelResult |
static class |
MessageDialog.QuestionResult
Result of a dialog of type
MessageDialog.QuestionResult |
static class |
MessageDialog.Type
The message type
|
CANCEL_BUTTON, OK_BUTTON
Modifier and Type | Method and Description |
---|---|
protected void |
buttonPressed(int type)
Method called when button is pressed
|
protected java.util.List<javafx.scene.control.Button> |
createButtonsForBar()
Create the buttons for the bar
|
protected javafx.scene.Node |
createDialogArea() |
protected java.util.List<java.lang.String> |
getStylesheets() |
protected boolean |
isCancelDefault(int buttonId)
Check if the button ID is the default cancle button
|
protected boolean |
isOkDefault(int buttonId)
Check if the button ID is the default ok button
|
static MessageDialog.ConfirmResult |
openConfirmDialog(@Nullable javafx.stage.Window parent,
@NonNull java.lang.String title,
@NonNull java.lang.String message)
Open confirm dialog who blocks until closed with default
MessageDialog.ConfirmResult.OK |
static MessageDialog.ConfirmResult |
openConfirmDialog(@Nullable javafx.stage.Window parent,
@NonNull java.lang.String title,
@NonNull java.lang.String message,
@NonNull MessageDialog.ConfirmResult defaultValue)
Open confirmation dialog who blocks until closed
|
static void |
openErrorDialog(@Nullable javafx.stage.Window parent,
@NonNull java.lang.String title,
@NonNull java.lang.String message)
Open an error dialog who blocks until closed
|
static void |
openInformationDialog(@Nullable javafx.stage.Window parent,
@NonNull java.lang.String title,
@NonNull java.lang.String message)
Open an information dialog who blocks until closed
|
static MessageDialog.QuestionCancelResult |
openQuestionCancelDialog(@Nullable javafx.stage.Window parent,
@NonNull java.lang.String title,
@NonNull java.lang.String message)
Open an question cancel dialog who blocks until closed with default option
MessageDialog.QuestionCancelResult.YES |
static MessageDialog.QuestionCancelResult |
openQuestionCancelDialog(@Nullable javafx.stage.Window parent,
@NonNull java.lang.String title,
@NonNull java.lang.String message,
@NonNull MessageDialog.QuestionCancelResult defaultValue)
Open a question cancel dialog who blocks until closed
|
static @NonNull MessageDialog.QuestionResult |
openQuestionDialog(@Nullable javafx.stage.Window parent,
@NonNull java.lang.String title,
@NonNull java.lang.String message)
Open a question dialog who blocks until closed with default value
MessageDialog.QuestionResult.YES |
static @NonNull MessageDialog.QuestionResult |
openQuestionDialog(@Nullable javafx.stage.Window parent,
@NonNull java.lang.String title,
@NonNull java.lang.String message,
@NonNull MessageDialog.QuestionResult defaultValue)
Open a question dialog who blocks until closed
|
static void |
openWarningDialog(@Nullable javafx.stage.Window parent,
@NonNull java.lang.String title,
@NonNull java.lang.String message)
Open a warning dialog who blocks until closed
|
cancelPressed, close, create, createButtonBar, createButtonForBar, createContents, getBounds, getContentInset, getInitialContentSize, getInitialLocation, getInitialSize, getModality, okPressed, open, pack, preopen, setBounds, setReturnCode
protected javafx.scene.Node createDialogArea()
createDialogArea
in class Dialog
protected java.util.List<java.lang.String> getStylesheets()
getStylesheets
in class Dialog
protected boolean isOkDefault(int buttonId)
Dialog
isOkDefault
in class Dialog
buttonId
- the button idtrue
if the button is the default ok buttonButton.defaultButtonProperty()
protected boolean isCancelDefault(int buttonId)
Dialog
isCancelDefault
in class Dialog
buttonId
- the button idtrue
if the button is the default cancel buttonprotected java.util.List<javafx.scene.control.Button> createButtonsForBar()
Dialog
createButtonsForBar
in class Dialog
protected void buttonPressed(int type)
Dialog
buttonPressed
in class Dialog
type
- the button idpublic static void openErrorDialog(@Nullable javafx.stage.Window parent, @NonNull java.lang.String title, @NonNull java.lang.String message)
parent
- the parenttitle
- the titlemessage
- the messagepublic static void openWarningDialog(@Nullable javafx.stage.Window parent, @NonNull java.lang.String title, @NonNull java.lang.String message)
parent
- the parenttitle
- the titlemessage
- the messagepublic static void openInformationDialog(@Nullable javafx.stage.Window parent, @NonNull java.lang.String title, @NonNull java.lang.String message)
parent
- the parenttitle
- the titlemessage
- the messagepublic static @NonNull MessageDialog.QuestionResult openQuestionDialog(@Nullable javafx.stage.Window parent, @NonNull java.lang.String title, @NonNull java.lang.String message)
MessageDialog.QuestionResult.YES
parent
- the parenttitle
- the titlemessage
- the mssagepublic static @NonNull MessageDialog.QuestionResult openQuestionDialog(@Nullable javafx.stage.Window parent, @NonNull java.lang.String title, @NonNull java.lang.String message, @NonNull MessageDialog.QuestionResult defaultValue)
parent
- the parenttitle
- the titlemessage
- the messagedefaultValue
- the default valuepublic static MessageDialog.QuestionCancelResult openQuestionCancelDialog(@Nullable javafx.stage.Window parent, @NonNull java.lang.String title, @NonNull java.lang.String message)
MessageDialog.QuestionCancelResult.YES
parent
- the parenttitle
- the titlemessage
- the messagepublic static MessageDialog.QuestionCancelResult openQuestionCancelDialog(@Nullable javafx.stage.Window parent, @NonNull java.lang.String title, @NonNull java.lang.String message, @NonNull MessageDialog.QuestionCancelResult defaultValue)
parent
- the parenttitle
- the titlemessage
- the messagedefaultValue
- the default valuepublic static MessageDialog.ConfirmResult openConfirmDialog(@Nullable javafx.stage.Window parent, @NonNull java.lang.String title, @NonNull java.lang.String message)
MessageDialog.ConfirmResult.OK
parent
- the parenttitle
- the titlemessage
- the messagepublic static MessageDialog.ConfirmResult openConfirmDialog(@Nullable javafx.stage.Window parent, @NonNull java.lang.String title, @NonNull java.lang.String message, @NonNull MessageDialog.ConfirmResult defaultValue)
parent
- the parenttitle
- the titlemessage
- the messagedefaultValue
- the default value