Top Fields Constructors Methods
com.sun.javafx.event

public Class EventDispatchChainImpl

extends Object
implements EventDispatchChain
Class Inheritance
All Implemented Interfaces
javafx.event.EventDispatchChain
Imports
javafx.event.Event, .EventDispatchChain, .EventDispatcher

Field Summary

Modifier and TypeField and Description
private int
private static final int
CAPACITY_GROWTH_FACTOR

Must be a power of two.

private EventDispatcher[]
private int
private int[]
private int
private int

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public EventDispatchChain
append(final EventDispatcher
the EventDispatcher to append to the chain
eventDispatcher
)

Implements javafx.event.EventDispatchChain.append.

Appends the specified EventDispatcher to this chain.

public Event
dispatchEvent(final Event
the event to dispatch
event
)

Implements javafx.event.EventDispatchChain.dispatchEvent.

Dispatches the specified event through this EventDispatchChain.

private void
ensureCapacity(final int size)

private void
insertFirst(final EventDispatcher eventDispatcher)

public EventDispatchChain
prepend(final EventDispatcher
the EventDispatcher to prepend to the chain
eventDispatcher
)

Implements javafx.event.EventDispatchChain.prepend.

Prepends the specified EventDispatcher to this chain.

public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

activeCountback to summary
private int activeCount
CAPACITY_GROWTH_FACTORback to summary
private static final int CAPACITY_GROWTH_FACTOR

Must be a power of two.

dispatchersback to summary
private EventDispatcher[] dispatchers
headIndexback to summary
private int headIndex
reservedCountback to summary
private int reservedCount
tailIndexback to summary
private int tailIndex

Constructor Detail

EventDispatchChainImplback to summary
public EventDispatchChainImpl()

Method Detail

appendback to summary
public EventDispatchChain append(final EventDispatcher eventDispatcher)

Implements javafx.event.EventDispatchChain.append.

Doc from javafx.event.EventDispatchChain.append.

Appends the specified EventDispatcher to this chain. Returns a reference to the chain with the appended element.

The caller shouldn't assume that this EventDispatchChain remains unchanged nor that the returned value will reference a different chain after the call. All this depends on the EventDispatchChain implementation.

So the call should be always done in the following form: chain = chain.append(eventDispatcher);

Parameters
eventDispatcher:EventDispatcher

the EventDispatcher to append to the chain

Returns:EventDispatchChain

the chain with the appended event dispatcher

Annotations
@Override
dispatchEventback to summary
public Event dispatchEvent(final Event event)

Implements javafx.event.EventDispatchChain.dispatchEvent.

Doc from javafx.event.EventDispatchChain.dispatchEvent.

Dispatches the specified event through this EventDispatchChain. The return value represents the event after processing done by the chain. If further processing is to be done after the call the event referenced by the return value should be used instead of the original event. In the case the event is fully handled / consumed in the chain the returned value is null and no further processing should be done with that event.

Parameters
event:Event

the event to dispatch

Returns:Event

the processed event or null if the event had been fully handled / consumed

Annotations
@Override
ensureCapacityback to summary
private void ensureCapacity(final int size)
insertFirstback to summary
private void insertFirst(final EventDispatcher eventDispatcher)
prependback to summary
public EventDispatchChain prepend(final EventDispatcher eventDispatcher)

Implements javafx.event.EventDispatchChain.prepend.

Doc from javafx.event.EventDispatchChain.prepend.

Prepends the specified EventDispatcher to this chain. Returns a reference to the chain with the prepended element.

The caller shouldn't assume that this EventDispatchChain remains unchanged nor that the returned value will reference a different chain after the call. All this depends on the EventDispatchChain implementation.

So the call should be always done in the following form: chain = chain.prepend(eventDispatcher);

Parameters
eventDispatcher:EventDispatcher

the EventDispatcher to prepend to the chain

Returns:EventDispatchChain

the chain with the prepended event dispatcher

Annotations
@Override
resetback to summary
public void reset()