public class CompositeEventTargetImpl extends java.lang.Object implements CompositeEventTarget
| Modifier and Type | Field and Description |
|---|---|
private java.util.Set<EventTarget> |
eventTargets |
| Constructor and Description |
|---|
CompositeEventTargetImpl(EventTarget... eventTargets) |
| Modifier and Type | Method and Description |
|---|---|
EventDispatchChain |
buildEventDispatchChain(EventDispatchChain tail)
Construct an event dispatch chain for this target.
|
boolean |
containsTarget(EventTarget target) |
java.util.Set<EventTarget> |
getTargets() |
private final java.util.Set<EventTarget> eventTargets
public CompositeEventTargetImpl(EventTarget... eventTargets)
public java.util.Set<EventTarget> getTargets()
getTargets in interface CompositeEventTargetpublic boolean containsTarget(EventTarget target)
containsTarget in interface CompositeEventTargetpublic EventDispatchChain buildEventDispatchChain(EventDispatchChain tail)
EventTargetEventTarget. This event target is
not automatically added to the chain, so if it wants to process events,
it needs to add an EventDispatcher for itself to the chain.
In the case the event target is part of some hierarchy, the chain for it is usually built from event dispatchers collected from the root of the hierarchy to the event target.
The event dispatch chain is constructed by modifications to the provided initial event dispatch chain. The returned chain should have the initial chain at its end so the dispatchers should be prepended to the initial chain.
The caller shouldn't assume that the initial chain remains unchanged nor that the returned value will reference a different chain.
buildEventDispatchChain in interface EventTargettail - the initial chain to build from