큐브리드2012.05.14 19:16

TableViewerFocusCellManager tvFocusCellManager = new TableViewerFocusCellManager(tableViewer,
    new FocusCellOwnerDrawHighlighter(tableViewer));

ColumnViewerEditorActivationStrategy cveaStrategy = new ColumnViewerEditorActivationStrategy(tableViewer) {
    protected boolean isEditorActivationEvent(ColumnViewerEditorActivationEvent event) {
    return event.eventType == ColumnViewerEditorActivationEvent.TRAVERSAL
        || event.eventType == ColumnViewerEditorActivationEvent.MOUSE_DOUBLE_CLICK_SELECTION
        || (event.eventType == ColumnViewerEditorActivationEvent.KEY_PRESSED && event.keyCode == SWT.CR)
        || event.eventType == ColumnViewerEditorActivationEvent.PROGRAMMATIC;
    }
};

TableViewerEditor.create(tableViewer, tvFocusCellManager, cveaStrategy, ColumnViewerEditor.TABBING_HORIZONTAL
    | ColumnViewerEditor.TABBING_MOVE_TO_ROW_NEIGHBOR | ColumnViewerEditor.TABBING_VERTICAL
    | ColumnViewerEditor.KEYBOARD_ACTIVATION);

Posted by 종이비행기

티스토리 툴바