|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectThincMsg
ThincCMsg
ThincCMsgEvent
ThincCMsgEventMouseButton
public final class ThincCMsgEventMouseButton
ThincCMsgEventMouseButton
handles the mouse clicked / released event from canvas.
it simply implements MouseListener
interfaces provided from java, and it is added
as a MouseListener on ThincClientCanvas.
Field Summary | |
---|---|
static int |
BUTTON_PRESSED
|
static int |
BUTTON_RELEASED
|
static int |
MESSAGE_SIZE
|
static int |
MESSAGE_TYPE
|
private byte |
pressed
|
private java.awt.event.MouseEvent |
send
|
Fields inherited from class ThincMsg |
---|
canvas, handler |
Constructor Summary | |
---|---|
ThincCMsgEventMouseButton(ThincMsgHandler h,
ThincClientCanvas c)
creates ThincCMsgEventMouseButton object. |
Method Summary | |
---|---|
byte |
getMsgType()
getMsgType() returns a type of the message. |
short |
messageSize()
messageSize() returns the total messageSize to send. |
void |
mouseClicked(java.awt.event.MouseEvent arg0)
|
void |
mouseEntered(java.awt.event.MouseEvent arg0)
|
void |
mouseExited(java.awt.event.MouseEvent arg0)
|
void |
mousePressed(java.awt.event.MouseEvent arg0)
mousePressed() sets the pressed as BUTTON_PRESSED and saves MouseEvent object into send variable. |
void |
mouseReleased(java.awt.event.MouseEvent arg0)
mouseReleased() sets the pressed as BUTTON_RELEASED and saves MouseEvent object into send variable. |
void |
process()
process() simply calls the send method on ThincMsgHandler |
void |
putMessage(java.nio.ByteBuffer b)
putMessage() simply puts buttonMask 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 BUTTON_PRESSED
public static final int BUTTON_RELEASED
private byte pressed
private java.awt.event.MouseEvent send
Constructor Detail |
---|
public ThincCMsgEventMouseButton(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
ThincMsgHandler
process
in class ThincMsg
ThincException
public void mousePressed(java.awt.event.MouseEvent arg0)
mousePressed
in interface java.awt.event.MouseListener
public void mouseReleased(java.awt.event.MouseEvent arg0)
mouseReleased
in interface java.awt.event.MouseListener
public void mouseClicked(java.awt.event.MouseEvent arg0)
mouseClicked
in interface java.awt.event.MouseListener
public void mouseEntered(java.awt.event.MouseEvent arg0)
mouseEntered
in interface java.awt.event.MouseListener
public void mouseExited(java.awt.event.MouseEvent arg0)
mouseExited
in interface java.awt.event.MouseListener
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |