public class TaskEvent extends Event
DesktopTask
events.Modifier and Type | Field and Description |
---|---|
static EventType<TaskEvent> |
ANY
Common supertype for all
DesktopTask event types. |
static EventType<TaskEvent> |
RELEASE_RESOURCES
This event occurs when internal resources of a
DesktopTask must
be released. |
static EventType<TaskEvent> |
TASK_STATE_REQUEST
This event occurs when the state of the
DesktopTask is required. |
static EventType<TaskEvent> |
TASK_TERMINATED
This event occurs just after a
DesktopTask is terminated. |
static EventType<TaskEvent> |
TASK_TERMINATING
This event occurs just before a
DesktopTask is terminated. |
consumed, eventType, NULL_SOURCE_TARGET, target
source
Constructor and Description |
---|
TaskEvent(DesktopTask source,
EventTarget target,
EventType<? extends TaskEvent> eventType)
Construct a new
TaskEvent with the specified event source, target
and type. |
TaskEvent(DesktopTask source,
EventType<? extends TaskEvent> eventType)
Construct a new
TaskEvent with the specified event source and
event type. |
Modifier and Type | Method and Description |
---|---|
DesktopTask |
getTask()
The
DesktopTask on which this event occurred. |
Object |
getTaskState()
The state object of the
Task of this event. |
void |
setTaskState(Object value)
Changes the state of the
Task of this event. |
clone, consume, copyFor, fireEvent, getEventType, getTarget, isConsumed
getSource, toString
public static final EventType<TaskEvent> TASK_STATE_REQUEST
DesktopTask
is required.
The handler of this event must call the setTaskState
method to return the required state object.public static final EventType<TaskEvent> TASK_TERMINATING
DesktopTask
is terminated. If the
event is not consumed by any installed event handler, the default handler
for this event terminates the DesktopTask
.public static final EventType<TaskEvent> TASK_TERMINATED
DesktopTask
is terminated.public TaskEvent(DesktopTask source, EventType<? extends TaskEvent> eventType)
TaskEvent
with the specified event source and
event type. The target of the event is set to NULL_SOURCE_TARGET
.source
- the source of the event.eventType
- the event type.public TaskEvent(DesktopTask source, EventTarget target, EventType<? extends TaskEvent> eventType)
TaskEvent
with the specified event source, target
and type. If the source or target is set to null
, it is replaced
by the NULL_SOURCE_TARGET
value.source
- the source of the event.target
- the target of the event.eventType
- the event type.public final DesktopTask getTask()
DesktopTask
on which this event occurred.DesktopTask
on which this event occurred.public final Object getTaskState()
Task
of this event.Task
of this event.public final void setTaskState(Object value)
Task
of this event.value
- the state of the Task
of this event.Copyright © OBCOM INGENIERIA S.A. (Chile). All Rights Reserved.