Class AnnotationElement
- java.lang.Object
- 
- org.pepstock.charba.client.commons.NativeObjectContainer
- 
- org.pepstock.charba.client.commons.AbstractNode
- 
- org.pepstock.charba.client.commons.AbstractReadOnlyPoint
- 
- org.pepstock.charba.client.items.ChartElement
- 
- org.pepstock.charba.client.annotation.elements.AnnotationElement
 
 
 
 
 
- 
- All Implemented Interfaces:
- IsPoint
 
 public final class AnnotationElement extends ChartElement Maps all properties of the annotation element, the implementation of the annotation options in the plugin.
 It provides all dimensions of the element and sub elements.- Author:
- Andrea "Stock" Stocchero
 
- 
- 
Field SummaryFields Modifier and Type Field Description static ChartElementFactoryFACTORYStatic instance for the MATRIX element factorystatic StringTYPEMATRIX element type.
 - 
Constructor SummaryConstructors Constructor Description AnnotationElement(AnnotationEnvelop<NativeObject> envelop)Creates the item using an envelop of the native java script object which contains all properties.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetHeight()Returns the height of element in pixel.AnnotationElementgetLabel()Returns the inner label element of the element.OptionsElementgetOptions()Returns the element options ornullif options are not stored in the element.doublegetPointX()Returns the X location of element point in pixel.doublegetPointY()Returns the Y location of element point in pixel.doublegetRadius()Returns the radius of element in pixel.doublegetWidth()Returns the width of element in pixel.doublegetX2()Returns the X2 location of element in pixel.doublegetY2()Returns the Y location of element in pixel.booleaninRange(double x, double y)Returns whether the coordinates, passed as arguments, are inside the element or not.booleaninRange(double x, double y, boolean useFinalPosition)Returns whether the coordinates, passed as arguments, are inside the element or not.booleaninRange(IsPoint point)Returns whether the coordinates, passed as arguments, are inside the element or not.booleaninRange(IsPoint point, boolean useFinalPosition)Returns whether the coordinates, passed as arguments, are inside the element or not.voidsetCenterPoint(double x, double y)Sets the center point of the element.voidsetCenterPoint(IsPoint point)Sets the center point of the element.voidsetHeight(double height)Sets the height of element in pixel.voidsetRadius(double radius)Sets the radius of element in pixel.voidsetWidth(double width)Sets the width of element in pixel.voidsetX(double x)Sets the X location of element in pixel.voidsetX2(double x2)Sets the X2 location of element in pixel.voidsetY(double y)Sets the Y location of element in pixel.voidsetY2(double y2)Sets the Y2 location of element in pixel.- 
Methods inherited from class org.pepstock.charba.client.items.ChartElementgetCenterPoint, getCenterPoint, getFinalPositionProps, getFinalPositionProps, getType, isActive, isSkipped, isStop, toString
 - 
Methods inherited from class org.pepstock.charba.client.commons.AbstractReadOnlyPointgetX, getY
 - 
Methods inherited from class org.pepstock.charba.client.commons.AbstractNodecheckAndAddToParent, 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, setValueAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent
 - 
Methods inherited from class org.pepstock.charba.client.commons.NativeObjectContainercheckDefaultValuesArgument, 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, setValue, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface org.pepstock.charba.client.commons.IsPointisConsistent
 
- 
 
- 
- 
- 
Field Detail- 
TYPEpublic static final String TYPE MATRIX element type.- See Also:
- Constant Field Values
 
 - 
FACTORYpublic static final ChartElementFactory FACTORY Static instance for the MATRIX element factory
 
- 
 - 
Constructor Detail- 
AnnotationElementpublic AnnotationElement(AnnotationEnvelop<NativeObject> envelop) Creates the item using an envelop of the native java script object which contains all properties.- Parameters:
- envelop- envelop of the nativeObject native java script object which contains all properties.
 
 
- 
 - 
Method Detail- 
getLabelpublic AnnotationElement getLabel() Returns the inner label element of the element.- Returns:
- the inner label element of the element
 
 - 
setCenterPointpublic void setCenterPoint(IsPoint point) Sets the center point of the element.- Parameters:
- point- the center point of the element.
 
 - 
setCenterPointpublic void setCenterPoint(double x, double y)Sets the center point of the element.- Parameters:
- x- the X value of center point of the element.
- y- the Y value of center point of the element.
 
 - 
inRangepublic boolean inRange(IsPoint point) Returns whether the coordinates, passed as arguments, are inside the element or not.- Parameters:
- point- the point instance to check.
- Returns:
- trueif point is inside the element
 
 - 
inRangepublic boolean inRange(IsPoint point, boolean useFinalPosition) Returns whether the coordinates, passed as arguments, are inside the element or not.- Parameters:
- point- the point instance to check.
- useFinalPosition- if the position must be calculated with final dimensions or also during the animation.
- Returns:
- trueif point is inside the element
 
 - 
inRangepublic boolean inRange(double x, double y)Returns whether the coordinates, passed as arguments, are inside the element or not.- Parameters:
- x- coordinate x of the point to check.
- y- coordinate y of the point to check.
- Returns:
- trueif point is inside the element
 
 - 
inRangepublic boolean inRange(double x, double y, boolean useFinalPosition)Returns whether the coordinates, passed as arguments, are inside the element or not.- Parameters:
- x- coordinate x of the point to check.
- y- coordinate y of the point to check.
- useFinalPosition- if the position must be calculated with final dimensions or also during the animation.
- Returns:
- trueif point is inside the element
 
 - 
getOptionspublic OptionsElement getOptions() Returns the element options ornullif options are not stored in the element.- Overrides:
- getOptionsin class- ChartElement
- Returns:
- the element options or nullif options are not stored in the element.
 
 - 
setXpublic void setX(double x) Sets the X location of element in pixel.- Parameters:
- x- the X location of element in pixel.
 
 - 
setYpublic void setY(double y) Sets the Y location of element in pixel.- Parameters:
- y- the Y location of element in pixel.
 
 - 
getX2public double getX2() Returns the X2 location of element in pixel.- Returns:
- the X2 location of element in pixel.
 
 - 
setX2public void setX2(double x2) Sets the X2 location of element in pixel.- Parameters:
- x2- the X2 location of element in pixel.
 
 - 
getY2public double getY2() Returns the Y location of element in pixel.- Returns:
- the Y location of element in pixel.
 
 - 
setY2public void setY2(double y2) Sets the Y2 location of element in pixel.- Parameters:
- y2- the Y2 location of element in pixel.
 
 - 
getWidthpublic double getWidth() Returns the width of element in pixel.- Returns:
- the width of element in pixel.
 
 - 
setWidthpublic void setWidth(double width) Sets the width of element in pixel.- Parameters:
- width- the width of element in pixel.
 
 - 
getHeightpublic double getHeight() Returns the height of element in pixel.- Returns:
- the height of element in pixel.
 
 - 
setHeightpublic void setHeight(double height) Sets the height of element in pixel.- Parameters:
- height- the height of element in pixel.
 
 - 
getRadiuspublic double getRadius() Returns the radius of element in pixel.- Returns:
- the radius of element in pixel.
 
 - 
setRadiuspublic void setRadius(double radius) Sets the radius of element in pixel.- Parameters:
- radius- the radius of element in pixel.
 
 - 
getPointXpublic double getPointX() Returns the X location of element point in pixel.- Returns:
- the X location of element point in pixel.
 
 - 
getPointYpublic double getPointY() Returns the Y location of element point in pixel.- Returns:
- the Y location of element point in pixel.
 
 
- 
 
-