public abstract class ColumnViewerEditor extends Object
TableViewerEditor
,
TreeViewerEditor
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT
Tabbing from cell to cell is turned off
|
static int |
KEEP_EDITOR_ON_DOUBLE_CLICK
Style mask used to turn off the feature that an editor activation
is canceled on double click.
|
static int |
KEYBOARD_ACTIVATION
Style mask used to enable keyboard activation
|
static int |
TABBING_CYCLE_IN_ROW
Should if the end of the row is reach started from the beginning in the
same row
|
static int |
TABBING_HORIZONTAL
Should tabbing from column to column with in one row be supported
|
static int |
TABBING_MOVE_TO_ROW_NEIGHBOR
Should if the end of the row is reach started from the start/end of the
row below/above
|
static int |
TABBING_VERTICAL
Support tabbing to Cell above/below the current cell
|
Modifier | Constructor and Description |
---|---|
protected |
ColumnViewerEditor(ColumnViewer viewer,
ColumnViewerEditorActivationStrategy editorActivationStrategy,
int feature) |
Modifier and Type | Method and Description |
---|---|
void |
addEditorActivationListener(ColumnViewerEditorActivationListener listener)
Adds the given listener, it is to be notified when the cell editor is
activated or deactivated.
|
ViewerCell |
getFocusCell() |
protected ColumnViewer |
getViewer() |
protected void |
processTraverseEvent(int columnIndex,
ViewerRow row,
TraverseEvent event)
Process the traverse event and opens the next available editor depending
of the implemented strategy.
|
void |
removeEditorActivationListener(ColumnViewerEditorActivationListener listener)
Removes the given listener.
|
protected abstract void |
setEditor(Control w,
Item item,
int fColumnNumber)
Position the editor inside the control
|
protected abstract void |
setLayoutData(CellEditor.LayoutData layoutData)
set the layout data for the editor
|
protected abstract void |
updateFocusCell(ViewerCell focusCell,
ColumnViewerEditorActivationEvent event) |
public static final int DEFAULT
public static final int TABBING_MOVE_TO_ROW_NEIGHBOR
public static final int TABBING_CYCLE_IN_ROW
public static final int TABBING_VERTICAL
public static final int TABBING_HORIZONTAL
public static final int KEYBOARD_ACTIVATION
public static final int KEEP_EDITOR_ON_DOUBLE_CLICK
CellEditor.getDoubleClickTimeout()
protected ColumnViewerEditor(ColumnViewer viewer, ColumnViewerEditorActivationStrategy editorActivationStrategy, int feature)
viewer
- the viewer this editor is attached toeditorActivationStrategy
- the strategy used to decide about editor activationfeature
- bit mask controlling the editor
public void addEditorActivationListener(ColumnViewerEditorActivationListener listener)
listener
- the listener to addpublic void removeEditorActivationListener(ColumnViewerEditorActivationListener listener)
listener
- the listener to removeprotected void processTraverseEvent(int columnIndex, ViewerRow row, TraverseEvent event)
Subclasses may overwrite to implement their custom logic to edit the next cell
columnIndex
- the index of the current columnrow
- the current row - may only be used for the duration of this
method callevent
- the traverse eventprotected abstract void setEditor(Control w, Item item, int fColumnNumber)
w
- the editor controlitem
- the item (row) in which the editor is drawn infColumnNumber
- the column number in which the editor is shownprotected abstract void setLayoutData(CellEditor.LayoutData layoutData)
layoutData
- the layout data used when editor is displayedprotected abstract void updateFocusCell(ViewerCell focusCell, ColumnViewerEditorActivationEvent event)
focusCell
- updates the cell with the current input focusevent
- the event requesting to update the focusCellpublic ViewerCell getFocusCell()
null
is
returnedprotected ColumnViewer getViewer()
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.