1 11 12 package org.eclipse.jface.viewers; 13 14 import org.eclipse.swt.widgets.Table; 15 16 24 public class TableViewerFocusCellManager extends SWTFocusCellManager { 25 private static final CellNavigationStrategy TABLE_NAVIGATE = new CellNavigationStrategy(); 26 27 35 public TableViewerFocusCellManager(TableViewer viewer, 36 FocusCellHighlighter focusDrawingDelegate) { 37 super(viewer, focusDrawingDelegate, TABLE_NAVIGATE); 38 } 39 40 ViewerCell getInitialFocusCell() { 41 Table table = (Table) getViewer().getControl(); 42 43 if (table.getItemCount() > 0) { 44 return getViewer().getViewerRowFromItem(table.getItem(0)) 45 .getCell(0); 46 } 47 48 return null; 49 } 50 51 } 52 | Popular Tags |