Defines the various events and event types that can be listened for by publisher applications. Event listeners
(callbacks) can be added to the publisher instance such that applications can be notified of various Spotfire
events. e.g.
In some cases (e.g. ConfigurationChangedEvent or StateChangedEvent) the event object provided to
the callback function will contain information about the event subtype as well as information about what changed.
For example there are 3 subtypes of state changed event (see StateChangedEventType). The event subtype
will be indicated on the event object by the event field.
// JS no NPM. publisher.addEventListener('onStateChanged', (event) => { console.log('state changed and it was ' + event.event + ' sub type'); });
The contents of the event object may vary depending on the event subtype. Where this is case, there are type defined
event interfaces for each of the event subtypes e.g.
// Typescript publisher.addEventListener(PublisherEventType.CONFIGURATION_CHANGED, (event: ConfigurationChangedEvent) => { console.log('configuration changed'); switch (event.event) { caseConfigurationChangedEventType.COLOR_RULES: conste = eventasColorRulesConfigurationChangedEvent; // The event has the coloring field in this case. console.log(e.coloring); break; caseConfigurationChangedEventType.COLUMNS: conste = eventasColumnConfigurationChangedEvent; // The event has the renderers field in this case. console.log(e.renderers); break; .... } });
// JS no NPM. publisher.addEventListener('onConfigurationChanged', (event) => { console.log('configuration changed'); switch (event.event) { case'colorRules': // The event has the coloring field in this case. console.log(e.coloring); break; case'columns: // The event has the renderers field in this case. console.log(e.renderers); break; .... } });
Defines the various events and event types that can be listened for by publisher applications. Event listeners (callbacks) can be added to the
publisher
instance such that applications can be notified of various Spotfire events. e.g.There are a number of different event types (see PublisherEventType). Each of these have a corresponding event i.e. if you add a callback for the PublisherEventType.STATE_CHANGED event type the callback will receive a StateChangedEvent.
In some cases (e.g. ConfigurationChangedEvent or StateChangedEvent) the event object provided to the callback function will contain information about the event subtype as well as information about what changed. For example there are 3 subtypes of state changed event (see StateChangedEventType). The event subtype will be indicated on the event object by the
event
field.The contents of the event object may vary depending on the event subtype. Where this is case, there are type defined event interfaces for each of the event subtypes e.g.