edu.virginia.cs.mng.hypercast.demo
Class Entry

java.lang.Object
  |
  +--edu.virginia.cs.mng.hypercast.demo.Entry

class Entry
extends java.lang.Object
implements java.io.Serializable

Entry class. Each entry contains the information of a piece of drawing/operation. The operation may be KILL, MOVE, COPY, NAMEANNOUNCE, NAMEREPLY, DROP, NEWPAGE. The drawing type may be BRUSH, TEXT, LINE, RECT, ROUNDRECT, OVAL, POLY. All types have some common attirbutes, such as entryID, typeID, personID. Each type has specific information. For a drawing type, these including page number, coordinates, color, boundary region, pen size, line width, etc. Some methods are also defined to operate the entry.

See Also:
Serialized Form

Field Summary
(package private)  boolean backclear
          Whether to clear the foreground/background.
(package private)  java.awt.Color backcolor
          Color.
(package private)  boolean boundscalc
           
(package private)  int boundsx1
          The upper-left and lower-right coordinates of the region this entry occupied.
(package private)  int boundsx2
          The upper-left and lower-right coordinates of the region this entry occupied.
(package private)  int boundsy1
          The upper-left and lower-right coordinates of the region this entry occupied.
(package private)  int boundsy2
          The upper-left and lower-right coordinates of the region this entry occupied.
(package private) static int COPY
           
(package private)  boolean done
          Whether this entry is finished drawing.
(package private) static int DROP
           
(package private)  int entryid
          Entry ID.
(package private)  boolean foreclear
          Whether to clear the foreground/background.
(package private)  java.awt.Color forecolor
          Color.
(package private) static int KILL
           
(package private)  java.lang.String label
          A string with various purpose according the entry type.
(package private) static int MOVE
           
(package private) static int NAMEANNOUNCE
           
(package private) static int NAMEREPLY
           
(package private) static int NEWPAGE
           
(package private)  WBFrame parent
          The WBFrame object associated with.
(package private)  char pchar
           
(package private)  int penwidth
           
(package private)  int personid
          Person ID, indicating who draw/operate on this entry.
(package private)  java.awt.Image pic
           
(package private)  int streamid
          Page number, indicating this operation/drawing is performed on which page.
(package private) static java.lang.String[] sType
           
(package private)  int textsize
           
(package private)  boolean trace
           
(package private)  int typeid
          type of this entry.
(package private)  java.util.Vector xs
          Coordinates of this piece of drawing.
(package private)  java.util.Vector ys
          Coordinates of this piece of drawing.
 
Constructor Summary
Entry(Entry e)
          Copy constructor.
Entry(WBFrame pa, int tid, int pid, int sid, int eid, java.util.Vector x, java.util.Vector y, java.awt.Color f, java.awt.Color b, boolean fc, boolean bc, int pw, int ts, java.lang.String l, char p, boolean d, boolean t, java.awt.Image pi)
          Constructor.
Entry(WBFrame p, java.util.Vector x, java.util.Vector y, boolean d, boolean t)
          Constructor.
 
Method Summary
 void dump()
          For debugging purpose.
 byte[] toByteArray()
          To convert the contents of this entry to a byte array.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

KILL

static int KILL

MOVE

static int MOVE

COPY

static int COPY

NAMEANNOUNCE

static int NAMEANNOUNCE

NAMEREPLY

static int NAMEREPLY

DROP

static int DROP

NEWPAGE

static int NEWPAGE

sType

static java.lang.String[] sType

parent

WBFrame parent
The WBFrame object associated with.

typeid

int typeid
type of this entry. It may be an operation, such as KILL, MOVE, COPY, NAMEANOUNCE, NAMEREPLY, DROP, NEWPAGE, or a piece of drawing, such as BRUSH, TEXT, LINE, RECT, ROUNDRECT, OVAL, POLY.

personid

int personid
Person ID, indicating who draw/operate on this entry.

streamid

int streamid
Page number, indicating this operation/drawing is performed on which page.

entryid

int entryid
Entry ID.

xs

java.util.Vector xs
Coordinates of this piece of drawing. The vector often stores a sequence of points.

ys

java.util.Vector ys
Coordinates of this piece of drawing. The vector often stores a sequence of points.

forecolor

java.awt.Color forecolor
Color.

backcolor

java.awt.Color backcolor
Color.

foreclear

boolean foreclear
Whether to clear the foreground/background.

backclear

boolean backclear
Whether to clear the foreground/background.

boundsx1

int boundsx1
The upper-left and lower-right coordinates of the region this entry occupied.

boundsx2

int boundsx2
The upper-left and lower-right coordinates of the region this entry occupied.

boundsy1

int boundsy1
The upper-left and lower-right coordinates of the region this entry occupied.

boundsy2

int boundsy2
The upper-left and lower-right coordinates of the region this entry occupied.

boundscalc

boolean boundscalc

done

boolean done
Whether this entry is finished drawing.

trace

boolean trace

label

java.lang.String label
A string with various purpose according the entry type.

pchar

char pchar

pic

java.awt.Image pic

penwidth

int penwidth

textsize

int textsize
Constructor Detail

Entry

public Entry(WBFrame p,
             java.util.Vector x,
             java.util.Vector y,
             boolean d,
             boolean t)
Constructor.
Parameters:
p - the associated WBFrame object.
x,y - the vectors which store the coordinates of this entry.
d - whether this entry is finished.
t - whether this entry is in tracing.

Entry

public Entry(Entry e)
Copy constructor.
Parameters:
e - an Entry object to be copied.

Entry

public Entry(WBFrame pa,
             int tid,
             int pid,
             int sid,
             int eid,
             java.util.Vector x,
             java.util.Vector y,
             java.awt.Color f,
             java.awt.Color b,
             boolean fc,
             boolean bc,
             int pw,
             int ts,
             java.lang.String l,
             char p,
             boolean d,
             boolean t,
             java.awt.Image pi)
Constructor. With many parameters. Please refer to previous explanation.
Method Detail

toByteArray

public byte[] toByteArray()
To convert the contents of this entry to a byte array. The specific format is user-defined.
Returns:
a byte array, which store the contents of this entry with our own format.

dump

public void dump()
For debugging purpose. Dump all information about this entry to the system.out.