Package org.eclipse.swt.custom

Examples of org.eclipse.swt.custom.CCombo.select()


    CCombo cc = newCCombo(tc, tip);
    for (String e : entries) {
      cc.add(e);
    }
    ((GridData) cc.getLayoutData()).grabExcessHorizontalSpace = true;;
    cc.select(0);
    return cc;
  }
 
  private CCombo wideCComboTF(Composite tc, String tip) {
    return wideCCombo(tc, tip, "false", "true");
View Full Code Here


                combo.add(key);
              }
            }
           
            // Select the previously selected item from the cell
            combo.select(combo.indexOf(item.getText(column)));

            // Compute the width for the editor
            // Also, compute the column width, so that the dropdown fits
            editor.minimumWidth = combo.computeSize(SWT.DEFAULT, SWT.DEFAULT).x;
            if (incrementTable.getColumn(column).getWidth() < editor.minimumWidth)
View Full Code Here

                combo.add(key);
              }
            }

            // Select the previously selected item from the cell
            combo.select(combo.indexOf(item.getText(column)));

            // Compute the width for the editor
            // Also, compute the column width, so that the dropdown fits
            editor.minimumWidth = combo.computeSize(SWT.DEFAULT, SWT.DEFAULT).x;
            if (valueSetTable.getColumn(column).getWidth() < editor.minimumWidth)
View Full Code Here

            {
               combo.setItems(NodeModel.shapes);
            }

            // Select the previously selected item from the cell
            combo.select(combo.indexOf(item.getText(1)));
//            combo.setFont(tableFont);
            editor.setEditor(combo, item, 1);

            // Add a listener to set the selected item back into the
            // cell
View Full Code Here

            {
               combo.setItems(NodeModel.shapes);
            }

            // Select the previously selected item from the cell
            combo.select(combo.indexOf(item.getText(1)));
//            combo.setFont(tableFont);
            editor.setEditor(combo, item, 1);

            // Add a listener to set the selected item back into the
            // cell
View Full Code Here

  void doSetStringValue(Object source, String value) {
    CCombo ccombo = (CCombo) source;
    String items[] = ccombo.getItems();
    int index = -1;
    if (value == null) {
      ccombo.select(-1);
    } else if (items != null) {
      for (int i = 0; i < items.length; i++) {
        if (value.equals(items[i])) {
          index = i;
          break;
View Full Code Here

        }
      }
      if (index == -1) {
        ccombo.setText(value);
      } else {
        ccombo.select(index); // -1 will not "unselect"
      }
    }
  }

  public String toString() {
View Full Code Here

      t = (Text)e.next();
      key = (String)fTextFields.get(t);
    }

    CCombo c;
    for(Iterator e = fComboBoxes.keySet().iterator(); e.hasNext(); c.select(fOverlayStore.getInt(key)))
    {
      c = (CCombo)e.next();
      key = (String)fComboBoxes.get(c);
    }
View Full Code Here

    btnCommandSourceFile.setLayoutData(gd_btnCommandSourceFile);
    btnCommandSourceFile.setText("Command Source File");

    final CCombo combo = new CCombo(grpSourceFileType, SWT.BORDER);
    combo.setItems(new String[] { "Empty Main Function", "Main Function with Parameters", "Simple Web Server" });
    combo.select(0);
    combo.setEnabled(false);
    combo.setEditable(false);

    GridData gd_combo = new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1);
    gd_combo.widthHint = 231;
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.