public class ComboDialogCellEditor
extends org.eclipse.jface.viewers.CellEditor
Initially focus will be on the combo. On tabbing focus will be on button. Dialog will be opened, if the focus is on the button and when return is pressed. On tabbing the button focus will shift to next cell.
Dialog to be opened must be coded in the selection listener of the button. The value to be set to the text from dialog if any must be set using setTextValue method.
Do not instantiate or extend this class. Use CellEditorFactory to instantiate this class.
Modifier and Type | Field and Description |
---|---|
static java.lang.String | COPYRIGHT
IBM copyright notice field
|
Modifier and Type | Method and Description |
---|---|
protected org.eclipse.swt.widgets.Control | createControl(org.eclipse.swt.widgets.Composite parent)
This method creates the control for this cell editor under the given parent control.
|
protected java.lang.Object | doGetValue()
The ComboDialogCellEditor 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 combo control.
|
protected void | doSetValue(java.lang.Object value)
The ComboDialogCellEditor implementation of this CellEditor framework method accepts a zero-based index of a selection.
|
protected void | focusLost()
This method processes a focus lost event that occurred in this cell editor.
|
org.eclipse.swt.widgets.Button | getButton()
This method returns the button control in the editor composite.
|
org.eclipse.swt.graphics.Image | getButtonImage()
This method returns the button display image.
|
java.lang.String | getButtonText()
This method returns button display text.
|
org.eclipse.swt.widgets.Combo | getCombo()
This method returns the combo control in the editor composite.
|
org.eclipse.jface.dialogs.Dialog | getDialog()
This method returns the dialog that will be shown when button is selected.
|
java.lang.String[] | getItems()
This method returns the list of choices for the combo box
|
org.eclipse.jface.viewers.CellEditor.LayoutData | getLayoutData()
The ComboDialogCellEditor implementation of this CellEditor framework method sets the minimum width of the cell to fit the text and the arrow.
|
java.lang.String[] | getValues()
This method returns the list of values for the combo box
|
protected void | keyReleaseOccured(org.eclipse.swt.events.KeyEvent keyEvent)
This method processes a key release event that occurred in this cell editor.
|
void | setButtonImage(org.eclipse.swt.graphics.Image image)
This method sets the button display image.
|
void | setButtonText(java.lang.String text)
This method sets the button display text.
|
void | setDialog(org.eclipse.jface.dialogs.Dialog inputDialog)
This method sets the dialog that will be shown when the button is selected.
|
void | setItems(java.lang.String[] items)
This method sets the list of choices for the combo box
|
void | setTextValue(java.lang.Object newValue)
This method must be used by the caller to set the item on to the combo box.
|
void | setValues(java.lang.String[] keyValues)
This method sets the list of values for the combo box
|
public static final java.lang.String COPYRIGHT
public java.lang.String[] getItems()
public void setItems(java.lang.String[] items)
public java.lang.String[] getValues()
public void setValues(java.lang.String[] keyValues)
protected org.eclipse.swt.widgets.Control createControl(org.eclipse.swt.widgets.Composite parent)
protected java.lang.Object doGetValue()
protected void doSetFocus()
protected void doSetValue(java.lang.Object value)
public org.eclipse.jface.viewers.CellEditor.LayoutData getLayoutData()
public void setButtonImage(org.eclipse.swt.graphics.Image image)
public void setButtonText(java.lang.String text)
public org.eclipse.swt.graphics.Image getButtonImage()
public java.lang.String getButtonText()
public void setTextValue(java.lang.Object newValue)
public org.eclipse.swt.widgets.Combo getCombo()
public org.eclipse.swt.widgets.Button getButton()
public void setDialog(org.eclipse.jface.dialogs.Dialog inputDialog)
public org.eclipse.jface.dialogs.Dialog getDialog()
protected void focusLost()
This implementation applies the current value and deactivates the cell editor.
protected void keyReleaseOccured(org.eclipse.swt.events.KeyEvent keyEvent)
This implementation of this framework method cancels editing when the ESC key is pressed.