Package org.eclipse.jface.viewers
Class CheckboxCellEditor
java.lang.Object
org.eclipse.jface.viewers.CellEditor
org.eclipse.jface.viewers.CheckboxCellEditor
A cell editor that manages a checkbox.
The cell editor's value is a boolean.
This class may be instantiated; it is not intended to be subclassed.
Note that this implementation simply fakes it and does does not create
any new controls. The mere activation of this editor means that the value
of the check box is being toggled by the end users; the listener method
applyEditorValue is immediately called to signal the change.
-
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.CellEditor
COPY, CUT, DELETE, FIND, PASTE, REDO, SELECT_ALL, UNDO -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new checkbox cell editor with no controlCheckboxCellEditor(Composite parent) Creates a new checkbox cell editor parented under the given control.CheckboxCellEditor(Composite parent, int style) Creates a new checkbox cell editor parented under the given control. -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate()TheCheckboxCellEditorimplementation of thisCellEditorframework method simulates the toggling of the checkbox control and notifies listeners withICellEditorListener.applyEditorValue.voidactivate(ColumnViewerEditorActivationEvent activationEvent) Activate the editor but also inform the editor which event triggered its activation.protected ControlcreateControl(Composite parent) TheCheckboxCellEditorimplementation of thisCellEditorframework method does nothing and returnsnull.protected ObjectTheCheckboxCellEditorimplementation of thisCellEditorframework method returns the checkbox setting wrapped as aBoolean.protected voidSets the focus to the cell editor's control.protected voiddoSetValue(Object value) TheCheckboxCellEditorimplementation of thisCellEditorframework method accepts a value wrapped as aBoolean.Methods inherited from class org.eclipse.jface.viewers.CellEditor
addListener, addPropertyChangeListener, create, deactivate, 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
-
Constructor Details
-
CheckboxCellEditor
public CheckboxCellEditor()Creates a new checkbox cell editor with no control- Since:
- 2.1
-
CheckboxCellEditor
Creates a new checkbox cell editor parented under the given control. The cell editor value is a boolean value, which is initiallyfalse. Initially, the cell editor has no cell validator.- Parameters:
parent- the parent control
-
CheckboxCellEditor
Creates a new checkbox cell editor parented under the given control. The cell editor value is a boolean value, which is initiallyfalse. Initially, the cell editor has no cell validator.- Parameters:
parent- the parent controlstyle- the style bits- Since:
- 2.1
-
-
Method Details
-
activate
public void activate()TheCheckboxCellEditorimplementation of thisCellEditorframework method simulates the toggling of the checkbox control and notifies listeners withICellEditorListener.applyEditorValue.- Overrides:
activatein classCellEditor
-
createControl
TheCheckboxCellEditorimplementation of thisCellEditorframework method does nothing and returnsnull.- Specified by:
createControlin classCellEditor- Parameters:
parent- the parent control- Returns:
- the new control, or
nullif this cell editor has no control
-
doGetValue
TheCheckboxCellEditorimplementation of thisCellEditorframework method returns the checkbox setting wrapped as aBoolean.- Specified by:
doGetValuein classCellEditor- Returns:
- the Boolean checkbox value
- See Also:
-
doSetFocus
protected void doSetFocus()Description copied from class:CellEditorSets the focus to the cell editor's control.This framework method must be implemented by concrete subclasses.
- Specified by:
doSetFocusin classCellEditor- See Also:
-
doSetValue
TheCheckboxCellEditorimplementation of thisCellEditorframework method accepts a value wrapped as aBoolean.- Specified by:
doSetValuein classCellEditor- Parameters:
value- a Boolean value- See Also:
-
activate
Description copied from class:CellEditorActivate the editor but also inform the editor which event triggered its activation. The default implementation simply callsCellEditor.activate()- Overrides:
activatein classCellEditor- Parameters:
activationEvent- the editor activation event
-