|
Eclipse Platform Release 3.7 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.jface.viewers.CellEditor
org.eclipse.jface.viewers.ComboBoxCellEditor
public class ComboBoxCellEditor
A cell editor that presents a list of items in a combo box. 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.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.eclipse.jface.viewers.CellEditor |
|---|
CellEditor.LayoutData |
| Field Summary | |
|---|---|
static int |
DROP_DOWN_ON_KEY_ACTIVATION
The list is dropped down when the activation is done through the keyboard |
static int |
DROP_DOWN_ON_MOUSE_ACTIVATION
The list is dropped down when the activation is done through the mouse |
static int |
DROP_DOWN_ON_PROGRAMMATIC_ACTIVATION
The list is dropped down when the activation is done without ui-interaction |
static int |
DROP_DOWN_ON_TRAVERSE_ACTIVATION
The list is dropped down when the activation is done by traversing from cell to cell |
| Fields inherited from class org.eclipse.jface.viewers.CellEditor |
|---|
COPY, CUT, DELETE, FIND, PASTE, REDO, SELECT_ALL, UNDO |
| Constructor Summary | |
|---|---|
ComboBoxCellEditor()
Creates a new cell editor with no control and no st of choices. |
|
ComboBoxCellEditor(Composite parent,
String[] items)
Creates a new cell editor with a combo containing the given list of choices and parented under the given control. |
|
ComboBoxCellEditor(Composite parent,
String[] items,
int style)
Creates a new cell editor with a combo containing the given list of choices and parented under the given control. |
|
| Method Summary | |
|---|---|
void |
activate(ColumnViewerEditorActivationEvent activationEvent)
Activate the editor but also inform the editor which event triggered its activation. |
protected Control |
createControl(Composite parent)
Creates the control for this cell editor under the given parent control. |
protected Object |
doGetValue()
The ComboBoxCellEditor implementation of this
CellEditor framework method returns the zero-based index
of the current selection. |
protected void |
doSetFocus()
Sets the focus to the cell editor's control. |
protected void |
doSetValue(Object value)
The ComboBoxCellEditor implementation of this
CellEditor framework method accepts a zero-based index of
a selection. |
protected void |
focusLost()
Processes a focus lost event that occurred in this cell editor. |
String[] |
getItems()
Returns the list of choices for the combo box |
CellEditor.LayoutData |
getLayoutData()
The ComboBoxCellEditor implementation of this
CellEditor framework method sets the minimum width of the
cell. |
protected void |
keyReleaseOccured(KeyEvent keyEvent)
Processes a key release event that occurred in this cell editor. |
void |
setActivationStyle(int activationStyle)
This method allows to control how the combo reacts when activated |
void |
setItems(String[] items)
Sets the list of choices for the combo box |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int DROP_DOWN_ON_MOUSE_ACTIVATION
public static final int DROP_DOWN_ON_KEY_ACTIVATION
public static final int DROP_DOWN_ON_PROGRAMMATIC_ACTIVATION
public static final int DROP_DOWN_ON_TRAVERSE_ACTIVATION
| Constructor Detail |
|---|
public ComboBoxCellEditor()
CellEditor.setStyle(int),
CellEditor.create(org.eclipse.swt.widgets.Composite),
setItems(java.lang.String[]),
CellEditor.dispose()
public ComboBoxCellEditor(Composite parent,
String[] items)
parent - the parent controlitems - the list of strings for the combo box
public ComboBoxCellEditor(Composite parent,
String[] items,
int style)
parent - the parent controlitems - the list of strings for the combo boxstyle - the style bits| Method Detail |
|---|
public String[] getItems()
public void setItems(String[] items)
items - the list of choices for the combo boxprotected Control createControl(Composite parent)
CellEditorThis framework method must be implemented by concrete subclasses.
createControl in class CellEditorparent - the parent control
null if this cell editor has
no controlprotected Object doGetValue()
ComboBoxCellEditor implementation of this
CellEditor framework method returns the zero-based index
of the current selection.
doGetValue in class CellEditorIntegerCellEditor.getValue()protected void doSetFocus()
CellEditorThis framework method must be implemented by concrete subclasses.
doSetFocus in class CellEditorCellEditor.setFocus()public 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 else 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 CellEditorprotected void doSetValue(Object value)
ComboBoxCellEditor implementation of this
CellEditor framework method accepts a zero-based index of
a selection.
doSetValue in class CellEditorvalue - the zero-based index of the selection wrapped as an
IntegerCellEditor.setValue(java.lang.Object)protected void focusLost()
CellEditorThe 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.
focusLost in class CellEditorprotected void keyReleaseOccured(KeyEvent keyEvent)
CellEditorThe 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.
keyReleaseOccured in class CellEditorkeyEvent - the key eventpublic void activate(ColumnViewerEditorActivationEvent activationEvent)
CellEditorCellEditor.activate()
activate in class CellEditoractivationEvent - the editor activation eventpublic void setActivationStyle(int activationStyle)
activationStyle - the style used
|
Eclipse Platform Release 3.7 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2011. All rights reserved.