Package docking.widgets.values

# Class ValuesMapDialog

java.lang.Object
docking.DialogComponentProvider
docking.widgets.values.ValuesMapDialog

All Implemented Interfaces:
  `ActionContextProvider`, `StatusListener`, `TaskListener`

public class ValuesMapDialog extends DialogComponentProvider
Dialog for displaying and editing values defined in a `GValuesMap`. The dialog consists of an option message, followed by a list of name / value pairs. The name / value pairs will be display in the order they were defined in the ValuesMap.

- ## Field Summary

  ### Fields inherited from class docking.DialogComponentProvider

  `applyButton, buttonPanel, cancelButton, dismissButton, okButton, rootPanel`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ValuesMapDialog(String title, String message)`
  Creates the dialog with the given title and optional message.
  `ValuesMapDialog(String title, String message, GValuesMap valuesMap)`
  Creates the dialog with the given title and optional message.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `AbstractValue<?>`
  `addValue(AbstractValue<?> value)`
  Adds a new value to the ValuesMap being edited by this dialog.
  `protected void`
  `cancelCallback()`
  The callback method for when the "Cancel" button is pressed.
  `GValuesMap`
  `getValues()`
  Returns the ValuesMap being edited.
  `boolean`
  `isCancelled()`
  Returns true if the dialog was cancelled.
  `protected void`
  `okCallback()`
  The callback method for when the "OK" button is pressed.
  `void`
  `setValidator(ValuesMapValidator validator)`
  Sets the `ValuesMapValidator` on the ValuesMap being edited.

  ### Methods inherited from class docking.DialogComponentProvider

  `addAction, addApplyButton, addButton, addCancelButton, addDismissButton, addOKButton, addWorkPanel, alertMessage, alertMessage, applyCallback, cancelCurrentTask, clearScheduledTask, clearStatusText, close, closeDialog, dialogClosed, dialogShown, dismissCallback, dispose, doInitialize, escapeCallback, executeProgressTask, getActionContext, getActions, getBackground, getBounds, getComponent, getDefaultButton, getDefaultSize, getDialogSize, getFocusComponent, getGlassPane, getHelpLocation, getId, getInitialLocation, getLocationOnScreen, getParent, getPreferredSize, getRememberLocation, getRememberSize, 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`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### ValuesMapDialog

    public ValuesMapDialog(String title, String message)
    Creates the dialog with the given title and optional message. The message will be display at the top of the dialog before the list of name / value pairs. This form of the dialog requires that the `addValue(AbstractValue)` method be called to populate the ValuesMap.
    Parameters:
      `title` - the title for the dialog
      `message` - the optional message to display before the list of name value pairs

  - ### ValuesMapDialog

    public ValuesMapDialog(String title, String message, GValuesMap valuesMap)
    Creates the dialog with the given title and optional message. The message will be display at the top of the dialog before the list of name / value pairs. The values are provided at construction time.
    Parameters:
      `title` - the title for the dialog
      `message` - the optional message to display before the list of name value pairs
      `valuesMap` - the ValuesMap whose values are to be displayed.

- ## Method Details

  - ### addValue

    public AbstractValue<?> addValue(AbstractValue<?> value)
    Adds a new value to the ValuesMap being edited by this dialog.
    Parameters:
      `value` - the new AbstractValue to be added
    Returns:
      the value that was added

  - ### setValidator

    public void setValidator(ValuesMapValidator validator)
    Sets the `ValuesMapValidator` on the ValuesMap being edited. This is usually set on the ValuesMap before the dialog is constructed. This method is for uses where it wasn't constructed with a ValueMap, but values were added directly to the dialog after dialog construction.
    Parameters:
      `validator` - the ValuesMapValidator

  - ### getValues

    public GValuesMap getValues()
    Returns the ValuesMap being edited.
    Returns:
      the ValuesMap being edited.

  - ### isCancelled

    public boolean isCancelled()
    Returns true if the dialog was cancelled.
    Returns:
      true if the dialog was cancelled.

  - ### okCallback

    protected void okCallback()
    Description copied from class: `DialogComponentProvider`
    The callback method for when the "OK" button is pressed.
    Overrides:
      `okCallback` in class `DialogComponentProvider`

  - ### cancelCallback

    protected void cancelCallback()
    Description copied from class: `DialogComponentProvider`
    The callback method for when the "Cancel" button is pressed. The default behavior is to call setVisible(false) and dispose() on the dialog.
    Overrides:
      `cancelCallback` in class `DialogComponentProvider`