|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.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 Keymap
public void setDefaultAction(Action a)
setDefaultAction
in interface Keymap
a
- the actionpublic String getName()
Keymap
getName
in interface Keymap
public Action getAction(KeyStroke key)
Keymap
getAction
in interface Keymap
key
- the key sequence
null
public KeyStroke[] getBoundKeyStrokes()
Keymap
getBoundKeyStrokes
in interface Keymap
public Action[] getBoundActions()
Keymap
getBoundActions
in interface Keymap
public KeyStroke[] getKeyStrokesForAction(Action a)
Keymap
getKeyStrokesForAction
in interface Keymap
a
- the action
public boolean isLocallyDefined(KeyStroke key)
Keymap
isLocallyDefined
in interface Keymap
key
- the key sequence
public void addActionForKeyStroke(KeyStroke key, Action a)
Keymap
addActionForKeyStroke
in interface Keymap
key
- the key sequencea
- the actionpublic void removeKeyStrokeBinding(KeyStroke key)
Keymap
removeKeyStrokeBinding
in interface Keymap
key
- the key sequencepublic void removeBindings()
Keymap
removeBindings
in interface Keymap
public Keymap getResolveParent()
Keymap
getResolveParent
in interface Keymap
public void setResolveParent(Keymap parent)
Keymap
setResolveParent
in interface Keymap
parent
- 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 |