Example usage for javax.swing JComponent registerKeyboardAction

List of usage examples for javax.swing JComponent registerKeyboardAction

Introduction

In this page you can find the example usage for javax.swing JComponent registerKeyboardAction.

Prototype

public void registerKeyboardAction(ActionListener anAction, KeyStroke aKeyStroke, int aCondition) 

Source Link

Document

This method is now obsolete, please use a combination of getActionMap() and getInputMap() for similar behavior.

Usage

From source file:org.executequery.gui.browser.FindAction.java

public void install(JComponent component) {

    this.component = component;

    component.registerKeyboardAction(this, INVOKE_KEY_STROKE, JComponent.WHEN_IN_FOCUSED_WINDOW);

    //      comp.registerKeyboardAction(this, KeyStroke.getKeyStroke('I',
    //            KeyEvent.CTRL_MASK | KeyEvent.SHIFT_MASK),
    //            JComponent.WHEN_FOCUSED);
}