Class WorkerStateEvent
java.lang.Object
java.util.EventObject
javafx.event.Event
javafx.concurrent.WorkerStateEvent
- All Implemented Interfaces:
Serializable, Cloneable
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final EventType<WorkerStateEvent> Common supertype for all worker state event types.static final EventType<WorkerStateEvent> This event occurs when the state of a Worker implementation has transitioned to the CANCELLED state.static final EventType<WorkerStateEvent> This event occurs when the state of a Worker implementation has transitioned to the FAILED state.static final EventType<WorkerStateEvent> This event occurs when the state of a Worker implementation has transitioned to the READY state.static final EventType<WorkerStateEvent> This event occurs when the state of a Worker implementation has transitioned to the RUNNING state.static final EventType<WorkerStateEvent> This event occurs when the state of a Worker implementation has transitioned to the SCHEDULED state.static final EventType<WorkerStateEvent> This event occurs when the state of a Worker implementation has transitioned to the SUCCEEDED state.Fields declared in class Event
consumed, eventType, NULL_SOURCE_TARGET, targetModifier and TypeFieldDescriptionprotected booleanWhether this event has been consumed by any filter or handler.Type of the event.static final EventTargetThe constant which represents an unknown event source / target.protected EventTargetEvent target that defines the path through which the event will travel when posted.Fields declared in class EventObject
source -
Constructor Summary
ConstructorsConstructorDescriptionWorkerStateEvent(Worker worker, EventType<? extends WorkerStateEvent> eventType) Create a new WorkerStateEvent. -
Method Summary
Methods declared in class Event
clone, consume, copyFor, fireEvent, getEventType, getTarget, isConsumedModifier and TypeMethodDescriptionclone()Creates and returns a copy of thisEvent.voidconsume()Marks thisEventas consumed.copyFor(Object newSource, EventTarget newTarget) Creates and returns a copy of this event with the specified event source and target.static voidfireEvent(EventTarget eventTarget, Event event) Fires the specified event.Gets the event type of this event.Returns the event target of this event.booleanIndicates whether thisEventhas been consumed by any filter or handler.Methods declared in class EventObject
toString
-
Field Details
-
ANY
Common supertype for all worker state event types. -
WORKER_STATE_READY
This event occurs when the state of a Worker implementation has transitioned to the READY state. -
WORKER_STATE_SCHEDULED
This event occurs when the state of a Worker implementation has transitioned to the SCHEDULED state. -
WORKER_STATE_RUNNING
This event occurs when the state of a Worker implementation has transitioned to the RUNNING state. -
WORKER_STATE_SUCCEEDED
This event occurs when the state of a Worker implementation has transitioned to the SUCCEEDED state. -
WORKER_STATE_CANCELLED
This event occurs when the state of a Worker implementation has transitioned to the CANCELLED state. -
WORKER_STATE_FAILED
This event occurs when the state of a Worker implementation has transitioned to the FAILED state.
-
-
Constructor Details
-
WorkerStateEvent
Create a new WorkerStateEvent. Specify the worker and the event type.- Parameters:
worker- The Worker which is firing the event. The Worker really should be an EventTarget, otherwise the EventTarget for the event will be null.eventType- The type of event. This should not be null.
-
-
Method Details
-
getSource
The Worker on which the Event initially occurred.- Overrides:
getSourcein classEventObject- Returns:
- The Worker on which the Event initially occurred.
-