| Package | Description |
|---|---|
| javax.swing |
Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
|
| javax.swing.plaf.basic |
Provides user interface objects built according to the Basic look and feel.
|
| javax.swing.text |
Provides classes and interfaces that deal with editable and noneditable text components.
|
| Modifier and Type | Method and Description |
|---|---|
KeyStroke |
InputMap.allKeys()
Returns an array of the
KeyStrokes defined in this
InputMap and its parent.
|
KeyStroke |
JMenuItem.getAccelerator()
Returns the
KeyStroke which serves as an accelerator for the menu item.
|
static KeyStroke |
KeyStroke.getKeyStroke(char keyChar)
Returns a shared instance of a
KeyStroke that represents a
KEY_TYPED event for the specified character.
|
static KeyStroke |
KeyStroke.getKeyStroke(Character
Returns a shared instance of a
KeyStroke that represents a
KEY_TYPED event for the specified Character object and a set of modifiers.
|
static KeyStroke |
KeyStroke.getKeyStroke(char keyChar, boolean onKeyRelease)
Deprecated.
use getKeyStroke(char)
|
static KeyStroke |
KeyStroke.getKeyStroke(int keyCode, int modifiers)
Returns a shared instance of a KeyStroke, given a numeric key code and a set of modifiers.
|
static KeyStroke |
KeyStroke.getKeyStroke(int keyCode, int modifiers, boolean onKeyRelease)
Returns a shared instance of a KeyStroke, given a numeric key code and a set of modifiers, specifying whether the key is activated when it is pressed or released.
|
static KeyStroke |
KeyStroke.getKeyStroke(String
Parses a string and returns a
KeyStroke.
|
static KeyStroke |
KeyStroke.getKeyStrokeForEvent(KeyEvent
Returns a KeyStroke which represents the stroke which generated a given KeyEvent.
|
KeyStroke |
JComponent.getRegisteredKeyStrokes()
Returns the
KeyStrokes that will initiate registered actions.
|
KeyStroke |
InputMap.keys()
Returns the
KeyStrokes that are bound in this
InputMap.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
InputMap.get(KeyStroke
Returns the binding for
keyStroke, messaging the parent
InputMap if the binding is not locally defined.
|
ActionListener |
JComponent.getActionForKeyStroke(KeyStroke
Returns the object that will perform the action registered for a given keystroke.
|
int |
JComponent.getConditionForKeyStroke(KeyStroke
Returns the condition that determines whether a registered action occurs in response to the specified keystroke.
|
static boolean |
SwingUtilities.notifyAction(Action
Invokes
actionPerformed on
action if
action is enabled (and non-
null).
|
protected boolean |
JTable.processKeyBinding(KeyStroke
|
protected boolean |
JComponent.processKeyBinding(KeyStroke
Invoked to process the key bindings for
ks as the result of the
KeyEvent
e.
|
protected boolean |
JMenuBar.processKeyBinding(KeyStroke
Subclassed to check all the child menus.
|
void |
InputMap.put(KeyStroke
Adds a binding for
keyStroke to
actionMapKey.
|
void |
ComponentInputMap.put(KeyStroke
Adds a binding for
keyStroke to
actionMapKey.
|
void |
JComponent.registerKeyboardAction(ActionListener
This method is now obsolete, please use a combination of
getActionMap() and
getInputMap() for similar behavior.
|
void |
JComponent.registerKeyboardAction(ActionListener
This method is now obsolete, please use a combination of
getActionMap() and
getInputMap() for similar behavior.
|
void |
InputMap.remove(KeyStroke
Removes the binding for
key from this
InputMap.
|
void |
ComponentInputMap.remove(KeyStroke
Removes the binding for
key from this object.
|
void |
JMenuItem.setAccelerator(KeyStroke
Sets the key combination which invokes the menu item's action listeners without navigating the menu hierarchy.
|
void |
JMenu.setAccelerator(KeyStroke
setAccelerator is not defined for
JMenu.
|
void |
JComponent.unregisterKeyboardAction(KeyStroke
This method is now obsolete.
|
| Modifier and Type | Field and Description |
|---|---|
protected KeyStroke |
BasicDesktopPaneUI.closeKey
Deprecated.
As of 1.3.
|
protected KeyStroke |
BasicSplitPaneUI.dividerResizeToggleKey
Deprecated.
As of Java 2 platform v1.3.
|
protected KeyStroke |
BasicTabbedPaneUI.downKey
Deprecated.
As of Java 2 platform v1.3.
|
protected KeyStroke |
BasicSplitPaneUI.downKey
Deprecated.
As of Java 2 platform v1.3.
|
protected KeyStroke |
BasicToolBarUI.downKey
Deprecated.
As of Java 2 platform v1.3.
|
protected KeyStroke |
BasicSplitPaneUI.endKey
Deprecated.
As of Java 2 platform v1.3.
|
protected KeyStroke |
BasicSplitPaneUI.homeKey
Deprecated.
As of Java 2 platform v1.3.
|
protected KeyStroke |
BasicTabbedPaneUI.leftKey
Deprecated.
As of Java 2 platform v1.3.
|
protected KeyStroke |
BasicSplitPaneUI.leftKey
Deprecated.
As of Java 2 platform v1.3.
|
protected KeyStroke |
BasicToolBarUI.leftKey
Deprecated.
As of Java 2 platform v1.3.
|
protected KeyStroke |
BasicDesktopPaneUI.maximizeKey
Deprecated.
As of 1.3.
|
protected KeyStroke |
BasicDesktopPaneUI.minimizeKey
Deprecated.
As of 1.3.
|
protected KeyStroke |
BasicDesktopPaneUI.navigateKey
Deprecated.
As of 1.3.
|
protected KeyStroke |
BasicDesktopPaneUI.navigateKey2
Deprecated.
As of 1.3.
|
protected KeyStroke |
BasicInternalFrameUI.openMenuKey
Deprecated.
As of Java 2 platform v1.3.
|
protected KeyStroke |
BasicTabbedPaneUI.rightKey
Deprecated.
As of Java 2 platform v1.3.
|
protected KeyStroke |
BasicSplitPaneUI.rightKey
Deprecated.
As of Java 2 platform v1.3.
|
protected KeyStroke |
BasicToolBarUI.rightKey
Deprecated.
As of Java 2 platform v1.3.
|
protected KeyStroke |
BasicTabbedPaneUI.upKey
Deprecated.
As of Java 2 platform v1.3.
|
protected KeyStroke |
BasicSplitPaneUI.upKey
Deprecated.
As of Java 2 platform v1.3.
|
protected KeyStroke |
BasicToolBarUI.upKey
Deprecated.
As of Java 2 platform v1.3.
|
| Modifier and Type | Field and Description |
|---|---|
KeyStroke |
JTextComponent.KeyBinding.key
The key.
|
| Modifier and Type | Method and Description |
|---|---|
KeyStroke |
Keymap.getBoundKeyStrokes()
Fetches all of the keystrokes in this map that are bound to some action.
|
KeyStroke |
Keymap.getKeyStrokesForAction(Action
Fetches the keystrokes that will result in the given action.
|
| Modifier and Type | Method and Description |
|---|---|
void |
Keymap.addActionForKeyStroke(KeyStroke
Adds a binding to the keymap.
|
Action |
Keymap.getAction(KeyStroke
Fetches the action appropriate for the given symbolic event sequence.
|
boolean |
Keymap.isLocallyDefined(KeyStroke
Determines if the given key sequence is locally defined.
|
void |
Keymap.removeKeyStrokeBinding(KeyStroke
Removes a binding from the keymap.
|
| Constructor and Description | |
|---|---|
KeyBinding(KeyStroke
Creates a new key binding.
|