Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.Combo.addSelectionListener()


    final Combo combo = AttributeEditorUtils.createCombo(
        toolkit, composite, element,
        ClickPlugin.getString("editor.clickXML.headers.type"),
        ClickPlugin.ATTR_TYPE,
        ClickUtils.createComboValues(ClickPlugin.HEADER_TYPE_VALUES));
    combo.addSelectionListener(new SelectionAdapter(){
      public void widgetSelected(SelectionEvent evt){
        if(combo.getText().equals("")){
          element.removeAttribute(ClickPlugin.ATTR_TYPE);
        } else {
          element.setAttribute(ClickPlugin.ATTR_TYPE, combo.getText());
View Full Code Here


      layout.numColumns += 4;
      final Label l = new Label(createDialogArea, SWT.NONE);
      l.setText("Format:");
      final Combo m = new Combo(createDialogArea, SWT.READ_ONLY | SWT.BORDER);
      m.setItems(PasteImageAction.FILE_TYPES);
      m.addSelectionListener(new SelectionListener() {

        public void widgetDefaultSelected(SelectionEvent e) {

        }
View Full Code Here

    return spinner;
  }
 
  protected static Combo createFieldCombo(final AbstractField<Integer> field, Composite topControl, int style) {
    final Combo combo = new Combo(topControl, style);
    combo.addSelectionListener(new SelectionAdapter() {
      @Override
      public void widgetSelected(SelectionEvent e) {
        int selectionIndex = combo.getSelectionIndex();
        field.setFieldValueFromControl(selectionIndex);
      }
View Full Code Here

            final Combo combo = new Combo(parent, SWT.DROP_DOWN | SWT.READ_ONLY);
            combo.setItems((String[]) _labels
                .toArray(new String[_labels.size()]));

            combo.addSelectionListener(new SelectionAdapter() {
                public void widgetSelected(SelectionEvent e) {
                    int selection = combo.getSelectionIndex();
                    if (selection < 0) {
                        sc.setSuccessful(false);
                    } else {
View Full Code Here

    for (String unit : AgeValue.getAllUnits()) {
      comboUnits.add(unit);
    }
    comboUnits.select(value.getUnit());

    comboUnits.addSelectionListener(new SelectionListener() {
      @Override
      public void widgetSelected(final SelectionEvent evt) {
        value.setUnit(comboUnits.getSelectionIndex());
        valueChanged(new ValueChangedEvent(value));
      }
View Full Code Here

    for (String unit : SizeValue.getAllUnits()) {
      comboUnits.add(unit);
    }
    comboUnits.select(value.getUnit());

    comboUnits.addSelectionListener(new SelectionListener() {
      @Override
      public void widgetSelected(final SelectionEvent evt) {
        value.setUnit(comboUnits.getSelectionIndex());
        valueChanged(new ValueChangedEvent(value));
      }
View Full Code Here

  public void init(final Composite composite) {
    final FilterRuleListItem ruleItem = this;

    final Combo comboRuleTypes = new Combo(composite, SWT.DROP_DOWN | SWT.READ_ONLY);

    comboRuleTypes.addSelectionListener(new SelectionAdapter() {
      @Override
      public void widgetSelected(final SelectionEvent evt) {
        ruleType = getRuleTypeName(comboRuleTypes.getText());
        root.recreateRuleList();
      }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.