org.moxieapps.gwt.highcharts.client.events
Class PointEvent

java.lang.Object
  extended by org.moxieapps.gwt.highcharts.client.events.MouseEvent
      extended by org.moxieapps.gwt.highcharts.client.events.PointEvent
Direct Known Subclasses:
PointClickEvent, PointLegendItemClickEvent, PointMouseOutEvent, PointMouseOverEvent, PointRemoveEvent, PointSelectEvent, PointUnselectEvent, PointUpdateEvent

public abstract class PointEvent
extends MouseEvent

The base class of all events that are triggered on a point, and includes methods for accessing the general properties of the point, such as its name or X and Y values.

Since:
1.1.0
Author:
squinn@moxiegroup.com (Shawn Quinn)

Constructor Summary
protected PointEvent(com.google.gwt.core.client.JavaScriptObject event, com.google.gwt.core.client.JavaScriptObject point)
          We can only be created by instantiating one of our sub classes.
 
Method Summary
 Point getPoint()
          Create a new GWT point instance that is connected to the Highcharts JS point instance associated with this event.
 String getPointName()
          Return the name of the point on which the event occurred.
 String getSeriesId()
          Retrieve the unique id of the series that the point is a part of which received the event.
 String getSeriesName()
          Return the name of the series that the point is a part of which the event was received on.
 double getXAsDouble()
          Return the x value of the point as a double.
 long getXAsLong()
          Return the x value of the point as a long.
 String getXAsString()
          Return the x value of the point as a string.
 double getYAsDouble()
          Return the y value of the point as a double.
 long getYAsLong()
          Return the y value of the point as a long.
 String getYAsString()
          Return the y value of the point as a string.
 
Methods inherited from class org.moxieapps.gwt.highcharts.client.events.MouseEvent
getClientX, getClientY, getNativeButton, getNativeEvent, getRelativeX, getRelativeY, getScreenX, getScreenY, isAltKeyDown, isControlKeyDown, isMetaKeyDown, isShiftKeyDown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PointEvent

protected PointEvent(com.google.gwt.core.client.JavaScriptObject event,
                     com.google.gwt.core.client.JavaScriptObject point)
We can only be created by instantiating one of our sub classes.

Parameters:
event - The native javascript object containing the details of the original event that was fired.
point - The native javascript object that represents the point instance that the event was triggered on.
Method Detail

getPoint

public Point getPoint()
Create a new GWT point instance that is connected to the Highcharts JS point instance associated with this event.

Returns:
A Point instance that is connected to the Highcharts data point associated with this event

getSeriesId

public String getSeriesId()
Retrieve the unique id of the series that the point is a part of which received the event. This id can then be used to obtain the Series instance itself via the BaseChart.getSeries(String) method.

Returns:
The unique id of the series that the point was a part of that the event was triggered on.

getSeriesName

public String getSeriesName()
Return the name of the series that the point is a part of which the event was received on.

Returns:
The name of the series that the point was a part of that the event was received on.

getPointName

public String getPointName()
Return the name of the point on which the event occurred.

Returns:
The name of the point on which the event occurred.

getXAsDouble

public double getXAsDouble()
Return the x value of the point as a double. An exception will be thrown if the native value of the object is not a number.

Returns:
The x value of the point as a double.

getXAsLong

public long getXAsLong()
Return the x value of the point as a long. An exception will be thrown if the native value of the object is not a number.

Returns:
The x value of the point as a long.

getXAsString

public String getXAsString()
Return the x value of the point as a string. An exception will be thrown if the native value of the object is not a string.

Returns:
The x value of the point as a string.

getYAsDouble

public double getYAsDouble()
Return the y value of the point as a double. An exception will be thrown if the native value of the object is not a number.

Returns:
The y value of the point as a double.

getYAsLong

public long getYAsLong()
Return the y value of the point as a long. An exception will be thrown if the native value of the object is not a number.

Returns:
The y value of the point as a long.

getYAsString

public String getYAsString()
Return the y value of the point as a string. An exception will be thrown if the native value of the object is not a string.

Returns:
The y value of the point as a string.


Copyright © 2015. All Rights Reserved.