|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectThincMsg
ThincCMsg
ThincCMsgEvent
ThincCMsgEventKey
public final class ThincCMsgEventKey
ThincCMsgEventKey
handles the key pressed and released event from canvas. it simply
implements KeyListener
interfaces provided from java, and it is added
as a KeyListener on ThincClientCanvas.
Field Summary | |
---|---|
private int |
key
|
static int |
KEY_DOWN
|
static int |
KEY_UP
|
static int |
MESSAGE_SIZE
|
static int |
MESSAGE_TYPE
|
private byte |
status
|
private static int |
VK_BACK_SLASH
|
private static int |
VK_BACK_TICK
|
private static int |
VK_COLON
|
private static int |
VK_COMMA
|
private static int |
VK_LBRACKET
|
private static int |
VK_MINUS
|
private static int |
VK_PERIOD
|
private static int |
VK_PLUS
|
private static int |
VK_RBRACKET
|
private static int |
VK_SEMICOLON
|
private static int |
VK_SINGLE_QUOTE
|
private static int |
VK_SLASH
|
private static int |
XK_Alt_L
|
private static int |
XK_Back_slash
|
private static int |
XK_Back_Tick
|
private static int |
XK_BackSpace
|
private static int |
XK_Cancel
|
private static int |
XK_Caps_Lock
|
private static int |
XK_Clear
|
private static int |
XK_Colon
|
private static int |
XK_Comma
|
private static int |
XK_Control_L
|
private static int |
XK_Delete
|
private static int |
XK_Down
|
private static int |
XK_End
|
private static int |
XK_Escape
|
private static int |
XK_F1
|
private static int |
XK_F10
|
private static int |
XK_F11
|
private static int |
XK_F12
|
private static int |
XK_F13
|
private static int |
XK_F14
|
private static int |
XK_F15
|
private static int |
XK_F16
|
private static int |
XK_F17
|
private static int |
XK_F18
|
private static int |
XK_F19
|
private static int |
XK_F2
|
private static int |
XK_F20
|
private static int |
XK_F21
|
private static int |
XK_F22
|
private static int |
XK_F23
|
private static int |
XK_F24
|
private static int |
XK_F3
|
private static int |
XK_F4
|
private static int |
XK_F5
|
private static int |
XK_F6
|
private static int |
XK_F7
|
private static int |
XK_F8
|
private static int |
XK_F9
|
private static int |
XK_Find
|
private static int |
XK_Help
|
private static int |
XK_Home
|
private static int |
XK_Insert
|
private static int |
XK_KP_0
|
private static int |
XK_KP_1
|
private static int |
XK_KP_2
|
private static int |
XK_KP_3
|
private static int |
XK_KP_4
|
private static int |
XK_KP_5
|
private static int |
XK_KP_6
|
private static int |
XK_KP_7
|
private static int |
XK_KP_8
|
private static int |
XK_KP_9
|
private static int |
XK_LBracket
|
private static int |
XK_Left
|
private static int |
XK_Meta_L
|
private static int |
XK_Minus
|
private static int |
XK_Mode_switch
|
private static int |
XK_Num_Lock
|
private static int |
XK_Page_Down
|
private static int |
XK_Page_Up
|
private static int |
XK_Pause
|
private static int |
XK_Period
|
private static int |
XK_Plus
|
private static int |
XK_Print
|
private static int |
XK_RBracket
|
private static int |
XK_Redo
|
private static int |
XK_Return
|
private static int |
XK_Right
|
private static int |
XK_Scroll_Lock
|
private static int |
XK_Semi_Colon
|
private static int |
XK_Shift_L
|
private static int |
XK_Shift_Lock
|
private static int |
XK_Single_Quote
|
private static int |
XK_Slash
|
private static int |
XK_Tab
|
private static int |
XK_Undo
|
private static int |
XK_Up
|
private static int |
XKEY_SIZE
|
Fields inherited from class ThincMsg |
---|
canvas, handler |
Constructor Summary | |
---|---|
ThincCMsgEventKey(ThincMsgHandler h,
ThincClientCanvas c)
creates ThincCMsgEventKey object. |
Method Summary | |
---|---|
private int |
getKeyCode(java.awt.event.KeyEvent e)
getKeyCode() translate KeyCode for java to KeyCode for X11. |
byte |
getMsgType()
getMsgType() returns a type of the message. |
void |
keyPressed(java.awt.event.KeyEvent arg0)
keyPressed() sets the key using getKeyCode method and status as KEY_DOWN. |
void |
keyReleased(java.awt.event.KeyEvent arg0)
keyReleased() sets the key using getKeyCode method and status as KEY_UP. |
void |
keyTyped(java.awt.event.KeyEvent arg0)
|
short |
messageSize()
messageSize() returns the total messageSize to send. |
void |
process()
process() is general processing method for each thinc messages. |
void |
putMessage(java.nio.ByteBuffer b)
putMessage() simply puts key code and pressed / released information |
Methods inherited from class ThincCMsg |
---|
getFlag, headerSize |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int MESSAGE_TYPE
public static final int MESSAGE_SIZE
public static final int KEY_DOWN
public static final int KEY_UP
private int key
private byte status
private static final int XK_BackSpace
private static final int XK_Tab
private static final int XK_Clear
private static final int XK_Return
private static final int XK_Pause
private static final int XK_Scroll_Lock
private static final int XK_Escape
private static final int XK_Delete
private static final int XK_Home
private static final int XK_Left
private static final int XK_Up
private static final int XK_Right
private static final int XK_Down
private static final int XK_Page_Up
private static final int XK_Page_Down
private static final int XK_End
private static final int XK_Print
private static final int XK_Insert
private static final int XK_Undo
private static final int XK_Redo
private static final int XK_Find
private static final int XK_Cancel
private static final int XK_Help
private static final int XK_Mode_switch
private static final int XK_Num_Lock
private static final int XK_KP_0
private static final int XK_KP_1
private static final int XK_KP_2
private static final int XK_KP_3
private static final int XK_KP_4
private static final int XK_KP_5
private static final int XK_KP_6
private static final int XK_KP_7
private static final int XK_KP_8
private static final int XK_KP_9
private static final int XK_F1
private static final int XK_F2
private static final int XK_F3
private static final int XK_F4
private static final int XK_F5
private static final int XK_F6
private static final int XK_F7
private static final int XK_F8
private static final int XK_F9
private static final int XK_F10
private static final int XK_F11
private static final int XK_F12
private static final int XK_F13
private static final int XK_F14
private static final int XK_F15
private static final int XK_F16
private static final int XK_F17
private static final int XK_F18
private static final int XK_F19
private static final int XK_F20
private static final int XK_F21
private static final int XK_F22
private static final int XK_F23
private static final int XK_F24
private static final int XK_Shift_L
private static final int XK_Control_L
private static final int XK_Caps_Lock
private static final int XK_Shift_Lock
private static final int XK_Meta_L
private static final int XK_Alt_L
private static final int XK_Semi_Colon
private static final int VK_SEMICOLON
private static final int XK_Colon
private static final int VK_COLON
private static final int XK_Single_Quote
private static final int VK_SINGLE_QUOTE
private static final int XK_Back_Tick
private static final int VK_BACK_TICK
private static final int XK_Back_slash
private static final int VK_BACK_SLASH
private static final int XK_Period
private static final int VK_PERIOD
private static final int XK_Slash
private static final int VK_SLASH
private static final int XK_Comma
private static final int VK_COMMA
private static final int XK_RBracket
private static final int VK_RBRACKET
private static final int XK_LBracket
private static final int VK_LBRACKET
private static final int XK_Plus
private static final int VK_PLUS
private static final int XK_Minus
private static final int VK_MINUS
private static final int XKEY_SIZE
Constructor Detail |
---|
public ThincCMsgEventKey(ThincMsgHandler h, ThincClientCanvas c)
h
- ThincMsgHandler
to handle the messagec
- ThincClientCanvas
to get the informationMethod Detail |
---|
public byte getMsgType()
ThincCMsg
getMsgType
in class ThincCMsg
public void putMessage(java.nio.ByteBuffer b)
putMessage
in class ThincCMsg
b
- ByteBuffer object to sendThincCMsg.putMessage()
public short messageSize()
ThincCMsg
messageSize
in class ThincCMsg
public void process() throws ThincException
ThincMsg
ThincMsgHandler
object to send the
client messages.
In server messages, it interacts with ThincClientCanvas
in this method.
process
in class ThincMsg
ThincException
public void keyPressed(java.awt.event.KeyEvent arg0)
keyPressed
in interface java.awt.event.KeyListener
public void keyReleased(java.awt.event.KeyEvent arg0)
keyReleased
in interface java.awt.event.KeyListener
public void keyTyped(java.awt.event.KeyEvent arg0)
keyTyped
in interface java.awt.event.KeyListener
private int getKeyCode(java.awt.event.KeyEvent e)
e
- java key code
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |