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

Constructor Index

 o KeyBinding()
Constructs an empty key binding.
 o KeyBinding(Keymap)
Constructs a key binding with the specified keymap.

Method Index

 o addKeyAction(KeyAction)
Adds the key action to this key binding.
 o addKeyActions(KeyAction[])
Adds the key actions to this key binding.
 o 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.
 o getKeyAction(char)
Returns the key action object associated with the specified key character.
 o getKeyAction(int, int)
Returns the key action object associated with the specified key code with the specified key modifiers.
 o getKeyAction(KeyEvent)
Returns the key action object associated with the specified key event.
 o getKeyAction(String)
Returns the key action object associated with the specified name.
 o getKeymap()
Returns the Keymap object of this key binding.
 o isPrintableCharacter(char)
Tests if the specified character is printable.
 o removeKeyAction(KeyAction)
Removes the key action from this key binding.
 o removeKeyActionNamed(String)
Removes the key action named the specified name from this key binding.
 o setKeyActions(KeyAction[])
Sets the key actions of this key binding.
 o setKeymap(Keymap)
Sets the Keymap object of this key binding.

Constructors

 o KeyBinding
 public KeyBinding()
Constructs an empty key binding.

 o KeyBinding
 public KeyBinding(Keymap keymap)
Constructs a key binding with the specified keymap.

Parameters:
keymap - the keymap.

Methods

 o 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.
 o getKeymap
 public Keymap getKeymap()
Returns the Keymap object of this key binding.

Returns:
the Keymap object of this key binding.
 o setKeymap
 public void setKeymap(Keymap keymap)
Sets the Keymap object of this key binding.

Parameters:
keymap - the Keymap object.
 o addKeyAction
 public void addKeyAction(KeyAction keyAction)
Adds the key action to this key binding.

Parameters:
keyAction - the key action object.
 o addKeyActions
 public void addKeyActions(KeyAction keyActions[])
Adds the key actions to this key binding.

Parameters:
keyActions - the key action objects.
 o setKeyActions
 public void setKeyActions(KeyAction keyActions[])
Sets the key actions of this key binding.

Parameters:
keyActions - the key action objects.
 o removeKeyAction
 public void removeKeyAction(KeyAction keyAction)
Removes the key action from this key binding.

Parameters:
keyAction - the key action object.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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