| Modifier and Type | Field and Description |
|---|---|
static Action |
BEEP_ACTION
Action that beeps.
|
static Action |
EMPTY_ACTION
Action that does nothing
|
| Constructor and Description |
|---|
MultiKeymap(String name)
Construct new keymap.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addActionForKeyStroke(KeyStroke key,
Action a) |
Action |
getAction(KeyStroke key) |
Action[] |
getBoundActions() |
KeyStroke[] |
getBoundKeyStrokes() |
Action |
getDefaultAction()
Get default action of this keymap or parent keymap if this
one doesn't have one.
|
KeyStroke[] |
getKeyStrokesForAction(Action a) |
String |
getName() |
Keymap |
getResolveParent() |
boolean |
isLocallyDefined(KeyStroke key) |
void |
load(JTextComponent.KeyBinding[] bindings,
Action[] actions)
Loads the key to action mappings into this keymap in similar way
as JTextComponent.loadKeymap() does.
|
void |
load(JTextComponent.KeyBinding[] bindings,
Map actions)
Loads key to action mappings into this keymap
|
void |
removeBindings() |
void |
removeKeyStrokeBinding(KeyStroke key) |
void |
resetContext()
Reset keymap to base context
|
void |
setContextKeyNotFoundAction(Action a)
What to do when key is not resolved for context
|
void |
setDefaultAction(Action a) |
void |
setResolveParent(Keymap parent) |
String |
toString() |
public static final Action EMPTY_ACTION
public static final Action BEEP_ACTION
public MultiKeymap(String name)
name - name of new keymappublic void resetContext()
public void setContextKeyNotFoundAction(Action a)
public void load(JTextComponent.KeyBinding[] bindings, Action[] actions)
public void load(JTextComponent.KeyBinding[] bindings, Map actions)
bindings - array of bindingsactions - map of [action_name, action] pairspublic Action getDefaultAction()
getDefaultAction in interface Keymappublic void setDefaultAction(Action a)
setDefaultAction in interface Keymappublic KeyStroke[] getBoundKeyStrokes()
getBoundKeyStrokes in interface Keymappublic Action[] getBoundActions()
getBoundActions in interface Keymappublic KeyStroke[] getKeyStrokesForAction(Action a)
getKeyStrokesForAction in interface Keymappublic boolean isLocallyDefined(KeyStroke key)
isLocallyDefined in interface Keymappublic void addActionForKeyStroke(KeyStroke key, Action a)
addActionForKeyStroke in interface Keymappublic void removeKeyStrokeBinding(KeyStroke key)
removeKeyStrokeBinding in interface Keymappublic void removeBindings()
removeBindings in interface Keymappublic Keymap getResolveParent()
getResolveParent in interface Keymappublic void setResolveParent(Keymap parent)
setResolveParent in interface KeymapBuilt on June 18 2013. | Portions Copyright 1997-2013 Oracle. All rights reserved.