public class MultipleInputDialog extends Dialog
Modifier and Type | Class and Description |
---|---|
protected class |
MultipleInputDialog.FieldSummary |
Window.IExceptionHandler
Modifier and Type | Field and Description |
---|---|
protected static int |
BROWSE |
protected List |
controlList |
protected static String |
FIELD_NAME |
protected List |
fieldList |
protected Composite |
panel |
protected static int |
TEXT |
protected List |
validators |
protected Map |
valueMap |
protected static int |
VARIABLE |
blockedHandler, buttonBar, DIALOG_DEFAULT_BOUNDS, DIALOG_PERSISTLOCATION, DIALOG_PERSISTSIZE, dialogArea, DLG_IMG_ERROR, DLG_IMG_HELP, DLG_IMG_INFO, DLG_IMG_MESSAGE_ERROR, DLG_IMG_MESSAGE_INFO, DLG_IMG_MESSAGE_WARNING, DLG_IMG_QUESTION, DLG_IMG_WARNING, ELLIPSIS
CANCEL, OK, resizeHasOccurred
Constructor and Description |
---|
MultipleInputDialog(Shell shell,
String title) |
Modifier and Type | Method and Description |
---|---|
void |
addBrowseField(String labelText,
String initialValue,
boolean allowsEmpty) |
void |
addBrowseField(String labelText,
String initialValue,
TextValidator validator) |
void |
addTextField(String labelText,
String initialValue,
boolean allowsEmpty)
Adds a text field to the dialog.
|
void |
addTextField(String labelText,
String initialValue,
TextValidator validator)
Adds a text field to the dialog.
|
protected void |
configureShell(Shell shell) |
protected void |
createBrowseField(String labelText,
String initialValue,
TextValidator validator) |
protected Control |
createButtonBar(Composite parent) |
protected Control |
createDialogArea(Composite parent) |
protected void |
createTextField(String labelText,
String initialValue,
TextValidator validator) |
String |
getStringValue(String key) |
Object |
getValue(String key) |
protected void |
okPressed() |
int |
open() |
void |
validateFields() |
applyDialogFont, buttonPressed, cancelPressed, close, convertHeightInCharsToPixels, convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, convertWidthInCharsToPixels, create, createButton, createButtonsForButtonBar, createContents, dialogFontIsDefault, getBlockedHandler, getButton, getButtonBar, getCancelButton, getDialogArea, getDialogBoundsSettings, getDialogBoundsStrategy, getImage, getInitialLocation, getInitialSize, getOKButton, initializeBounds, initializeDialogUnits, isResizable, setBlockedHandler, setButtonLayoutData, setButtonLayoutFormData, shortenText
canHandleShellCloseEvent, constrainShellSize, createShell, getConstrainedShellBounds, getContents, getDefaultImage, getDefaultImages, getDefaultOrientation, getLayout, getParentShell, getReturnCode, getShell, getShellListener, getShellStyle, getWindowManager, handleFontChange, handleShellCloseEvent, setBlockOnOpen, setDefaultImage, setDefaultImages, setDefaultModalParent, setDefaultOrientation, setExceptionHandler, setParentShell, setReturnCode, setShellStyle, setWindowManager
protected static final String FIELD_NAME
protected static final int TEXT
protected static final int BROWSE
protected static final int VARIABLE
protected Composite panel
protected List fieldList
protected List controlList
protected List validators
protected Map valueMap
protected void configureShell(Shell shell)
configureShell
in class Window
protected Control createButtonBar(Composite parent)
createButtonBar
in class Dialog
protected Control createDialogArea(Composite parent)
createDialogArea
in class Dialog
public void addBrowseField(String labelText, String initialValue, boolean allowsEmpty)
public void addBrowseField(String labelText, String initialValue, TextValidator validator)
public void addTextField(String labelText, String initialValue, boolean allowsEmpty)
allowsEmpty == true
) or accept any non-empty value
(allowsEmpty == false
).labelText
- the label shown to the left of the fieldinitialValue
- the field's value when the dialog is openedallowsEmpty
- determines if the field accepts empty values or notpublic void addTextField(String labelText, String initialValue, TextValidator validator)
labelText
- the label shown to the left of the fieldinitialValue
- the field's value when the dialog is openedvalidator
- determines if the field accepts empty values or not.The validator will be
initialized by calling validator.setText(textWidget)
where
textWidget
is the newly created text widget.protected void createTextField(String labelText, String initialValue, TextValidator validator)
protected void createBrowseField(String labelText, String initialValue, TextValidator validator)
public void validateFields()