public abstract class EditingSupport extends Object
Constructor and Description |
---|
EditingSupport(ColumnViewer viewer) |
Modifier and Type | Method and Description |
---|---|
protected abstract boolean |
canEdit(Object element)
Is the cell editable
|
protected abstract CellEditor |
getCellEditor(Object element)
The editor to be shown
|
protected abstract Object |
getValue(Object element)
Get the value to set to the editor
|
ColumnViewer |
getViewer() |
protected void |
initializeCellEditorValue(CellEditor cellEditor,
ViewerCell cell)
Initialize the editor.
|
protected void |
saveCellEditorValue(CellEditor cellEditor,
ViewerCell cell)
Save the value of the cell editor back to the model.
|
protected abstract void |
setValue(Object element,
Object value)
Sets the new value on the given element.
|
public EditingSupport(ColumnViewer viewer)
viewer
- a new viewerprotected abstract CellEditor getCellEditor(Object element)
element
- the model elementprotected abstract boolean canEdit(Object element)
element
- the model elementprotected abstract Object getValue(Object element)
element
- the model elementprotected abstract void setValue(Object element, Object value)
getViewer().update(element, null)
or similar
methods are called, either directly or through some kind of listener
mechanism on the implementer's model, to cause the new value to appear in
the viewer.
Subclasses should overwrite.
element
- the model elementvalue
- the new valuepublic ColumnViewer getViewer()
protected void initializeCellEditorValue(CellEditor cellEditor, ViewerCell cell)
Standard customers should not overwrite this method but getValue(Object)
cellEditor
- the cell editorcell
- the cell the editor is working forprotected void saveCellEditorValue(CellEditor cellEditor, ViewerCell cell)
Standard customers should not overwrite this method but setValue(Object, Object)
cellEditor
- the cell-editorcell
- the cell the editor is working for
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.