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.
  • 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