Package org.eclipse.swt.custom

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


          e.doit = false;
        }
      }
    });

    comboBox.addFocusListener(new FocusAdapter() {
      public void focusLost(FocusEvent e) {
        ComboBoxViewerCellEditor.this.focusLost();
      }
    });
    return comboBox;
View Full Code Here


          final CCombo combo = new CCombo(table, SWT.BORDER | SWT.READ_ONLY);
          combo.setItems(new String[] { "terminate", "disable" }); //$NON-NLS-1$
          combo.setText(item.getText(1));
          combo.pack();
          combo.setFocus();
          combo.addFocusListener(new FocusListener() {

            public void focusGained(FocusEvent e) {
            }

            public void focusLost(FocusEvent e) {
View Full Code Here

            final CCombo combo = new CCombo(table, SWT.BORDER | SWT.READ_ONLY);
            combo.setItems(new String[] { Boolean.toString(true), Boolean.toString(false) }); //$NON-NLS-1$
            combo.setText(item.getText(1));
            combo.pack();
            combo.setFocus();
            combo.addFocusListener(new FocusListener() {

              public void focusGained(FocusEvent e) {
              }

              public void focusLost(FocusEvent e) {
View Full Code Here

    combo.setToolTipText(Messages.getString(messagePrefix + "_hint")); //$NON-NLS-1$
    final ComboViewer comboViewer = new ComboViewer(combo);
   
    //Add Focus-Lost Listener so that the entered text gets converted to a IField and gets selected.
    //This way the databinding works
    combo.addFocusListener(new FocusListener() {

      private StringToFieldConverter converter = new StringToFieldConverter(null, comboViewer);     
     
      public void focusGained(FocusEvent e) {}
      public void focusLost(FocusEvent e) {
View Full Code Here

   
    final ComboViewer comboViewer = new ComboViewer(combo);
   
    //Add Focus-Lost Listener so that the entered text gets converted to a IMethod and gets selected.
    //This way the databinding works
    combo.addFocusListener(new FocusListener() {

      private StringToMethodConverter converter = new StringToMethodConverter(null, comboViewer);
     
      public void focusGained(FocusEvent e) {}
      public void focusLost(FocusEvent e) {
View Full Code Here

      data.top = new FormAttachment(0, VSPACE);
    } else {
      data.top = new FormAttachment(top, VSPACE);
    }
    combo.setLayoutData(data);
    combo.addFocusListener(listener);
    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.