Package cl.obcom.desktopfx.core
Class TaskEvent
java.lang.Object
java.util.EventObject
javafx.event.Event
cl.obcom.desktopfx.core.TaskEvent
- All Implemented Interfaces:
Serializable
,Cloneable
The root event class for all
DesktopTask
events.- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionCommon supertype for allDesktopTask
event types.This event occurs when internal resources of aDesktopTask
must be released.This event occurs when the state of theDesktopTask
is required.This event occurs just after aDesktopTask
is terminated.This event occurs just before aDesktopTask
is terminated.Fields inherited from class javafx.event.Event
consumed, eventType, NULL_SOURCE_TARGET, target
Fields inherited from class java.util.EventObject
source
-
Constructor Summary
ConstructorDescriptionTaskEvent
(DesktopTask source, EventTarget target, EventType<? extends TaskEvent> eventType) Construct a newTaskEvent
with the specified event source, target and type.TaskEvent
(DesktopTask source, EventType<? extends TaskEvent> eventType) Construct a newTaskEvent
with the specified event source and event type. -
Method Summary
Modifier and TypeMethodDescriptionfinal DesktopTask
getTask()
TheDesktopTask
on which this event occurred.final Object
The state object of theTask
of this event.final void
setTaskState
(Object value) Changes the state of theTask
of this event.Methods inherited from class javafx.event.Event
clone, consume, copyFor, fireEvent, getEventType, getTarget, isConsumed
Methods inherited from class java.util.EventObject
getSource, toString
-
Field Details
-
ANY
Common supertype for allDesktopTask
event types. -
TASK_STATE_REQUEST
This event occurs when the state of theDesktopTask
is required. The handler of this event must call thesetTaskState
method to return the required state object. -
TASK_TERMINATING
This event occurs just before aDesktopTask
is terminated. If the event is not consumed by any installed event handler, the default handler for this event terminates theDesktopTask
. -
TASK_TERMINATED
This event occurs just after aDesktopTask
is terminated. -
RELEASE_RESOURCES
This event occurs when internal resources of aDesktopTask
must be released.
-
-
Constructor Details
-
TaskEvent
Construct a newTaskEvent
with the specified event source and event type. The target of the event is set toNULL_SOURCE_TARGET
.- Parameters:
source
- the source of the event.eventType
- the event type.
-
TaskEvent
Construct a newTaskEvent
with the specified event source, target and type. If the source or target is set tonull
, it is replaced by theNULL_SOURCE_TARGET
value.- Parameters:
source
- the source of the event.target
- the target of the event.eventType
- the event type.
-
-
Method Details
-
getTask
TheDesktopTask
on which this event occurred.- Returns:
- the
DesktopTask
on which this event occurred.
-
getTaskState
The state object of theTask
of this event.- Returns:
- the state object of the
Task
of this event.
-
setTaskState
Changes the state of theTask
of this event.- Parameters:
value
- the state of theTask
of this event.
-