Saros
Distributed Collaborative Editing and Distributed Party Programming
de.fu_berlin.inf.dpp.activities.ProgressActivity Class Reference
Inheritance diagram for de.fu_berlin.inf.dpp.activities.ProgressActivity:
de.fu_berlin.inf.dpp.activities.AbstractActivity de.fu_berlin.inf.dpp.activities.ITargetedActivity de.fu_berlin.inf.dpp.activities.IActivity de.fu_berlin.inf.dpp.activities.IActivity

List of all members.

Public Types

enum  ProgressAction {
  BEGINTASK, SUBTASK, SETTASKNAME, UPDATE,
  DONE, CANCEL
}

Public Member Functions

 ProgressActivity (User source, User target, String progressID, int workCurrent, int workTotal, String taskName, ProgressAction action)
boolean isValid ()
String toString ()
void dispatch (IActivityReceiver receiver)
String getProgressID ()
int getWorkCurrent ()
int getWorkTotal ()
String getTaskName ()
int hashCode ()
boolean equals (Object obj)
ProgressAction getAction ()
User getTarget ()

Protected Attributes

String progressID
int workCurrent
int workTotal
String taskName
ProgressAction action
User target

Detailed Description

A ProgressActivity is used for controlling a progress bar at a remote peer.


Member Enumeration Documentation

Enumerator:
BEGINTASK 
SUBTASK 
SETTASKNAME 
UPDATE 
DONE 
CANCEL 

Constructor & Destructor Documentation

de.fu_berlin.inf.dpp.activities.ProgressActivity.ProgressActivity ( User  source,
User  target,
String  progressID,
int  workCurrent,
int  workTotal,
String  taskName,
ProgressAction  action 
)

Member Function Documentation

void de.fu_berlin.inf.dpp.activities.ProgressActivity.dispatch ( IActivityReceiver  receiver)
boolean de.fu_berlin.inf.dpp.activities.ProgressActivity.equals ( Object  obj)
ProgressAction de.fu_berlin.inf.dpp.activities.ProgressActivity.getAction ( )

The action describes whether the associated progress bar at the remote site should be updated or closed.

Once a remote progress has been closed the peer might discard all updates.

String de.fu_berlin.inf.dpp.activities.ProgressActivity.getProgressID ( )

The unique ID by which local users and remote peers can identify the progress process.

User de.fu_berlin.inf.dpp.activities.ProgressActivity.getTarget ( )
Returns:
the users that should receive this activity

Implements de.fu_berlin.inf.dpp.activities.ITargetedActivity.

String de.fu_berlin.inf.dpp.activities.ProgressActivity.getTaskName ( )

A human readable description of the work currently being done as part of the process about which this ProgressActivity is informing about.

Returns:
a new human readable description of the work currently being done or null if the task did not change.
int de.fu_berlin.inf.dpp.activities.ProgressActivity.getWorkCurrent ( )

The current position the progress bar should be shown at (in relation to getWorkTotal().

For instance if workCurrent == 3 and workTotal == 10, then the progress bar should be shown at 30% of the total width of the progress dialog.

int de.fu_berlin.inf.dpp.activities.ProgressActivity.getWorkTotal ( )

The total amount of work associated with this progress process.

int de.fu_berlin.inf.dpp.activities.ProgressActivity.hashCode ( )
boolean de.fu_berlin.inf.dpp.activities.ProgressActivity.isValid ( )
String de.fu_berlin.inf.dpp.activities.ProgressActivity.toString ( )

Member Data Documentation

 All Classes Namespaces Files Functions Variables Enumerations