Class ThincCMsgResizeEvent

java.lang.Object
  extended by ThincMsg
      extended by ThincCMsg
          extended by ThincCMsgResize
              extended by ThincCMsgResizeEvent
All Implemented Interfaces:
java.awt.event.HierarchyBoundsListener, java.util.EventListener

public final class ThincCMsgResizeEvent
extends ThincCMsgResize
implements java.awt.event.HierarchyBoundsListener

ThincCMsgEventMouseButton handles resized event from canvas. it simply implements HierarchyBoundsListener interfaces provided from java, and it is added as a HierarchyBoundsListener on ThincClientCanvas.

Author:
Young Jin Yoon
See Also:
ThincCMsgResize

Field Summary
private  ThincFrame frame
           
private  int height
           
static int MESSAGE_SIZE
           
static int MESSAGE_TYPE
           
private  int width
           
 
Fields inherited from class ThincMsg
canvas, handler
 
Constructor Summary
ThincCMsgResizeEvent(ThincMsgHandler h, ThincClientCanvas c, ThincFrame f)
          creates ThincCMsgResizeEvent object.
 
Method Summary
 void ancestorMoved(java.awt.event.HierarchyEvent arg0)
           
 void ancestorResized(java.awt.event.HierarchyEvent arg0)
          ancestorResized() implemented method from HierarchyBoundsListener interface.
 byte getMsgType()
          getMsgType() returns a type of the message.
 short messageSize()
          messageSize() returns the total messageSize to send.
 void process()
          process() Set resized width and height into ThincSMsgFlagResize class and invokes send method in ThincMsgHandler.
 void putMessage(java.nio.ByteBuffer b)
          putMessage() simply puts resized width and height.
 
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

MESSAGE_TYPE

public static final int MESSAGE_TYPE
See Also:
Constant Field Values

MESSAGE_SIZE

public static final int MESSAGE_SIZE
See Also:
Constant Field Values

width

private int width

height

private int height

frame

private ThincFrame frame
Constructor Detail

ThincCMsgResizeEvent

public ThincCMsgResizeEvent(ThincMsgHandler h,
                            ThincClientCanvas c,
                            ThincFrame f)
creates ThincCMsgResizeEvent object.

Parameters:
h - ThincMsgHandler to handle the message
c - ThincClientCanvas to get the information
Method Detail

getMsgType

public byte getMsgType()
Description copied from class: ThincCMsg
getMsgType() returns a type of the message.

Specified by:
getMsgType in class ThincCMsg
Returns:
type of message

putMessage

public void putMessage(java.nio.ByteBuffer b)
putMessage() simply puts resized width and height.

Specified by:
putMessage in class ThincCMsg
Parameters:
b - ByteBuffer object to send

messageSize

public short messageSize()
Description copied from class: ThincCMsg
messageSize() returns the total messageSize to send.

Specified by:
messageSize in class ThincCMsg
Returns:
total messageSize refered from ThincMsgHandler class

process

public void process()
             throws ThincException
process() Set resized width and height into ThincSMsgFlagResize class and invokes send method in ThincMsgHandler. It also creates ThincCMsgResizeUpdate object and invokes process, also. (which means send update message for entire screen right after send itself to the server.)

Specified by:
process in class ThincMsg
Throws:
ThincException

ancestorResized

public void ancestorResized(java.awt.event.HierarchyEvent arg0)
ancestorResized() implemented method from HierarchyBoundsListener interface. it saves resized height and width, then invokes process.

Specified by:
ancestorResized in interface java.awt.event.HierarchyBoundsListener

ancestorMoved

public void ancestorMoved(java.awt.event.HierarchyEvent arg0)
Specified by:
ancestorMoved in interface java.awt.event.HierarchyBoundsListener