public class CComboBoxCellEditor
extends org.eclipse.jface.viewers.CellEditor
| Modifier and Type | Field and Description |
|---|---|
protected org.eclipse.swt.custom.CCombo |
comboBox
The custom combo box control.
|
protected Object |
selection
The the selected item.
|
protected CComboViewer |
viewer
The combo box viewer
|
| Constructor and Description |
|---|
CComboBoxCellEditor()
Creates a new cell editor with no control and no st of choices.
|
CComboBoxCellEditor(org.eclipse.swt.widgets.Composite parent,
org.eclipse.jface.viewers.ILabelProvider labelProvider,
org.eclipse.jface.viewers.IContentProvider contentProvider,
int style)
Creates a new cell editor with a combo containing the given list of
choices and parented under the given control.
|
CComboBoxCellEditor(org.eclipse.swt.widgets.Composite parent,
Object[] items,
org.eclipse.jface.viewers.IBaseLabelProvider labelProvider,
int style)
Creates a new cell editor with a combo containing the given list of
choices and parented under the given control.
|
| Modifier and Type | Method and Description |
|---|---|
protected org.eclipse.swt.widgets.Control |
createControl(org.eclipse.swt.widgets.Composite parent) |
protected org.eclipse.swt.events.FocusListener |
createFocusListener() |
protected Object |
doGetValue()
The
ComboBoxCellEditor implementation of this
CellEditor framework method returns 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() |
Object[] |
getItems()
Returns the list of choices for the combo box
|
org.eclipse.jface.viewers.CellEditor.LayoutData |
getLayoutData()
The
ComboBoxCellEditor implementation of this
CellEditor framework method sets the minimum width of the
cell. |
protected void |
keyReleaseOccured(org.eclipse.swt.events.KeyEvent keyEvent) |
protected void |
selectionChanged() |
void |
setContentProvider(org.eclipse.jface.viewers.IContentProvider contentProvider) |
void |
setInput(Object input)
Sets the list of choices for the combo box
|
void |
setItems(Object[] items)
Sets the list of choices for the combo box
|
void |
setLabelProvider(org.eclipse.jface.viewers.IBaseLabelProvider labelProvider) |
void |
setViewerComparator(org.eclipse.jface.viewers.ViewerComparator viewerComparator) |
activate, activate, addListener, addPropertyChangeListener, create, deactivate, deactivate, dependsOnExternalFocusListener, dispose, fireApplyEditorValue, fireCancelEditor, fireEditorValueChanged, fireEnablementChanged, getControl, getDoubleClickTimeout, getErrorMessage, getStyle, getValidator, getValue, isActivated, isCopyEnabled, isCorrect, isCutEnabled, isDeleteEnabled, isDirty, isFindEnabled, isPasteEnabled, isRedoEnabled, isSelectAllEnabled, isUndoEnabled, isValueValid, markDirty, performCopy, performCut, performDelete, performFind, performPaste, performRedo, performSelectAll, performUndo, removeListener, removePropertyChangeListener, setErrorMessage, setFocus, setStyle, setValidator, setValue, setValueValid, valueChangedprotected Object selection
protected org.eclipse.swt.custom.CCombo comboBox
protected CComboViewer viewer
public CComboBoxCellEditor()
CellEditor.setStyle(int),
CellEditor.create(org.eclipse.swt.widgets.Composite),
setItems(java.lang.Object[]),
CellEditor.dispose()public CComboBoxCellEditor(org.eclipse.swt.widgets.Composite parent,
Object[] items,
org.eclipse.jface.viewers.IBaseLabelProvider labelProvider,
int style)
parent - the parent controlitems - the list of strings for the combo boxlabelProvider - the label provider of the comboviewerstyle - the style bitspublic CComboBoxCellEditor(org.eclipse.swt.widgets.Composite parent,
org.eclipse.jface.viewers.ILabelProvider labelProvider,
org.eclipse.jface.viewers.IContentProvider contentProvider,
int style)
parent - the parent controlitems - the list of strings for the combo boxstyle - the style bitspublic Object[] getItems()
public void setItems(Object[] items)
items - the list of choices for the combo boxpublic void setInput(Object input)
items - the list of choices for the combo boxprotected org.eclipse.swt.events.FocusListener createFocusListener()
protected org.eclipse.swt.widgets.Control createControl(org.eclipse.swt.widgets.Composite parent)
createControl in class org.eclipse.jface.viewers.CellEditorprotected void selectionChanged()
public void setLabelProvider(org.eclipse.jface.viewers.IBaseLabelProvider labelProvider)
public void setContentProvider(org.eclipse.jface.viewers.IContentProvider contentProvider)
public void setViewerComparator(org.eclipse.jface.viewers.ViewerComparator viewerComparator)
protected Object doGetValue()
ComboBoxCellEditor implementation of this
CellEditor framework method returns the current selection.doGetValue in class org.eclipse.jface.viewers.CellEditorprotected void doSetFocus()
doSetFocus in class org.eclipse.jface.viewers.CellEditorpublic org.eclipse.jface.viewers.CellEditor.LayoutData getLayoutData()
ComboBoxCellEditor 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.getLayoutData in class org.eclipse.jface.viewers.CellEditorprotected void doSetValue(Object value)
ComboBoxCellEditor implementation of this
CellEditor framework method accepts a zero-based index of
a selection.doSetValue in class org.eclipse.jface.viewers.CellEditorvalue - the zero-based index of the selection wrapped as an
Integerprotected void focusLost()
focusLost in class org.eclipse.jface.viewers.CellEditorprotected void keyReleaseOccured(org.eclipse.swt.events.KeyEvent keyEvent)
keyReleaseOccured in class org.eclipse.jface.viewers.CellEditorCopyright © 2022 Fraunhofer IWU. All rights reserved.