public interface CyEventHelper
Module: event-api
To use this in your app, include the following dependency in your POM:
<dependency> <groupId>org.cytoscape</groupId> <artifactId>event-api</artifactId> </dependency>
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_PAYLOAD_INTERVAL_MILLIS
The default number of milliseconds to wait before the next
time that we will check for payload events to fire.
|
Modifier and Type | Method and Description |
---|---|
<S,P,E extends CyPayloadEvent<S,P>> |
addEventPayload(S source,
P payload,
Class<E> eventType)
Adds a payload object to be accumulated in a CyPayloadEvent.
|
<E extends CyEvent<?>> |
fireEvent(E event)
Calls each listener found in the Service Registry identified by the listenerClass
interface by the supplied CyEvent.
|
void |
flushPayloadEvents()
Forces accumulated payload events to be fired.
|
void |
silenceEventSource(Object eventSource)
This method will prevent any events fired from the specified source
object from being propagated to listeners.
|
void |
unsilenceEventSource(Object eventSource)
This method will allow events fired from the specified source
object to be propagated to listeners.
|
static final int DEFAULT_PAYLOAD_INTERVAL_MILLIS
<E extends CyEvent<?>> void fireEvent(E event)
E
- The type of event fired.event
- The event to be fired.<S,P,E extends CyPayloadEvent<S,P>> void addEventPayload(S source, P payload, Class<E> eventType)
S
- the generic type of the object firing the event.P
- the generic type of the data payload to be added to the event.E
- the generic type of the event that the payload will be added to.source
- The object firing the event.payload
- The data payload to be added to the event that will
eventually be fired.eventType
- The type of the event that the payload will be added to.void flushPayloadEvents()
void silenceEventSource(Object eventSource)
eventSource
- The object that should have its events blocked
from being sent.void unsilenceEventSource(Object eventSource)
eventSource
- The object that should have its events sent
to listeners.Copyright 2011-2015 Cytoscape Consortium. All rights reserved.