Class Rect

Class Rect

java.lang.Object
   |
   +----ObjBaseClass
           |
           +----Rect

public class Rect
extends ObjBaseClass
implements DrawObject, Cloneable

Variable Index

 o base_x
 o base_y
 o baseColors
 o color
 o height
 o id
 o obj_id
 o old_height
 o old_width
 o old_x1
 o old_y1
 o type
 o width
 o x1
 o y1

Constructor Index

 o Rect(SketchArea)
 o Rect(SketchArea, int)

Method Index

 o assemble(int)
assembles Rectangle object's parameters before calling superclass's BaseClassAssemble function to assemble this resulting packet with RTP header.
 o clean(Graphics)
 o clear(Graphics)
 o clone()
clones a rectangle object by making an exact copy of this rectangle object with values equal to the original values, except that the starting and ending points of the newly cloned rectangle are translated by a value of TRANSLATE_X and TRANSLATE_Y defined in the ObjBaseClass.java.
 o draw(int, int, int, int, int, int)
 o erase(Graphics, boolean)
 o erase_obj_to_move(Graphics)
 o getObjID()
 o getType()
 o mouseDown(int, int)
 o mouseDrag(int, int)
 o mouseUp(int, int)
 o moveUP(Graphics, int, int)
 o moving(Graphics, int, int)
 o paint(Graphics)
 o processInData(byte[])
retrieves Rectangle object's parameters from the received packet and displays on the drawing canvas of the whiteboard.
 o send()
 o setBaseDist(Graphics, int, int)
 o setBasePoint(int, int)
 o setPenColor(Graphics, int)

Variables

 o x1
  public int x1
 o y1
  public int y1
 o base_x
  public int base_x
 o base_y
  public int base_y
 o old_x1
  public int old_x1
 o old_y1
  public int old_y1
 o width
  public int width
 o height
  public int height
 o old_width
  public int old_width
 o old_height
  public int old_height
 o type
  public int type
 o id
  public int id
 o color
  public int color
 o baseColors
  public Color baseColors[]
 o obj_id
  public int obj_id

Constructors

 o Rect
  public Rect(SketchArea parent)
 o Rect
  public Rect(SketchArea parent,
              int c)

Methods

 o clone
  public Object clone()
clones a rectangle object by making an exact copy of this rectangle object with values equal to the original values, except that the starting and ending points of the newly cloned rectangle are translated by a value of TRANSLATE_X and TRANSLATE_Y defined in the ObjBaseClass.java.
Returns:
a cloned object.
Overrides:
clone in class Object
 o mouseDown
  public boolean mouseDown(int x,
                           int y)
 o mouseUp
  public boolean mouseUp(int x,
                         int y)
 o send
  public void send()
 o mouseDrag
  public boolean mouseDrag(int x,
                           int y)
 o moving
  public void moving(Graphics g,
                     int x,
                     int y)
 o setBasePoint
  public void setBasePoint(int x,
                           int y)
 o setBaseDist
  public void setBaseDist(Graphics g,
                          int x,
                          int y)
 o moveUP
  public void moveUP(Graphics g,
                     int x,
                     int y)
 o clear
  public void clear(Graphics g)
 o clean
  public void clean(Graphics g)
 o erase
  public void erase(Graphics g,
                    boolean send_del_req)
 o erase_obj_to_move
  public void erase_obj_to_move(Graphics g)
 o paint
  public void paint(Graphics g)
 o draw
  public void draw(int xx1,
                   int yy1,
                   int xx2,
                   int yy2,
                   int col,
                   int obj_id_recvd)
 o setPenColor
  public void setPenColor(Graphics g,
                          int c)
 o assemble
  public void assemble(int ObjectType)
assembles Rectangle object's parameters before calling superclass's BaseClassAssemble function to assemble this resulting packet with RTP header. This function is called by mouseUp Event.
Returns:
void
 o processInData
  public void processInData(byte buf[])
retrieves Rectangle object's parameters from the received packet and displays on the drawing canvas of the whiteboard.
Parameters:
buf - buffer storing the object's parameters in the form of byte array.
Returns:
void
 o getType
  public int getType()
 o getObjID
  public int getObjID()