Package org.eclipse.ui.internal.editors.text.AccessibilityPreferencePage.EnumeratedDomain

Examples of org.eclipse.ui.internal.editors.text.AccessibilityPreferencePage.EnumeratedDomain.EnumValue


        fControl= control;
        fDomain= domain;
      }
      public void initialize() {
        int value= fOverlayStore.getInt(fPreference.getKey());
        EnumValue enumValue= fDomain.getValueByInteger(value);
        if (enumValue != null) {
          int index= fDomain.getIndex(enumValue);
          if (index >= 0)
            fControl.select(index);
        }
View Full Code Here


    }

    public int getIndex(EnumValue enumValue) {
      int i= 0;
      for (Iterator it= fItems.iterator(); it.hasNext();) {
        EnumValue ev= (EnumValue) it.next();
        if (ev.equals(enumValue))
          return i;
        i++;
      }
      return -1;
    }
View Full Code Here

      return null;
    }

    public EnumValue getValueByInteger(int intValue) {
      for (Iterator it= fItems.iterator(); it.hasNext();) {
        EnumValue e= (EnumValue) it.next();
        if (e.getIntValue() == intValue)
          return e;
      }
      return null;
    }
View Full Code Here

      }
      return null;
    }

    public void addValue(int val) {
      addValue(new EnumValue(val));
    }
View Full Code Here

        status.setError(TextEditorMessages.TextEditorPreferencePage_emptyInput);
        return status;
      }

      try {
        EnumValue e= parseEnumValue(value);
        if (!fValueSet.contains(e))
          status.setError(NLSUtility.format(TextEditorMessages.TextEditorPreferencePage_invalidRange, new String[] {getValueByIndex(0).getLabel(), getValueByIndex(fItems.size() - 1).getLabel()}));
      } catch (NumberFormatException e) {
        status.setError(NLSUtility.format(TextEditorMessages.TextEditorPreferencePage_invalidInput, String.valueOf(value)));
      }
View Full Code Here

TOP

Related Classes of org.eclipse.ui.internal.editors.text.AccessibilityPreferencePage.EnumeratedDomain.EnumValue

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.