Package org.jorigin.task
Class TaskEvent
- java.lang.Object
-
- java.util.EventObject
-
- java.awt.AWTEvent
-
- org.jorigin.task.TaskEvent
-
- All Implemented Interfaces:
java.io.Serializable
public class TaskEvent extends java.awt.AWTEventAn event that describes the life cycle of a task.- Since:
- 1.0.0
- Version:
- "1.0.9" - b201903071030L
- Author:
- Julien Seinturier - COMEX S.A. - contact@jorigin.org - https://github.com/jorigin/jeometry
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static intTASK_ERRORThe task has produced an error.static intTASK_FINISHEDThe task has finished.static intTASK_INFOThe task has produces an information.static intTASK_PROGRESSThe task has progressed.static intTASK_STARTEDThe task has started.static intTASK_SUSPENDEDThe task is suspended.static intTASK_WARNINGThe 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_MASK
-
-
Constructor Summary
Constructors Constructor Description TaskEvent(java.awt.AWTEvent event)Create a new task event.TaskEvent(java.lang.Object source, int id)Create a new task event.TaskEvent(java.lang.Object source, int id, int size)Create a new task event.TaskEvent(java.lang.Object source, int id, java.lang.String name)Create a new task event.TaskEvent(java.lang.Object source, int id, java.lang.String name, int size)Create a new task event.TaskEvent(java.lang.Object source, int id, java.lang.String name, java.lang.String description)Create a new task event.TaskEvent(java.lang.Object source, int id, java.lang.String name, java.lang.String description, int size)Create a new task event.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetDescription()Get the description of the taskintgetSize()Get the size of the task.java.lang.StringgetTaskName()Get the name of the task attached to this event
-
-
-
Field Detail
-
TASK_STARTED
public static final int TASK_STARTED
The task has started.- See Also:
- Constant Field Values
-
TASK_PROGRESS
public static final int TASK_PROGRESS
The task has progressed.- See Also:
- Constant Field Values
-
TASK_SUSPENDED
public static final int TASK_SUSPENDED
The task is suspended.- See Also:
- Constant Field Values
-
TASK_FINISHED
public static final int TASK_FINISHED
The task has finished.- See Also:
- Constant Field Values
-
TASK_WARNING
public static final int TASK_WARNING
The task has produced a warning.- See Also:
- Constant Field Values
-
TASK_ERROR
public static final int TASK_ERROR
The task has produced an error.- See Also:
- Constant Field Values
-
TASK_INFO
public static final int TASK_INFO
The task has produces an information.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
TaskEvent
public TaskEvent(java.lang.Object source, int id)Create a new task event.- Parameters:
source- the source (task) of the event.id- the identifier of the task.
-
TaskEvent
public TaskEvent(java.awt.AWTEvent event)
Create a new task event.- Parameters:
event- the original event to copy.
-
TaskEvent
public TaskEvent(java.lang.Object source, int id, java.lang.String name)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
public TaskEvent(java.lang.Object source, int id, java.lang.String name, java.lang.String description)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
public TaskEvent(java.lang.Object source, int id, int size)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
public TaskEvent(java.lang.Object source, int id, java.lang.String name, int size)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
public TaskEvent(java.lang.Object source, int id, java.lang.String name, java.lang.String description, int size)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 Detail
-
getTaskName
public java.lang.String getTaskName()
Get the name of the task attached to this event- Returns:
- String the name of the task attached to this event
-
getDescription
public java.lang.String 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
-
-