Class Callout
- java.lang.Object
-
- org.pepstock.charba.client.commons.NativeObjectContainer
-
- org.pepstock.charba.client.commons.AbstractNode
-
- org.pepstock.charba.client.annotation.Callout
-
public final class Callout extends AbstractNode
Implements a CALLOUT to apply on a LABEL annotation.- Author:
- Andrea "Stock" Stocchero
-
-
Field Summary
Fields Modifier and Type Field Description static CapStyleDEFAULT_BORDER_CAP_STYLEDefault callout border cap style,CapStyle.BUTT.static intDEFAULT_BORDER_DASH_OFFSETDefault callout border dash offset, 0.static JoinStyleDEFAULT_BORDER_JOIN_STYLEDefault callout border join style,JoinStyle.MITER.static intDEFAULT_BORDER_WIDTHDefault callout border width, 1.static booleanDEFAULT_DISPLAYDefault callout display, false.static intDEFAULT_MARGINDefault amount of pixels between the label and the callout separator, 5.static intDEFAULT_SIDEDefault width of the starter line of callout pointer, 5.static intDEFAULT_STARTDefault the separator dimension in pixels to use as starting point for callout pointer,Undefined.INTEGER.static doubleDEFAULT_START_AS_PERCENTAGEDefault the percentage of the separator dimension to use as starting point for callout pointer, 0.5.
-
Method Summary
All Methods Instance Methods Concrete Methods Default Methods Modifier and Type Method Description default CapStylegetBorderCapStyle()Returns how the end points of every line are drawn.default CapStyleCallback<AnnotationContext>getBorderCapStyleCallback()Returns the border capstyle callback, if set, otherwisenull.default IsColorgetBorderColor()Returns the color of the border of annotation.default StringgetBorderColorAsString()Returns the color of the border of annotation.default ColorCallback<AnnotationContext>getBorderColorCallback()Returns the callback called to set the color of the border of annotation.default 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.default BorderDashCallback<AnnotationContext>getBorderDashCallback()Returns the callback called to set 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.default doublegetBorderDashOffset()Returns the line dash pattern offset.default BorderDashOffsetCallback<AnnotationContext>getBorderDashOffsetCallback()Returns the callback called to set the line dash pattern offset.default JoinStylegetBorderJoinStyle()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).default JoinStyleCallback<AnnotationContext>getBorderJoinStyleCallback()Returns the border join style callback, if set, otherwisenull.org.pepstock.charba.client.annotation.BorderOptionsHandlergetBorderOptionsHandler()default intgetBorderWidth()Returns the width of the border in pixels.default WidthCallback<AnnotationContext>getBorderWidthCallback()Returns the callback called to set the width of the border in pixels.SimpleDisplayCallback<AnnotationContext>getDisplayCallback()Returns the callback called to set whether the label should be displayed.org.pepstock.charba.client.annotation.ExtendedBorderOptionsHandlergetExtendedBorderOptionsHandler()intgetMargin()Returns the amount of pixels between the label and the callout separator.MarginCallbackgetMarginCallback()Returns the callback to set the amount of pixels between the label and the callout separator.CalloutPositiongetPosition()Returns the position of callout, with respect to the label.CalloutPositionCallbackgetPositionCallback()Returns the callback to set the position of callout, with respect to the label.intgetSide()Returns the width of the starter line of callout pointer.SideCallbackgetSideCallback()Returns the callback to set the width of the starter line of callout pointer.intgetStart()Returns the separator dimension in pixels to use as starting point for callout pointer.doublegetStartAsPercentage()Returns the percentage of the separator dimension to use as starting point for callout pointer.StartCallbackgetStartCallback()Returns the callback to set the separator dimension to use as starting point for callout pointer.booleanisDisplay()Returnstruewhether the label should be displayed.default voidsetBorderCapStyle(CapStyleCallback<AnnotationContext> borderCapStyleCallback)Sets the border capstyle callback.default voidsetBorderCapStyle(NativeCallback borderCapStyleCallback)Sets the border capstyle callback.default voidsetBorderCapStyle(CapStyle borderCapStyle)Sets how the end points of every line are drawn.default voidsetBorderColor(String borderColor)Sets the color of the border of annotation.default voidsetBorderColor(ColorCallback<AnnotationContext> borderColorCallback)Sets the callback to set the color of the border of annotation.default voidsetBorderColor(NativeCallback borderColorCallback)Sets the callback to set the color of the border of annotation.default voidsetBorderColor(IsColor borderColor)Sets the color of the border of annotation.default voidsetBorderDash(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.default voidsetBorderDash(BorderDashCallback<AnnotationContext> borderDashCallback)Sets the callback to set 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.default voidsetBorderDash(NativeCallback borderDashCallback)Sets the callback to set 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.default voidsetBorderDashOffset(double borderDashOffset)Sets the line dash pattern offset.default voidsetBorderDashOffset(BorderDashOffsetCallback<AnnotationContext> borderDashOffsetCallback)Sets the callback to set the line dash pattern offset.default voidsetBorderDashOffset(NativeCallback borderDashOffsetCallback)Sets the callback to set the line dash pattern offset.default voidsetBorderJoinStyle(JoinStyleCallback<AnnotationContext> borderJoinStyleCallback)Sets the border join style callback.default voidsetBorderJoinStyle(NativeCallback borderJoinStyleCallback)Sets the border join style callback.default voidsetBorderJoinStyle(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).default voidsetBorderWidth(int borderWidth)Sets the width of the border in pixels.default voidsetBorderWidth(NativeCallback borderWidthCallback)Sets the callback to set the color of the width of the border in pixels.default voidsetBorderWidth(WidthCallback<AnnotationContext> borderWidthCallback)Sets the callback to set the color of the width of the border in pixels.voidsetDisplay(boolean display)Setstruewhether the label should be displayed.voidsetDisplay(NativeCallback displayCallback)Sets the callback to set whether the label should be displayed.voidsetDisplay(SimpleDisplayCallback<AnnotationContext> displayCallback)Sets the callback to set whether the label should be displayed.voidsetMargin(int margin)Sets the amount of pixels between the label and the callout separator.voidsetMargin(MarginCallback marginCallback)Sets the callback to set the amount of pixels between the label and the callout separator.voidsetMargin(NativeCallback marginCallback)Sets the callback to set the amount of pixels between the label and the callout separator.voidsetPosition(CalloutPositionCallback positionCallback)Sets the callback to set the position of callout, with respect to the label.voidsetPosition(CalloutPosition position)Sets the position of callout, with respect to the label.voidsetPosition(NativeCallback positionCallback)Sets the callback to set the position of callout, with respect to the label.voidsetSide(int side)Sets the width of the starter line of callout pointer.voidsetSide(SideCallback sideCallback)Sets the callback to set the width of the starter line of callout pointer.voidsetSide(NativeCallback sideCallback)Sets the callback to set the width of the starter line of callout pointer.voidsetStart(int start)Sets the separator dimension in pixels to use as starting point for callout pointer.voidsetStart(StartCallback startCallback)Sets the callback to set the separator dimension to use as starting point for callout pointer.voidsetStart(NativeCallback startCallback)Sets the callback to set the separator dimension to use as starting point for callout pointer.voidsetStartAsPercentage(double start)Sets the percentage of the separator dimension to use as starting point for callout pointer.-
Methods inherited from class org.pepstock.charba.client.commons.AbstractNode
checkAndAddToParent, 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.NativeObjectContainer
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, 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
-
-
-
-
Field Detail
-
DEFAULT_DISPLAY
public static final boolean DEFAULT_DISPLAY
Default callout display, false.- See Also:
- Constant Field Values
-
DEFAULT_BORDER_WIDTH
public static final int DEFAULT_BORDER_WIDTH
Default callout border width, 1.- See Also:
- Constant Field Values
-
DEFAULT_BORDER_CAP_STYLE
public static final CapStyle DEFAULT_BORDER_CAP_STYLE
Default callout border cap style,CapStyle.BUTT.
-
DEFAULT_BORDER_JOIN_STYLE
public static final JoinStyle DEFAULT_BORDER_JOIN_STYLE
Default callout border join style,JoinStyle.MITER.
-
DEFAULT_BORDER_DASH_OFFSET
public static final int DEFAULT_BORDER_DASH_OFFSET
Default callout border dash offset, 0.- See Also:
- Constant Field Values
-
DEFAULT_MARGIN
public static final int DEFAULT_MARGIN
Default amount of pixels between the label and the callout separator, 5.- See Also:
- Constant Field Values
-
DEFAULT_SIDE
public static final int DEFAULT_SIDE
Default width of the starter line of callout pointer, 5.- See Also:
- Constant Field Values
-
DEFAULT_START
public static final int DEFAULT_START
Default the separator dimension in pixels to use as starting point for callout pointer,Undefined.INTEGER.- See Also:
- Constant Field Values
-
DEFAULT_START_AS_PERCENTAGE
public static final double DEFAULT_START_AS_PERCENTAGE
Default the percentage of the separator dimension to use as starting point for callout pointer, 0.5.- See Also:
- Constant Field Values
-
-
Method Detail
-
getBorderOptionsHandler
public org.pepstock.charba.client.annotation.BorderOptionsHandler getBorderOptionsHandler()
-
getExtendedBorderOptionsHandler
public org.pepstock.charba.client.annotation.ExtendedBorderOptionsHandler getExtendedBorderOptionsHandler()
-
setDisplay
public void setDisplay(boolean display)
Setstruewhether the label should be displayed.- Parameters:
display-truewhether the label should be displayed
-
isDisplay
public boolean isDisplay()
Returnstruewhether the label should be displayed.- Returns:
truewhether the label should be displayed
-
setMargin
public void setMargin(int margin)
Sets the amount of pixels between the label and the callout separator.- Parameters:
margin- the amount of pixels between the label and the callout separator
-
getMargin
public int getMargin()
Returns the amount of pixels between the label and the callout separator.- Returns:
- the amount of pixels between the label and the callout separator.
-
setSide
public void setSide(int side)
Sets the width of the starter line of callout pointer.- Parameters:
side- the width of the starter line of callout pointer
-
getSide
public int getSide()
Returns the width of the starter line of callout pointer.- Returns:
- the width of the starter line of callout pointer
-
setStart
public void setStart(int start)
Sets the separator dimension in pixels to use as starting point for callout pointer.- Parameters:
start- the separator dimension in pixels to use as starting point for callout pointer
-
getStart
public int getStart()
Returns the separator dimension in pixels to use as starting point for callout pointer.- Returns:
- the separator dimension in pixels to use as starting point for callout pointer
-
setStartAsPercentage
public void setStartAsPercentage(double start)
Sets the percentage of the separator dimension to use as starting point for callout pointer.- Parameters:
start- the percentage of the separator dimension to use as starting point for callout pointer
-
getStartAsPercentage
public double getStartAsPercentage()
Returns the percentage of the separator dimension to use as starting point for callout pointer.- Returns:
- the percentage of the separator dimension to use as starting point for callout pointer
-
setPosition
public void setPosition(CalloutPosition position)
Sets the position of callout, with respect to the label.- Parameters:
position- the position of callout, with respect to the label
-
getPosition
public CalloutPosition getPosition()
Returns the position of callout, with respect to the label.- Returns:
- the position of callout, with respect to the label.
-
getDisplayCallback
public SimpleDisplayCallback<AnnotationContext> getDisplayCallback()
Returns the callback called to set whether the label should be displayed.- Returns:
- the callback called to set whether the label should be displayed
-
setDisplay
public void setDisplay(SimpleDisplayCallback<AnnotationContext> displayCallback)
Sets the callback to set whether the label should be displayed.- Parameters:
displayCallback- to set whether the label should be displayed
-
setDisplay
public void setDisplay(NativeCallback displayCallback)
Sets the callback to set whether the label should be displayed.- Parameters:
displayCallback- to set whether the label should be displayed
-
getMarginCallback
public MarginCallback getMarginCallback()
Returns the callback to set the amount of pixels between the label and the callout separator.- Returns:
- the callback to set the amount of pixels between the label and the callout separator
-
setMargin
public void setMargin(MarginCallback marginCallback)
Sets the callback to set the amount of pixels between the label and the callout separator.- Parameters:
marginCallback- the callback to set the amount of pixels between the label and the callout separator
-
setMargin
public void setMargin(NativeCallback marginCallback)
Sets the callback to set the amount of pixels between the label and the callout separator.- Parameters:
marginCallback- the callback to set the amount of pixels between the label and the callout separator
-
getSideCallback
public SideCallback getSideCallback()
Returns the callback to set the width of the starter line of callout pointer.- Returns:
- the callback to set the width of the starter line of callout pointer
-
setSide
public void setSide(SideCallback sideCallback)
Sets the callback to set the width of the starter line of callout pointer.- Parameters:
sideCallback- the callback to set the width of the starter line of callout pointer
-
setSide
public void setSide(NativeCallback sideCallback)
Sets the callback to set the width of the starter line of callout pointer.- Parameters:
sideCallback- the callback to set the width of the starter line of callout pointer
-
getStartCallback
public StartCallback getStartCallback()
Returns the callback to set the separator dimension to use as starting point for callout pointer.- Returns:
- the callback to set the separator dimension to use as starting point for callout pointer
-
setStart
public void setStart(StartCallback startCallback)
Sets the callback to set the separator dimension to use as starting point for callout pointer.- Parameters:
startCallback- the callback to set the separator dimension to use as starting point for callout pointer
-
setStart
public void setStart(NativeCallback startCallback)
Sets the callback to set the separator dimension to use as starting point for callout pointer.- Parameters:
startCallback- the callback to set the separator dimension to use as starting point for callout pointer
-
getPositionCallback
public CalloutPositionCallback getPositionCallback()
Returns the callback to set the position of callout, with respect to the label.- Returns:
- the callback to set the position of callout, with respect to the label
-
setPosition
public void setPosition(CalloutPositionCallback positionCallback)
Sets the callback to set the position of callout, with respect to the label.- Parameters:
positionCallback- the callback to set the position of callout, with respect to the label
-
setPosition
public void setPosition(NativeCallback positionCallback)
Sets the callback to set the position of callout, with respect to the label.- Parameters:
positionCallback- the callback to set the position of callout, with respect to the label
-
setBorderColor
public default void setBorderColor(IsColor borderColor)
Sets the color of the border of annotation.- Parameters:
borderColor- the color of the border of annotation
-
setBorderColor
public default void setBorderColor(String borderColor)
Sets the color of the border of annotation.- Parameters:
borderColor- the color of the border of annotation
-
getBorderColorAsString
public default String getBorderColorAsString()
Returns the color of the border of annotation.- Returns:
- the color of the border of annotation
-
getBorderColor
public default IsColor getBorderColor()
Returns the color of the border of annotation.- Returns:
- the color of the border of annotation
-
setBorderWidth
public default void setBorderWidth(int borderWidth)
Sets the width of the border in pixels.- Parameters:
borderWidth- the width of the border in pixels.
-
getBorderWidth
public default int getBorderWidth()
Returns the width of the border in pixels.- Returns:
- the width of the border in pixels.
-
setBorderDash
public default 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 default 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 default void setBorderDashOffset(double borderDashOffset)
Sets the line dash pattern offset.- Parameters:
borderDashOffset- the line dash pattern offset.
-
getBorderDashOffset
public default double getBorderDashOffset()
Returns the line dash pattern offset.- Returns:
- the line dash pattern offset.
-
getBorderColorCallback
public default ColorCallback<AnnotationContext> getBorderColorCallback()
Returns the callback called to set the color of the border of annotation.- Returns:
- the callback called to set the color of the border of annotation
-
setBorderColor
public default void setBorderColor(ColorCallback<AnnotationContext> borderColorCallback)
Sets the callback to set the color of the border of annotation.- Parameters:
borderColorCallback- to set the color of the border of annotation
-
setBorderColor
public default void setBorderColor(NativeCallback borderColorCallback)
Sets the callback to set the color of the border of annotation.- Parameters:
borderColorCallback- to set the color of the border of annotation
-
getBorderWidthCallback
public default WidthCallback<AnnotationContext> getBorderWidthCallback()
Returns the callback called to set the width of the border in pixels.- Returns:
- the callback called to set the width of the border in pixels
-
setBorderWidth
public default void setBorderWidth(WidthCallback<AnnotationContext> borderWidthCallback)
Sets the callback to set the color of the width of the border in pixels.- Parameters:
borderWidthCallback- to set the width of the border in pixels
-
setBorderWidth
public default void setBorderWidth(NativeCallback borderWidthCallback)
Sets the callback to set the color of the width of the border in pixels.- Parameters:
borderWidthCallback- to set the width of the border in pixels
-
getBorderDashCallback
public default BorderDashCallback<AnnotationContext> getBorderDashCallback()
Returns the callback called to set 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 callback called to set 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
-
setBorderDash
public default void setBorderDash(BorderDashCallback<AnnotationContext> borderDashCallback)
Sets the callback to set 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:
borderDashCallback- to set 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
-
setBorderDash
public default void setBorderDash(NativeCallback borderDashCallback)
Sets the callback to set 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:
borderDashCallback- to set 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
-
getBorderDashOffsetCallback
public default BorderDashOffsetCallback<AnnotationContext> getBorderDashOffsetCallback()
Returns the callback called to set the line dash pattern offset.- Returns:
- the callback called to set the line dash pattern offset
-
setBorderDashOffset
public default void setBorderDashOffset(BorderDashOffsetCallback<AnnotationContext> borderDashOffsetCallback)
Sets the callback to set the line dash pattern offset.- Parameters:
borderDashOffsetCallback- to set the line dash pattern offset
-
setBorderDashOffset
public default void setBorderDashOffset(NativeCallback borderDashOffsetCallback)
Sets the callback to set the line dash pattern offset.- Parameters:
borderDashOffsetCallback- to set the line dash pattern offset
-
setBorderCapStyle
public default 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 default CapStyle getBorderCapStyle()
Returns how the end points of every line are drawn.- Returns:
- how the end points of every line are drawn.
-
setBorderJoinStyle
public default 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 default 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
-
getBorderCapStyleCallback
public default CapStyleCallback<AnnotationContext> getBorderCapStyleCallback()
Returns the border capstyle callback, if set, otherwisenull.- Returns:
- the border capstyle callback, if set, otherwise
null.
-
setBorderCapStyle
public default void setBorderCapStyle(CapStyleCallback<AnnotationContext> borderCapStyleCallback)
Sets the border capstyle callback.- Parameters:
borderCapStyleCallback- the border capstyle callback.
-
setBorderCapStyle
public default void setBorderCapStyle(NativeCallback borderCapStyleCallback)
Sets the border capstyle callback.- Parameters:
borderCapStyleCallback- the border capstyle callback.
-
getBorderJoinStyleCallback
public default JoinStyleCallback<AnnotationContext> getBorderJoinStyleCallback()
Returns the border join style callback, if set, otherwisenull.- Returns:
- the border join style callback, if set, otherwise
null.
-
setBorderJoinStyle
public default void setBorderJoinStyle(JoinStyleCallback<AnnotationContext> borderJoinStyleCallback)
Sets the border join style callback.- Parameters:
borderJoinStyleCallback- the border join style callback.
-
setBorderJoinStyle
public default void setBorderJoinStyle(NativeCallback borderJoinStyleCallback)
Sets the border join style callback.- Parameters:
borderJoinStyleCallback- the border join style callback.
-
-