|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--candy.core.candyObject
|
+--candy.util.whiteboard.Whiteboard
The Whiteboard is the class which encapsulates an entire Whiteboard session from its inception through all of the operations affecting it to its completion. A Whiteboard is comprised mainly of a Vector of Packet's. Each user that is attached to a Whiteboard has a their own copy of the actual Whiteboard and maintains a copy of the same list of packets which represent all the operations on the Whiteboard. Whenever a user adds a WBPrimitive to their copy of the Whiteboard, the WBPrimitive is timestamped and written to the JavaSpace. Each other client attached to the Whiteboard is listening on the JavaSpace for any new WBPrimitive. They extract this WBPrimitive from the JavaSpace and insert it into their ordered list of packets then redraw the Whiteboard; thus ensuring concurrent copies of the same whiteboard.
| Field Summary | |
java.lang.String |
handle
The Whiteboard's identifier |
java.util.Vector |
members
A Vector of the Members that are currently attached to the WB |
WhiteboardMeta |
metadata
all member vars must be public for javaspace candyObject |
(package private) WhiteboardView |
myView
transient WhiteboardView for transcriptable playback |
java.util.Vector |
packets
The Vector of timestamped packets making up this WhiteBoard. |
java.lang.Integer |
transcriptIdx
Transcriptable interface implementation |
java.lang.Boolean |
transcripting
|
| Fields inherited from class candy.core.candyObject |
description, timestamp |
| Constructor Summary | |
Whiteboard()
Constructor for Entry |
|
Whiteboard(java.lang.String n)
Construct a regular whiteboard given a string for a handle |
|
Whiteboard(WhiteboardMeta m)
Construct a whiteboard that will be used to match in the javaspace For this, you are given the meta data on which to match Everything else must be null (jcorso) |
|
| Method Summary | |
void |
addMember(Member m)
Add a Member to the Whiteboard |
void |
addPTD(java.util.Vector p)
Add this vector of packets to the beginning of my packets vector to "bring me up to date with the current whiteboard" |
void |
clear()
Erase the entire whiteboard |
void |
completeTranscript()
|
Transcript |
createTranscript()
|
CandyView |
createViewForTranscript(javax.swing.JDesktopPane p,
ClientApp a,
java.lang.String s)
|
void |
deletePrimitive(candy.core.packet.WBPrimitivePacket p)
Remove a packet from the whiteboard |
boolean |
equals(Whiteboard b)
A whiteboard is equal by its handle |
candy.core.packet.WBPrimitivePacket |
findCollision(java.awt.geom.Point2D.Double l,
java.awt.Graphics2D g2)
Collision detection routine |
int |
getCurrent()
|
WhiteboardMeta |
getMeta()
Fetch the metadata for this whiteboard |
WBIterator |
getPrimitivesIterator()
fetch a specialized iterator for WBPrimitivePackets |
int |
getTotal()
|
void |
newPrimitive(candy.core.packet.WBPrimitivePacket p)
Add a newPrimitive to this Whiteboard in order. |
boolean |
nextForTranscript()
|
void |
playTranscript()
|
void |
removeMember(Member m)
Remove a member from the current whiteboard |
CandyView |
rewindTranscript(javax.swing.JDesktopPane p,
ClientApp a,
java.lang.String s)
clear display and reset transcript index to beginning of data |
void |
setTranscripting(boolean b)
|
java.lang.String |
toString()
|
| Methods inherited from class candy.core.candyObject |
getDescription, getHandle, setDescription, setHandle |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
transient WhiteboardView myView
public java.util.Vector members
public WhiteboardMeta metadata
public java.lang.String handle
public java.util.Vector packets
public java.lang.Boolean transcripting
public java.lang.Integer transcriptIdx
| Constructor Detail |
public Whiteboard(java.lang.String n)
public Whiteboard(WhiteboardMeta m)
public Whiteboard()
| Method Detail |
public void addMember(Member m)
public void addPTD(java.util.Vector p)
public WBIterator getPrimitivesIterator()
public void newPrimitive(candy.core.packet.WBPrimitivePacket p)
p - The WBPrimitivePacket to be insertedpublic void deletePrimitive(candy.core.packet.WBPrimitivePacket p)
public void clear()
public boolean equals(Whiteboard b)
public WhiteboardMeta getMeta()
public candy.core.packet.WBPrimitivePacket findCollision(java.awt.geom.Point2D.Double l,
java.awt.Graphics2D g2)
l - The point to check for collisiong2 - The graphics contextpublic void removeMember(Member m)
public void setTranscripting(boolean b)
public java.lang.String toString()
toString in class java.lang.Objectpublic Transcript createTranscript()
public CandyView createViewForTranscript(javax.swing.JDesktopPane p,
ClientApp a,
java.lang.String s)
createViewForTranscript in interface Transcriptable
public CandyView rewindTranscript(javax.swing.JDesktopPane p,
ClientApp a,
java.lang.String s)
rewindTranscript in interface Transcriptablepublic boolean nextForTranscript()
nextForTranscript in interface Transcriptablepublic void playTranscript()
public int getTotal()
getTotal in interface Transcriptablepublic int getCurrent()
getCurrent in interface Transcriptablepublic void completeTranscript()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||