com.guiseframework.event
Class ProgressEvent<P>

java.lang.Object
  extended by java.util.EventObject
      extended by com.globalmentor.event.AbstractEvent
          extended by com.guiseframework.event.AbstractGuiseEvent
              extended by com.guiseframework.event.ProgressEvent<P>
Type Parameters:
P - The type of progress being made.
All Implemented Interfaces:
com.globalmentor.event.Event, GuiseEvent, java.io.Serializable

public class ProgressEvent<P>
extends AbstractGuiseEvent

An event used to notify interested parties that progress has been made for a particular task.

Author:
Garret Wilson
See Also:
ProgressListener, Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
ProgressEvent(java.lang.Object source, ProgressEvent<P> progressEvent)
          Source copy constructor.
ProgressEvent(java.lang.Object source, java.lang.String task, com.globalmentor.model.TaskState taskState)
          Task and task state constructor with no known value or maximum value.
ProgressEvent(java.lang.Object source, java.lang.String task, com.globalmentor.model.TaskState taskState, P progress)
          Task, task state, and value constructor with no known maximum value.
ProgressEvent(java.lang.Object source, java.lang.String task, com.globalmentor.model.TaskState taskState, P value, P completion)
          Task, task state, value, and maximum constructor.
ProgressEvent(java.lang.Object source, com.globalmentor.model.TaskState taskState)
          Task state constructor with no known value or maximum value.
ProgressEvent(java.lang.Object source, com.globalmentor.model.TaskState taskState, P value)
          Task state and value constructor with no known maximum value.
ProgressEvent(java.lang.Object source, com.globalmentor.model.TaskState taskState, P progress, P completion)
          Task state, value, and maximum constructor.
 
Method Summary
 P getCompletion()
           
 P getProgress()
           
 java.lang.String getTask()
           
 com.globalmentor.model.TaskState getTaskState()
           
 
Methods inherited from class com.guiseframework.event.AbstractGuiseEvent
getSession
 
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
 
Methods inherited from interface com.globalmentor.event.Event
getSource
 

Constructor Detail

ProgressEvent

public ProgressEvent(java.lang.Object source,
                     com.globalmentor.model.TaskState taskState)
Task state constructor with no known value or maximum value.

Parameters:
source - The object on which the event initially occurred.
taskState - The state of the task.
Throws:
java.lang.NullPointerException - if the given task state is null.

ProgressEvent

public ProgressEvent(java.lang.Object source,
                     com.globalmentor.model.TaskState taskState,
                     P value)
Task state and value constructor with no known maximum value.

Parameters:
source - The object on which the event initially occurred.
taskState - The state of the task.
value - The current progress, or null if not known.
Throws:
java.lang.NullPointerException - if the given task state is null.

ProgressEvent

public ProgressEvent(java.lang.Object source,
                     com.globalmentor.model.TaskState taskState,
                     P progress,
                     P completion)
Task state, value, and maximum constructor.

Parameters:
source - The object on which the event initially occurred.
taskState - The state of the task.
progress - The current progress, or null if not known.
completion - The goal, or null if not known.
Throws:
java.lang.NullPointerException - if the given task state is null.

ProgressEvent

public ProgressEvent(java.lang.Object source,
                     java.lang.String task,
                     com.globalmentor.model.TaskState taskState)
Task and task state constructor with no known value or maximum value.

Parameters:
source - The object on which the event initially occurred.
task - The task being performed, or null if not indicated.
taskState - The state of the task.
Throws:
java.lang.NullPointerException - if the given task state is null.

ProgressEvent

public ProgressEvent(java.lang.Object source,
                     java.lang.String task,
                     com.globalmentor.model.TaskState taskState,
                     P progress)
Task, task state, and value constructor with no known maximum value.

Parameters:
source - The object on which the event initially occurred.
task - The task being performed, or null if not indicated.
taskState - The state of the task.
progress - The current progress, or null if not known.
Throws:
java.lang.NullPointerException - if the given task state is null.

ProgressEvent

public ProgressEvent(java.lang.Object source,
                     java.lang.String task,
                     com.globalmentor.model.TaskState taskState,
                     P value,
                     P completion)
Task, task state, value, and maximum constructor.

Parameters:
source - The object on which the event initially occurred.
task - The task being performed, or null if not indicated.
taskState - The state of the task.
value - The current progress, or null if not known.
completion - The goal, or null if not known.
Throws:
java.lang.NullPointerException - if the given task state is null.

ProgressEvent

public ProgressEvent(java.lang.Object source,
                     ProgressEvent<P> progressEvent)
Source copy constructor.

Parameters:
source - The object on which the event initially occurred.
progressEvent - The existing progress event the values of which will be copied to this object.
Throws:
java.lang.NullPointerException - if the given progress event is null.
Method Detail

getTask

public java.lang.String getTask()
Returns:
The task being performed, or null if not indicated.

getTaskState

public com.globalmentor.model.TaskState getTaskState()
Returns:
The state of the task.

getProgress

public P getProgress()
Returns:
The current progress, or null if not known.

getCompletion

public P getCompletion()
Returns:
The goal, or null if not known.


Copyright © 2005-2010 GlobalMentor, Inc. All Rights Reserved.