Package melnorme.util.swt.components.fields

Examples of melnorme.util.swt.components.fields.ComboBoxField


    final String[] INDENT_MODE__VALUES = array(
      CodeFormatterConstants.TAB,
      CodeFormatterConstants.SPACES
    );
   
    final ComboBoxField indentModeField = new ComboBoxField(
      FormatterMessages.IndentationGroup_tab_policy,
      INDENT_MODE__LABELS,
      INDENT_MODE__VALUES);
    createCheckboxField(generalGroup,
      CodeFormatterConstants.FORMATTER_INDENT_MODE.key,
      indentModeField
    );
   
    createStringField(generalGroup,
      CodeFormatterConstants.FORMATTER_TAB_SIZE.key,
      createNumberField(FormatterMessages.IndentationGroup_tab_size, 2)
    );
   
    final NumberField indentationSizeField = createNumberField(
      FormatterMessages.IndentationGroup_indent_size, 2);
    createStringField(generalGroup,
      CodeFormatterConstants.FORMATTER_INDENTATION_SPACES_SIZE.key,
      indentationSizeField
    );
    IFieldValueListener indentModeValueListener = new IFieldValueListener() {
      @Override
      public void fieldValueChanged() {
        boolean enabled = !areEqual(indentModeField.getFieldValue(), CodeFormatterConstants.TAB);
        indentationSizeField.setEnabled(enabled);
      }
    };
    indentModeField.addValueChangedListener(indentModeValueListener);
    indentModeValueListener.fieldValueChanged();
  }
View Full Code Here

TOP

Related Classes of melnorme.util.swt.components.fields.ComboBoxField

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.