Class Rect
Class Rect
java.lang.Object
|
+----ObjBaseClass
|
+----Rect
- public class Rect
- extends ObjBaseClass
- implements DrawObject, Cloneable
-
base_x
-
-
base_y
-
-
baseColors
-
-
color
-
-
height
-
-
id
-
-
obj_id
-
-
old_height
-
-
old_width
-
-
old_x1
-
-
old_y1
-
-
type
-
-
width
-
-
x1
-
-
y1
-
-
Rect(SketchArea)
-
-
Rect(SketchArea, int)
-
-
assemble(int)
- assembles Rectangle object's parameters before calling superclass's
BaseClassAssemble function to assemble this resulting packet with
RTP header.
-
clean(Graphics)
-
-
clear(Graphics)
-
-
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.
-
draw(int, int, int, int, int, int)
-
-
erase(Graphics, boolean)
-
-
erase_obj_to_move(Graphics)
-
-
getObjID()
-
-
getType()
-
-
mouseDown(int, int)
-
-
mouseDrag(int, int)
-
-
mouseUp(int, int)
-
-
moveUP(Graphics, int, int)
-
-
moving(Graphics, int, int)
-
-
paint(Graphics)
-
-
processInData(byte[])
- retrieves Rectangle object's parameters from the received packet
and displays on the drawing canvas of the whiteboard.
-
send()
-
-
setBaseDist(Graphics, int, int)
-
-
setBasePoint(int, int)
-
-
setPenColor(Graphics, int)
-
x1
public int x1
y1
public int y1
base_x
public int base_x
base_y
public int base_y
old_x1
public int old_x1
old_y1
public int old_y1
width
public int width
height
public int height
old_width
public int old_width
old_height
public int old_height
type
public int type
id
public int id
color
public int color
baseColors
public Color baseColors[]
obj_id
public int obj_id
Rect
public Rect(SketchArea parent)
Rect
public Rect(SketchArea parent,
int c)
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
mouseDown
public boolean mouseDown(int x,
int y)
mouseUp
public boolean mouseUp(int x,
int y)
send
public void send()
mouseDrag
public boolean mouseDrag(int x,
int y)
moving
public void moving(Graphics g,
int x,
int y)
setBasePoint
public void setBasePoint(int x,
int y)
setBaseDist
public void setBaseDist(Graphics g,
int x,
int y)
moveUP
public void moveUP(Graphics g,
int x,
int y)
clear
public void clear(Graphics g)
clean
public void clean(Graphics g)
erase
public void erase(Graphics g,
boolean send_del_req)
erase_obj_to_move
public void erase_obj_to_move(Graphics g)
paint
public void paint(Graphics g)
draw
public void draw(int xx1,
int yy1,
int xx2,
int yy2,
int col,
int obj_id_recvd)
setPenColor
public void setPenColor(Graphics g,
int c)
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
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
getType
public int getType()
getObjID
public int getObjID()