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| Constructor and Description |
|---|
MessageDialog(javafx.stage.Window parent,
java.lang.String windowTitle,
java.lang.String message,
MessageDialog.Type type,
int okButton,
int cancelButton,
java.lang.String... dialogButtonLabels) |
| 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(javafx.stage.Window parent,
java.lang.String title,
java.lang.String message)
Open confirm dialog who blocks until closed with default
MessageDialog.ConfirmResult.OK |
static MessageDialog.ConfirmResult |
openConfirmDialog(javafx.stage.Window parent,
java.lang.String title,
java.lang.String message,
MessageDialog.ConfirmResult defaultValue)
Open confirmation dialog who blocks until closed
|
static void |
openErrorDialog(javafx.stage.Window parent,
java.lang.String title,
java.lang.String message)
Open an error dialog who blocks until closed
|
static void |
openInformationDialog(javafx.stage.Window parent,
java.lang.String title,
java.lang.String message)
Open an information dialog who blocks until closed
|
static MessageDialog.QuestionCancelResult |
openQuestionCancelDialog(javafx.stage.Window parent,
java.lang.String title,
java.lang.String message)
Open an question cancel dialog who blocks until closed with default option
MessageDialog.QuestionCancelResult.YES |
static MessageDialog.QuestionCancelResult |
openQuestionCancelDialog(javafx.stage.Window parent,
java.lang.String title,
java.lang.String message,
MessageDialog.QuestionCancelResult defaultValue)
Open a question cancel dialog who blocks until closed
|
static MessageDialog.QuestionResult |
openQuestionDialog(javafx.stage.Window parent,
java.lang.String title,
java.lang.String message)
Open a question dialog who blocks until closed with default value
MessageDialog.QuestionResult.YES |
static MessageDialog.QuestionResult |
openQuestionDialog(javafx.stage.Window parent,
java.lang.String title,
java.lang.String message,
MessageDialog.QuestionResult defaultValue)
Open a question dialog who blocks until closed
|
static void |
openWarningDialog(javafx.stage.Window parent,
java.lang.String title,
java.lang.String message)
Open a warning dialog who blocks until closed
|
cancelPressed, close, create, createButtonBar, createButtonForBar, createContents, getBounds, getContentInset, getCustomWindowPane, getInitialContentSize, getInitialLocation, getInitialSize, getModality, okPressed, open, pack, preopen, setBounds, setReturnCodepublic MessageDialog(javafx.stage.Window parent,
java.lang.String windowTitle,
java.lang.String message,
MessageDialog.Type type,
int okButton,
int cancelButton,
java.lang.String... dialogButtonLabels)
protected javafx.scene.Node createDialogArea()
createDialogArea in class Dialogprotected java.util.List<java.lang.String> getStylesheets()
getStylesheets in class Dialogprotected boolean isOkDefault(int buttonId)
DialogisOkDefault in class DialogbuttonId - the button idtrue if the button is the default ok buttonButton.defaultButtonProperty()protected boolean isCancelDefault(int buttonId)
DialogisCancelDefault in class DialogbuttonId - the button idtrue if the button is the default cancel buttonprotected java.util.List<javafx.scene.control.Button> createButtonsForBar()
DialogcreateButtonsForBar in class Dialogprotected void buttonPressed(int type)
DialogbuttonPressed in class Dialogtype - the button idpublic static void openErrorDialog(javafx.stage.Window parent,
java.lang.String title,
java.lang.String message)
parent - the parenttitle - the titlemessage - the messagepublic static void openWarningDialog(javafx.stage.Window parent,
java.lang.String title,
java.lang.String message)
parent - the parenttitle - the titlemessage - the messagepublic static void openInformationDialog(javafx.stage.Window parent,
java.lang.String title,
java.lang.String message)
parent - the parenttitle - the titlemessage - the messagepublic static MessageDialog.QuestionResult openQuestionDialog(javafx.stage.Window parent, java.lang.String title, java.lang.String message)
MessageDialog.QuestionResult.YESparent - the parenttitle - the titlemessage - the mssagepublic static MessageDialog.QuestionResult openQuestionDialog(javafx.stage.Window parent, java.lang.String title, java.lang.String message, MessageDialog.QuestionResult defaultValue)
parent - the parenttitle - the titlemessage - the messagedefaultValue - the default valuepublic static MessageDialog.QuestionCancelResult openQuestionCancelDialog(javafx.stage.Window parent, java.lang.String title, java.lang.String message)
MessageDialog.QuestionCancelResult.YESparent - the parenttitle - the titlemessage - the messagepublic static MessageDialog.QuestionCancelResult openQuestionCancelDialog(javafx.stage.Window parent, java.lang.String title, java.lang.String message, MessageDialog.QuestionCancelResult defaultValue)
parent - the parenttitle - the titlemessage - the messagedefaultValue - the default valuepublic static MessageDialog.ConfirmResult openConfirmDialog(javafx.stage.Window parent, java.lang.String title, java.lang.String message)
MessageDialog.ConfirmResult.OKparent - the parenttitle - the titlemessage - the messagepublic static MessageDialog.ConfirmResult openConfirmDialog(javafx.stage.Window parent, java.lang.String title, java.lang.String message, MessageDialog.ConfirmResult defaultValue)
parent - the parenttitle - the titlemessage - the messagedefaultValue - the default value