org.naokishibata.generic
Class KeySensor

java.lang.Object
  extended by org.naokishibata.generic.KeySensor
All Implemented Interfaces:
java.awt.event.ComponentListener, java.awt.event.KeyListener, java.util.EventListener

public class KeySensor
extends java.lang.Object
implements java.awt.event.KeyListener, java.awt.event.ComponentListener


Field Summary
static long ALNUM_0
           
static long ALNUM_1
           
static long ALNUM_2
           
static long ALNUM_3
           
static long ALNUM_4
           
static long ALNUM_5
           
static long ALNUM_6
           
static long ALNUM_7
           
static long ALNUM_8
           
static long ALNUM_9
           
static long ALNUM_A
           
static long ALNUM_B
           
static long ALNUM_C
           
static long ALNUM_D
           
static long ALNUM_E
           
static long ALNUM_F
           
static long ALNUM_G
           
static long ALNUM_H
           
static long ALNUM_I
           
static long ALNUM_J
           
static long ALNUM_K
           
static long ALNUM_L
           
static long ALNUM_M
           
static long ALNUM_N
           
static long ALNUM_O
           
static long ALNUM_P
           
static long ALNUM_Q
           
static long ALNUM_R
           
static long ALNUM_S
           
static long ALNUM_T
           
static long ALNUM_U
           
static long ALNUM_V
           
static long ALNUM_W
           
static long ALNUM_X
           
static long ALNUM_Y
           
static long ALNUM_Z
           
static long ALT
           
static long BACKSPACE
           
static long BS
           
static long CAPSLOCK
           
static long CONTROL
           
static long CTRL
           
static long DEL
           
static long DELETE
           
static long DOWN
           
static long END
           
static long ENTER
           
static long ESC
           
static long ESCAPE
           
static long F1
           
static long F10
           
static long F11
           
static long F12
           
static long F2
           
static long F3
           
static long F4
           
static long F5
           
static long F6
           
static long F7
           
static long F8
           
static long F9
           
static long HOME
           
static long INS
           
static long INSERT
           
static long LEFT
           
static long NUMLOCK
           
static long PAGE_DOWN
           
static long PAGE_UP
           
static long PAUSE
           
static long PRTSC
           
static long RETURN
           
static long RIGHT
           
static long SCRLOCK
           
static long SHIFT
           
static long SPACE
           
static long TAB
           
static long UP
           
 
Constructor Summary
KeySensor()
           
KeySensor(java.awt.Component c)
           
 
Method Summary
 void componentHidden(java.awt.event.ComponentEvent e)
           
 void componentMoved(java.awt.event.ComponentEvent e)
           
 void componentResized(java.awt.event.ComponentEvent e)
           
 void componentShown(java.awt.event.ComponentEvent e)
           
 char getKeyTyped()
           
 void installOn(java.awt.Component c)
           
 void keyPressed(java.awt.event.KeyEvent e)
           
 void keyReleased(java.awt.event.KeyEvent e)
           
 long keyState()
           
 long keyState2()
           
 void keyTyped(java.awt.event.KeyEvent e)
           
 char peekKeyTyped()
           
 void reset()
           
 void uninstallFrom(java.awt.Component c)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LEFT

public static final long LEFT
See Also:
Constant Field Values

DOWN

public static final long DOWN
See Also:
Constant Field Values

RIGHT

public static final long RIGHT
See Also:
Constant Field Values

UP

public static final long UP
See Also:
Constant Field Values

PAGE_UP

public static final long PAGE_UP
See Also:
Constant Field Values

PAGE_DOWN

public static final long PAGE_DOWN
See Also:
Constant Field Values

SHIFT

public static final long SHIFT
See Also:
Constant Field Values

CONTROL

public static final long CONTROL
See Also:
Constant Field Values

CTRL

public static final long CTRL
See Also:
Constant Field Values

TAB

public static final long TAB
See Also:
Constant Field Values

ESC

public static final long ESC
See Also:
Constant Field Values

ESCAPE

public static final long ESCAPE
See Also:
Constant Field Values

ALT

public static final long ALT
See Also:
Constant Field Values

SPACE

public static final long SPACE
See Also:
Constant Field Values

ENTER

public static final long ENTER
See Also:
Constant Field Values

RETURN

public static final long RETURN
See Also:
Constant Field Values

HOME

public static final long HOME
See Also:
Constant Field Values

END

public static final long END
See Also:
Constant Field Values

INS

public static final long INS
See Also:
Constant Field Values

INSERT

public static final long INSERT
See Also:
Constant Field Values

DEL

public static final long DEL
See Also:
Constant Field Values

DELETE

public static final long DELETE
See Also:
Constant Field Values

BS

public static final long BS
See Also:
Constant Field Values

BACKSPACE

public static final long BACKSPACE
See Also:
Constant Field Values

PAUSE

public static final long PAUSE
See Also:
Constant Field Values

PRTSC

public static final long PRTSC
See Also:
Constant Field Values

CAPSLOCK

public static final long CAPSLOCK
See Also:
Constant Field Values

NUMLOCK

public static final long NUMLOCK
See Also:
Constant Field Values

SCRLOCK

