Class ArrowHeadsElement
- java.lang.Object
-
- org.pepstock.charba.client.commons.NativeObjectContainer
-
- org.pepstock.charba.client.commons.AbstractNode
-
- org.pepstock.charba.client.items.ChartElementOptions
-
- org.pepstock.charba.client.annotation.elements.ArrowElement
-
- org.pepstock.charba.client.annotation.elements.ArrowHeadsElement
-
public class ArrowHeadsElement extends ArrowElement
Maps the arrow heads options of aAnnotationElement
at runtime.- Author:
- Andrea "Stock" Stocchero
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AlignPositionElement
getAlignPosition()
Returns the anchor position of label on line.IsColor
getBackgroundColor()
Returns the color of the background of annotation.String
getBackgroundColorAsString()
Returns the color of the background of annotation.IsColor
getBackgroundShadowColor()
Returns the color of the shadow of annotation.String
getBackgroundShadowColorAsString()
Returns the color of the shadow of annotation.CapStyle
getBorderCapStyle()
Returns how the end points of every line are drawn.IsColor
getBorderColor()
Returns the color of the border of annotation.String
getBorderColorAsString()
Returns the color of the border of annotation.List<Integer>
getBorderDash()
Returns the line dash pattern used when stroking lines, using an array of values which specify alternating lengths of lines and gaps which describe the pattern.double
getBorderDashOffset()
Returns the line dash pattern offset.JoinStyle
getBorderJoinStyle()
Returns how two connecting segments (of lines, arcs or curves) with non-zero lengths in a shape are joined together (degenerate segments with zero lengths, whose specified end points and control points are exactly at the same position, are skipped).int
getBorderRadius()
Returns the border radius (in pixels).BarBorderRadius
getBorderRadiusAsObject()
Returns the border radius (in pixels).String
getBorderShadowColorAsString()
Returns the color of the border shadow of annotation.int
getBorderWidth()
Returns the width of the border in pixels.IsColor
getColor()
Returns the color of text.String
getColorAsString()
Returns the color of text as string.List<String>
getContent()
Returns the text to display in label as list.Canvas
getContentAsCanvas()
Returns the text to display in label asCanvas
.Img
getContentAsImage()
Returns the text to display in label asImg
.DrawTime
getDrawTime()
Returns the draw time which defines when the annotations are drawn.ArrowElement
getEnd()
Returns the end arrow head options.IsFont
getFont()
Returns the font element.int
getImageHeight()
Returns the height of label content, when is set asImg
, in pixels in order to scale the image when drawn.String
getImageHeightAsPercentage()
Returns the height of label content, when is set asImg
, in percentage (format is "{n}%") in order to scale the image when drawn.int
getImageWidth()
Returns the width of label content, when is set asImg
, in pixels in order to scale the image when drawn.String
getImageWidthAsPercentage()
Returns the width of label content, when is set asImg
, in percentage (format is "{n}%") in order to scale the image when drawn.IsPadding
getPadding()
Returns the padding element.double
getRotation()
Returns the rotation of annotation in degrees.double
getShadowBlur()
Returns the amount of blur applied to shadows.int
getShadowOffsetX()
Returns the distance that shadows will be offset horizontally.int
getShadowOffsetY()
Returns the distance that shadows will be offset vertically.ArrowElement
getStart()
Returns the start arrow head options.TextAlign
getTextAlign()
Returns the horizontal alignment of the label text when multiple lines.double
getXAdjust()
Returns the adjustment along x-axis (left-right) of annotation relative to above number (can be negative).double
getYAdjust()
Returns the adjustment along y-axis (top-bottom) of annotation relative to above number (can be negative).int
getZ()
Returns the property determines the drawing stack level of the box annotation element.
All visible elements will be drawn in ascending order of `z` option, with the same "drawTime" option.void
setBackgroundColor(String backgroundColor)
Sets the color of the background of annotation.void
setBackgroundColor(IsColor backgroundColor)
Sets the color of the background of annotation.void
setBackgroundShadowColor(String borderShadowColor)
Sets the color of the shadow of annotation.void
setBackgroundShadowColor(IsColor backgroundColor)
Sets the color of the shadow of annotation.void
setBorderCapStyle(CapStyle borderCapStyle)
Sets how the end points of every line are drawn.void
setBorderColor(String borderColor)
Sets the color of the border of annotation.void
setBorderColor(IsColor borderColor)
Sets the color of the border of annotation.void
setBorderDash(int... borderDash)
Sets the line dash pattern used when stroking lines, using an array of values which specify alternating lengths of lines and gaps which describe the pattern.void
setBorderDashOffset(double borderDashOffset)
Sets the line dash pattern offset.void
setBorderJoinStyle(JoinStyle borderJoinStyle)
Sets how two connecting segments (of lines, arcs or curves) with non-zero lengths in a shape are joined together (degenerate segments with zero lengths, whose specified end points and control points are exactly at the same position, are skipped).void
setBorderRadius(int radius)
Sets the border radius.void
setBorderRadius(BarBorderRadius borderRadius)
Sets the border radius (in pixels).void
setBorderShadowColor(String borderShadowColor)
Sets the color of the border shadow of annotation.void
setBorderShadowColor(IsColor borderColor)
Sets the color of the border shadow of annotation.void
setBorderWidth(int borderWidth)
Sets the width of the border in pixels.void
setColor(String fontColor)
Sets the color of text as string.void
setColor(IsColor fontColor)
Sets the color of text.void
setContent(String... content)
Sets the text to display in label.
Provide an array to display values on a new line.void
setContent(List<String> content)
Sets the text to display in label.
Provide a list to display values on a new line.void
setContent(Canvas content)
Sets the canvas to display in label.void
setContent(Img content)
Sets the image to display in label.void
setDrawTime(DrawTime drawTime)
Sets the draw time which defines when the annotations are drawn.void
setImageHeight(int height)
Sets the height of label content, when is set asImg
, in pixels in order to scale the image when drawn.void
setImageHeightAsPercentage(String heightPercentage)
Sets the height of label content, when is set asImg
, in percentage (format is "{n}%") in order to scale the image when drawn.void
setImageWidth(int width)
Sets the width of label content, when is set asImg
, in pixels in order to scale the image when drawn.void
setImageWidthAsPercentage(String widthPercentage)
Sets the width of label content, when is set asImg
, in percentage (format is "{n}%") in order to scale the image when drawn.void
setRotation(double rotation)
Sets the rotation of annotation in degrees.void
setShadowBlur(double shadowBlur)
Sets the amount of blur applied to shadows.void
setShadowOffsetX(int shadowOffset)
Sets the distance that shadows will be offset horizontally.void
setShadowOffsetY(int shadowOffset)
Sets the distance that shadows will be offset vertically.void
setTextAlign(TextAlign align)
Sets the horizontal alignment of the label text when multiple lines.void
setXAdjust(double xAdjust)
Sets the adjustment along x-axis (left-right) of annotation relative to above number (can be negative).void
setYAdjust(double yAdjust)
Sets the adjustment along y-axis (top-bottom) of annotation relative to above number (can be negative).void
setZ(int z)
Sets the property determines the drawing stack level of the box annotation element.
All visible elements will be drawn in ascending order of `z` option, with the same "drawTime" option.-
Methods inherited from class org.pepstock.charba.client.annotation.elements.ArrowElement
getLength, getWidth, isDisplay, isFill, setDisplay, setFill, setLength, setWidth
-
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, 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, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
-
-
-
-
Method Detail
-
getStart
public ArrowElement getStart()
Returns the start arrow head options.- Returns:
- the start arrow head options
-
getEnd
public ArrowElement getEnd()
Returns the end arrow head options.- Returns:
- the end arrow head options
-
getFont
public final IsFont getFont()
Returns the font element.- Returns:
- the font element.
-
getPadding
public final IsPadding getPadding()
Returns the padding element.- Returns:
- the padding element.
-
getAlignPosition
public final AlignPositionElement getAlignPosition()
Returns the anchor position of label on line.- Returns:
- the anchor position of label on line
-
setBorderColor
public final void setBorderColor(IsColor borderColor)
Sets the color of the border of annotation.- Parameters:
borderColor
- the color of the border of annotation
-
setBorderColor
public final void setBorderColor(String borderColor)
Sets the color of the border of annotation.- Parameters:
borderColor
- the color of the border of annotation
-
getBorderColorAsString
public final String getBorderColorAsString()
Returns the color of the border of annotation.- Returns:
- the color of the border of annotation
-
getBorderColor
public final IsColor getBorderColor()
Returns the color of the border of annotation.- Returns:
- the color of the border of annotation
-
setBorderWidth
public final void setBorderWidth(int borderWidth)
Sets the width of the border in pixels.- Parameters:
borderWidth
- the width of the border in pixels.
-
getBorderWidth
public final int getBorderWidth()
Returns the width of the border in pixels.- Returns:
- the width of the border in pixels.
-
setBorderDash
public final void setBorderDash(int... borderDash)
Sets the line dash pattern used when stroking lines, using an array of values which specify alternating lengths of lines and gaps which describe the pattern.- Parameters:
borderDash
- the line dash pattern used when stroking lines, using an array of values which specify alternating lengths of lines and gaps which describe the pattern.
-
getBorderDash
public final List<Integer> getBorderDash()
Returns the line dash pattern used when stroking lines, using an array of values which specify alternating lengths of lines and gaps which describe the pattern.- Returns:
- the line dash pattern used when stroking lines, using an array of values which specify alternating lengths of lines and gaps which describe the pattern.
-
setBorderDashOffset
public final void setBorderDashOffset(double borderDashOffset)
Sets the line dash pattern offset.- Parameters:
borderDashOffset
- the line dash pattern offset.
-
getBorderDashOffset
public final double getBorderDashOffset()
Returns the line dash pattern offset.- Returns:
- the line dash pattern offset.
-
setBorderShadowColor
public final void setBorderShadowColor(IsColor borderColor)
Sets the color of the border shadow of annotation.- Parameters:
borderColor
- the color of the border shadow of annotation
-
setBorderShadowColor
public final void setBorderShadowColor(String borderShadowColor)
Sets the color of the border shadow of annotation.- Parameters:
borderShadowColor
- the border shadow of the border of annotation
-
getBorderShadowColorAsString
public final String getBorderShadowColorAsString()
Returns the color of the border shadow of annotation.- Returns:
- the color of the border shadow of annotation
-
setShadowBlur
public final void setShadowBlur(double shadowBlur)
Sets the amount of blur applied to shadows.- Parameters:
shadowBlur
- the amount of blur applied to shadows
-
getShadowBlur
public final double getShadowBlur()
Returns the amount of blur applied to shadows.- Returns:
- the amount of blur applied to shadows
-
setShadowOffsetX
public final void setShadowOffsetX(int shadowOffset)
Sets the distance that shadows will be offset horizontally.- Parameters:
shadowOffset
- the distance that shadows will be offset horizontally.
-
getShadowOffsetX
public final int getShadowOffsetX()
Returns the distance that shadows will be offset horizontally.- Returns:
- the distance that shadows will be offset horizontally.
-
setShadowOffsetY
public final void setShadowOffsetY(int shadowOffset)
Sets the distance that shadows will be offset vertically.- Parameters:
shadowOffset
- the distance that shadows will be offset vertically.
-
getShadowOffsetY
public final int getShadowOffsetY()
Returns the distance that shadows will be offset vertically.- Returns:
- the distance that shadows will be offset vertically.
-
setBackgroundColor
public final void setBackgroundColor(IsColor backgroundColor)
Sets the color of the background of annotation.- Parameters:
backgroundColor
- the color of the background of annotation
-
setBackgroundColor
public final void setBackgroundColor(String backgroundColor)
Sets the color of the background of annotation.- Parameters:
backgroundColor
- the color of the background of annotation
-
getBackgroundColorAsString
public final String getBackgroundColorAsString()
Returns the color of the background of annotation.- Returns:
- the color of the background of annotation
-
getBackgroundColor
public final IsColor getBackgroundColor()
Returns the color of the background of annotation.- Returns:
- the color of the background of annotation
-
setBorderRadius
public final void setBorderRadius(int radius)
Sets the border radius.- Parameters:
radius
- the border radius.
-
setBorderRadius
public final void setBorderRadius(BarBorderRadius borderRadius)
Sets the border radius (in pixels).- Parameters:
borderRadius
- the border radius (in pixels).
-
getBorderRadius
public final int getBorderRadius()
Returns the border radius (in pixels).- Returns:
- the border radius (in pixels).
-
getBorderRadiusAsObject
public final BarBorderRadius getBorderRadiusAsObject()
Returns the border radius (in pixels).- Returns:
- the border radius (in pixels).
-
setBorderCapStyle
public final void setBorderCapStyle(CapStyle borderCapStyle)
Sets how the end points of every line are drawn.- Parameters:
borderCapStyle
- how the end points of every line are drawn.
-
getBorderCapStyle
public final CapStyle getBorderCapStyle()
Returns how the end points of every line are drawn.- Returns:
- how the end points of every line are drawn.
-
setBorderJoinStyle
public final void setBorderJoinStyle(JoinStyle borderJoinStyle)
Sets how two connecting segments (of lines, arcs or curves) with non-zero lengths in a shape are joined together (degenerate segments with zero lengths, whose specified end points and control points are exactly at the same position, are skipped).- Parameters:
borderJoinStyle
- how two connecting segments (of lines, arcs or curves) with non-zero lengths in a shape are joined together
-
getBorderJoinStyle
public final JoinStyle getBorderJoinStyle()
Returns how two connecting segments (of lines, arcs or curves) with non-zero lengths in a shape are joined together (degenerate segments with zero lengths, whose specified end points and control points are exactly at the same position, are skipped).- Returns:
- how two connecting segments (of lines, arcs or curves) with non-zero lengths in a shape are joined together
-
setBackgroundShadowColor
public final void setBackgroundShadowColor(IsColor backgroundColor)
Sets the color of the shadow of annotation.- Parameters:
backgroundColor
- the color of the shadow of annotation
-
setBackgroundShadowColor
public final void setBackgroundShadowColor(String borderShadowColor)
Sets the color of the shadow of annotation.- Parameters:
borderShadowColor
- the shadow of the border of annotation
-
getBackgroundShadowColorAsString
public final String getBackgroundShadowColorAsString()
Returns the color of the shadow of annotation.- Returns:
- the color of the shadow of annotation
-
getBackgroundShadowColor
public final IsColor getBackgroundShadowColor()
Returns the color of the shadow of annotation.- Returns:
- the color of the shadow of annotation
-
setColor
public final void setColor(String fontColor)
Sets the color of text as string.- Parameters:
fontColor
- the color of text
-
setDrawTime
public final void setDrawTime(DrawTime drawTime)
Sets the draw time which defines when the annotations are drawn.- Parameters:
drawTime
- the draw time which defines when the annotations are drawn
-
getDrawTime
public final DrawTime getDrawTime()
Returns the draw time which defines when the annotations are drawn.- Returns:
- the draw time which defines when the annotations are drawn
-
setColor
public final void setColor(IsColor fontColor)
Sets the color of text.- Parameters:
fontColor
- the color of text
-
getColorAsString
public final String getColorAsString()
Returns the color of text as string.- Returns:
- the color of text
-
getColor
public final IsColor getColor()
Returns the color of text.- Returns:
- the color of text
-
setContent
public final void setContent(List<String> content)
Sets the text to display in label.
Provide a list to display values on a new line.- Parameters:
content
- the text to display in label as multi-line values
-
setContent
public final void setContent(String... content)
Sets the text to display in label.
Provide an array to display values on a new line.- Parameters:
content
- the text to display in label
-
setContent
public final void setContent(Img content)
Sets the image to display in label.- Parameters:
content
- the image to display in label
-
setContent
public final void setContent(Canvas content)
Sets the canvas to display in label.- Parameters:
content
- the canvas to display in label
-
getContent
public final List<String> getContent()
Returns the text to display in label as list.- Returns:
- the text to display in label as list
-
getContentAsImage
public final Img getContentAsImage()
Returns the text to display in label asImg
.- Returns:
- the text to display in label as
Img
-
getContentAsCanvas
public final Canvas getContentAsCanvas()
Returns the text to display in label asCanvas
.- Returns:
- the text to display in label as
Canvas
-
setImageHeight
public final void setImageHeight(int height)
Sets the height of label content, when is set asImg
, in pixels in order to scale the image when drawn.- Parameters:
height
- the height of label content, when is set asImg
, in pixels in order to scale the image when drawn
-
setImageHeightAsPercentage
public final void setImageHeightAsPercentage(String heightPercentage)
Sets the height of label content, when is set asImg
, in percentage (format is "{n}%") in order to scale the image when drawn.- Parameters:
heightPercentage
- the height of label content, when is set asImg
, in percentage (format is "{n}%") in order to scale the image when drawn
-
getImageHeight
public final int getImageHeight()
Returns the height of label content, when is set asImg
, in pixels in order to scale the image when drawn.- Returns:
- the height of label content, when is set as
Img
, in pixels in order to scale the image when drawn
-
getImageHeightAsPercentage
public final String getImageHeightAsPercentage()
Returns the height of label content, when is set asImg
, in percentage (format is "{n}%") in order to scale the image when drawn.- Returns:
- the height of label content, when is set as
Img
, in percentage (format is "{n}%") in order to scale the image when drawn
-
setImageWidth
public final void setImageWidth(int width)
Sets the width of label content, when is set asImg
, in pixels in order to scale the image when drawn.- Parameters:
width
- the height of label content, when is set asImg
, in pixels in order to scale the image when drawn
-
setImageWidthAsPercentage
public final void setImageWidthAsPercentage(String widthPercentage)
Sets the width of label content, when is set asImg
, in percentage (format is "{n}%") in order to scale the image when drawn.- Parameters:
widthPercentage
- the height of label content, when is set asImg
, in percentage (format is "{n}%") in order to scale the image when drawn
-
getImageWidth
public final int getImageWidth()
Returns the width of label content, when is set asImg
, in pixels in order to scale the image when drawn.- Returns:
- the width of label content, when is set as
Img
, in pixels in order to scale the image when drawn
-
getImageWidthAsPercentage
public final String getImageWidthAsPercentage()
Returns the width of label content, when is set asImg
, in percentage (format is "{n}%") in order to scale the image when drawn.- Returns:
- the width of label content, when is set as
Img
, in percentage (format is "{n}%") in order to scale the image when drawn
-
setRotation
public final void setRotation(double rotation)
Sets the rotation of annotation in degrees.- Parameters:
rotation
- the rotation of annotation in degrees
-
getRotation
public final double getRotation()
Returns the rotation of annotation in degrees.- Returns:
- the rotation of annotation in degrees
-
setTextAlign
public final void setTextAlign(TextAlign align)
Sets the horizontal alignment of the label text when multiple lines.- Parameters:
align
- the horizontal alignment of the label text when multiple lines
-
getTextAlign
public final TextAlign getTextAlign()
Returns the horizontal alignment of the label text when multiple lines.- Returns:
- the horizontal alignment of the label text when multiple lines
-
setYAdjust
public final void setYAdjust(double yAdjust)
Sets the adjustment along y-axis (top-bottom) of annotation relative to above number (can be negative).- Parameters:
yAdjust
- the adjustment along y-axis (top-bottom) of annotation
-
getYAdjust
public final double getYAdjust()
Returns the adjustment along y-axis (top-bottom) of annotation relative to above number (can be negative).- Returns:
- the adjustment along y-axis (top-bottom) of annotation
-
setXAdjust
public final void setXAdjust(double xAdjust)
Sets the adjustment along x-axis (left-right) of annotation relative to above number (can be negative).- Parameters:
xAdjust
- the adjustment along x-axis (left-right) of annotation
-
getXAdjust
public final double getXAdjust()
Returns the adjustment along x-axis (left-right) of annotation relative to above number (can be negative).- Returns:
- the adjustment along x-axis (left-right) of annotation
-
setZ
public final void setZ(int z)
Sets the property determines the drawing stack level of the box annotation element.
All visible elements will be drawn in ascending order of `z` option, with the same "drawTime" option.- Parameters:
z
- the property determines the drawing stack level of the box annotation element.
All visible elements will be drawn in ascending order of `z` option, with the same "drawTime" option.
-
getZ
public final int getZ()
Returns the property determines the drawing stack level of the box annotation element.
All visible elements will be drawn in ascending order of `z` option, with the same "drawTime" option.- Returns:
- the property determines the drawing stack level of the box annotation element.
All visible elements will be drawn in ascending order of `z` option, with the same "drawTime" option.
-
-