/** * Create a customized editor whose activation process is customized * * @param viewer * the viewer the editor is created for * @param editorActivationStrategy * activation strategy to control if an editor activated * @param feature * bit mask controlling the editor * <ul> * <li>{@link ColumnViewerEditor#DEFAULT}</li> * <li>{@link ColumnViewerEditor#TABBING_CYCLE_IN_ROW}</li> * <li>{@link ColumnViewerEditor#TABBING_HORIZONTAL}</li> * <li>{@link ColumnViewerEditor#TABBING_MOVE_TO_ROW_NEIGHBOR}</li> * <li>{@link ColumnViewerEditor#TABBING_VERTICAL}</li> * </ul> */ public static void create(TableViewer viewer, ColumnViewerEditorActivationStrategy editorActivationStrategy, int feature) { create(viewer, null, editorActivationStrategy, feature); }
@Override protected ColumnViewerEditor createViewerEditor() { return new TableViewerEditor(this, null, new ColumnViewerEditorActivationStrategy(this), ColumnViewerEditor.DEFAULT); }
protected void updateFocusCell(ViewerCell focusCell, ColumnViewerEditorActivationEvent event) { // Update the focus cell when we activated the editor with these 2 // events if (event.eventType == ColumnViewerEditorActivationEvent.PROGRAMMATIC || event.eventType == ColumnViewerEditorActivationEvent.TRAVERSAL) { List l = getViewer().getSelectionFromWidget(); if (!l.contains(focusCell.getElement())) { getViewer().setSelection( new StructuredSelection(focusCell.getElement()),true); } // Set the focus cell after the selection is updated because else // the cell is not scrolled into view if (focusCellManager != null) { focusCellManager.setFocusCell(focusCell); } } } }
@Override protected ColumnViewerEditor createViewerEditor() { return new TableViewerEditor(this, null, new ColumnViewerEditorActivationStrategy(this), ColumnViewerEditor.DEFAULT); }
@Override protected void updateFocusCell(ViewerCell focusCell, ColumnViewerEditorActivationEvent event) { // Update the focus cell when we activated the editor with these 2 // events if (event.eventType == ColumnViewerEditorActivationEvent.PROGRAMMATIC || event.eventType == ColumnViewerEditorActivationEvent.TRAVERSAL) { List l = getViewer().getSelectionFromWidget(); if (!l.contains(focusCell.getElement())) { getViewer().setSelection( new StructuredSelection(focusCell.getElement()), true); } // Set the focus cell after the selection is updated because else // the cell is not scrolled into view if (focusCellManager != null) { focusCellManager.setFocusCell(focusCell); } } } }
/** * Create a customized editor whose activation process is customized * * @param viewer * the viewer the editor is created for * @param editorActivationStrategy * activation strategy to control if an editor activated * @param feature * bit mask controlling the editor * <ul> * <li>{@link ColumnViewerEditor#DEFAULT}</li> * <li>{@link ColumnViewerEditor#TABBING_CYCLE_IN_ROW}</li> * <li>{@link ColumnViewerEditor#TABBING_HORIZONTAL}</li> * <li>{@link ColumnViewerEditor#TABBING_MOVE_TO_ROW_NEIGHBOR}</li> * <li>{@link ColumnViewerEditor#TABBING_VERTICAL}</li> * </ul> */ public static void create(TableViewer viewer, ColumnViewerEditorActivationStrategy editorActivationStrategy, int feature) { create(viewer, null, editorActivationStrategy, feature); }
protected ColumnViewerEditor createViewerEditor() { return new TableViewerEditor(this, null, new ColumnViewerEditorActivationStrategy(this), ColumnViewerEditor.DEFAULT); }
@Override protected void updateFocusCell(ViewerCell focusCell, ColumnViewerEditorActivationEvent event) { // Update the focus cell when we activated the editor with these 2 // events if (event.eventType == ColumnViewerEditorActivationEvent.PROGRAMMATIC || event.eventType == ColumnViewerEditorActivationEvent.TRAVERSAL) { List l = getViewer().getSelectionFromWidget(); if (!l.contains(focusCell.getElement())) { getViewer().setSelection( new StructuredSelection(focusCell.getElement()), true); } // Set the focus cell after the selection is updated because else // the cell is not scrolled into view if (focusCellManager != null) { focusCellManager.setFocusCell(focusCell); } } } }
/** * Create a customized editor whose activation process is customized * * @param viewer * the viewer the editor is created for * @param editorActivationStrategy * activation strategy to control if an editor activated * @param feature * bit mask controlling the editor * <ul> * <li>{@link ColumnViewerEditor#DEFAULT}</li> * <li>{@link ColumnViewerEditor#TABBING_CYCLE_IN_ROW}</li> * <li>{@link ColumnViewerEditor#TABBING_HORIZONTAL}</li> * <li>{@link ColumnViewerEditor#TABBING_MOVE_TO_ROW_NEIGHBOR}</li> * <li>{@link ColumnViewerEditor#TABBING_VERTICAL}</li> * </ul> */ public static void create(TableViewer viewer, ColumnViewerEditorActivationStrategy editorActivationStrategy, int feature) { create(viewer, null, editorActivationStrategy, feature); }
ColumnViewerEditorActivationStrategy editorActivationStrategy, int feature) { TableViewerEditor editor = new TableViewerEditor(viewer, focusCellManager, editorActivationStrategy, feature); viewer.setColumnViewerEditor(editor);
| ColumnViewerEditor.KEYBOARD_ACTIVATION | ColumnViewerEditor.KEEP_EDITOR_ON_DOUBLE_CLICK; TableViewerEditor.create(propertiesViewer, focusCellMgr, actSupport, features);
ColumnViewerEditorActivationStrategy editorActivationStrategy, int feature) { TableViewerEditor editor = new TableViewerEditor(viewer, focusCellManager, editorActivationStrategy, feature); viewer.setColumnViewerEditor(editor);
ColumnViewerEditorActivationStrategy editorActivationStrategy, int feature) { TableViewerEditor editor = new TableViewerEditor(viewer, focusCellManager, editorActivationStrategy, feature); viewer.setColumnViewerEditor(editor);