Package org.eclipse.swt.widgets

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


        options.add(ver.getDisplayName());
      }
      int pos=0;
      for(String item:options.getItems()){
        if(item.equalsIgnoreCase(location.getVersion().getDisplayName())){
          options.select(pos);
          break;
        }
        pos++;
      }
      options.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
View Full Code Here


        Combo combo = new Combo(composite, SWT.READ_ONLY | SWT.DROP_DOWN);
        List<String> qList = ApplicationRegistry.getServerRegistry(_mbean).getQueueNames(_virtualHostName);
        combo.setItems(qList.toArray(new String[0]));
        combo.add("Select Queue", 0);
        combo.select(0);
        combo.setLayoutData(formData);
        combo.setData(param);
        combo.addSelectionListener(parameterSelectionListener);

        // Binding creation widgets
View Full Code Here

        }
       
        viewSelectionCombo.setItems(viewNames.toArray(new String[viewNames.size()]));
       
        // Preselect default view, will always be there
        viewSelectionCombo.select(0);
       
        Button switchView = new Button(noTextComposite, SWT.PUSH);
        switchView.setText("Switch");
       
        // TODO: Add a combo to select view ...
View Full Code Here

          int max = OptionData.instance.getMaxValueFromKey(key);
          int step = OptionData.instance.getStepValueFromKey(key);
          for (int i = min; i <= max; i += step) {
            combo.add(Integer.toString(i));
          }
          combo.select((OptionData.instance.getInt(key) - min) / step);
          FormData fd = new FormData();
          fd.top = new FormAttachment(0, 0);
          fd.bottom = new FormAttachment(100, 0);
          fd.right = new FormAttachment(100, 0);
          fd.left = new FormAttachment(80, 0);
View Full Code Here

          String currText = OptionData.instance.getComboText(key);
          List<String> texts = OptionData.instance.getComboTexts(key);
          for (String text : texts) {
            combo.add(text);
            if (text.equals(currText)) {
              combo.select(combo.getItemCount() - 1);
            }
          }
          FormData fd = new FormData();
          fd.top = new FormAttachment(0, 0);
          fd.bottom = new FormAttachment(100, 0);
View Full Code Here

    addEmptyLabel(c2, choice.level * 2);
    Combo combo = new Combo(c2, SWT.DROP_DOWN | SWT.READ_ONLY);
    addPersonFields(combo);
    combo.setData("choice", i);
    combo.addSelectionListener(this);
    combo.select(choice.index);
    Button buttonRemove = new Button(c2, SWT.PUSH);
    buttonRemove.setText("-");
    buttonRemove.setData("remove", i);
    buttonRemove.addSelectionListener(this);
    addFillingLabel(c2);
View Full Code Here

    sev.setText("Minimum Severity is:");
    final Combo m = new Combo(topBar, SWT.READ_ONLY);
    final String[] items = STRINGS;
   
    m.setItems(items);
    m.select(items.length - 1);
    m.addSelectionListener(new SelectionAdapter(){

     
      public void widgetSelected(SelectionEvent e) {
        currentSeverity=items.length-1-m.getSelectionIndex();
View Full Code Here

          String selectedPartitioning = partitioningCombo.getItem(0);
          if (Utilities.contains(partitionings, IStructuredPartitioning.DEFAULT_STRUCTURED_PARTITIONING)) {
            selectedPartitioning = IStructuredPartitioning.DEFAULT_STRUCTURED_PARTITIONING;
            for (int i = 0; i < partitionings.length; i++) {
              if (partitionings[i].equals(IStructuredPartitioning.DEFAULT_STRUCTURED_PARTITIONING)) {
                partitioningCombo.select(i);
              }
            }
          }
          else {
            partitioningCombo.select(0);
View Full Code Here

                partitioningCombo.select(i);
              }
            }
          }
          else {
            partitioningCombo.select(0);
          }
          ISelection sel = fTextEditor.getSelectionProvider().getSelection();
          ITextSelection textSelection = (ITextSelection) sel;
          ITypedRegion[] partitions = TextUtilities.computePartitioning(fDocument, selectedPartitioning, textSelection.getOffset(), textSelection.getLength(), true);
          fPartitionTable.setInput(partitions);
View Full Code Here

  private Combo createCombo(Composite parent, String[] labels, int selectedItem) {
    Combo combo = new Combo(parent, SWT.DROP_DOWN | SWT.READ_ONLY);
    combo.setItems(labels);
    if (selectedItem >= 0)
      combo.select(selectedItem);
    GridData data = new GridData(GridData.FILL_HORIZONTAL);
    data.horizontalAlignment = GridData.HORIZONTAL_ALIGN_FILL;
    combo.setLayoutData(data);
    return combo;
  }
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.