APIdia Launch Partner
Top Description Fields Constructors Methods
javafx.concurrent

public Class WorkerStateEvent

extends Event
Class Inheritance
Imports
javafx.beans.NamedArg, javafx.event.Event, .EventTarget, .EventType

An event which occurs whenever the state changes on a Worker. Both Task and Service support listening to state events.
Since
JavaFX 2.1

Field Summary

Modifier and TypeField and Description
public static final EventType<WorkerStateEvent>
ANY

Hides javafx.event.Event.ANY.

Common supertype for all worker state event types.
public static final EventType<WorkerStateEvent>
WORKER_STATE_CANCELLED

This event occurs when the state of a Worker implementation has transitioned to the CANCELLED state.

public static final EventType<WorkerStateEvent>
WORKER_STATE_FAILED

This event occurs when the state of a Worker implementation has transitioned to the FAILED state.

public static final EventType<WorkerStateEvent>
WORKER_STATE_READY

This event occurs when the state of a Worker implementation has transitioned to the READY state.

public static final EventType<WorkerStateEvent>
WORKER_STATE_RUNNING

This event occurs when the state of a Worker implementation has transitioned to the RUNNING state.

public static final EventType<WorkerStateEvent>
WORKER_STATE_SCHEDULED

This event occurs when the state of a Worker implementation has transitioned to the SCHEDULED state.

public static final EventType<WorkerStateEvent>
WORKER_STATE_SUCCEEDED

This event occurs when the state of a Worker implementation has transitioned to the SUCCEEDED state.

Inherited from javafx.event.Event:
consumedeventTypeNULL_SOURCE_TARGETtarget

Constructor Summary

AccessConstructor and Description
public
WorkerStateEvent(Worker<V>
The Worker which is firing the event. The Worker really should be an EventTarget, otherwise the EventTarget for the event will be null.
worker
,
EventType<? extends WorkerStateEvent>
The type of event. This should not be null.
eventType
)

Create a new WorkerStateEvent.

Method Summary

Modifier and TypeMethod and Description
public Worker<V>

Returns:

The Worker on which the Event initially occurred.
getSource
()

Overrides java.util.EventObject.getSource.

The Worker on which the Event initially occurred.

Inherited from javafx.event.Event:
cloneconsumecopyForfireEventgetEventTypegetTargetisConsumed

Field Detail

ANYback to summary
public static final EventType<WorkerStateEvent> ANY

Hides javafx.event.Event.ANY.

Common supertype for all worker state event types.

WORKER_STATE_CANCELLEDback to summary
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_FAILEDback to summary
public static final EventType<WorkerStateEvent> WORKER_STATE_FAILED

This event occurs when the state of a Worker implementation has transitioned to the FAILED state.

WORKER_STATE_READYback to summary
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_RUNNINGback to summary
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_SCHEDULEDback to summary
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_SUCCEEDEDback to summary
public static final EventType<WorkerStateEvent> WORKER_STATE_SUCCEEDED

This event occurs when the state of a Worker implementation has transitioned to the SUCCEEDED state.

Constructor Detail

WorkerStateEventback to summary
public WorkerStateEvent(Worker<V> worker, EventType<? extends WorkerStateEvent> eventType)

Create a new WorkerStateEvent. Specify the worker and the event type.

Parameters
worker:Worker<V>

The Worker which is firing the event. The Worker really should be an EventTarget, otherwise the EventTarget for the event will be null.

eventType:EventType<? extends WorkerStateEvent>

The type of event. This should not be null.

Method Detail

getSourceback to summary
public Worker<V> getSource()

Overrides java.util.EventObject.getSource.

The Worker on which the Event initially occurred.

Returns:Worker<V>

The Worker on which the Event initially occurred.

Annotations
@Override