Class LongPreference

java.lang.Object
org.eclipse.handly.ui.preference.AbstractPreference
org.eclipse.handly.ui.preference.LongPreference
All Implemented Interfaces:
ILongPreference, IPreference

public class LongPreference extends AbstractPreference implements ILongPreference
Implements a long-valued preference. The preference is stored in an IPreferenceStore.
  • Constructor Details

    • LongPreference

      public LongPreference(String name, org.eclipse.jface.preference.IPreferenceStore store)
      Creates a new long-valued preference with the given name and the given store.
      Parameters:
      name - the preference name (not null)
      store - the preference store (not null)
  • Method Details

    • getValue

      public final long getValue()
      Description copied from interface: ILongPreference
      Returns the current value of this preference.
      Specified by:
      getValue in interface ILongPreference
      Returns:
      the current value of this preference
    • setValue

      public final void setValue(long value)
      Description copied from interface: ILongPreference
      Sets the current value of this preference.

      A preference change event is reported if the current value of the preference actually changes from its previous value.

      Specified by:
      setValue in interface ILongPreference
      Parameters:
      value - the new current value of this preference
    • setDefault

      public final void setDefault(long value)
      Sets the default value for this preference.

      Note that if the preference's current value equals the old default value, the current value changes to the new default value. No preference change events are reported by changing default values.

      Parameters:
      value - the new default value for this preference