All Packages Class Hierarchy This Package Previous Next Index
Class jp.kyasu.awt.text.Keymap
java.lang.Object
|
+----jp.kyasu.awt.text.Keymap
- public class Keymap
- extends Object
- implements Cloneable, Serializable
The Keymap
object maps key characters or codes to action
names of the KeyAction
object.
- Version:
- 06 Jun 1998
- Author:
- Kazuki YASUMATSU
- See Also:
- CompositeKeyAction, KeyAction, KeyBinding, TextEditController
-
Keymap()
- Constructs an empty keymap.
-
Keymap(String)
- Constructs an empty keymap with the default action name.
-
Keymap(String[])
- Constructs an empty keymap with the default action names.
-
clone()
- Returns a clone of this object.
-
getDefaultActionNames()
- Returns the default action names.
-
getKeyCharMap(char)
- Returns the action names mapped from the specified key character.
-
getKeyCodeMap(int)
- Returns the action names mapped from the specified key code.
-
getKeyCodeMap(int, int)
- Returns the action names mapped from the specified key code with
the specified key modifiers.
-
removeKeyCharMap(char)
- Removes the map from the specified key character to action names.
-
removeKeyCodeMap(int)
- Removes the map from the specified key code to action names.
-
removeKeyCodeMap(int, int)
- Removes the map from the specified key code with he specified key
modifiers to action names.
-
setDefaultActionName(String)
- Sets the default action to the specified action name.
-
setDefaultActionNames(String[])
- Sets the default action to the specified action names.
-
setKeyCharMap(char, String)
- Maps the specified key character to the specified action name.
-
setKeyCharMap(char, String[])
- Maps the specified key character to the specified action names.
-
setKeyCodeMap(int, int, String)
- Maps the specified key code with the specified key modifiers to the
specified action name.
-
setKeyCodeMap(int, int, String[])
- Maps the specified key code with the specified key modifiers to the
specified action names.
-
setKeyCodeMap(int, String)
- Maps the specified key code to the specified action name.
-
setKeyCodeMap(int, String[])
- Maps the specified key code to the specified action names.
-
setMetaAltKeyCodeMap(int, String)
- Maps the specified key code with the META and ALT key modifiers to the
specified action name.
-
setMetaAltKeyCodeMap(int, String[])
- Maps the specified key code with the META and ALT key modifiers to the
specified action names.
Keymap
public Keymap()
- Constructs an empty keymap.
Keymap
public Keymap(String actionName)
- Constructs an empty keymap with the default action name.
- Parameters:
- actionName - the default action name.
Keymap
public Keymap(String actionNames[])
- Constructs an empty keymap with the default action names.
- Parameters:
- actionNames - the default action names.
setDefaultActionName
public void setDefaultActionName(String actionName)
- Sets the default action to the specified action name.
- Parameters:
- actionName - the action name.
setDefaultActionNames
public void setDefaultActionNames(String actionNames[])
- Sets the default action to the specified action names.
- Parameters:
- actionNames - the action names.
getDefaultActionNames
public String[] getDefaultActionNames()
- Returns the default action names.
setKeyCharMap
public void setKeyCharMap(char keyChar,
String actionName)
- Maps the specified key character to the specified action name.
- Parameters:
- keyChar - the key character.
- actionName - the action name.
setKeyCharMap
public void setKeyCharMap(char keyChar,
String actionNames[])
- Maps the specified key character to the specified action names.
- Parameters:
- keyChar - the key character.
- actionNames - the action names.
removeKeyCharMap
public String[] removeKeyCharMap(char keyChar)
- Removes the map from the specified key character to action names.
- Parameters:
- keyChar - the key character.
- Returns:
- the old mapped action names.
setKeyCodeMap
public void setKeyCodeMap(int keyCode,
String actionName)
- Maps the specified key code to the specified action name.
- Parameters:
- keyCode - the key code.
- actionName - the action name.
setKeyCodeMap
public void setKeyCodeMap(int keyCode,
String actionNames[])
- Maps the specified key code to the specified action names.
- Parameters:
- keyCode - the key code.
- actionNames - the action names.
setMetaAltKeyCodeMap
public void setMetaAltKeyCodeMap(int keyCode,
String actionName)
- Maps the specified key code with the META and ALT key modifiers to the
specified action name.
- Parameters:
- keyCode - the key code.
- actionName - the action name.
setMetaAltKeyCodeMap
public void setMetaAltKeyCodeMap(int keyCode,
String actionNames[])
- Maps the specified key code with the META and ALT key modifiers to the
specified action names.
- Parameters:
- keyCode - the key code.
- actionNames - the action names.
setKeyCodeMap
public void setKeyCodeMap(int keyCode,
int modifiers,
String actionName)
- Maps the specified key code with the specified key modifiers to the
specified action name.
- Parameters:
- keyCode - the key code.
- modifiers - the key modifiers.
- actionName - the action name.
setKeyCodeMap
public void setKeyCodeMap(int keyCode,
int modifiers,
String actionNames[])
- Maps the specified key code with the specified key modifiers to the
specified action names.
- Parameters:
- keyCode - the key code.
- modifiers - the key modifiers.
- actionNames - the action names.
removeKeyCodeMap
public void removeKeyCodeMap(int keyCode)
- Removes the map from the specified key code to action names.
- Parameters:
- keyCode - the key code.
removeKeyCodeMap
public String[] removeKeyCodeMap(int keyCode,
int modifiers)
- Removes the map from the specified key code with he specified key
modifiers to action names.
- Parameters:
- keyCode - the key code.
- modifiers - the key modifiers.
- Returns:
- the old mapped action names.
getKeyCharMap
public String[] getKeyCharMap(char keyChar)
- Returns the action names mapped from the specified key character.
- Parameters:
- keyChar - the key character.
- Returns:
- the action names if mapped, otherwise
null
.
getKeyCodeMap
public String[] getKeyCodeMap(int keyCode)
- Returns the action names mapped from the specified key code.
- Parameters:
- keyCode - the key code.
- Returns:
- the action names if mapped, otherwise
null
.
getKeyCodeMap
public String[] getKeyCodeMap(int keyCode,
int modifiers)
- Returns the action names mapped from the specified key code with
the specified key modifiers.
- Parameters:
- keyCode - the key code.
- modifiers - the key modifiers.
- Returns:
- the action names if mapped, otherwise
null
.
clone
public Object clone()
- Returns a clone of this object.
- Overrides:
- clone in class Object
All Packages Class Hierarchy This Package Previous Next Index