Java Code Examples for org.eclipse.jface.viewers.ViewerRow#getCell()
The following examples show how to use
org.eclipse.jface.viewers.ViewerRow#getCell() .
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: GalleryTreeViewer.java From nebula with Eclipse Public License 2.0 | 6 votes |
public void editElement(Object element, int column) { if (element instanceof TreePath) { setSelection(new TreeSelection((TreePath) element)); GalleryItem[] items = gallery.getSelection(); if (items.length == 1) { ViewerRow row = getViewerRowFromItem(items[0]); if (row != null) { ViewerCell cell = row.getCell(column); if (cell != null) { getControl().setRedraw(false); triggerEditorActivationEvent( new ColumnViewerEditorActivationEvent(cell)); getControl().setRedraw(true); } } } } else { super.editElement(element, column); } }
Example 2
Source File: GridTableViewer.java From nebula with Eclipse Public License 2.0 | 6 votes |
/** * {@inheritDoc} */ @Override public void editElement(Object element, int column) { try { getControl().setRedraw(false); Widget item = findItem(element); if (item != null) { ViewerRow row = getViewerRowFromItem(item); if (row != null) { ViewerCell cell = row.getCell(column); if (cell != null) { triggerEditorActivationEvent(new ColumnViewerEditorActivationEvent(cell)); } } } } finally { getControl().setRedraw(true); } // } }
Example 3
Source File: GridViewerEditor.java From nebula with Eclipse Public License 2.0 | 6 votes |
/** * FIXME * {@inheritDoc} */ @Override public ViewerCell getFocusCell() { Grid grid = (Grid)getViewer().getControl(); if( grid.getCellSelectionEnabled() ) { Point p = grid.getFocusCell(); if( p.x >= 0 && p.y >= 0 ) { GridItem item = grid.getItem(p.y); if( item != null ) { ViewerRow row = getViewerRowFromItem(item); return row.getCell(p.x); } } } return null; }
Example 4
Source File: GridViewerEditor.java From nebula with Eclipse Public License 2.0 | 6 votes |
public ViewerCell getFocusCell() { Grid grid = (Grid)getViewer().getControl(); if( grid.getCellSelectionEnabled() ) { Point p = grid.getFocusCell(); if( p.x >= 0 && p.y >= 0 ) { GridItem item = grid.getItem(p.y); if( item != null ) { ViewerRow row = getViewerRowFromItem(item); return row.getCell(p.x); } } } return null; }
Example 5
Source File: CTreeComboViewer.java From nebula with Eclipse Public License 2.0 | 6 votes |
/** * @see org.eclipse.jface.viewers.ColumnViewer#editElement(java.lang.Object, int) */ public void editElement(Object element, int column) { if (element instanceof TreePath) { try { getControl().setRedraw(false); setSelection(new TreeSelection((TreePath) element)); CTreeComboItem[] items = tree.getSelection(); if (items.length == 1) { ViewerRow row = getViewerRowFromItem(items[0]); if (row != null) { ViewerCell cell = row.getCell(column); if (cell != null) { triggerEditorActivationEvent(new ColumnViewerEditorActivationEvent(cell)); } } } } finally { getControl().setRedraw(true); } } else { super.editElement(element, column); } }
Example 6
Source File: GridTableViewer.java From translationstudio8 with GNU General Public License v2.0 | 6 votes |
/** * {@inheritDoc} */ public void editElement(Object element, int column) { try { getControl().setRedraw(false); Widget item = findItem(element); if (item != null) { ViewerRow row = getViewerRowFromItem(item); if (row != null) { ViewerCell cell = row.getCell(column); if (cell != null) { triggerEditorActivationEvent(new ColumnViewerEditorActivationEvent( cell)); } } } } finally { getControl().setRedraw(true); } // } }
Example 7
Source File: GridViewerEditor.java From translationstudio8 with GNU General Public License v2.0 | 6 votes |
/** * FIXME * {@inheritDoc} */ public ViewerCell getFocusCell() { Grid grid = (Grid)getViewer().getControl(); if( grid.getCellSelectionEnabled() ) { Point p = grid.getFocusCell(); if( p.x >= 0 && p.y >= 0 ) { GridItem item = grid.getItem(p.y); if( item != null ) { ViewerRow row = getViewerRowFromItem(item); return row.getCell(p.x); } } } return null; }
Example 8
Source File: GridTableViewer.java From tmxeditor8 with GNU General Public License v2.0 | 6 votes |
/** * {@inheritDoc} */ public void editElement(Object element, int column) { try { getControl().setRedraw(false); Widget item = findItem(element); if (item != null) { ViewerRow row = getViewerRowFromItem(item); if (row != null) { ViewerCell cell = row.getCell(column); if (cell != null) { triggerEditorActivationEvent(new ColumnViewerEditorActivationEvent( cell)); } } } } finally { getControl().setRedraw(true); } // } }
Example 9
Source File: GridViewerEditor.java From tmxeditor8 with GNU General Public License v2.0 | 6 votes |
/** * FIXME * {@inheritDoc} */ public ViewerCell getFocusCell() { Grid grid = (Grid)getViewer().getControl(); if( grid.getCellSelectionEnabled() ) { Point p = grid.getFocusCell(); if( p.x >= 0 && p.y >= 0 ) { GridItem item = grid.getItem(p.y); if( item != null ) { ViewerRow row = getViewerRowFromItem(item); return row.getCell(p.x); } } } return null; }