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 CapStyle
DEFAULT_BORDER_CAP_STYLE
Default callout border cap style,CapStyle.BUTT
.static int
DEFAULT_BORDER_DASH_OFFSET
Default callout border dash offset, 0.static JoinStyle
DEFAULT_BORDER_JOIN_STYLE
Default callout border join style,JoinStyle.MITER
.static int
DEFAULT_BORDER_WIDTH
Default callout border width, 1.static boolean
DEFAULT_DISPLAY
Default callout display, false.static int
DEFAULT_MARGIN
Default amount of pixels between the label and the callout separator, 5.static int
DEFAULT_SIDE
Default width of the starter line of callout pointer, 5.static int
DEFAULT_START
Default the separator dimension in pixels to use as starting point for callout pointer,Undefined.INTEGER
.static double
DEFAULT_START_AS_PERCENTAGE
Default 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 CapStyle
getBorderCapStyle()
Returns how the end points of every line are drawn.default CapStyleCallback<AnnotationContext>
getBorderCapStyleCallback()
Returns the border capstyle callback, if set, otherwisenull
.default IsColor
getBorderColor()
Returns the color of the border of annotation.default String
getBorderColorAsString()
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 double
getBorderDashOffset()
Returns the line dash pattern offset.default BorderDashOffsetCallback<AnnotationContext>
getBorderDashOffsetCallback()
Returns the callback called to set the line dash pattern offset.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).default JoinStyleCallback<AnnotationContext>
getBorderJoinStyleCallback()
Returns the border join style callback, if set, otherwisenull
.org.pepstock.charba.client.annotation.BorderOptionsHandler
getBorderOptionsHandler()
default int
getBorderWidth()
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.ExtendedBorderOptionsHandler
getExtendedBorderOptionsHandler()
int
getMargin()
Returns the amount of pixels between the label and the callout separator.MarginCallback
getMarginCallback()
Returns the callback to set the amount of pixels between the label and the callout separator.CalloutPosition
getPosition()
Returns the position of callout, with respect to the label.CalloutPositionCallback
getPositionCallback()
Returns the callback to set the position of callout, with respect to the label.int
getSide()
Returns the width of the starter line of callout pointer.SideCallback
getSideCallback()
Returns the callback to set the width of the starter line of callout pointer.int
getStart()
Returns the separator dimension in pixels to use as starting point for callout pointer.double
getStartAsPercentage()
Returns the percentage of the separator dimension to use as starting point for callout pointer.StartCallback
getStartCallback()
Returns the callback to set the separator dimension to use as starting point for callout pointer.boolean
isDisplay()
Returnstrue
whether the label should be displayed.default void
setBorderCapStyle(CapStyleCallback<AnnotationContext> borderCapStyleCallback)
Sets the border capstyle callback.default void
setBorderCapStyle(NativeCallback borderCapStyleCallback)
Sets the border capstyle callback.default void
setBorderCapStyle(CapStyle borderCapStyle)
Sets how the end points of every line are drawn.default void
setBorderColor(String borderColor)
Sets the color of the border of annotation.default void
setBorderColor(ColorCallback<AnnotationContext> borderColorCallback)
Sets the callback to set the color of the border of annotation.default void
setBorderColor(NativeCallback borderColorCallback)
Sets the callback to set the color of the border of annotation.default void
setBorderColor(IsColor borderColor)
Sets the color of the border of annotation.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.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.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.default void
setBorderDashOffset(double borderDashOffset)
Sets the line dash pattern offset.default void
setBorderDashOffset(BorderDashOffsetCallback<AnnotationContext> borderDashOffsetCallback)
Sets the callback to set the line dash pattern offset.default void
setBorderDashOffset(NativeCallback borderDashOffsetCallback)
Sets the callback to set the line dash pattern offset.default void
setBorderJoinStyle(JoinStyleCallback<AnnotationContext> borderJoinStyleCallback)
Sets the border join style callback.default void
setBorderJoinStyle(NativeCallback borderJoinStyleCallback)
Sets the border join style callback.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).default void
setBorderWidth(int borderWidth)
Sets the width of the border in pixels.default void
setBorderWidth(NativeCallback borderWidthCallback)
Sets the callback to set the color of the width of the border in pixels.default void
setBorderWidth(WidthCallback<AnnotationContext> borderWidthCallback)
Sets the callback to set the color of the width of the border in pixels.void
setDisplay(boolean display)
Setstrue
whether the label should be displayed.void
setDisplay(NativeCallback displayCallback)
Sets the callback to set whether the label should be displayed.void
setDisplay(SimpleDisplayCallback<AnnotationContext> displayCallback)
Sets the callback to set whether the label should be displayed.void
setMargin(int margin)
Sets the amount of pixels between the label and the callout separator.void
setMargin(MarginCallback marginCallback)
Sets the callback to set the amount of pixels between the label and the callout separator.void
setMargin(NativeCallback marginCallback)
Sets the callback to set the amount of pixels between the label and the callout separator.void
setPosition(CalloutPositionCallback positionCallback)
Sets the callback to set the position of callout, with respect to the label.void
setPosition(CalloutPosition position)
Sets the position of callout, with respect to the label.void
setPosition(NativeCallback positionCallback)
Sets the callback to set the position of callout, with respect to the label.void
setSide(int side)
Sets the width of the starter line of callout pointer.void
setSide(SideCallback sideCallback)
Sets the callback to set the width of the starter line of callout pointer.void
setSide(NativeCallback sideCallback)
Sets the callback to set the width of the starter line of callout pointer.void
setStart(int start)
Sets the separator dimension in pixels to use as starting point for callout pointer.void
setStart(StartCallback startCallback)
Sets the callback to set the separator dimension to use as starting point for callout pointer.void
setStart(NativeCallback startCallback)
Sets the callback to set the separator dimension to use as starting point for callout pointer.void
setStartAsPercentage(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, 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, 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)
Setstrue
whether the label should be displayed.- Parameters:
display
-true
whether the label should be displayed
-
isDisplay
public boolean isDisplay()
Returnstrue
whether the label should be displayed.- Returns:
true
whether 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.
-
-