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

The following examples show how to use org.eclipse.swt.widgets.Control#removeKeyListener() . 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: HopGui.java    From hop with 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
Source File: TextFieldNavigationHandler.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
private void deactivate() {
	if (fKeyListener != null) {
		Control control= fNavigable.getControl();
		if (! control.isDisposed())
			control.removeKeyListener(fKeyListener);
		fKeyListener= null;
	}
}
 
Example 3
Source File: TableRow.java    From nebula with 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);
}