Package io.guise.framework.event
Class ProgressEvent<P>
java.lang.Object
java.util.EventObject
com.globalmentor.event.AbstractEvent
io.guise.framework.event.AbstractGuiseEvent
io.guise.framework.event.ProgressEvent<P>
- Type Parameters:
P
- The type of progress being made.
- All Implemented Interfaces:
com.globalmentor.event.Event
,GuiseEvent
,Serializable
An event used to notify interested parties that progress has been made for a particular task.
- Author:
- Garret Wilson
- See Also:
-
Field Summary
Fields inherited from class java.util.EventObject
source
-
Constructor Summary
ConstructorDescriptionProgressEvent
(Object source, com.globalmentor.model.TaskState taskState) Task state constructor with no known value or maximum value.ProgressEvent
(Object source, com.globalmentor.model.TaskState taskState, P value) Task state and value constructor with no known maximum value.ProgressEvent
(Object source, com.globalmentor.model.TaskState taskState, P progress, P completion) Task state, value, and maximum constructor.ProgressEvent
(Object source, ProgressEvent<P> progressEvent) Source copy constructor.ProgressEvent
(Object source, String task, com.globalmentor.model.TaskState taskState) Task and task state constructor with no known value or maximum value.ProgressEvent
(Object source, String task, com.globalmentor.model.TaskState taskState, P progress) Task, task state, and value constructor with no known maximum value.ProgressEvent
(Object source, String task, com.globalmentor.model.TaskState taskState, P value, P completion) Task, task state, value, and maximum constructor. -
Method Summary
Methods inherited from class io.guise.framework.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 Details
-
ProgressEvent
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:
NullPointerException
- if the given task state isnull
.
-
ProgressEvent
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, ornull
if not known.- Throws:
NullPointerException
- if the given task state isnull
.
-
ProgressEvent
public ProgressEvent(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, ornull
if not known.completion
- The goal, ornull
if not known.- Throws:
NullPointerException
- if the given task state isnull
.
-
ProgressEvent
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, ornull
if not indicated.taskState
- The state of the task.- Throws:
NullPointerException
- if the given task state isnull
.
-
ProgressEvent
public ProgressEvent(Object source, 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, ornull
if not indicated.taskState
- The state of the task.progress
- The current progress, ornull
if not known.- Throws:
NullPointerException
- if the given task state isnull
.
-
ProgressEvent
public ProgressEvent(Object source, 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, ornull
if not indicated.taskState
- The state of the task.value
- The current progress, ornull
if not known.completion
- The goal, ornull
if not known.- Throws:
NullPointerException
- if the given task state isnull
.
-
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:
NullPointerException
- if the given progress event isnull
.
-
-
Method Details
-
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
- Returns:
- The current progress, or
null
if not known.
-
getCompletion
- Returns:
- The goal, or
null
if not known.
-