public abstract class DialogCellEditor extends CellEditor
Subclasses may override the following methods:
createButton
: creates the cell editor's button controlcreateContents
: creates the cell editor's 'display value' controlupdateContents
: updates the cell editor's 'display value' control
after its value has changedopenDialogBox
: opens the dialog box when the end user presses
the buttonCellEditor.LayoutData
Modifier and Type | Field and Description |
---|---|
static String |
CELL_EDITOR_IMG_DOTS_BUTTON
Image registry key for three dot image (value
"cell_editor_dots_button_image" ). |
COPY, CUT, DELETE, FIND, PASTE, REDO, SELECT_ALL, UNDO
Modifier | Constructor and Description |
---|---|
|
DialogCellEditor()
Creates a new dialog cell editor with no control
|
protected |
DialogCellEditor(Composite parent)
Creates a new dialog cell editor parented under the given control.
|
protected |
DialogCellEditor(Composite parent,
int style)
Creates a new dialog cell editor parented under the given control.
|
Modifier and Type | Method and Description |
---|---|
protected Button |
createButton(Composite parent)
Creates the button for this cell editor under the given parent control.
|
protected Control |
createContents(Composite cell)
Creates the controls used to show the value of this cell editor.
|
protected Control |
createControl(Composite parent)
Creates the control for this cell editor under the given parent control.
|
void |
deactivate()
Hides this cell editor's control.
|
protected Object |
doGetValue()
Returns this cell editor's value.
|
protected void |
doSetFocus()
Sets the focus to the cell editor's control.
|
protected void |
doSetValue(Object value)
Sets this cell editor's value.
|
protected Label |
getDefaultLabel()
Returns the default label widget created by
createContents . |
protected abstract Object |
openDialogBox(Control cellEditorWindow)
Opens a dialog box under the given parent control and returns the
dialog's value when it closes, or
null if the dialog
was canceled or no selection was made in the dialog. |
protected void |
updateContents(Object value)
Updates the controls showing the value of this cell editor.
|
activate, activate, addListener, addPropertyChangeListener, create, deactivate, dependsOnExternalFocusListener, dispose, fireApplyEditorValue, fireCancelEditor, fireEditorValueChanged, fireEnablementChanged, focusLost, getControl, getDoubleClickTimeout, getErrorMessage, getLayoutData, getStyle, getValidator, getValue, isActivated, isCopyEnabled, isCorrect, isCutEnabled, isDeleteEnabled, isDirty, isFindEnabled, isPasteEnabled, isRedoEnabled, isSelectAllEnabled, isUndoEnabled, isValueValid, keyReleaseOccured, markDirty, performCopy, performCut, performDelete, performFind, performPaste, performRedo, performSelectAll, performUndo, removeListener, removePropertyChangeListener, setErrorMessage, setFocus, setStyle, setValidator, setValue, setValueValid, valueChanged
public static final String CELL_EDITOR_IMG_DOTS_BUTTON
"cell_editor_dots_button_image"
).public DialogCellEditor()
protected DialogCellEditor(Composite parent)
null
initially, and has no
validator.parent
- the parent controlprotected DialogCellEditor(Composite parent, int style)
null
initially, and has no
validator.parent
- the parent controlstyle
- the style bitsprotected Button createButton(Composite parent)
The default implementation of this framework method creates the button display on the right hand side of the dialog cell editor. Subclasses may extend or reimplement.
parent
- the parent controlprotected Control createContents(Composite cell)
The default implementation of this framework method creates a label widget, using the same font and background color as the parent control.
Subclasses may reimplement. If you reimplement this method, you
should also reimplement updateContents
.
cell
- the control for this cell editorprotected Control createControl(Composite parent)
CellEditor
This framework method must be implemented by concrete subclasses.
createControl
in class CellEditor
parent
- the parent controlnull
if this cell editor has
no controlpublic void deactivate()
CellEditor
deactivate
in class CellEditor
protected Object doGetValue()
CellEditor
This framework method must be implemented by concrete subclasses.
doGetValue
in class CellEditor
CellEditor.getValue()
protected void doSetFocus()
CellEditor
This framework method must be implemented by concrete subclasses.
doSetFocus
in class CellEditor
CellEditor.setFocus()
protected void doSetValue(Object value)
CellEditor
This framework method must be implemented by concrete subclasses.
doSetValue
in class CellEditor
value
- the value of this cell editorCellEditor.setValue(java.lang.Object)
protected Label getDefaultLabel()
createContents
.protected abstract Object openDialogBox(Control cellEditorWindow)
null
if the dialog
was canceled or no selection was made in the dialog.
This framework method must be implemented by concrete subclasses. It is called when the user has pressed the button and the dialog box must pop up.
cellEditorWindow
- the parent control cell editor's window
so that a subclass can adjust the dialog box accordinglynull
if the dialog was
canceled or no selection was made in the dialogprotected void updateContents(Object value)
The default implementation of this framework method just converts
the passed object to a string using toString
and
sets this as the text of the label widget.
Subclasses may reimplement. If you reimplement this method, you
should also reimplement createContents
.
value
- the new value of this cell editor
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.