Exemple #1
0
  /**
   * Informs this field editor's listener, if it has one, about a change to the value (<code>VALUE
   * </code> property) provided that the old and new values are different.
   *
   * <p>This hook is <em>not</em> called when the scale is initialized (or reset to the default
   * value) from the preference store.
   */
  protected void valueChanged() {
    setPresentsDefaultValue(false);

    int newValue = spinner.getSelection().intValue();
    if (newValue != oldValue) {
      fireStateChanged(IS_VALID, false, true);
      fireValueChanged(VALUE, new Integer(oldValue), new Integer(newValue));
      oldValue = newValue;
    }
  }
Exemple #2
0
 @Override
 protected void doStore() {
   getPreferenceStore().setValue(getPreferenceName(), spinner.getSelection().intValue());
 }