Example usage for org.eclipse.jface.viewers CellEditor removeListener

List of usage examples for org.eclipse.jface.viewers CellEditor removeListener

Introduction

In this page you can find the example usage for org.eclipse.jface.viewers CellEditor removeListener.

Prototype

public void removeListener(ICellEditorListener listener) 

Source Link

Document

Removes the given listener from this cell editor.

Usage

From source file:org.eclipse.debug.internal.ui.viewers.TableEditorImpl.java

License:Open Source License

/**
 * Deactivates the currently active cell editor.
 *///  ww  w. ja  v a  2 s  .c  o m
public void applyEditorValue() {
    CellEditor c = fCellEditor;
    if (c != null) {
        // null out cell editor before calling save
        // in case save results in applyEditorValue being re-entered
        // see 1GAHI8Z: ITPUI:ALL - How to code event notification when
        // using cell editor ?
        fCellEditor = null;
        Item t = fTableItem;
        // don't null out table item -- same item is still selected
        if (t != null && !t.isDisposed()) {
            saveEditorValue(c, t);
        }
        setEditor(null, null, 0);
        c.removeListener(fCellEditorListener);
        Control control = c.getControl();
        if (control != null) {
            if (fMouseListener != null) {
                control.removeMouseListener(fMouseListener);
            }
            if (fFocusListener != null) {
                control.removeFocusListener(fFocusListener);
            }
        }
        c.deactivate();
    }
}

From source file:org.eclipse.rcptt.tesla.gef.DirectEditorContainer.java

License:Open Source License

public void removeListeners() {
    CellEditor cellEditor = getCellEditor();
    Object listener = getProperty("cellEditorListener");
    Object source = getProperty("source");
    Object editPartListener = getProperty("editPartListener");
    if (listener != null) {
        cellEditor.removeListener((ICellEditorListener) listener);
    }/*from   w  w w .ja  v a2  s  . co m*/
    if (source != null && editPartListener != null) {
        ((GraphicalEditPart) source).removeEditPartListener((EditPartListener) editPartListener);
    }
}

From source file:org.eclipse.wst.common.snippets.internal.util.TableViewerImpl.java

License:Open Source License

/**
 * Deactivates the currently active cell editor.
 *//*from ww  w . j  av  a2  s  . c  o m*/
public void applyEditorValue() {
    CellEditor c = this.fCellEditor;
    if (c != null) {
        // null out cell editor before calling save
        // in case save results in applyEditorValue being re-entered
        // see 1GAHI8Z: ITPUI:ALL - How to code event notification when
        // using cell editor ?
        this.fCellEditor = null;
        Item t = this.fTableItem;
        // don't null out table item -- same item is still selected
        if (t != null && !t.isDisposed()) {
            saveEditorValue(c, t);
        }
        setEditor(null, null, 0);
        c.removeListener(fCellEditorListener);
        c.deactivate();
    }
}