Class Point
-
- All Implemented Interfaces:
IsDefaultOptionsElement
,IsDefaultPoint
,IsDefaultPointStyleHandler
- Direct Known Subclasses:
BubbleMapPoint
public class Point extends AbstractElement<IsDefaultPoint> implements IsDefaultPoint
Point elements are used to represent the points in a line chart or a bubble chart.- Author:
- Andrea "Stock" Stocchero
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Point(Elements elements, Key childKey, IsDefaultPoint defaultValues, NativeObject nativeObject)
Creates the object with the parent, the key of this element, default values and native object to map java script properties.
-
Method Summary
All Methods Instance Methods Concrete Methods Default Methods Modifier and Type Method Description double
getHitRadius()
Returns the pixel size of the non-displayed point that reacts to mouse events.double
getHoverRadius()
Returns the radius of the point when hovered.default PointStyle
getPointStyle()
Returns the style of the point.default Canvas
getPointStyleAsCanvas()
Returns the style of the point as canvas.
If property is missing or not an canvas, returnsnull
.default Img
getPointStyleAsImage()
Returns the style of the point as image.
If property is missing or not an image, returnsnull
.org.pepstock.charba.client.options.PointStyleHandler
getPointStyleHandler()
default PointStyleType
getPointStyleType()
Returns the type of point style.double
getRadius()
Returns the radius of the point.double
getRotation()
Returns the point rotation (in degrees).void
setHitRadius(double hitRadius)
Sets the pixel size of the non-displayed point that reacts to mouse events.void
setHoverRadius(double hoverRadius)
Sets the radius of the point when hovered.default void
setPointStyle(Canvas pointStyle)
Sets the style of the point as canvas.default void
setPointStyle(Img pointStyle)
Sets the style of the point as image.default void
setPointStyle(PointStyle pointStyle)
Sets the style of the point.void
setRadius(double radius)
Sets the radius of the point shape.
If set to 0, the point is not rendered.void
setRotation(double rotation)
Sets the point rotation (in degrees).-
Methods inherited from class org.pepstock.charba.client.options.AbstractElement
getBackgroundColor, getBackgroundColorAsString, getBorderColor, getBorderColorAsString, getBorderWidth, getHoverBackgroundColor, getHoverBackgroundColorAsString, getHoverBorderColor, getHoverBorderColorAsString, getHoverBorderWidth, setBackgroundColor, setBackgroundColor, setBorderColor, setBorderColor, setBorderWidth, setHoverBackgroundColor, setHoverBackgroundColor, setHoverBorderColor, setHoverBorderColor, setHoverBorderWidth
-
Methods inherited from class org.pepstock.charba.client.options.AbstractModel
getDefaultValues, getParent, loadPadding, setCallbackToModel, setCallbackToModel, setEventToModel
-
Methods inherited from class org.pepstock.charba.client.commons.AbstractNode
checkAndAddToParent, getChildKey, getParentNode, getRootNode, retrieveRoot, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setElementAndAddToParent, setInternalCallbackToModel, setInternalCallbackToModel, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent
-
Methods inherited from class org.pepstock.charba.client.commons.NativeObjectContainer
checkDefaultValuesArgument, empty, getArrayValue, getElement, getIncrementalId, getNativeChart, getNativeEvent, getNativeObject, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, has, has, isType, keys, loadNativeObject, remove, remove, setArrayValue, setArrayValue, setArrayValue, setElement, setEmptyValue, setNewIncrementalId, setNewIncrementalId, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.pepstock.charba.client.defaults.IsDefaultOptionsElement
getBackgroundColorAsString, getBorderColorAsString, getBorderWidth, getHoverBackgroundColorAsString, getHoverBorderColorAsString, getHoverBorderWidth
-
-
-
-
Constructor Detail
-
Point
protected Point(Elements elements, Key childKey, IsDefaultPoint defaultValues, NativeObject nativeObject)
Creates the object with the parent, the key of this element, default values and native object to map java script properties.- Parameters:
elements
- parent node to use to add this element where changedchildKey
- the property name of this element to use to add it to the parent.defaultValues
- default providernativeObject
- native object to map java script properties
-
-
Method Detail
-
getPointStyleHandler
public org.pepstock.charba.client.options.PointStyleHandler getPointStyleHandler()
-
setRadius
public void setRadius(double radius)
Sets the radius of the point shape.
If set to 0, the point is not rendered.- Parameters:
radius
- array of the radius of the point shape.
-
getRadius
public double getRadius()
Returns the radius of the point.- Specified by:
getRadius
in interfaceIsDefaultPoint
- Returns:
- the radius of the point.
-
setHitRadius
public void setHitRadius(double hitRadius)
Sets the pixel size of the non-displayed point that reacts to mouse events.- Parameters:
hitRadius
- the pixel size of the non-displayed point.
-
getHitRadius
public double getHitRadius()
Returns the pixel size of the non-displayed point that reacts to mouse events.- Specified by:
getHitRadius
in interfaceIsDefaultPoint
- Returns:
- the pixel size of the non-displayed point.
-
setHoverRadius
public void setHoverRadius(double hoverRadius)
Sets the radius of the point when hovered.- Parameters:
hoverRadius
- the radius of the point when hovered.
-
getHoverRadius
public double getHoverRadius()
Returns the radius of the point when hovered.- Specified by:
getHoverRadius
in interfaceIsDefaultPoint
- Returns:
- the radius of the point when hovered.
-
setRotation
public void setRotation(double rotation)
Sets the point rotation (in degrees).- Parameters:
rotation
- the point rotation (in degrees).
-
getRotation
public double getRotation()
Returns the point rotation (in degrees).- Specified by:
getRotation
in interfaceIsDefaultPoint
- Returns:
- the point rotation (in degrees).
-
setPointStyle
public default void setPointStyle(PointStyle pointStyle)
Sets the style of the point.- Parameters:
pointStyle
- array of the style of the point.
-
getPointStyle
public default PointStyle getPointStyle()
Returns the style of the point.- Specified by:
getPointStyle
in interfaceIsDefaultPointStyleHandler
- Returns:
- the style of the point or
null
if point style is set as image
-
setPointStyle
public default void setPointStyle(Img pointStyle)
Sets the style of the point as image.- Parameters:
pointStyle
- image element of the style of the point as image.
-
getPointStyleType
public default PointStyleType getPointStyleType()
Returns the type of point style.- Specified by:
getPointStyleType
in interfaceIsDefaultPointStyleHandler
- Returns:
- the type of point style
-
getPointStyleAsImage
public default Img getPointStyleAsImage()
Returns the style of the point as image.
If property is missing or not an image, returnsnull
.- Specified by:
getPointStyleAsImage
in interfaceIsDefaultPointStyleHandler
- Returns:
- image of the style of the point as image.
If property is missing or not a image, returnsnull
.
-
setPointStyle
public default void setPointStyle(Canvas pointStyle)
Sets the style of the point as canvas.- Parameters:
pointStyle
- canvas element of the style of the point as canvas.
-
getPointStyleAsCanvas
public default Canvas getPointStyleAsCanvas()
Returns the style of the point as canvas.
If property is missing or not an canvas, returnsnull
.- Specified by:
getPointStyleAsCanvas
in interfaceIsDefaultPointStyleHandler
- Returns:
- image of the style of the point as canvas.
If property is missing or not a canvas, returnsnull
.
-
-