Class ControlPoint
- java.lang.Object
- 
- org.pepstock.charba.client.commons.NativeObjectContainer
- 
- org.pepstock.charba.client.commons.AbstractNode
- 
- org.pepstock.charba.client.annotation.ControlPoint
 
 
 
- 
 public final class ControlPoint 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
 
- 
- 
Field SummaryFields Modifier and Type Field Description static doubleDEFAULT_X_PERCENTAGEDefault of X value as percentage, 0.0static doubleDEFAULT_Y_PERCENTAGEDefault of Y value as percentage, -0.5static doubleMAXIMUN_PERCENTAGEMaximum value as percentage, 1000.0static doubleMINIMUN_PERCENTAGEMaximum value as percentage, -1000.0
 - 
Constructor SummaryConstructors Constructor Description ControlPoint()Creates an object with default.ControlPoint(double x)Creates an object with X value in pixels.ControlPoint(double x, double y)Creates an object with X and Y values in pixels.ControlPoint(String x)Creates an object with X value as percentage.ControlPoint(String x, String y)Creates an object with X and Y values as percentage.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetX()Returns the X value of the control point in pixels.doublegetXAsPercentage()Returns the X value of the control point as percentage.StringgetXAsPercentageString()Returns the X value of the control point as percentage.doublegetY()Returns the Y value of the control point in pixels.doublegetYAsPercentage()Returns the Y value of the control point as percentage.StringgetYAsPercentageString()Returns the Y value of the control point as percentage.voidsetX(double x)Sets the X value of the control point in pixels.voidsetX(String x)Sets the X value of the control point as percentage.voidsetXAsPercentage(double percentage)Sets the X value of the control point as percentage.voidsetY(double y)Sets the Y value of the control point in pixels.voidsetY(String y)Sets the Y value of the control point as percentage.voidsetYAsPercentage(double percentage)Sets the Y value of the control point as percentage.- 
Methods inherited from class org.pepstock.charba.client.commons.AbstractNodecheckAndAddToParent, 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.NativeObjectContainercheckAndGetColor, 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
 
- 
 
- 
- 
- 
Field Detail- 
MINIMUN_PERCENTAGEpublic static final double MINIMUN_PERCENTAGE Maximum value as percentage, -1000.0- See Also:
- Constant Field Values
 
 - 
MAXIMUN_PERCENTAGEpublic static final double MAXIMUN_PERCENTAGE Maximum value as percentage, 1000.0- See Also:
- Constant Field Values
 
 - 
DEFAULT_X_PERCENTAGEpublic static final double DEFAULT_X_PERCENTAGE Default of X value as percentage, 0.0- See Also:
- Constant Field Values
 
 - 
DEFAULT_Y_PERCENTAGEpublic static final double DEFAULT_Y_PERCENTAGE Default of Y value as percentage, -0.5- See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
ControlPointpublic ControlPoint() Creates an object with default.
 - 
ControlPointpublic ControlPoint(double x) Creates an object with X value in pixels.- Parameters:
- x- the X value of the control point in pixels
 
 - 
ControlPointpublic ControlPoint(double x, double y)Creates an object with X and Y values in pixels.- Parameters:
- x- the X value of the control point in pixels
- y- the Y value of the control point in pixels
 
 - 
ControlPointpublic ControlPoint(String x) Creates an object with X value as percentage.- Parameters:
- x- the X value of the control point as percentage
 
 
- 
 - 
Method Detail- 
setXpublic 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
 
 - 
setYpublic 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
 
 - 
setXpublic void setX(String x) Sets the X value of the control point as percentage.- Parameters:
- x- the X value of the control point as percentage
 
 - 
setYpublic void setY(String y) Sets the Y value of the control point as percentage.- Parameters:
- y- the Y value of the control point as percentage
 
 - 
setXAsPercentagepublic 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
 
 - 
setYAsPercentagepublic 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
 
 - 
getXpublic double getX() Returns the X value of the control point in pixels.- Returns:
- the X value of the control point in pixels.
 
 - 
getYpublic double getY() Returns the Y value of the control point in pixels.- Returns:
- the Y value of the control point in pixels.
 
 - 
getXAsPercentageStringpublic String getXAsPercentageString() Returns the X value of the control point as percentage.- Returns:
- the X value of the control point as percentage.
 
 - 
getYAsPercentageStringpublic String getYAsPercentageString() Returns the Y value of the control point as percentage.- Returns:
- the Y value of the control point as percentage.
 
 - 
getXAsPercentagepublic double getXAsPercentage() Returns the X value of the control point as percentage.- Returns:
- the X value of the control point as percentage.
 
 - 
getYAsPercentagepublic double getYAsPercentage() Returns the Y value of the control point as percentage.- Returns:
- the Y value of the control point as percentage.
 
 
- 
 
-