Class AlignPosition
- java.lang.Object
- 
- org.pepstock.charba.client.commons.NativeObjectContainer
- 
- org.pepstock.charba.client.commons.AbstractNode
- 
- org.pepstock.charba.client.annotation.AlignPosition
 
 
 
- 
 public final class AlignPosition extends AbstractNode This object is to set the position of a label, setting the horizontal and vertical position.- Author:
- Andrea "Stock" Stocchero
 
- 
- 
Constructor SummaryConstructors Constructor Description AlignPosition()Creates an empty object.AlignPosition(double x)Creates an object with X position.AlignPosition(double x, double y)Creates an object with X and Y positions for the label.AlignPosition(LabelPosition x)Creates an object with X position.AlignPosition(LabelPosition x, LabelPosition y)Creates an object with X and Y positions for the label.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description LabelPositiongetX()Returns the anchor position of label on horizontal dimension.doublegetXAsPercentage()Returns the position of label by the percentage (value between 0 and 1) of the horizontal dimension.LabelPositiongetY()Returns the anchor position of label on vertical dimension.doublegetYAsPercentage()Returns the position of label by the percentage (value between 0 and 1) of the vertical dimension.voidsetX(LabelPosition position)Sets the anchor position of label on horizontal dimension.voidsetXAsPercentage(double percentage)Sets the position of label by the percentage (value between 0 and 1) of the horizontal dimension.voidsetY(LabelPosition position)Sets the anchor position of label on vertical dimension.voidsetYAsPercentage(double percentage)Sets the position of label by the percentage (value between 0 and 1) of the vertical dimension.- 
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
 
- 
 
- 
- 
- 
Constructor Detail- 
AlignPositionpublic AlignPosition() Creates an empty object. Default position isLabelPosition.CENTER.
 - 
AlignPositionpublic AlignPosition(LabelPosition x) Creates an object with X position. The vertical position is the same of the passed for horizontal.- Parameters:
- x- the X position of the label.
 
 - 
AlignPositionpublic AlignPosition(LabelPosition x, LabelPosition y) Creates an object with X and Y positions for the label.- Parameters:
- x- the X position of the label
- y- the Y position of the label
 
 - 
AlignPositionpublic AlignPosition(double x) Creates an object with X position. The vertical position is the same of the passed for horizontal.- Parameters:
- x- the X position of the label.
 
 - 
AlignPositionpublic AlignPosition(double x, double y)Creates an object with X and Y positions for the label.- Parameters:
- x- the X position of the label
- y- the Y position of the label
 
 
- 
 - 
Method Detail- 
setXpublic void setX(LabelPosition position) Sets the anchor position of label on horizontal dimension.- Parameters:
- position- the anchor position of label on horizontal dimension
 
 - 
setYpublic void setY(LabelPosition position) Sets the anchor position of label on vertical dimension.- Parameters:
- position- the anchor position of label on vertical dimension
 
 - 
setXAsPercentagepublic void setXAsPercentage(double percentage) Sets the position of label by the percentage (value between 0 and 1) of the horizontal dimension.- Parameters:
- percentage- the position of label by the percentage (value between 0 and 1) of the horizontal dimension
 
 - 
setYAsPercentagepublic void setYAsPercentage(double percentage) Sets the position of label by the percentage (value between 0 and 1) of the vertical dimension.- Parameters:
- percentage- the position of label by the percentage (value between 0 and 1) of the vertical dimension
 
 - 
getXpublic LabelPosition getX() Returns the anchor position of label on horizontal dimension.- Returns:
- the anchor position of label on horizontal dimension.
 
 - 
getYpublic LabelPosition getY() Returns the anchor position of label on vertical dimension.- Returns:
- the anchor position of label on vertical dimension.
 
 - 
getXAsPercentagepublic double getXAsPercentage() Returns the position of label by the percentage (value between 0 and 1) of the horizontal dimension.- Returns:
- the position of label by the percentage (value between 0 and 1) of the horizontal dimension
 
 - 
getYAsPercentagepublic double getYAsPercentage() Returns the position of label by the percentage (value between 0 and 1) of the vertical dimension.- Returns:
- the position of label by the percentage (value between 0 and 1) of the vertical dimension
 
 
- 
 
-