net.sf.banglapad
Class BanglaKeyListener

java.lang.Object
  extended by java.awt.event.KeyAdapter
      extended by net.sf.banglapad.BanglaKeyListener
All Implemented Interfaces:
java.awt.event.KeyListener, java.util.EventListener

public class BanglaKeyListener
extends java.awt.event.KeyAdapter

BanglaKeyListener

Version:
0.1, September 21, 2005
Author:
Naushad UzZaman (naushadzaman@gmail.com), Zahurul Islam (zahurul@bracuniversity.net)

Constructor Summary
BanglaKeyListener(javax.swing.JComboBox comboBox)
          Creates a new VietKeyListener.
BanglaKeyListener(javax.swing.text.JTextComponent textComponent)
          Creates a new VietKeyListener.
 
Method Summary
 void keyAction(java.awt.event.KeyEvent e)
          FIXME: keyAction is called in the KeyTyped listener.
 void keyTyped(java.awt.event.KeyEvent e)
          Invoked when a key has been typed.
static void setMacroMap(java.util.Properties shortHandMap)
          Sets map for shorthand.
static void setPaliSanskritModeEnabled(boolean mode)
          Sets Pali-Sanskrit/Dega mode for key input.
static void setSmartMark(boolean smartMark)
          Sets the SmartMark capability on or off.
static void setVietModeEnabled(boolean mode)
          Sets Vietnamese mode for key input.
 
Methods inherited from class java.awt.event.KeyAdapter
keyPressed, keyReleased
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BanglaKeyListener

public BanglaKeyListener(javax.swing.text.JTextComponent textComponent)
Creates a new VietKeyListener.

Parameters:
textComponent - the JTextComponent to be listened

BanglaKeyListener

public BanglaKeyListener(javax.swing.JComboBox comboBox)
Creates a new VietKeyListener.

Parameters:
comboBox - the JComboBox to be listened
Method Detail

setVietModeEnabled

public static void setVietModeEnabled(boolean mode)
Sets Vietnamese mode for key input.

Parameters:
mode - true to enable entry of Vietnamese characters (enabled by default)

setPaliSanskritModeEnabled

public static void setPaliSanskritModeEnabled(boolean mode)
Sets Pali-Sanskrit/Dega mode for key input.

This capability is dependent on VIQR input method being selected.

Parameters:
mode - true to enable entry of Pali-Sanskrit/Dega characters in addition to Vietnamese

setSmartMark

public static void setSmartMark(boolean smartMark)
Sets the SmartMark capability on or off.

Parameters:
smartMark - true to enable automatic placement of diacritical marks on appropriate vowels in a word;
otherwise, they must be typed immediately after the character they qualify.

setMacroMap

public static void setMacroMap(java.util.Properties shortHandMap)
Sets map for shorthand.

Parameters:
shortHandMap - the list of shorthand sequences

keyAction

public void keyAction(java.awt.event.KeyEvent e)
FIXME: keyAction is called in the KeyTyped listener. It is called when a key is typed. Kept the action for Bangla key typed in a specific method, so that it can be changed and modified easily.

Parameters:
e - is the KeyEvent found from KeyTyped

keyTyped

public void keyTyped(java.awt.event.KeyEvent e)
Invoked when a key has been typed.

Specified by:
keyTyped in interface java.awt.event.KeyListener
Overrides:
keyTyped in class java.awt.event.KeyAdapter
Parameters:
e - invoked when a key has been typed. This event occurs when a key press is followed by a key release.