public class DataLabelsPointerHandler extends AbstractEventHandler
DataLabelsPlugin.ID event callback to change the cursor type when the labels are clickable.| Modifier and Type | Field and Description |
|---|---|
static Style.Cursor |
DEFAULT_CURSOR
Default pointer cursor to use if omitted,
Style.Cursor.POINTER. |
| Constructor and Description |
|---|
DataLabelsPointerHandler()
Creates a callback setting the
DEFAULT_CURSOR as pointer. |
DataLabelsPointerHandler(Style.Cursor cursor)
Creates a callback setting the pointer cursor what is passed as argument.
|
| Modifier and Type | Method and Description |
|---|---|
Style.Cursor |
getCursor()
Returns the pointer cursor to use.
|
boolean |
onEnter(IsChart chart,
ScriptableContext context)
Invoked to manage ENTER events on labels.
|
boolean |
onLeave(IsChart chart,
ScriptableContext context)
Invoked to manage LEAVE events on labels.
|
onClickpublic static final Style.Cursor DEFAULT_CURSOR
Style.Cursor.POINTER.public DataLabelsPointerHandler()
DEFAULT_CURSOR as pointer.public DataLabelsPointerHandler(Style.Cursor cursor)
cursor - the cursor type to use. If null, uses DEFAULT_CURSOR as
pointerpublic final Style.Cursor getCursor()
public boolean onLeave(IsChart chart, ScriptableContext context)
LeaveEventHandleronLeave in interface LeaveEventHandleronLeave in class AbstractEventHandlerchart - chart instancecontext - DataLabelsPlugin.ID plugin context instancetrue, the label is updated with the new context and the chart
re-rendered.public boolean onEnter(IsChart chart, ScriptableContext context)
EnterEventHandleronEnter in interface EnterEventHandleronEnter in class AbstractEventHandlerchart - chart instancecontext - DataLabelsPlugin.ID plugin context instancetrue, the label is updated with the new context and the chart
re-rendered.