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

Constructor Index

 o Keymap()
Constructs an empty keymap.
 o Keymap(String)
Constructs an empty keymap with the default action name.
 o Keymap(String[])
Constructs an empty keymap with the default action names.

Method Index

 o clone()
Returns a clone of this object.
 o getDefaultActionNames()
Returns the default action names.
 o getKeyCharMap(char)
Returns the action names mapped from the specified key character.
 o getKeyCodeMap(int)
Returns the action names mapped from the specified key code.
 o getKeyCodeMap(int, int)
Returns the action names mapped from the specified key code with the specified key modifiers.
 o removeKeyCharMap(char)
Removes the map from the specified key character to action names.
 o removeKeyCodeMap(int)
Removes the map from the specified key code to action names.
 o removeKeyCodeMap(int, int)
Removes the map from the specified key code with he specified key modifiers to action names.
 o setDefaultActionName(String)
Sets the default action to the specified action name.
 o setDefaultActionNames(String[])
Sets the default action to the specified action names.
 o setKeyCharMap(char, String)
Maps the specified key character to the specified action name.
 o setKeyCharMap(char, String[])
Maps the specified key character to the specified action names.
 o setKeyCodeMap(int, int, String)
Maps the specified key code with the specified key modifiers to the specified action name.
 o setKeyCodeMap(int, int, String[])
Maps the specified key code with the specified key modifiers to the specified action names.
 o setKeyCodeMap(int, String)
Maps the specified key code to the specified action name.
 o setKeyCodeMap(int, String[])
Maps the specified key code to the specified action names.
 o setMetaAltKeyCodeMap(int, String)
Maps the specified key code with the META and ALT key modifiers to the specified action name.
 o setMetaAltKeyCodeMap(int, String[])
Maps the specified key code with the META and ALT key modifiers to the specified action names.

Constructors

 o Keymap
 public Keymap()
Constructs an empty keymap.

 o Keymap
 public Keymap(String actionName)
Constructs an empty keymap with the default action name.

Parameters:
actionName - the default action name.
 o Keymap
 public Keymap(String actionNames[])
Constructs an empty keymap with the default action names.

Parameters:
actionNames - the default action names.

Methods

 o setDefaultActionName
 public void setDefaultActionName(String actionName)
Sets the default action to the specified action name.

Parameters:
actionName - the action name.
 o setDefaultActionNames
 public void setDefaultActionNames(String actionNames[])
Sets the default action to the specified action names.

Parameters:
actionNames - the action names.
 o getDefaultActionNames
 public String[] getDefaultActionNames()
Returns the default action names.

 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o removeKeyCodeMap
 public void removeKeyCodeMap(int keyCode)
Removes the map from the specified key code to action names.

Parameters:
keyCode - the key code.
 o 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.
 o 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.
 o 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.
 o 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.
 o clone
 public Object clone()
Returns a clone of this object.

Overrides:
clone in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index