Interface IOption<V>

Type Parameters:
V - The type of the value that this option holds
All Known Implementing Classes:
AbstractOption, BooleanOption, IntegerOption, MultiStringOption, ShowWhitespaceCharactersOption, StringOption

public interface IOption<V>
This interface represents entity that supports capability to work with preferences and with UI elements
  • Method Details

    • setValue

      void setValue(V value)
      Sets the value of this option to the given value. This shall update UI representation
      Parameters:
      value - , cannot be null
    • getValue

      V getValue()
      Returns current value held by this option. This shall not be affected by handleSelection(Object).
      Returns:
      value held by this option, cannot be null
    • getPreferenceKey

      String getPreferenceKey()
      Getter for #preferenceKey
      Returns:
      #preferenceKey, cannot be null
    • handleSelection

      void handleSelection(V value)
      This method invoked when associated UI element has changed selection and the given value is now set to UI element So there is no need to update UI element but preference representation. This method shall not write preferences right to the store as this changes can be canceled with no callback.
      Parameters:
      value - the new value to be set, can be null
    • writeSelf

      void writeSelf()
      Writes it self to the preferences with given IPreferenceManager
    • setControl

      void setControl(IUpdatableControl<V> control)
      Associates this option with given control
      Parameters:
      control - The control associated with this option, can be null
    • getPresentation

      String getPresentation()
      Returns:
      Description of this option
    • uploadValue

      void uploadValue()
      Reads current value from IPreferenceManager and sets it with setValue(Object) or in any other way with following setValue(Object) protocol
      See Also:
    • restoreDefault

      void restoreDefault()
      Restores default value for this option