Java Code Examples for org.eclipse.nebula.widgets.grid.Grid#setFocusColumn()
The following examples show how to use
org.eclipse.nebula.widgets.grid.Grid#setFocusColumn() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: GridViewerEditor.java From nebula with Eclipse Public License 2.0 | 6 votes |
/** * {@inheritDoc} */ @Override protected void updateFocusCell(ViewerCell focusCell, ColumnViewerEditorActivationEvent event) { Grid grid = ((Grid)getViewer().getControl()); if (event.eventType == ColumnViewerEditorActivationEvent.PROGRAMMATIC || event.eventType == ColumnViewerEditorActivationEvent.TRAVERSAL) { grid.setFocusColumn(grid.getColumn(focusCell.getColumnIndex())); grid.setFocusItem((GridItem) focusCell.getItem()); if( selectionFollowsEditor ) { grid.setCellSelection(new Point(focusCell.getColumnIndex(),((GridItem)focusCell.getItem()).getRowIndex())); } } grid.showColumn(grid.getColumn(focusCell.getColumnIndex())); grid.showItem((GridItem) focusCell.getItem()); }
Example 2
Source File: GridViewerEditor.java From translationstudio8 with GNU General Public License v2.0 | 6 votes |
/** * {@inheritDoc} */ protected void updateFocusCell(ViewerCell focusCell, ColumnViewerEditorActivationEvent event) { Grid grid = ((Grid)getViewer().getControl()); if (event.eventType == ColumnViewerEditorActivationEvent.PROGRAMMATIC || event.eventType == ColumnViewerEditorActivationEvent.TRAVERSAL) { grid.setFocusColumn(grid.getColumn(focusCell.getColumnIndex())); grid.setFocusItem((GridItem) focusCell.getItem()); if( selectionFollowsEditor ) { grid.setCellSelection(new Point(focusCell.getColumnIndex(),grid.indexOf((GridItem)focusCell.getItem()))); } } grid.showColumn(grid.getColumn(focusCell.getColumnIndex())); grid.showItem((GridItem) focusCell.getItem()); }
Example 3
Source File: GridViewerEditor.java From tmxeditor8 with GNU General Public License v2.0 | 6 votes |
/** * {@inheritDoc} */ protected void updateFocusCell(ViewerCell focusCell, ColumnViewerEditorActivationEvent event) { Grid grid = ((Grid)getViewer().getControl()); if (event.eventType == ColumnViewerEditorActivationEvent.PROGRAMMATIC || event.eventType == ColumnViewerEditorActivationEvent.TRAVERSAL) { grid.setFocusColumn(grid.getColumn(focusCell.getColumnIndex())); grid.setFocusItem((GridItem) focusCell.getItem()); if( selectionFollowsEditor ) { grid.setCellSelection(new Point(focusCell.getColumnIndex(),grid.indexOf((GridItem)focusCell.getItem()))); } } grid.showColumn(grid.getColumn(focusCell.getColumnIndex())); grid.showItem((GridItem) focusCell.getItem()); }
Example 4
Source File: GridViewerEditor.java From nebula with Eclipse Public License 2.0 | 5 votes |
protected void updateFocusCell(ViewerCell focusCell, ColumnViewerEditorActivationEvent event) { if (event.eventType == ColumnViewerEditorActivationEvent.PROGRAMMATIC || event.eventType == ColumnViewerEditorActivationEvent.TRAVERSAL) { Grid grid = ((Grid)getViewer().getControl()); grid.deselectAllCells(); grid.setFocusColumn(grid.getColumn(focusCell.getColumnIndex())); grid.setFocusItem((GridItem) focusCell.getItem()); grid.setCellSelection(new Point(focusCell.getColumnIndex(),grid.indexOf((GridItem) focusCell.getItem()))); } }