com.swtdesigner.api.swt.property.editor
Interface IComboPropertyEditor

All Superinterfaces:
IPropertyEditor

public interface IComboPropertyEditor
extends IPropertyEditor

Property editor that uses combo box as property editor control. Events flow on property editor activation is following:

  1. Designer calls setValue(value)
  2. Designer calls getText().
  3. Designer calls getItems().
  4. Designer creates combo box and fills it with text and items.
  5. User selects some item in combo box.
  6. Designer calls setSelection(index, text).
  7. Designer calls getValue() to access new value.


Method Summary
 java.lang.String[] getItems()
          Returns array of items to show in combo box.
 java.lang.String getText()
          Returns text to show in combo box.
 void setSelection(int index, java.lang.String text)
          When user changes selection in combo box, Designer will notify editor about this.
You can use index or text to handle selection.
 
Methods inherited from interface com.swtdesigner.api.swt.property.editor.IPropertyEditor
getJavaSource, getValue, initialize, setValue
 

Method Detail

getItems

java.lang.String[] getItems()
Returns array of items to show in combo box.


getText

java.lang.String getText()
Returns text to show in combo box.


setSelection

void setSelection(int index,
                  java.lang.String text)
When user changes selection in combo box, Designer will notify editor about this.
You can use index or text to handle selection. If user removes value of property, for example presses DEL, index is -1 and text is null.

Parameters:
index - the index of selected item
text - the text of selected item