All Packages Class Hierarchy This Package Previous Next Index
Class jp.kyasu.awt.text.KeyBinding
java.lang.Object
|
+----jp.kyasu.awt.text.KeyBinding
- public class KeyBinding
- extends Object
- implements Serializable
The KeyBinding
object maps key characters or codes to
KeyAction
object according to the Keymap
object.
- Version:
- 02 Jun 1998
- Author:
- Kazuki YASUMATSU
- See Also:
- CompositeKeyAction, KeyAction, Keymap, TextEditController
-
KeyBinding()
- Constructs an empty key binding.
-
KeyBinding(Keymap)
- Constructs a key binding with the specified keymap.
-
addKeyAction(KeyAction)
- Adds the key action to this key binding.
-
addKeyActions(KeyAction[])
- Adds the key actions to this key binding.
-
getDefaultKeyAction()
- Returns the default key action object which will be invoked when
the pressed key is not associated with any actions and the pressed
key character is printable.
-
getKeyAction(char)
- Returns the key action object associated with the specified key
character.
-
getKeyAction(int, int)
- Returns the key action object associated with the specified key code
with the specified key modifiers.
-
getKeyAction(KeyEvent)
- Returns the key action object associated with the specified key event.
-
getKeyAction(String)
- Returns the key action object associated with the specified name.
-
getKeymap()
- Returns the
Keymap
object of this key binding.
-
isPrintableCharacter(char)
- Tests if the specified character is printable.
-
removeKeyAction(KeyAction)
- Removes the key action from this key binding.
-
removeKeyActionNamed(String)
- Removes the key action named the specified name from this key binding.
-
setKeyActions(KeyAction[])
- Sets the key actions of this key binding.
-
setKeymap(Keymap)
- Sets the
Keymap
object of this key binding.
KeyBinding
public KeyBinding()
- Constructs an empty key binding.
KeyBinding
public KeyBinding(Keymap keymap)
- Constructs a key binding with the specified keymap.
- Parameters:
- keymap - the keymap.
isPrintableCharacter
public static boolean isPrintableCharacter(char ch)
- Tests if the specified character is printable.
- Parameters:
- ch - a character.
- Returns:
-
true
if the character is printable,
false
otherwise.
getKeymap
public Keymap getKeymap()
- Returns the
Keymap
object of this key binding.
- Returns:
- the
Keymap
object of this key binding.
setKeymap
public void setKeymap(Keymap keymap)
- Sets the
Keymap
object of this key binding.
- Parameters:
- keymap - the
Keymap
object.
addKeyAction
public void addKeyAction(KeyAction keyAction)
- Adds the key action to this key binding.
- Parameters:
- keyAction - the key action object.
addKeyActions
public void addKeyActions(KeyAction keyActions[])
- Adds the key actions to this key binding.
- Parameters:
- keyActions - the key action objects.
setKeyActions
public void setKeyActions(KeyAction keyActions[])
- Sets the key actions of this key binding.
- Parameters:
- keyActions - the key action objects.
removeKeyAction
public void removeKeyAction(KeyAction keyAction)
- Removes the key action from this key binding.
- Parameters:
- keyAction - the key action object.
removeKeyActionNamed
public void removeKeyActionNamed(String actionName)
- Removes the key action named the specified name from this key binding.
- Parameters:
- actionName - the name of the key action.
getKeyAction
public KeyAction getKeyAction(String actionName)
- Returns the key action object associated with the specified name.
- Parameters:
- actionName - the name of the key action.
- Returns:
- the key action object, or
null
if no associated
action exists.
getKeyAction
public KeyAction getKeyAction(KeyEvent e)
- Returns the key action object associated with the specified key event.
- Parameters:
- e - the key event.
- Returns:
- the key action object, or
null
if no associated
action exists.
getKeyAction
public KeyAction getKeyAction(char keyChar)
- Returns the key action object associated with the specified key
character.
- Parameters:
- keyChar - the key character.
- Returns:
- the key action object, or
null
if no associated
action exists.
getKeyAction
public KeyAction getKeyAction(int keyCode,
int modifiers)
- Returns the key action object associated with the specified key code
with the specified key modifiers.
- Parameters:
- keyCode - the key code.
- modifiers - the key modifiers.
- Returns:
- the key action object, or
null
if no associated
action exists.
getDefaultKeyAction
public KeyAction getDefaultKeyAction()
- Returns the default key action object which will be invoked when
the pressed key is not associated with any actions and the pressed
key character is printable.
All Packages Class Hierarchy This Package Previous Next Index