public class ColorCellEditor extends DialogCellEditor
RBG
).
This class may be instantiated; it is not intended to be subclassed.
CellEditor.LayoutData
CELL_EDITOR_IMG_DOTS_BUTTON
COPY, CUT, DELETE, FIND, PASTE, REDO, SELECT_ALL, UNDO
Constructor and Description |
---|
ColorCellEditor(Composite parent)
Creates a new color cell editor parented under the given control.
|
ColorCellEditor(Composite parent,
int style)
Creates a new color cell editor parented under the given control.
|
Modifier and Type | Method and Description |
---|---|
protected Control |
createContents(Composite cell)
Creates the controls used to show the value of this cell editor.
|
void |
dispose()
Disposes of this cell editor and frees any associated SWT resources.
|
protected 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.
|
createButton, createControl, deactivate, doGetValue, doSetFocus, doSetValue, getDefaultLabel
activate, activate, addListener, addPropertyChangeListener, create, deactivate, dependsOnExternalFocusListener, 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 ColorCellEditor(Composite parent)
RGB(0,0,0)
) initially, and has no
validator.parent
- the parent controlpublic ColorCellEditor(Composite parent, int style)
RGB(0,0,0)
) initially, and has no
validator.parent
- the parent controlstyle
- the style bitsprotected Control createContents(Composite cell)
DialogCellEditor
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
.
createContents
in class DialogCellEditor
cell
- the control for this cell editorpublic void dispose()
CellEditor
dispose
in class CellEditor
protected Object openDialogBox(Control cellEditorWindow)
DialogCellEditor
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.
openDialogBox
in class DialogCellEditor
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)
DialogCellEditor
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
.
updateContents
in class DialogCellEditor
value
- the new value of this cell editor
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.