java.lang.Object
java.util.EventObject
javafx.event.Event
javafx.concurrent.WorkerStateEvent
- All Implemented Interfaces:
- Serializable,- Cloneable
An event which occurs whenever the state changes on a Worker. Both
 
Task and Service support listening to state events.- Since:
- JavaFX 2.1
- See Also:
- 
Field SummaryFieldsModifier 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 javafx.event.Eventconsumed, eventType, NULL_SOURCE_TARGET, targetFields declared in class java.util.EventObjectsource
- 
Constructor SummaryConstructorsConstructorDescriptionWorkerStateEvent(Worker worker, EventType<? extends WorkerStateEvent> eventType) Create a new WorkerStateEvent.
- 
Method SummaryMethods declared in class javafx.event.Eventclone, consume, copyFor, fireEvent, getEventType, getTarget, isConsumedMethods declared in class java.util.EventObjecttoString
- 
Field Details- 
ANYCommon supertype for all worker state event types.
- 
WORKER_STATE_READYThis event occurs when the state of a Worker implementation has transitioned to the READY state.
- 
WORKER_STATE_SCHEDULEDThis event occurs when the state of a Worker implementation has transitioned to the SCHEDULED state.
- 
WORKER_STATE_RUNNINGThis event occurs when the state of a Worker implementation has transitioned to the RUNNING state.
- 
WORKER_STATE_SUCCEEDEDThis event occurs when the state of a Worker implementation has transitioned to the SUCCEEDED state.
- 
WORKER_STATE_CANCELLEDThis event occurs when the state of a Worker implementation has transitioned to the CANCELLED state.
- 
WORKER_STATE_FAILEDThis event occurs when the state of a Worker implementation has transitioned to the FAILED state.
 
- 
- 
Constructor Details- 
WorkerStateEventCreate 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- 
getSourceThe Worker on which the Event initially occurred.- Overrides:
- getSourcein class- EventObject
- Returns:
- The Worker on which the Event initially occurred.
 
 
-