Class ControlPointElement
- java.lang.Object
-
- org.pepstock.charba.client.commons.NativeObjectContainer
-
- org.pepstock.charba.client.commons.AbstractNode
-
- org.pepstock.charba.client.annotation.elements.ControlPointElement
-
public final class ControlPointElement extends AbstractNode
This object is to set the control point of a line annotation, when set as curve.
If curve is enabled, it configures the control point to drawn the curve, calculated in pixels.
It can be set by a string in percentage format "number%" which are representing the percentage of the distance between the start and end point from the center.- Author:
- Andrea "Stock" Stocchero
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getX()
Returns the X value of the control point in pixels.double
getXAsPercentage()
Returns the X value of the control point as percentage.double
getY()
Returns the Y value of the control point in pixels.double
getYAsPercentage()
Returns the Y value of the control point as percentage.void
setX(double x)
Sets the X value of the control point in pixels.void
setXAsPercentage(double percentage)
Sets the X value of the control point as percentage.void
setY(double y)
Sets the Y value of the control point in pixels.void
setYAsPercentage(double percentage)
Sets the Y value of the control point as percentage.-
Methods inherited from class org.pepstock.charba.client.commons.AbstractNode
checkAndAddToParent, getChildKey, getParentNode, getRootNode, getUpdateListener, retrieveRoot, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setElementAndAddToParent, setInternalCallbackToModel, setInternalCallbackToModel, setUpdateListener, setValueAndAddToParent, setValueAndAddToParent, 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
checkAndGetColor, 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, 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, setValue, setValue, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
-
-
-
-
Method Detail
-
setX
public void setX(double x)
Sets the X value of the control point in pixels.- Parameters:
x
- the X value of the control point in pixels
-
setY
public void setY(double y)
Sets the Y value of the control point in pixels.- Parameters:
y
- the Y value of the control point in pixels
-
setXAsPercentage
public void setXAsPercentage(double percentage)
Sets the X value of the control point as percentage.- Parameters:
percentage
- the X value of the control point as percentage
-
setYAsPercentage
public void setYAsPercentage(double percentage)
Sets the Y value of the control point as percentage.- Parameters:
percentage
- the Y value of the control point as percentage
-
getX
public double getX()
Returns the X value of the control point in pixels.- Returns:
- the X value of the control point in pixels.
-
getY
public double getY()
Returns the Y value of the control point in pixels.- Returns:
- the Y value of the control point in pixels.
-
getXAsPercentage
public double getXAsPercentage()
Returns the X value of the control point as percentage.- Returns:
- the X value of the control point as percentage.
-
getYAsPercentage
public double getYAsPercentage()
Returns the Y value of the control point as percentage.- Returns:
- the Y value of the control point as percentage.
-
-