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

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:
  • Constructor Details

    • ProgressEvent

      public ProgressEvent(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:
      NullPointerException - if the given task state is null.
    • ProgressEvent

      public ProgressEvent(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:
      NullPointerException - if the given task state is null.
    • 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, or null if not known.
      completion - The goal, or null if not known.
      Throws:
      NullPointerException - if the given task state is null.
    • ProgressEvent

      public ProgressEvent(Object source, 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:
      NullPointerException - if the given task state is null.
    • 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, or null if not indicated.
      taskState - The state of the task.
      progress - The current progress, or null if not known.
      Throws:
      NullPointerException - if the given task state is null.
    • 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, 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:
      NullPointerException - if the given task state is null.
    • ProgressEvent

      public ProgressEvent(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:
      NullPointerException - if the given progress event is null.
  • Method Details

    • getTask

      public 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.