Class TaskEvent
java.lang.Object
java.util.EventObject
javafx.event.Event
cl.obcom.desktopfx.core.TaskEvent
- All Implemented Interfaces:
Serializable, Cloneable
-
Field Summary
FieldsModifier and TypeFieldDescriptionCommon supertype for allDesktopTaskevent types.This event occurs when internal resources of aDesktopTaskmust be released.This event occurs when the state of theDesktopTaskis required.This event occurs just after aDesktopTaskis terminated.This event occurs just before aDesktopTaskis terminated.Fields inherited from class Event
consumed, eventType, NULL_SOURCE_TARGET, targetFields inherited from class EventObject
source -
Constructor Summary
ConstructorsConstructorDescriptionTaskEvent(DesktopTask source, EventTarget target, EventType<? extends TaskEvent> eventType) Construct a newTaskEventwith the specified event source, target and type.TaskEvent(DesktopTask source, EventType<? extends TaskEvent> eventType) Construct a newTaskEventwith the specified event source and event type. -
Method Summary
Modifier and TypeMethodDescriptionfinal DesktopTaskgetTask()TheDesktopTaskon which this event occurred.final ObjectThe state object of theTaskof this event.final voidsetTaskState(Object value) Changes the state of theTaskof this event.Methods inherited from class Event
clone, consume, copyFor, fireEvent, getEventType, getTarget, isConsumedMethods inherited from class EventObject
getSource, toString
-
Field Details
-
ANY
-
TASK_STATE_REQUEST
This event occurs when the state of theDesktopTaskis required. The handler of this event must call thesetTaskStatemethod to return the required state object. -
TASK_TERMINATING
-
TASK_TERMINATED
-
RELEASE_RESOURCES
-
-
Constructor Details
-
TaskEvent
Construct a newTaskEventwith 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 newTaskEventwith the specified event source, target and type. If the source or target is set tonull, it is replaced by theNULL_SOURCE_TARGETvalue.- Parameters:
source- the source of the event.target- the target of the event.eventType- the event type.
-
-
Method Details
-
getTask
TheDesktopTaskon which this event occurred.- Returns:
- the
DesktopTaskon which this event occurred.
-
getTaskState
The state object of theTaskof this event.- Returns:
- the state object of the
Taskof this event.
-
setTaskState
Changes the state of theTaskof this event.- Parameters:
value- the state of theTaskof this event.
-