public class Keymap
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable
Keymap object maps key characters or codes to action
names of the KeyAction object.| 修飾子とタイプ | フィールドと説明 |
|---|---|
protected java.lang.String[] |
defaultActionNames |
protected static int |
KEY_SHIFT |
protected java.lang.String[][] |
keyCharMap |
protected java.util.Hashtable |
keyCodeMap |
| コンストラクタと説明 |
|---|
Keymap()
Constructs an empty keymap.
|
Keymap(java.lang.String actionName)
Constructs an empty keymap with the default action name.
|
Keymap(java.lang.String[] actionNames)
Constructs an empty keymap with the default action names.
|
| 修飾子とタイプ | メソッドと説明 |
|---|---|
java.lang.Object |
clone()
Returns a clone of this object.
|
protected static java.lang.String[] |
convertToActionNames(java.lang.String actions)
Converts a specified string into action names.
|
java.lang.String[] |
getDefaultActionNames()
Returns the default action names.
|
java.lang.String[] |
getKeyCharMap(char keyChar)
Returns the action names mapped from the specified key character.
|
java.lang.String[] |
getKeyCodeMap(int keyCode)
Returns the action names mapped from the specified key code.
|
java.lang.String[] |
getKeyCodeMap(int keyCode,
int modifiers)
Returns the action names mapped from the specified key code with
the specified key modifiers.
|
java.lang.String[] |
removeKeyCharMap(char keyChar)
Removes the map from the specified key character to action names.
|
void |
removeKeyCodeMap(int keyCode)
Removes the map from the specified key code to action names.
|
java.lang.String[] |
removeKeyCodeMap(int keyCode,
int modifiers)
Removes the map from the specified key code with he specified key
modifiers to action names.
|
void |
setDefaultActionName(java.lang.String actionName)
Sets the default action to the specified action name.
|
void |
setDefaultActionNames(java.lang.String[] actionNames)
Sets the default action to the specified action names.
|
void |
setKeyCharMap(char keyChar,
java.lang.String actionName)
Maps the specified key character to the specified action name.
|
void |
setKeyCharMap(char keyChar,
java.lang.String[] actionNames)
Maps the specified key character to the specified action names.
|
void |
setKeyCodeMap(int keyCode,
int modifiers,
java.lang.String actionName)
Maps the specified key code with the specified key modifiers to the
specified action name.
|
void |
setKeyCodeMap(int keyCode,
int modifiers,
java.lang.String[] actionNames)
Maps the specified key code with the specified key modifiers to the
specified action names.
|
void |
setKeyCodeMap(int keyCode,
java.lang.String actionName)
Maps the specified key code to the specified action name.
|
void |
setKeyCodeMap(int keyCode,
java.lang.String[] actionNames)
Maps the specified key code to the specified action names.
|
void |
setMetaAltKeyCodeMap(int keyCode,
java.lang.String actionName)
Maps the specified key code with the META and ALT key modifiers to the
specified action name.
|
void |
setMetaAltKeyCodeMap(int keyCode,
java.lang.String[] actionNames)
Maps the specified key code with the META and ALT key modifiers to the
specified action names.
|
protected java.lang.String[] defaultActionNames
protected java.lang.String[][] keyCharMap
protected java.util.Hashtable keyCodeMap
protected static final int KEY_SHIFT
public Keymap()
public Keymap(java.lang.String actionName)
actionName - the default action name.public Keymap(java.lang.String[] actionNames)
actionNames - the default action names.protected static java.lang.String[] convertToActionNames(java.lang.String actions)
public void setDefaultActionName(java.lang.String actionName)
actionName - the action name.public void setDefaultActionNames(java.lang.String[] actionNames)
actionNames - the action names.public java.lang.String[] getDefaultActionNames()
public void setKeyCharMap(char keyChar,
java.lang.String actionName)
keyChar - the key character.actionName - the action name.public void setKeyCharMap(char keyChar,
java.lang.String[] actionNames)
keyChar - the key character.actionNames - the action names.public java.lang.String[] removeKeyCharMap(char keyChar)
keyChar - the key character.public void setKeyCodeMap(int keyCode,
java.lang.String actionName)
keyCode - the key code.actionName - the action name.public void setKeyCodeMap(int keyCode,
java.lang.String[] actionNames)
keyCode - the key code.actionNames - the action names.public void setMetaAltKeyCodeMap(int keyCode,
java.lang.String actionName)
keyCode - the key code.actionName - the action name.public void setMetaAltKeyCodeMap(int keyCode,
java.lang.String[] actionNames)
keyCode - the key code.actionNames - the action names.public void setKeyCodeMap(int keyCode,
int modifiers,
java.lang.String actionName)
keyCode - the key code.modifiers - the key modifiers.actionName - the action name.public void setKeyCodeMap(int keyCode,
int modifiers,
java.lang.String[] actionNames)
keyCode - the key code.modifiers - the key modifiers.actionNames - the action names.public void removeKeyCodeMap(int keyCode)
keyCode - the key code.public java.lang.String[] removeKeyCodeMap(int keyCode,
int modifiers)
keyCode - the key code.modifiers - the key modifiers.public java.lang.String[] getKeyCharMap(char keyChar)
keyChar - the key character.null.public java.lang.String[] getKeyCodeMap(int keyCode)
keyCode - the key code.null.public java.lang.String[] getKeyCodeMap(int keyCode,
int modifiers)
keyCode - the key code.modifiers - the key modifiers.null.public java.lang.Object clone()
clone クラス内 java.lang.Object