Annotation Interface OnUIChart
@Documented @Retention(RUNTIME) @Target(METHOD) @Repeatable(OnUICharts.class) public @interface OnUIChart
Annotation for tagging methods to receive the events of a chart component (
UIChart): a click or a tap on a data element (a marker, a column, a bar, a pie slice, a bubble) and, when the chart asks for it, the mouse pointer resting on one.The chart sends nothing until it asks for the events: ChartOption.CLICK_EVENTS and ChartOption.HOVER_EVENTS, both off by default, on the chart in the Designer (group "Events") or in Java.
Only 1 acceptable method pattern for this annotation.
Note: methodName can be any name you want to use.
public void methodName(UIChartEventevent)
Example, the details of a clicked point in a floating panel:
@UI(ref="Proj:/panel/subFolder/OnePanel")
public class MyUIListener
{
// Method called for every event of the chart.
@OnUIChart(name="chart")
public void onChart(UIChartEvent event)
{
if ( event.getType()==UIChartEvent.Type.CLICK )
showDetails(event.getSeries().getPropName(),event.getIndex(),event.getY());
}
}
- Author:
- Christopher Mindus
Required Element Summary
Required Elements
Element Details
name
String nameThe Name or Relative Path of the Property to associate with the method. Thenameis either a Name without slash ('/') that is a direct child of the panel reference, or a Relative Path from the Panel root.- Returns:
- The Property Name path from the panel base "ref" reference specification, e.g. "myChart" or "container/..etc../myChart".