Java Code Examples for org.eclipse.swt.widgets.Control#removeKeyListener()

The following examples show how to use org.eclipse.swt.widgets.Control#removeKeyListener() . These examples are extracted from open source projects. 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 Project: hop   File: HopGui.java    License: Apache License 2.0 5 votes vote down vote up
public void replaceKeyboardShortcutListeners( Control control, HopGuiKeyHandler keyHandler ) {

    control.removeKeyListener( keyHandler );
    control.addKeyListener( keyHandler );

    // Add it to all the children as well so we don't have any focus issues
    //
    if ( control instanceof Composite ) {
      for ( Control child : ( (Composite) control ).getChildren() ) {
        replaceKeyboardShortcutListeners( child, keyHandler );
      }
    }
  }
 
Example 2
private void deactivate() {
	if (fKeyListener != null) {
		Control control= fNavigable.getControl();
		if (! control.isDisposed())
			control.removeKeyListener(fKeyListener);
		fKeyListener= null;
	}
}
 
Example 3
Source Project: nebula   File: TableRow.java    License: Eclipse Public License 2.0 4 votes vote down vote up
/**
 * Remove listeners from each control.
 * 
 * @param control The control to no longer listen to.
 */
private void removeListeners(Control control) {
	control.removeKeyListener(keyListener);
	control.removeFocusListener(focusListener);
	control.removeTraverseListener(traverseListener);
}