Class ModifyDialogTabPage.Preference

    • Constructor Summary

      Constructors 
      Constructor Description
      Preference​(java.util.Map<java.lang.String,​java.lang.String> preferences, java.lang.String key)
      Create a new Preference.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract org.eclipse.swt.widgets.Control getControl()
      Returns the main control of a preference, which is mainly used to manage the focus.
      boolean getEnabled()  
      java.lang.String getKey()  
      protected java.util.Map<java.lang.String,​java.lang.String> getPreferences()  
      void setEnabled​(boolean enabled)
      Set the enabled state of all SWT widgets of this preference.
      void setKey​(java.lang.String key)
      Set the key which is used to store the value.
      protected abstract void updateWidget()
      To be implemented in subclasses.
      • Methods inherited from class java.util.Observable

        addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Preference

        public Preference​(java.util.Map<java.lang.String,​java.lang.String> preferences,
                          java.lang.String key)
        Create a new Preference.
        Parameters:
        preferences - The map where the value is written.
        key - The key for which a value is managed.
    • Method Detail

      • getPreferences

        protected final java.util.Map<java.lang.String,​java.lang.String> getPreferences()
        Returns:
        Gets the map of this Preference.
      • setEnabled

        public final void setEnabled​(boolean enabled)
        Set the enabled state of all SWT widgets of this preference.
        Parameters:
        enabled - new value
      • getEnabled

        public final boolean getEnabled()
        Returns:
        Gets the enabled state of all SWT widgets of this Preference.
      • setKey

        public final void setKey​(java.lang.String key)
        Set the key which is used to store the value.
        Parameters:
        key - New value
      • getKey

        public final java.lang.String getKey()
        Returns:
        Gets the currently used key which is used to store the value.
      • getControl

        public abstract org.eclipse.swt.widgets.Control getControl()
        Returns the main control of a preference, which is mainly used to manage the focus. This may be null if the preference doesn't have a control which is able to have the focus.
        Returns:
        The main control
      • updateWidget

        protected abstract void updateWidget()
        To be implemented in subclasses. Update the SWT widgets when the state of this object has changed (enabled, key, ...).