public final class MultiKeyBinding extends Object
JTextComponent.KeyBinding to hold several successive keystrokes.| Constructor and Description |
|---|
MultiKeyBinding(KeyStroke[] keyStrokes,
String actionName)
Constructor for assigning keystroke sequence to action
|
MultiKeyBinding(KeyStroke keyStroke,
String actionName)
Constructor for array single keystroke to action assignment.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o)
Two keybindings are equal if and only if they represent
the same keystrokes sequence and the same action name.
|
String |
getActionName()
Get the name of the action which this keybinding triggers.
|
KeyStroke |
getKeyStroke(int index)
Get the key of this keybinding at the given index of the keystroke sequence.
|
int |
getKeyStrokeCount()
Get total number of keystrokes contained in this keybinding sequence.
|
List<KeyStroke> |
getKeyStrokeList()
Get list of keystrokes represented by this keybinding.
|
int |
hashCode() |
String |
toString() |
public MultiKeyBinding(KeyStroke[] keyStrokes, String actionName)
keyStrokes - non-null successive keystrokes that must be pressed in order
to invoke action. The passed array must not be modified by the caller.actionName - non-null name of the action that will be invoked.public KeyStroke getKeyStroke(int index)
index - >=0 and <getKeyStrokeCount() index.getKeyStrokeCount()public int getKeyStrokeCount()
public List<KeyStroke> getKeyStrokeList()
public String getActionName()
public boolean equals(Object o)
Built on May 22 2013. | Portions Copyright 1997-2013 Oracle. All rights reserved.