org.argouml.persistence
Class ProgressEvent

java.lang.Object
  extended byjava.util.EventObject
      extended byorg.argouml.persistence.ProgressEvent
All Implemented Interfaces:
Serializable

public class ProgressEvent
extends EventObject

An event to be fired in order to tell some other listener of progress through some activity.

See Also:
Serialized Form

Field Summary
private  String description
           
private  long length
           
private  long position
           
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
ProgressEvent(Object source, long thePosition, long theLength)
          Constructor for a new ProgressEvent
ProgressEvent(Object source, long thePosition, long theLength, String theDescription)
          Constructor for a new ProgressEvent
 
Method Summary
 long getDescription()
          An potional description of progress.
 long getLength()
          Return the length that progress is measuring.
 long getPosition()
          Return the position of progress as a proportion of length.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

length

private long length

position

private long position

description

private String description
Constructor Detail

ProgressEvent

public ProgressEvent(Object source,
                     long thePosition,
                     long theLength)
Constructor for a new ProgressEvent

Parameters:
source - the source that generated this event
thePosition - the position to which progress has reach as a proportion of length
theLength - the total length the progress is measuring

ProgressEvent

public ProgressEvent(Object source,
                     long thePosition,
                     long theLength,
                     String theDescription)
Constructor for a new ProgressEvent

Parameters:
source - the source that generated this event
thePosition - the position to which progress has reach as a proportion of length
theLength - the total length the progress is measuring
theDescription - a text description of progress
Method Detail

getPosition

public long getPosition()
Return the position of progress as a proportion of length.

Returns:
progress position.

getLength

public long getLength()
Return the length that progress is measuring. Typically this is the length of a file or 100 if percentage progress is being measured.

Returns:
progress length.

getDescription

public long getDescription()
An potional description of progress. The GUI should replace any existing progress description it displays if it find that this is non-null.

Returns:
progress description or null if no change.


ArgoUML © 1996-2004 (20050222)ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook