javafx.concurrent
Class WorkerStateEvent
- java.util.EventObject
-
- javafx.event.Event
-
- javafx.concurrent.WorkerStateEvent
-
Field Summary
Fields Modifier and Type Field and Description static EventType<WorkerStateEvent>ANYCommon supertype for all worker state event types.static EventType<WorkerStateEvent>WORKER_STATE_CANCELLEDThis event occurs when the state of a Worker implementation has transitioned to the CANCELLED state.static EventType<WorkerStateEvent>WORKER_STATE_FAILEDThis event occurs when the state of a Worker implementation has transitioned to the FAILED state.static EventType<WorkerStateEvent>WORKER_STATE_READYThis event occurs when the state of a Worker implementation has transitioned to the READY state.static EventType<WorkerStateEvent>WORKER_STATE_RUNNINGThis event occurs when the state of a Worker implementation has transitioned to the RUNNING state.static EventType<WorkerStateEvent>WORKER_STATE_SCHEDULEDThis event occurs when the state of a Worker implementation has transitioned to the SCHEDULED state.static EventType<WorkerStateEvent>WORKER_STATE_SUCCEEDEDThis event occurs when the state of a Worker implementation has transitioned to the SUCCEEDED state.-
Fields inherited from class javafx.event.Event
consumed, eventType, NULL_SOURCE_TARGET, target
-
Fields inherited from class java.util.EventObject
source
-
-
Constructor Summary
Constructors Constructor and Description WorkerStateEvent(Worker worker, EventType<? extends WorkerStateEvent> eventType)Create a new WorkerStateEvent.
-
Method Summary
All MethodsInstance MethodsConcrete Methods Modifier and Type Method and Description WorkergetSource()The Worker on which the Event initially occurred.-
Methods inherited from class javafx.event.Event
clone, consume, copyFor, fireEvent, getEventType, getTarget, isConsumed
-
Methods inherited from class java.util.EventObject
toString
-
-
Field Detail
-
ANY
public static final EventType<WorkerStateEvent> ANY
Common supertype for all worker state event types.
-
WORKER_STATE_READY
public static final EventType<WorkerStateEvent> WORKER_STATE_READY
This event occurs when the state of a Worker implementation has transitioned to the READY state.
-
WORKER_STATE_SCHEDULED
public static final EventType<WorkerStateEvent> WORKER_STATE_SCHEDULED
This event occurs when the state of a Worker implementation has transitioned to the SCHEDULED state.
-
WORKER_STATE_RUNNING
public static final EventType<WorkerStateEvent> WORKER_STATE_RUNNING
This event occurs when the state of a Worker implementation has transitioned to the RUNNING state.
-
WORKER_STATE_SUCCEEDED
public static final EventType<WorkerStateEvent> WORKER_STATE_SUCCEEDED
This event occurs when the state of a Worker implementation has transitioned to the SUCCEEDED state.
-
WORKER_STATE_CANCELLED
public static final EventType<WorkerStateEvent> WORKER_STATE_CANCELLED
This event occurs when the state of a Worker implementation has transitioned to the CANCELLED state.
-
WORKER_STATE_FAILED
public static final EventType<WorkerStateEvent> WORKER_STATE_FAILED
This event occurs when the state of a Worker implementation has transitioned to the FAILED state.
-
-
Constructor Detail
-
WorkerStateEvent
public WorkerStateEvent(Worker worker, EventType<? extends WorkerStateEvent> eventType)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.
-
-
Method Detail
-
getSource
public Worker getSource()
The Worker on which the Event initially occurred.Overrides:
getSourcein classEventObjectReturns:
The Worker on which the Event initially occurred.
-
© 2008, 2025, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from JavaFX API Documentation.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Java, JavaFX and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.