|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectThincMsg
ThincCMsg
ThincCMsgEvent
ThincCMsgEventMouseMove
public final class ThincCMsgEventMouseMove
ThincCMsgEventMouseMove
handles the mouse moved event from canvas.
it simply implements MouseMotionListener
interfaces provided from java, and it is added
as a MouseMotionListener on ThincClientCanvas.
Field Summary | |
---|---|
static int |
MESSAGE_SIZE
|
static int |
MESSAGE_TYPE
|
static int |
TIME_QUANTUM
|
private short |
x
|
private short |
y
|
Fields inherited from class ThincMsg |
---|
canvas, handler |
Constructor Summary | |
---|---|
ThincCMsgEventMouseMove(ThincMsgHandler h,
ThincClientCanvas c)
creates ThincCMsgEventMove object. |
Method Summary | |
---|---|
byte |
getMsgType()
getMsgType() returns a type of the message. |
short |
messageSize()
messageSize() returns the total messageSize to send. |
void |
mouseDragged(java.awt.event.MouseEvent moved)
mouseDragged() get the current position of cursor by using getX() and getY from MouseEvent object. then resize it if required. finally, it invokes process() method. |
void |
mouseMoved(java.awt.event.MouseEvent moved)
mouseMoved() get the current position of cursor by using getX() and getY from MouseEvent object. then resize it if required. finally, it invokes process() method. it is exactly as same as mouseDragged() method. |
void |
process()
process() is general processing method for each thinc messages. |
void |
putMessage(java.nio.ByteBuffer b)
putMessage() simply puts new coordination information for cursor. |
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 TIME_QUANTUM
private short x
private short y
Constructor Detail |
---|
public ThincCMsgEventMouseMove(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 mouseDragged(java.awt.event.MouseEvent moved)
mouseDragged
in interface java.awt.event.MouseMotionListener
public void mouseMoved(java.awt.event.MouseEvent moved)
mouseMoved
in interface java.awt.event.MouseMotionListener
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |