Package docking.widgets.dialogs
Class InputWithChoicesDialog
- java.lang.Object
- 
- docking.DialogComponentProvider
- 
- docking.widgets.dialogs.InputWithChoicesDialog
 
 
- 
- All Implemented Interfaces:
- ActionContextProvider,- StatusListener,- TaskListener
 
 public class InputWithChoicesDialog extends DialogComponentProvider A dialog that has text fields to get user input.
- 
- 
Field Summary- 
Fields inherited from class docking.DialogComponentProviderapplyButton, buttonPanel, cancelButton, dismissButton, okButton, rootPanel
 
- 
 - 
Constructor SummaryConstructors Constructor Description InputWithChoicesDialog(java.lang.String dialogTitle, java.lang.String label, java.lang.String[] optionValues, java.lang.String initialValue, boolean allowEdits, javax.swing.Icon messageIcon)Creates a provider for a generic input dialog with the specified title, a label and a editable comboBox pre-populated with selectable values.InputWithChoicesDialog(java.lang.String dialogTitle, java.lang.String label, java.lang.String[] optionValues, java.lang.String initialValue, javax.swing.Icon messageIcon)Creates a provider for a generic input dialog with the specified title, a label and a editable comboBox pre-populated with selectable values.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcancelCallback()The callback method for when the "Cancel" button is pressed.protected voiddialogShown()Override this method if you want to do something when the dialog is made visiblejava.lang.StringgetValue()return the value of the first combo boxbooleanisCanceled()Returns if this dialog is canceled.protected voidokCallback()The callback method for when the "OK" button is pressed.voidsetValue(java.lang.String value)Set the current choice to value.- 
Methods inherited from class docking.DialogComponentProvideraddAction, addApplyButton, addButton, addCancelButton, addDismissButton, addOKButton, addWorkPanel, alertMessage, alertMessage, applyCallback, cancelCurrentTask, clearScheduledTask, clearStatusText, close, dialogClosed, dismissCallback, dispose, doInitialize, escapeCallback, executeProgressTask, getActionContext, getActions, getBackground, getBounds, getComponent, getDefaultButton, getDefaultSize, getDialogSize, getFocusComponent, getGlassPane, getHelpLocatdion, getId, getIntialLocation, getLocationOnScreen, getParent, getPreferredSize, getRemberSize, getRememberLocation, getStatusColor, getStatusLabel, getStatusText, getTaskMonitorComponent, getTaskScheduler, getTitle, getUseSharedLocation, hideTaskMonitorComponent, isApplyEnabled, isCancelEnabled, isModal, isOKEnabled, isResizeable, isRunningTask, isShowing, isTransient, isVisible, notifyContextChanged, removeAction, removeButton, removeWorkPanel, repack, setApplyEnabled, setApplyToolTip, setBackground, setCancelButtonText, setCancelEnabled, setCancelToolTip, setCursor, setDefaultButton, setDefaultSize, setDialogSize, setDismissToolTip, setFocusComponent, setGlassPane, setHelpLocation, setInitialLocation, setMinimumSize, setMinimumSize, setOkButtonText, setOkEnabled, setOkToolTip, setPreferredSize, setRememberLocation, setRememberSize, setResizable, setStatusJustification, setStatusText, setStatusText, setStatusText, setTitle, setTransient, setUseSharedLocation, showProgressBar, showTaskMonitorComponent, stopProgressTimer, taskCancelled, taskCompleted, toFront, toString, waitForCurrentTask
 
- 
 
- 
- 
- 
Constructor Detail- 
InputWithChoicesDialogpublic InputWithChoicesDialog(java.lang.String dialogTitle, java.lang.String label, java.lang.String[] optionValues, java.lang.String initialValue, javax.swing.Icon messageIcon)Creates a provider for a generic input dialog with the specified title, a label and a editable comboBox pre-populated with selectable values. The user can check the value ofisCanceled()to know whether or not the user canceled the operation. To get the user selected value use thegetValue()value(s) entered by the user. If the user cancelled the operation, then null will be returned fromgetValue().- Parameters:
- dialogTitle- used as the name of the dialog's title bar
- label- value to use for the label of the text field
- optionValues- values to populate the combo box
- initialValue- the initial value - can be null
- messageIcon- the icon to display on the dialog--can be null
 
 - 
InputWithChoicesDialogpublic InputWithChoicesDialog(java.lang.String dialogTitle, java.lang.String label, java.lang.String[] optionValues, java.lang.String initialValue, boolean allowEdits, javax.swing.Icon messageIcon)Creates a provider for a generic input dialog with the specified title, a label and a editable comboBox pre-populated with selectable values. The user can check the value ofisCanceled()to know whether or not the user canceled the operation. To get the user selected value use thegetValue()value(s) entered by the user. If the user cancelled the operation, then null will be returned fromgetValue().- Parameters:
- dialogTitle- used as the name of the dialog's title bar
- label- value to use for the label of the text field
- optionValues- values to populate the combo box
- initialValue- the initial value - can be null
- allowEdits- true allows the user to add custom entries to the combo box by entering text
- messageIcon- the icon to display on the dialog--can be null
 
 
- 
 - 
Method Detail- 
dialogShownprotected void dialogShown() Description copied from class:DialogComponentProviderOverride this method if you want to do something when the dialog is made visible- Overrides:
- dialogShownin class- DialogComponentProvider
 
 - 
okCallbackprotected void okCallback() Description copied from class:DialogComponentProviderThe callback method for when the "OK" button is pressed.- Overrides:
- okCallbackin class- DialogComponentProvider
 
 - 
cancelCallbackprotected void cancelCallback() Description copied from class:DialogComponentProviderThe callback method for when the "Cancel" button is pressed. The default behavior is to call setVisible(false) and dispose() on the dialog.- Overrides:
- cancelCallbackin class- DialogComponentProvider
 
 - 
isCanceledpublic boolean isCanceled() Returns if this dialog is canceled.
 - 
getValuepublic java.lang.String getValue() return the value of the first combo box
 - 
setValuepublic void setValue(java.lang.String value) Set the current choice to value.- Parameters:
- value- updated choice
- Throws:
- java.util.NoSuchElementException- if choice does not permit edits and value is not a valid choice.
 
 
- 
 
-