Package org.eclipse.jface.viewers
Class ComboBoxViewerCellEditor
java.lang.Object
org.eclipse.jface.viewers.CellEditor
org.eclipse.jface.viewers.ComboBoxViewerCellEditor
A cell editor that presents a list of items in a combo box. In contrast to
 
ComboBoxCellEditor it wraps the underlying CCombo using a
 ComboViewer- Since:
- 3.4
- 
Nested Class SummaryNested classes/interfaces inherited from class org.eclipse.jface.viewers.CellEditorCellEditor.LayoutData
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intThe list is dropped down when the activation is done through the keyboardstatic final intThe list is dropped down when the activation is done through the mousestatic final intThe list is dropped down when the activation is done without ui-interactionstatic final intThe list is dropped down when the activation is done by traversing from cell to cellFields inherited from class org.eclipse.jface.viewers.CellEditorCOPY, CUT, DELETE, FIND, PASTE, REDO, SELECT_ALL, UNDO
- 
Constructor SummaryConstructorsConstructorDescriptionComboBoxViewerCellEditor(Composite parent) Creates a new cell editor with a combo viewer and a default styleComboBoxViewerCellEditor(Composite parent, int style) Creates a new cell editor with a combo viewer and the given style
- 
Method SummaryModifier and TypeMethodDescriptionvoidactivate(ColumnViewerEditorActivationEvent activationEvent) Activate the editor but also inform the editor which event triggered its activation.protected ControlcreateControl(Composite parent) Creates the control for this cell editor under the given parent control.protected ObjectTheComboBoxCellEditorimplementation of thisCellEditorframework method returns the zero-based index of the current selection.protected voidSets the focus to the cell editor's control.protected voiddoSetValue(Object value) Set a new valueprotected voidProcesses a focus lost event that occurred in this cell editor.TheComboBoxCellEditorimplementation of thisCellEditorframework method sets the minimum width of the cell.protected voidkeyReleaseOccured(KeyEvent keyEvent) Processes a key release event that occurred in this cell editor.voidsetActivationStyle(int activationStyle) This method allows to control how the combo reacts when activatedvoidsetContenProvider(IStructuredContentProvider provider) Deprecated.voidsetContentProvider(IStructuredContentProvider provider) voidvoidsetLabelProvider(IBaseLabelProvider labelProvider) Methods inherited from class org.eclipse.jface.viewers.CellEditoractivate, 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, valueChanged
- 
Field Details- 
DROP_DOWN_ON_MOUSE_ACTIVATIONpublic static final int DROP_DOWN_ON_MOUSE_ACTIVATIONThe list is dropped down when the activation is done through the mouse- See Also:
 
- 
DROP_DOWN_ON_KEY_ACTIVATIONpublic static final int DROP_DOWN_ON_KEY_ACTIVATIONThe list is dropped down when the activation is done through the keyboard- See Also:
 
- 
DROP_DOWN_ON_PROGRAMMATIC_ACTIVATIONpublic static final int DROP_DOWN_ON_PROGRAMMATIC_ACTIVATIONThe list is dropped down when the activation is done without ui-interaction- See Also:
 
- 
DROP_DOWN_ON_TRAVERSE_ACTIVATIONpublic static final int DROP_DOWN_ON_TRAVERSE_ACTIVATIONThe list is dropped down when the activation is done by traversing from cell to cell- See Also:
 
 
- 
- 
Constructor Details- 
ComboBoxViewerCellEditorCreates a new cell editor with a combo viewer and a default style- Parameters:
- parent- the parent control
 
- 
ComboBoxViewerCellEditorCreates a new cell editor with a combo viewer and the given style- Parameters:
- parent- the parent control
- style- the style bits
 
 
- 
- 
Method Details- 
createControlDescription copied from class:CellEditorCreates the control for this cell editor under the given parent control.This framework method must be implemented by concrete subclasses. - Specified by:
- createControlin class- CellEditor
- Parameters:
- parent- the parent control
- Returns:
- the new control, or nullif this cell editor has no control
 
- 
doGetValueTheComboBoxCellEditorimplementation of thisCellEditorframework method returns the zero-based index of the current selection.- Specified by:
- doGetValuein class- CellEditor
- Returns:
- the zero-based index of the current selection wrapped as an
         Integer
- See Also:
 
- 
doSetFocusprotected void doSetFocus()Description copied from class:CellEditorSets the focus to the cell editor's control.This framework method must be implemented by concrete subclasses. - Specified by:
- doSetFocusin class- CellEditor
- See Also:
 
- 
getLayoutDataTheComboBoxCellEditorimplementation of thisCellEditorframework method sets the minimum width of the cell. The minimum width is 10 characters ifcomboBoxis notnullordisposedeles 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.- Overrides:
- getLayoutDatain class- CellEditor
- Returns:
- the layout data object
 
- 
doSetValueSet a new value- Specified by:
- doSetValuein class- CellEditor
- Parameters:
- value- the new value
- See Also:
 
- 
setLabelProvider- Parameters:
- labelProvider- the label provider used
- See Also:
 
- 
setContentProvider- Parameters:
- provider- the content provider used
- Since:
- 3.7
- See Also:
 
- 
setContenProviderDeprecated.As of 3.7, replaced bysetContentProvider(IStructuredContentProvider)- Parameters:
- provider- the content provider used
- See Also:
 
- 
setInput- Parameters:
- input- the input used
- See Also:
 
- 
getViewer- Returns:
- get the viewer
 
- 
focusLostprotected void focusLost()Description copied from class:CellEditorProcesses a focus lost event that occurred in this cell editor.The default implementation of this framework method applies the current value and deactivates the cell editor. Subclasses should call this method at appropriate times. Subclasses may also extend or reimplement. - Overrides:
- focusLostin class- CellEditor
 
- 
keyReleaseOccuredDescription copied from class:CellEditorProcesses a key release event that occurred in this cell editor.The default implementation of this framework method cancels editing when the ESC key is pressed. When the RETURN key is pressed the current value is applied and the cell editor deactivates. Subclasses should call this method at appropriate times. Subclasses may also extend or reimplement. - Overrides:
- keyReleaseOccuredin class- CellEditor
- Parameters:
- keyEvent- the key event
 
- 
activateDescription copied from class:CellEditorActivate the editor but also inform the editor which event triggered its activation. The default implementation simply callsCellEditor.activate()- Overrides:
- activatein class- CellEditor
- Parameters:
- activationEvent- the editor activation event
 
- 
setActivationStylepublic void setActivationStyle(int activationStyle) This method allows to control how the combo reacts when activated- Parameters:
- activationStyle- the style used
 
 
- 
setContentProvider(IStructuredContentProvider)