public class Dialog
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Dialog.CenterOption |
static class |
Dialog.OpalDialogType
Types of opal dialog
|
| Modifier and Type | Field and Description |
|---|---|
(package private) Dialog.OpalDialogType |
buttonType |
(package private) org.eclipse.swt.widgets.Shell |
shell |
| Constructor and Description |
|---|
Dialog()
Constructor
|
Dialog(boolean resizable)
Constructor
|
Dialog(org.eclipse.swt.widgets.Shell parent)
Constructor
|
Dialog(org.eclipse.swt.widgets.Shell parent,
boolean resizable)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
ask(org.eclipse.swt.widgets.Shell shell,
java.lang.String title,
java.lang.String text,
java.lang.String defaultValue)
Create a dialog box that asks a question
|
static java.lang.String |
ask(java.lang.String title,
java.lang.String text,
java.lang.String defaultValue)
Create a dialog box that asks a question
|
static Dialog |
buildAskDialog(org.eclipse.swt.widgets.Shell shell,
java.lang.String title,
java.lang.String text,
java.lang.String defaultValue)
Build a dialog box that asks a question
|
static Dialog |
buildChoiceDialog(org.eclipse.swt.widgets.Shell shell,
java.lang.String title,
java.lang.String text,
int defaultSelection,
ChoiceItem... items)
Build a dialog box with a choice
|
static Dialog |
buildConfirmDialog(org.eclipse.swt.widgets.Shell shell,
java.lang.String title,
java.lang.String text,
int timer)
Build a dialog box that asks the user a confirmation.
|
static Dialog |
buildErrorDialog(org.eclipse.swt.widgets.Shell shell,
java.lang.String title,
java.lang.String errorMessage)
Build a dialog box that displays an error message
|
static Dialog |
buildExceptionDialog(java.lang.Throwable exception)
Build a dialog box with an exception
|
static Dialog |
buildInformDialog(org.eclipse.swt.widgets.Shell shell,
java.lang.String title,
java.lang.String text)
Build a dialog box that inform the user
|
static Dialog |
buildRadioChoiceDialog(org.eclipse.swt.widgets.Shell shell,
java.lang.String title,
java.lang.String text,
int defaultSelection,
java.lang.String... values)
Build a dialog box with a radio choice
|
static int |
choice(org.eclipse.swt.widgets.Shell shell,
java.lang.String title,
java.lang.String text,
int defaultSelection,
ChoiceItem... items)
Create a dialog box with a choice
|
static int |
choice(java.lang.String title,
java.lang.String text,
int defaultSelection,
ChoiceItem... items)
Create a dialog box with a choice
|
void |
close()
Close the dialog box
|
static void |
error(org.eclipse.swt.widgets.Shell shell,
java.lang.String title,
java.lang.String errorMessage)
Create a dialog box that displays an error message
|
static void |
error(java.lang.String title,
java.lang.String errorMessage)
Create a dialog box that displays an error message
|
Dialog.OpalDialogType |
getButtonType() |
Dialog.CenterOption |
getCenterPolicy() |
boolean |
getCheckboxValue() |
FooterArea |
getFooterArea() |
MessageArea |
getMessageArea() |
int |
getMinimumHeight() |
int |
getMinimumWidth() |
int |
getSelectedButton() |
org.eclipse.swt.widgets.Shell |
getShell() |
java.lang.String |
getTitle() |
static void |
inform(org.eclipse.swt.widgets.Shell shell,
java.lang.String title,
java.lang.String text)
Create a dialog box that inform the user
|
static void |
inform(java.lang.String title,
java.lang.String text)
Create a dialog box that inform the user
|
static boolean |
isConfirmed(org.eclipse.swt.widgets.Shell shell,
java.lang.String title,
java.lang.String text)
Create a dialog box that asks the user a confirmation
|
static boolean |
isConfirmed(org.eclipse.swt.widgets.Shell shell,
java.lang.String title,
java.lang.String text,
int timer)
Create a dialog box that asks the user a confirmation.
|
static boolean |
isConfirmed(java.lang.String title,
java.lang.String text)
Create a dialog box that asks the user a confirmation
|
static boolean |
isConfirmed(java.lang.String title,
java.lang.String text,
int timer)
Create a dialog box that asks the user a confirmation.
|
(package private) void |
pack()
Compute the size of the shell
|
static int |
radioChoice(org.eclipse.swt.widgets.Shell shell,
java.lang.String title,
java.lang.String text,
int defaultSelection,
java.lang.String... values)
Create a dialog box with a radio choice
|
static int |
radioChoice(java.lang.String title,
java.lang.String text,
int defaultSelection,
java.lang.String... values)
Create a dialog box with a radio choice
|
void |
setButtonType(Dialog.OpalDialogType buttonType) |
void |
setCenterPolicy(Dialog.CenterOption centerPolicy) |
(package private) void |
setLastSize(org.eclipse.swt.graphics.Point lastSize) |
void |
setMinimumHeight(int minimumHeight) |
void |
setMinimumWidth(int minimumWidth) |
void |
setTitle(java.lang.String title) |
int |
show()
Show the dialog box
|
static void |
showException(java.lang.Throwable exception)
Display a dialog box with an exception
|
Dialog.OpalDialogType buttonType
final org.eclipse.swt.widgets.Shell shell
public Dialog()
public Dialog(boolean resizable)
resizable - if true, the window is resizablepublic Dialog(org.eclipse.swt.widgets.Shell parent)
parent - parent shellpublic Dialog(org.eclipse.swt.widgets.Shell parent,
boolean resizable)
parent - parent shellresizable - if true, the window is resizablepublic int show()
public void close()
void pack()
public static java.lang.String ask(java.lang.String title,
java.lang.String text,
java.lang.String defaultValue)
title - title of the dialog boxtext - text of the questiondefaultValue - default value of the inputpublic static java.lang.String ask(org.eclipse.swt.widgets.Shell shell,
java.lang.String title,
java.lang.String text,
java.lang.String defaultValue)
title - title of the dialog boxtext - text of the questiondefaultValue - default value of the inputpublic static Dialog buildAskDialog(org.eclipse.swt.widgets.Shell shell, java.lang.String title, java.lang.String text, java.lang.String defaultValue)
title - title of the dialog boxtext - text of the questiondefaultValue - default value of the inputpublic static void error(java.lang.String title,
java.lang.String errorMessage)
title - title of the dialog boxerrorMessage - Error messagepublic static void error(org.eclipse.swt.widgets.Shell shell,
java.lang.String title,
java.lang.String errorMessage)
shell - parent shelltitle - title of the dialog boxerrorMessage - Error messagepublic static Dialog buildErrorDialog(org.eclipse.swt.widgets.Shell shell, java.lang.String title, java.lang.String errorMessage)
shell - parent shelltitle - title of the dialog boxerrorMessage - Error messagepublic static void inform(java.lang.String title,
java.lang.String text)
title - title of the dialog boxtext - text to displaypublic static void inform(org.eclipse.swt.widgets.Shell shell,
java.lang.String title,
java.lang.String text)
shell - parent shelltitle - title of the dialog boxtext - text to displaypublic static Dialog buildInformDialog(org.eclipse.swt.widgets.Shell shell, java.lang.String title, java.lang.String text)
shell - parent shelltitle - title of the dialog boxtext - text to displaypublic static boolean isConfirmed(java.lang.String title,
java.lang.String text)
title - title of the dialog boxtext - text to displaytrue if the user confirmed, false otherwisepublic static boolean isConfirmed(org.eclipse.swt.widgets.Shell shell,
java.lang.String title,
java.lang.String text)
shell - parent shelltitle - title of the dialog boxtext - text to displaytrue if the user confirmed, false otherwisepublic static boolean isConfirmed(java.lang.String title,
java.lang.String text,
int timer)
title - title of the dialog boxtext - text to displaytimer - number of seconds before enabling the yes buttontrue if the user confirmed, false otherwisepublic static boolean isConfirmed(org.eclipse.swt.widgets.Shell shell,
java.lang.String title,
java.lang.String text,
int timer)
shell - parent shelltitle - title of the dialog boxtext - text to displaytimer - number of seconds before enabling the yes buttontrue if the user confirmed, false otherwisepublic static Dialog buildConfirmDialog(org.eclipse.swt.widgets.Shell shell, java.lang.String title, java.lang.String text, int timer)
shell - parent shelltitle - title of the dialog boxtext - text to displaytimer - number of seconds before enabling the yes buttonpublic static int radioChoice(java.lang.String title,
java.lang.String text,
int defaultSelection,
java.lang.String... values)
title - title of the dialog boxtext - text to displaydefaultSelection - index of the default selectionvalues - values to displaypublic static int radioChoice(org.eclipse.swt.widgets.Shell shell,
java.lang.String title,
java.lang.String text,
int defaultSelection,
java.lang.String... values)
shell - parent shelltitle - title of the dialog boxtext - text to displaydefaultSelection - index of the default selectionvalues - values to displaypublic static Dialog buildRadioChoiceDialog(org.eclipse.swt.widgets.Shell shell, java.lang.String title, java.lang.String text, int defaultSelection, java.lang.String... values)
shell - parent shelltitle - title of the dialog boxtext - text to displaydefaultSelection - index of the default selectionvalues - values to displaypublic static void showException(java.lang.Throwable exception)
exception - exception to displaypublic static Dialog buildExceptionDialog(java.lang.Throwable exception)
exception - exception to displaypublic static int choice(java.lang.String title,
java.lang.String text,
int defaultSelection,
ChoiceItem... items)
title - title of the dialog boxtext - text to displaydefaultSelection - index of the default selectionitems - items to displaypublic static int choice(org.eclipse.swt.widgets.Shell shell,
java.lang.String title,
java.lang.String text,
int defaultSelection,
ChoiceItem... items)
shell - parent shelltitle - title of the dialog boxtext - text to displaydefaultSelection - index of the default selectionitems - items to displaypublic static Dialog buildChoiceDialog(org.eclipse.swt.widgets.Shell shell, java.lang.String title, java.lang.String text, int defaultSelection, ChoiceItem... items)
shell - parent shelltitle - title of the dialog boxtext - text to displaydefaultSelection - index of the default selectionitems - items to displaypublic java.lang.String getTitle()
public void setTitle(java.lang.String title)
title - the title to setpublic Dialog.OpalDialogType getButtonType()
public void setButtonType(Dialog.OpalDialogType buttonType)
buttonType - the buttonType to setpublic MessageArea getMessageArea()
public FooterArea getFooterArea()
public org.eclipse.swt.widgets.Shell getShell()
public int getSelectedButton()
public boolean getCheckboxValue()
public int getMinimumWidth()
public void setMinimumWidth(int minimumWidth)
minimumWidth - the minimum width of the dialog box to setpublic int getMinimumHeight()
public void setMinimumHeight(int minimumHeight)
minimumHeight - the minimum height of the dialog box to setpublic Dialog.CenterOption getCenterPolicy()
public void setCenterPolicy(Dialog.CenterOption centerPolicy)
centerPolicy - center policyvoid setLastSize(org.eclipse.swt.graphics.Point lastSize)