java.lang.Object
java.util.EventObject
java.awt.AWTEvent
org.jorigin.task.TaskEvent
- All Implemented Interfaces:
Serializable
An event that describes the life cycle of a task.
- Since:
- 1.0.0
- Version:
- "1.0.14" - b202111241200L
- Author:
- Julien SEINTURIER - Université de Toulon / CNRS LIS umr 7020 - github.com/jorigin/jcommon (contact@jorigin.org)
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe task has produced an error.static final intThe task has finished.static final intThe task has produces an information.static final intThe task has progressed.static final intThe task has started.static final intThe task is suspended.static final intThe task has produced a warning.Fields inherited from class java.awt.AWTEvent
ACTION_EVENT_MASK, ADJUSTMENT_EVENT_MASK, COMPONENT_EVENT_MASK, consumed, CONTAINER_EVENT_MASK, FOCUS_EVENT_MASK, HIERARCHY_BOUNDS_EVENT_MASK, HIERARCHY_EVENT_MASK, id, INPUT_METHOD_EVENT_MASK, INVOCATION_EVENT_MASK, ITEM_EVENT_MASK, KEY_EVENT_MASK, MOUSE_EVENT_MASK, MOUSE_MOTION_EVENT_MASK, MOUSE_WHEEL_EVENT_MASK, PAINT_EVENT_MASK, RESERVED_ID_MAX, TEXT_EVENT_MASK, WINDOW_EVENT_MASK, WINDOW_FOCUS_EVENT_MASK, WINDOW_STATE_EVENT_MASKFields inherited from class java.util.EventObject
source -
Constructor Summary
ConstructorsConstructorDescriptionCreate a new task event.Create a new task event.Create a new task event.Create a new task event.Create a new task event.Create a new task event.Create a new task event. -
Method Summary
Modifier and TypeMethodDescriptionGet the description of the taskintgetSize()Get the size of the task.Get the name of the task attached to this eventMethods inherited from class java.awt.AWTEvent
consume, getID, isConsumed, paramString, setSource, toStringMethods inherited from class java.util.EventObject
getSource
-
Field Details
-
TASK_STARTED
public static final int TASK_STARTEDThe task has started.- See Also:
-
TASK_PROGRESS
public static final int TASK_PROGRESSThe task has progressed.- See Also:
-
TASK_SUSPENDED
public static final int TASK_SUSPENDEDThe task is suspended.- See Also:
-
TASK_FINISHED
public static final int TASK_FINISHEDThe task has finished.- See Also:
-
TASK_WARNING
public static final int TASK_WARNINGThe task has produced a warning.- See Also:
-
TASK_ERROR
public static final int TASK_ERRORThe task has produced an error.- See Also:
-
TASK_INFO
public static final int TASK_INFOThe task has produces an information.- See Also:
-
-
Constructor Details
-
TaskEvent
Create a new task event.- Parameters:
source- the source (task) of the event.id- the identifier of the task.
-
TaskEvent
Create a new task event.- Parameters:
event- the original event to copy.
-
TaskEvent
Create a new task event.- Parameters:
source- the source (task) of the event.id- the identifier of the task.name- the name of the task.
-
TaskEvent
Create a new task event.- Parameters:
source- the source (task) of the event.id- the identifier of the task.name- the name of the task.description- the description of the event.
-
TaskEvent
Create a new task event.- Parameters:
source- the source (task) of the event.id- the identifier of the task.size- the size of the event in case of progress monitoring. If the event isTASK_STARTED, the size is the size of the task. If the event isTASK_PROGRESS, the size is the actually accomplished part of the task.
-
TaskEvent
Create a new task event.- Parameters:
source- the source (task) of the event.id- the identifier of the task.name- the name of the task.size- the size of the event in case of progress monitoring. If the event isTASK_STARTED, the size is the size of the task. If the event isTASK_PROGRESS, the size is the actually accomplished part of the task.
-
TaskEvent
Create a new task event.- Parameters:
source- the source (task) of the event.id- the identifier of the task.name- the name of the task.description- the description of the event.size- the size of the event in case of progress monitoring. If the event isTASK_STARTED, the size is the size of the task. If the event isTASK_PROGRESS, the size is the actually accomplished part of the task.
-
-
Method Details
-
getTaskName
Get the name of the task attached to this event- Returns:
- String the name of the task attached to this event
-
getDescription
Get the description of the task- Returns:
- String the description of the task
-
getSize
public int getSize()Get the size of the task.- Returns:
- int the size of the task
-