|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.text.JTextComponent.DefaultKeymap
| Field Summary | |
(package private) Hashtable |
bindings
|
(package private) Action |
defaultAction
|
(package private) String |
nm
|
(package private) Keymap |
parent
|
| Constructor Summary | |
(package private) |
JTextComponent.DefaultKeymap(String nm,
Keymap parent)
|
| Method Summary | |
void |
addActionForKeyStroke(KeyStroke key,
Action a)
Adds a binding to the keymap. |
Action |
getAction(KeyStroke key)
Fetches the action appropriate for the given symbolic event sequence. |
Action[] |
getBoundActions()
Fetches all of the actions defined in this keymap. |
KeyStroke[] |
getBoundKeyStrokes()
Fetches all of the keystrokes in this map that are bound to some action. |
Action |
getDefaultAction()
Fetch the default action to fire if a key is typed (ie a KEY_TYPED KeyEvent is received) and there is no binding for it. |
KeyStroke[] |
getKeyStrokesForAction(Action a)
Fetches the keystrokes that will result in the given action. |
String |
getName()
Fetches the name of the set of key-bindings. |
Keymap |
getResolveParent()
Fetches the parent keymap used to resolve key-bindings. |
boolean |
isLocallyDefined(KeyStroke key)
Determines if the given key sequence is locally defined. |
void |
removeBindings()
Removes all bindings from the keymap. |
void |
removeKeyStrokeBinding(KeyStroke key)
Removes a binding from the keymap. |
void |
setDefaultAction(Action a)
Set the default action to fire if a key is typed. |
void |
setResolveParent(Keymap parent)
Sets the parent keymap, which will be used to resolve key-bindings. |
String |
toString()
String representation of the keymap... potentially a very long string. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
String nm
Keymap parent
Hashtable bindings
Action defaultAction
| Constructor Detail |
JTextComponent.DefaultKeymap(String nm,
Keymap parent)
| Method Detail |
public Action getDefaultAction()
getDefaultAction in interface Keymappublic void setDefaultAction(Action a)
setDefaultAction in interface Keymapa - the actionpublic String getName()
Keymap
getName in interface Keymappublic Action getAction(KeyStroke key)
Keymap
getAction in interface Keymapkey - the key sequence
nullpublic KeyStroke[] getBoundKeyStrokes()
Keymap
getBoundKeyStrokes in interface Keymappublic Action[] getBoundActions()
Keymap
getBoundActions in interface Keymappublic KeyStroke[] getKeyStrokesForAction(Action a)
Keymap
getKeyStrokesForAction in interface Keymapa - the action
public boolean isLocallyDefined(KeyStroke key)
Keymap
isLocallyDefined in interface Keymapkey - the key sequence
public void addActionForKeyStroke(KeyStroke key,
Action a)
Keymap
addActionForKeyStroke in interface Keymapkey - the key sequencea - the actionpublic void removeKeyStrokeBinding(KeyStroke key)
Keymap
removeKeyStrokeBinding in interface Keymapkey - the key sequencepublic void removeBindings()
Keymap
removeBindings in interface Keymappublic Keymap getResolveParent()
Keymap
getResolveParent in interface Keymappublic void setResolveParent(Keymap parent)
Keymap
setResolveParent in interface Keymapparent - the parent keymappublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||