/** * @return the cell holding the current focus */ private ViewerCell getFocusCell() { return viewer.getColumnViewerEditor().getFocusCell(); }
/** * @return the cell holding the current focus */ private ViewerCell getFocusCell() { return viewer.getColumnViewerEditor().getFocusCell(); }
/** * @return the cell holding the current focus */ private ViewerCell getFocusCell() { return viewer.getColumnViewerEditor().getFocusCell(); }
protected void init() { ColumnViewerEditorActivationListener listener = new ColumnViewerEditorActivationListener() { public void afterEditorActivated( ColumnViewerEditorActivationEvent e ) { } public void afterEditorDeactivated( ColumnViewerEditorDeactivationEvent e ) { focusCellChanged( getFocusCell(), null ); } public void beforeEditorActivated( ColumnViewerEditorActivationEvent e ) { } public void beforeEditorDeactivated( ColumnViewerEditorDeactivationEvent e ) { } }; ColumnViewerEditor editor = viewer.getColumnViewerEditor(); editor.addEditorActivationListener( listener ); }
@Override public void afterEditorDeactivated( ColumnViewerEditorDeactivationEvent event) { editingState.dispose(); editingState = null; viewer.getColumnViewerEditor().removeEditorActivationListener(this); }
/** * @return the focus cell */ public ViewerCell getFocusCell() { // Mgr is normally not null because the highlighter is passed // to the SWTFocusCellManager instance if( mgr != null ) { // Use this method because it ensure that no // cell update (which might cause scrolling) happens return mgr._getFocusCell(); } return viewer.getColumnViewerEditor().getFocusCell(); }
/** * @return the focus cell */ public ViewerCell getFocusCell() { // Mgr is normally not null because the highlighter is passed // to the SWTFocusCellManager instance if( mgr != null ) { // Use this method because it ensure that no // cell update (which might cause scrolling) happens return mgr._getFocusCell(); } return viewer.getColumnViewerEditor().getFocusCell(); }
/** * @return the focus cell */ public ViewerCell getFocusCell() { // Mgr is normally not null because the highlighter is passed // to the SWTFocusCellManager instance if( mgr != null ) { // Use this method because it ensure that no // cell update (which might cause scrolling) happens return mgr._getFocusCell(); } return viewer.getColumnViewerEditor().getFocusCell(); }
/** * Creates a {@link Binding} between the editor and the element to be * edited. Invokes {@link #doCreateCellEditorObservable(CellEditor)}, * {@link #doCreateElementObservable(Object, ViewerCell)}, and then * {@link #createBinding(IObservableValue, IObservableValue)}. */ @Override final protected void initializeCellEditorValue(CellEditor cellEditor, ViewerCell cell) { IObservableValue target = doCreateCellEditorObservable(cellEditor); Assert.isNotNull(target, "doCreateCellEditorObservable(...) did not return an observable"); //$NON-NLS-1$ IObservableValue model = doCreateElementObservable(cell.getElement(), cell); Assert.isNotNull(model, "doCreateElementObservable(...) did not return an observable"); //$NON-NLS-1$ dirty = false; Binding binding = createBinding(target, model); target.addChangeListener(new IChangeListener() { @Override public void handleChange(ChangeEvent event) { dirty = true; } }); Assert.isNotNull(binding, "createBinding(...) did not return a binding"); //$NON-NLS-1$ editingState = new EditingState(binding, target, model); getViewer().getColumnViewerEditor().addEditorActivationListener( activationListener); }