public static final long SCRLOCK
See Also:
Constant Field Values

F1

public static final long F1
See Also:
Constant Field Values

F2

public static final long F2
See Also:
Constant Field Values

F3

public static final long F3
See Also:
Constant Field Values

F4

public static final long F4
See Also:
Constant Field Values

F5

public static final long F5
See Also:
Constant Field Values

F6

public static final long F6
See Also:
Constant Field Values

F7

public static final long F7
See Also:
Constant Field Values

F8

public static final long F8
See Also:
Constant Field Values

F9

public static final long F9
See Also:
Constant Field Values

F10

public static final long F10
See Also:
Constant Field Values

F11

public static final long F11
See Also:
Constant Field Values

F12

public static final long F12
See Also:
Constant Field Values

ALNUM_0

public static final long ALNUM_0
See Also:
Constant Field Values

ALNUM_1

public static final long ALNUM_1
See Also:
Constant Field Values

ALNUM_2

public static final long ALNUM_2
See Also:
Constant Field Values

ALNUM_3

public static final long ALNUM_3
See Also:
Constant Field Values

ALNUM_4

public static final long ALNUM_4
See Also:
Constant Field Values

ALNUM_5

public static final long ALNUM_5
See Also:
Constant Field Values

ALNUM_6

public static final long ALNUM_6
See Also:
Constant Field Values

ALNUM_7

public static final long ALNUM_7
See Also:
Constant Field Values

ALNUM_8

public static final long ALNUM_8
See Also:
Constant Field Values

ALNUM_9

public static final long ALNUM_9
See Also:
Constant Field Values

ALNUM_A

public static final long ALNUM_A
See Also:
Constant Field Values

ALNUM_B

public static final long ALNUM_B
See Also:
Constant Field Values

ALNUM_C

public static final long ALNUM_C
See Also:
Constant Field Values

ALNUM_D

public static final long ALNUM_D
See Also:
Constant Field Values

ALNUM_E

public static final long ALNUM_E
See Also:
Constant Field Values

ALNUM_F

public static final long ALNUM_F
See Also:
Constant Field Values

ALNUM_G

public static final long ALNUM_G
See Also:
Constant Field Values

ALNUM_H

public static final long ALNUM_H
See Also:
Constant Field Values

ALNUM_I

public static final long ALNUM_I
See Also:
Constant Field Values

ALNUM_J

public static final long ALNUM_J
See Also:
Constant Field Values

ALNUM_K

public static final long ALNUM_K
See Also:
Constant Field Values

ALNUM_L

public static final long ALNUM_L
See Also:
Constant Field Values

ALNUM_M

public static final long ALNUM_M
See Also:
Constant Field Values

ALNUM_N

public static final long ALNUM_N
See Also:
Constant Field Values

ALNUM_O

public static final long ALNUM_O
See Also:
Constant Field Values

ALNUM_P

public static final long ALNUM_P
See Also:
Constant Field Values

ALNUM_Q

public static final long ALNUM_Q
See Also:
Constant Field Values

ALNUM_R

public static final long ALNUM_R
See Also:
Constant Field Values

ALNUM_S

public static final long ALNUM_S
See Also:
Constant Field Values

ALNUM_T

public static final long ALNUM_T
See Also:
Constant Field Values

ALNUM_U

public static final long ALNUM_U
See Also:
Constant Field Values

ALNUM_V

public static final long ALNUM_V
See Also:
Constant Field Values

ALNUM_W

public static final long ALNUM_W
See Also:
Constant Field Values

ALNUM_X

public static final long ALNUM_X
See Also:
Constant Field Values

ALNUM_Y

public static final long ALNUM_Y
See Also:
Constant Field Values

ALNUM_Z

public static final long ALNUM_Z
See Also:
Constant Field Values
Constructor Detail

KeySensor

public KeySensor()

KeySensor

public KeySensor(java.awt.Component c)
Method Detail

keyState

public long keyState()

keyState2

public long keyState2()

getKeyTyped

public char getKeyTyped()

peekKeyTyped

public char peekKeyTyped()

installOn

public void installOn(java.awt.Component c)

uninstallFrom

public void uninstallFrom(java.awt.Component c)

reset

public void reset()

keyTyped

public void keyTyped(java.awt.event.KeyEvent e)
Specified by:
keyTyped in interface java.awt.event.KeyListener

keyPressed

public void keyPressed(java.awt.event.KeyEvent e)
Specified by:
keyPressed in interface java.awt.event.KeyListener

keyReleased

public void keyReleased(java.awt.event.KeyEvent e)
Specified by:
keyReleased in interface java.awt.event.KeyListener

componentHidden

public void componentHidden(java.awt.event.ComponentEvent e)
Specified by:
componentHidden in interface java.awt.event.ComponentListener

componentMoved

public void componentMoved(java.awt.event.ComponentEvent e)
Specified by:
componentMoved in interface java.awt.event.ComponentListener

componentResized

public void componentResized(java.awt.event.ComponentEvent e)
Specified by:
componentResized in interface java.awt.event.ComponentListener

componentShown

public void componentShown(java.awt.event.ComponentEvent e)
Specified by:
componentShown in interface java.awt.event.ComponentListener