| |
|
| gui.section.StringComboBoxCellEditor
StringComboBoxCellEditor | public class StringComboBoxCellEditor extends CellEditor (Code) | | A cell editor that presents a list of items in a combo box
and allows to edit the content of the editor.
The cell editor's value is the zero-based index of the selected
item.
This class may be instantiated; it is not intended to be subclassed.
|
Field Summary | |
protected CCombo | comboBox The custom combo box control. | protected String[] | items The list of items to present in the combo box. |
Method Summary | |
protected Control | createControl(Composite parent) | protected Object | doGetValue() The ComboBoxCellEditor implementation of
this CellEditor framework method returns
the zero-based index of the current selection. | protected void | doSetFocus() | protected void | doSetValue(Object value) The ComboBoxCellEditor implementation of
this CellEditor framework method
accepts a zero-based index of a selection. | protected void | focusLost() | public String[] | getItems() | public LayoutData | getLayoutData() method getLayoutData ( overwriting method )
The StringComboBoxCellEditor implementation of
this CellEditor framework method sets the
minimum width of the cell. | protected void | keyReleaseOccured(KeyEvent keyEvent) | public void | setItems(String[] items) |
comboBox | protected CCombo comboBox(Code) | | The custom combo box control.
|
items | protected String[] items(Code) | | The list of items to present in the combo box.
|
StringComboBoxCellEditor | public StringComboBoxCellEditor(Composite parent, String[] items)(Code) | | Creates a new cell editor with a combo containing the given
list of choices and parented under the given control. The cell
editor value is the zero-based index of the selected item.
Initially, the cell editor has no cell validator and
the first item in the list is selected.
Parameters: parent - the parent control Parameters: items - the list of strings for the combo box |
StringComboBoxCellEditor | public StringComboBoxCellEditor(Composite parent, String[] items, int style)(Code) | | Creates a new cell editor with a combo containing the given
list of choices and parented under the given control. The cell
editor value is the zero-based index of the selected item.
Initially, the cell editor has no cell validator and
the first item in the list is selected.
Parameters: parent - the parent control Parameters: items - the list of strings for the combo box Parameters: style - the style bits since: 2.1 |
StringComboBoxCellEditor | public StringComboBoxCellEditor(Composite parent)(Code) | | |
createControl | protected Control createControl(Composite parent)(Code) | | |
doGetValue | protected Object doGetValue()(Code) | | The ComboBoxCellEditor implementation of
this CellEditor framework method returns
the zero-based index of the current selection.
the zero-based index of the current selection wrappedas an Integer |
doSetFocus | protected void doSetFocus()(Code) | | |
doSetValue | protected void doSetValue(Object value)(Code) | | The ComboBoxCellEditor implementation of
this CellEditor framework method
accepts a zero-based index of a selection.
Parameters: value - the zero-based index of the selection wrappedas an Integer |
focusLost | protected void focusLost()(Code) | | |
getItems | public String[] getItems()(Code) | | Returns the list of choices for the combo box
the list of choices for the combo box |
getLayoutData | public LayoutData getLayoutData()(Code) | | method getLayoutData ( overwriting method )
The StringComboBoxCellEditor implementation of
this CellEditor framework method sets the
minimum width of the cell. The minimum width is 10 characters
if comboBox is not null or disposed
eles it is 60 pixels to make sure the arrow button and some text is visible.
The list of CCombo will be wide enough to show its longest item.
Import are the grabHorizontal and the horizontalAlignment settings, because
so you can control, that the button for dropdownbox is at the right corner
of your parent composite. In the CellEditor implementation it would be outside
the parent control (as wide as the longest item in the dropdown list.
|
keyReleaseOccured | protected void keyReleaseOccured(KeyEvent keyEvent)(Code) | | |
setItems | public void setItems(String[] items)(Code) | | Sets the list of choices for the combo box
Parameters: items - the list of choices for the combo box |
|
|
|