Class AbstractChartEvent<C extends AbstractChartBuilder<?>,E extends AbstractChartEvent<C,E>>
Object
ObjectIdentity
BacklinkBuilder<C>
AbstractChartEvent<C,E>
- Direct Known Subclasses:
ChartEvents.OnCellClick,ChartEvents.OnChartClick,ChartEvents.OnRowClick
public abstract class AbstractChartEvent<C extends AbstractChartBuilder<?>,E extends AbstractChartEvent<C,E>>
extends BacklinkBuilder<C>
Common base class for the click-event configuration builders returned by
AbstractChartBuilder.onRowClick() and AbstractChartBuilder.onCellClick(), and by each
concrete chart type's own onClick() method, for example ScatterChart.onClick(). You never
instantiate this class or a concrete subclass of it directly.
Call triggerEvent(String) to name the Dashboard event this click should fire; the returned
AbstractChartEvent.TriggerEvent builder then configures what data, if any, accompanies that event. The triggered event
is typically consumed by an embedded Dashboard to refresh another portlet in reaction to the click.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassAbstractChartEvent.TriggerEvent<T extends AbstractChartEvent<C,E>.TriggerEvent<?>> Base class for the event-payload builders returned by a concretetriggerEvent(String)implementation, for exampleChartEvents.OnRowClick.RowClickTriggerEvent. -
Field Summary
Fields inherited from class BacklinkBuilder
METHOD_BACKFields inherited from class ObjectIdentity
classId, idGenerator, instanceId, invocations, m, NONE, parentObjectIdentity -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected EgetThis()abstract <T extends AbstractChartEvent<C,E>.TriggerEvent<?>>
TtriggerEvent(String eventName) Names the Dashboard event this click should fire, returning a builder for configuring what data accompanies it.Methods inherited from class BacklinkBuilder
back, getParentMethods inherited from class ObjectIdentity
addInvocation, addInvocation, addInvocationInternal, getClassId
-
Constructor Details
-
AbstractChartEvent
-
-
Method Details
-
getThis
-
triggerEvent
public abstract <T extends AbstractChartEvent<C,E>.TriggerEvent<?>> T triggerEvent(String eventName) Names the Dashboard event this click should fire, returning a builder for configuring what data accompanies it. The concrete return type differs per event kind, for exampleChartEvents.OnRowClick.triggerEvent(String)returns aChartEvents.OnRowClick.RowClickTriggerEvent, which is why this method is declared abstract here rather than implemented once for every event kind.A Dashboard-wide-unique event name is recommended, typically obtained via
api.dashboardWideEvent(String)rather than a hardcoded literal, since Dashboard events are global across browser tabs.- Parameters:
eventName- the name of the Dashboard event to fire on click. Must be neithernullnor empty.- Returns:
- a new
AbstractChartEvent.TriggerEventbuilder for this event. Nevernull. - Throws:
IllegalArgumentException- ifeventNameisnullor empty
-