Class ColorCellEditor
RBG).
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
Fields inherited from class org.eclipse.jface.viewers.DialogCellEditor
CELL_EDITOR_IMG_DOTS_BUTTONFields inherited from class org.eclipse.jface.viewers.CellEditor
COPY, CUT, DELETE, FIND, PASTE, REDO, SELECT_ALL, UNDO -
Constructor Summary
ConstructorsConstructorDescriptionColorCellEditor(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. -
Method Summary
Modifier and TypeMethodDescriptionprotected ControlcreateContents(Composite cell) Creates the controls used to show the value of this cell editor.voiddispose()Disposes of this cell editor and frees any associated SWT resources.protected ObjectopenDialogBox(Control cellEditorWindow) Opens a dialog box under the given parent control and returns the dialog's value when it closes, ornullif the dialog was canceled or no selection was made in the dialog.protected voidupdateContents(Object value) Updates the controls showing the value of this cell editor.Methods inherited from class org.eclipse.jface.viewers.DialogCellEditor
createButton, createControl, deactivate, doGetValue, doSetFocus, doSetValue, getDefaultLabelMethods inherited from class org.eclipse.jface.viewers.CellEditor
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
-
Constructor Details
-
ColorCellEditor
Creates a new color cell editor parented under the given control. The cell editor value is black (RGB(0,0,0)) initially, and has no validator.- Parameters:
parent- the parent control
-
ColorCellEditor
Creates a new color cell editor parented under the given control. The cell editor value is black (RGB(0,0,0)) initially, and has no validator.- Parameters:
parent- the parent controlstyle- the style bits- Since:
- 2.1
-
-
Method Details
-
createContents
Description copied from class:DialogCellEditorCreates the controls used to show the value of this cell editor.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.- Overrides:
createContentsin classDialogCellEditor- Parameters:
cell- the control for this cell editor- Returns:
- the underlying control
-
dispose
public void dispose()Description copied from class:CellEditorDisposes of this cell editor and frees any associated SWT resources.- Overrides:
disposein classCellEditor
-
openDialogBox
Description copied from class:DialogCellEditorOpens a dialog box under the given parent control and returns the dialog's value when it closes, ornullif 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.
- Specified by:
openDialogBoxin classDialogCellEditor- Parameters:
cellEditorWindow- the parent control cell editor's window so that a subclass can adjust the dialog box accordingly- Returns:
- the selected value, or
nullif the dialog was canceled or no selection was made in the dialog
-
updateContents
Description copied from class:DialogCellEditorUpdates the controls showing the value of this cell editor.The default implementation of this framework method just converts the passed object to a string using
toStringand sets this as the text of the label widget.Subclasses may reimplement. If you reimplement this method, you should also reimplement
createContents.- Overrides:
updateContentsin classDialogCellEditor- Parameters:
value- the new value of this cell editor
-