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
,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
-
-
Constructor Summary
Constructors Constructor Description 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.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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description P
getCompletion()
P
getProgress()
java.lang.String
getTask()
com.globalmentor.model.TaskState
getTaskState()
-
Methods inherited from class io.guise.framework.event.AbstractGuiseEvent
getSession
-
-
-
-
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 isnull
.
-
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, ornull
if not known.- Throws:
java.lang.NullPointerException
- if the given task state isnull
.
-
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, ornull
if not known.completion
- The goal, ornull
if not known.- Throws:
java.lang.NullPointerException
- if the given task state isnull
.
-
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, ornull
if not indicated.taskState
- The state of the task.- Throws:
java.lang.NullPointerException
- if the given task state isnull
.
-
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, ornull
if not indicated.taskState
- The state of the task.progress
- The current progress, ornull
if not known.- Throws:
java.lang.NullPointerException
- if the given task state isnull
.
-
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, 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:
java.lang.NullPointerException
- if the given task state isnull
.
-
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 isnull
.
-
-
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.
-
-