public final class DataLabelsSelectionHandler extends DataLabelsPointerHandler
Constructor and Description |
---|
DataLabelsSelectionHandler()
Creates a callback setting
Style.Cursor.POINTER as pointer. |
DataLabelsSelectionHandler(Style.Cursor cursor)
Creates a callback setting the pointer cursor what is passed as argument.
|
Modifier and Type | Method and Description |
---|---|
void |
addDatasetSelectionEventHandler(DatasetSelectionEventHandler handler)
Adds a dataset selection handler instance to be invoke at click event.
|
boolean |
onClick(AbstractChart<?,?> chart,
Context context)
Invoked to manage CLICK events on labels.
|
boolean |
removeDatasetSelectionEventHandler(DatasetSelectionEventHandler handler)
Removes a dataset selection handler instance.
|
onEnter, onLeave
public DataLabelsSelectionHandler()
Style.Cursor.POINTER
as pointer.public DataLabelsSelectionHandler(Style.Cursor cursor)
cursor
- the cursor type to use. If null
, uses Style.Cursor.POINTER
as pointerpublic void addDatasetSelectionEventHandler(DatasetSelectionEventHandler handler)
handler
- dataset selection handler instance to be invoke at click eventpublic boolean removeDatasetSelectionEventHandler(DatasetSelectionEventHandler handler)
handler
- dataset selection handler instancetrue
if the handler has been removed, otherwise false
public boolean onClick(AbstractChart<?,?> chart, Context context)
ClickEventHandler
onClick
in interface ClickEventHandler
onClick
in class DataLabelsPointerHandler
chart
- chart instancecontext
- DATALABELS plugin context instancetrue
, the label is updated with the new context and the chart
re-rendered.