public final class DataLabelsSelectionHandler extends DataLabelsPointerHandler
DEFAULT_CURSOR
Constructor and Description |
---|
DataLabelsSelectionHandler()
Creates a callback setting
CursorType.POINTER as pointer. |
DataLabelsSelectionHandler(CursorType 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 data set selection handler instance to be invoke at click event.
|
boolean |
onClick(DataLabelsContext context,
ChartEventContext event)
Invoked to manage CLICK events on labels.
|
boolean |
removeDatasetSelectionEventHandler(DatasetSelectionEventHandler handler)
Removes a data set selection handler instance.
|
getCursor, onEnter, onLeave
public DataLabelsSelectionHandler()
CursorType.POINTER
as pointer.public DataLabelsSelectionHandler(CursorType cursor)
cursor
- the cursor type to use. If null
, uses CursorType.POINTER
as pointerpublic void addDatasetSelectionEventHandler(DatasetSelectionEventHandler handler)
handler
- data set selection handler instance to be invoke at click eventpublic boolean removeDatasetSelectionEventHandler(DatasetSelectionEventHandler handler)
handler
- data set selection handler instancetrue
if the handler has been removed, otherwise false
public boolean onClick(DataLabelsContext context, ChartEventContext event)
ClickEventHandler
onClick
in interface ClickEventHandler
onClick
in class AbstractEventHandler
context
- DataLabelsPlugin.ID
plugin context instanceevent
- event instancetrue
, the label is updated with the new context and the chart re-rendered.