T
- type of label itempublic abstract class AbstractBuilder<T extends LabelItem> extends AbstractBaseBuilder
DataLabelsPlugin.ID
label item by a builder.Modifier and Type | Method and Description |
---|---|
DataLabelsOptionsBuilder |
getOptionsBuilder()
Returns the
DataLabelsPlugin.ID label builder. |
AbstractBuilder<T> |
setAlign(Align align)
Sets the position of the label relative to the anchor point position and orientation.
|
AbstractBuilder<T> |
setAlign(AlignCallback alignCallback)
Sets the align callback.
|
AbstractBuilder<T> |
setAlign(double align)
Sets the position of the label relative to the anchor point position and orientation, by a number representing the clockwise angle (in degree).
|
AbstractBuilder<T> |
setAnchor(Anchor anchor)
Sets the anchor point, which is defined by an orientation vector and a position on the data element.
|
AbstractBuilder<T> |
setAnchor(AnchorCallback anchorCallback)
Sets the anchor callback.
|
AbstractBuilder<T> |
setBackgroundColor(ColorCallback<DataLabelsContext> backgroundColorCallback)
Sets the background color callback.
|
AbstractBuilder<T> |
setBackgroundColor(IsColor color)
Sets the background color.
|
AbstractBuilder<T> |
setBackgroundColor(String color)
Sets the background color.
|
AbstractBuilder<T> |
setBorderColor(ColorCallback<DataLabelsContext> borderColorCallback)
Sets the border color callback.
|
AbstractBuilder<T> |
setBorderColor(IsColor color)
Sets the border color.
|
AbstractBuilder<T> |
setBorderColor(String color)
Sets the border color.
|
AbstractBuilder<T> |
setBorderRadius(double radius)
Sets the border radius.
|
AbstractBuilder<T> |
setBorderRadius(RadiusCallback<DataLabelsContext> borderRadiusCallback)
Sets the border radius callback.
|
AbstractBuilder<T> |
setBorderWidth(int width)
Sets the border width.
|
AbstractBuilder<T> |
setBorderWidth(WidthCallback<DataLabelsContext> borderWidthCallback)
Sets the border width callback.
|
AbstractBuilder<T> |
setClamp(boolean clamp)
Sets
true to enforce the anchor position to be calculated based on the visible geometry of the associated element (i.e. |
AbstractBuilder<T> |
setClamp(ClampCallback clampCallback)
Sets the clamp callback.
|
AbstractBuilder<T> |
setClickEventHandler(ClickEventHandler clickEventHandler)
Sets the CLICK event (the mouse's primary button is pressed and released on a label) handler.
|
AbstractBuilder<T> |
setClip(boolean clip)
When the clip option is
true , the part of the label which is outside the chart area will be masked. |
AbstractBuilder<T> |
setClip(ClipCallback clipCallback)
Sets the clip callback.
|
AbstractBuilder<T> |
setColor(ColorCallback<DataLabelsContext> colorCallback)
Sets the color callback.
|
AbstractBuilder<T> |
setColor(IsColor color)
Sets the color.
|
AbstractBuilder<T> |
setColor(String color)
Sets the color.
|
AbstractBuilder<T> |
setDisplay(boolean display)
Sets the visibility of labels.
|
AbstractBuilder<T> |
setDisplay(Display display)
Sets the visibility of labels.
|
AbstractBuilder<T> |
setDisplay(DisplayCallback displayCallback)
Sets the display callback.
|
AbstractBuilder<T> |
setEnterEventHandler(EnterEventHandler enterEventHandler)
Sets the ENTER event (the mouse is moved over a label) handler.
|
AbstractBuilder<T> |
setFont(FontCallback<DataLabelsContext> fontCallback)
Sets the the font callback.
|
AbstractBuilder<T> |
setFontFamily(String fontFamily)
Sets the font family, follows CSS font-family label.
|
AbstractBuilder<T> |
setFontLineHeight(double lineHeight)
Sets the line height.
|
AbstractBuilder<T> |
setFontLineHeight(String lineHeight)
Sets the line height.
|
AbstractBuilder<T> |
setFontSize(int fontSize)
Sets the font size.
|
AbstractBuilder<T> |
setFontStyle(FontStyle fontStyle)
Sets the font style, follows CSS font-style label (i.e.
|
AbstractBuilder<T> |
setFontWeight(Weight weight)
Sets the font weight, follows CSS font-style-weight label.
|
AbstractBuilder<T> |
setFormatter(FormatterCallback formatterCallback)
Sets the formatter callback.
|
AbstractBuilder<T> |
setLeaveEventHandler(LeaveEventHandler leaveEventHandler)
Sets the LEAVE event (the mouse is moved out of a label) handler.
|
AbstractBuilder<T> |
setListenersHandler(AbstractEventHandler handler)
Adds a event handler instance as listener for all events.
|
AbstractBuilder<T> |
setOffset(int offset)
Sets the distance (in pixels) to pull the label away from the anchor point.
|
AbstractBuilder<T> |
setOffset(OffsetCallback<DataLabelsContext> offsetCallback)
Sets the offset callback.
|
AbstractBuilder<T> |
setOpacity(double opacity)
Sets the opacity.
|
AbstractBuilder<T> |
setOpacity(OpacityCallback opacityCallback)
Sets the opacity callback.
|
AbstractBuilder<T> |
setPadding(int padding)
Sets the padding size to all dimensions.
|
AbstractBuilder<T> |
setPadding(PaddingCallback<DataLabelsContext> paddingCallback)
Sets the padding callback.
|
AbstractBuilder<T> |
setPaddingBottom(int padding)
Sets the padding bottom in pixel.
|
AbstractBuilder<T> |
setPaddingLeft(int padding)
Sets the padding left in pixel.
|
AbstractBuilder<T> |
setPaddingRight(int padding)
Sets the padding right in pixel.
|
AbstractBuilder<T> |
setPaddingTop(int padding)
Sets the padding top in pixel.
|
AbstractBuilder<T> |
setRotation(double rotation)
Sets the clockwise rotation angle (in degrees) of the label, the rotation center point being the label center.
|
AbstractBuilder<T> |
setRotation(RotationCallback<DataLabelsContext> rotationCallback)
Sets the rotation callback.
|
AbstractBuilder<T> |
setTextAlign(TextAlign textAlign)
Sets the text alignment being used when drawing the label text.
|
AbstractBuilder<T> |
setTextAlign(TextAlignCallback<DataLabelsContext> textAlignCallback)
Sets the text align callback.
|
AbstractBuilder<T> |
setTextShadowBlur(double textShadowBlur)
Sets the text shadow blur.
|
AbstractBuilder<T> |
setTextShadowBlur(TextShadowBlurCallback textShadowBlurCallback)
Sets the text shadow blur callback.
|
AbstractBuilder<T> |
setTextShadowColor(ColorCallback<DataLabelsContext> textShadowColorCallback)
Sets the text shadow color callback.
|
AbstractBuilder<T> |
setTextShadowColor(IsColor color)
Sets the text shadow color color.
|
AbstractBuilder<T> |
setTextShadowColor(String color)
Sets the text shadow color color.
|
AbstractBuilder<T> |
setTextStrokeColor(ColorCallback<DataLabelsContext> textStrokeColorCallback)
Sets the text stroke color callback.
|
AbstractBuilder<T> |
setTextStrokeColor(IsColor color)
Sets the text stroke color.
|
AbstractBuilder<T> |
setTextStrokeColor(String color)
Sets the text stroke color.
|
AbstractBuilder<T> |
setTextStrokeWidth(int textStrokeWidth)
Sets the text stroke width.
|
AbstractBuilder<T> |
setTextStrokeWidth(WidthCallback<DataLabelsContext> textStrokeWidthCallback)
Sets the text stroke width callback.
|
isBuilt, setBuilt
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
checkAndGetIfValid, checkIfValid, isValid
public DataLabelsOptionsBuilder getOptionsBuilder()
DataLabelsPlugin.ID
label builder.DataLabelsPlugin.ID
label builderpublic final AbstractBuilder<T> setListenersHandler(AbstractEventHandler handler)
handler
- event handler instance as listener for all events.public final AbstractBuilder<T> setAlign(Align align)
align
- the position of the label relative to the anchor point position and orientation.public final AbstractBuilder<T> setAlign(double align)
align
- the position of the label relative to the anchor point position and orientation, by a number representing the clockwise angle (in degree)public final AbstractBuilder<T> setAnchor(Anchor anchor)
anchor
- the anchor point, which is defined by an orientation vector and a position on the data element.public final AbstractBuilder<T> setBackgroundColor(IsColor color)
color
- the background colorpublic final AbstractBuilder<T> setBackgroundColor(String color)
color
- the background colorpublic final AbstractBuilder<T> setBorderColor(IsColor color)
color
- the border colorpublic final AbstractBuilder<T> setBorderColor(String color)
color
- the border colorpublic final AbstractBuilder<T> setBorderRadius(double radius)
radius
- the border radius.public final AbstractBuilder<T> setBorderWidth(int width)
width
- the border width.public final AbstractBuilder<T> setClamp(boolean clamp)
true
to enforce the anchor position to be calculated based on the visible geometry of the associated element (i.e. part inside the chart area).clamp
- true
to enforce the anchor position to be calculated based on the visible geometry of the associated element (i.e. part inside the chart area).public final AbstractBuilder<T> setClip(boolean clip)
true
, the part of the label which is outside the chart area will be masked.clip
- when the clip option is true
, the part of the label which is outside the chart area will be masked.public final AbstractBuilder<T> setColor(IsColor color)
color
- the colorpublic final AbstractBuilder<T> setColor(String color)
color
- the colorpublic final AbstractBuilder<T> setDisplay(boolean display)
display
- the visibility of labels.public final AbstractBuilder<T> setDisplay(Display display)
display
- the visibility of labels.public final AbstractBuilder<T> setOffset(int offset)
offset
- the distance (in pixels) to pull the label away from the anchor point. This option is not applicable when align is 'center'. Also note that if align is
'start', the label is moved in the opposite direction.public final AbstractBuilder<T> setOpacity(double opacity)
opacity
- the opacity.public final AbstractBuilder<T> setRotation(double rotation)
rotation
- the clockwise rotation angle (in degrees) of the label, the rotation center point being the label center.public final AbstractBuilder<T> setTextAlign(TextAlign textAlign)
textAlign
- the text alignment being used when drawing the label text.public final AbstractBuilder<T> setTextStrokeColor(IsColor color)
color
- the text stroke colorpublic final AbstractBuilder<T> setTextStrokeColor(String color)
color
- the text stroke color.public final AbstractBuilder<T> setTextStrokeWidth(int textStrokeWidth)
textStrokeWidth
- the text stroke width.public final AbstractBuilder<T> setTextShadowBlur(double textShadowBlur)
textShadowBlur
- the text shadow blur.public final AbstractBuilder<T> setTextShadowColor(IsColor color)
color
- the text shadow color colorpublic final AbstractBuilder<T> setTextShadowColor(String color)
color
- the text shadow color color.public final AbstractBuilder<T> setBackgroundColor(ColorCallback<DataLabelsContext> backgroundColorCallback)
backgroundColorCallback
- the background color callback.public final AbstractBuilder<T> setBorderColor(ColorCallback<DataLabelsContext> borderColorCallback)
borderColorCallback
- the border color callback.public final AbstractBuilder<T> setColor(ColorCallback<DataLabelsContext> colorCallback)
colorCallback
- the color callback.public final AbstractBuilder<T> setFormatter(FormatterCallback formatterCallback)
formatterCallback
- the formatter callback to setpublic final AbstractBuilder<T> setAlign(AlignCallback alignCallback)
alignCallback
- the align callback to setpublic final AbstractBuilder<T> setAnchor(AnchorCallback anchorCallback)
anchorCallback
- the anchor callback to setpublic final AbstractBuilder<T> setBorderRadius(RadiusCallback<DataLabelsContext> borderRadiusCallback)
borderRadiusCallback
- the border radius callback to setpublic final AbstractBuilder<T> setBorderWidth(WidthCallback<DataLabelsContext> borderWidthCallback)
borderWidthCallback
- the border width callback to setpublic final AbstractBuilder<T> setClamp(ClampCallback clampCallback)
clampCallback
- the clamp callback to setpublic final AbstractBuilder<T> setClip(ClipCallback clipCallback)
clipCallback
- the clip callback to setpublic final AbstractBuilder<T> setDisplay(DisplayCallback displayCallback)
displayCallback
- the display callback to setpublic final AbstractBuilder<T> setOffset(OffsetCallback<DataLabelsContext> offsetCallback)
offsetCallback
- the offset callback to setpublic final AbstractBuilder<T> setOpacity(OpacityCallback opacityCallback)
opacityCallback
- the opacity callback to setpublic final AbstractBuilder<T> setRotation(RotationCallback<DataLabelsContext> rotationCallback)
rotationCallback
- the rotation callback to setpublic final AbstractBuilder<T> setTextAlign(TextAlignCallback<DataLabelsContext> textAlignCallback)
textAlignCallback
- the text align callback to setpublic final AbstractBuilder<T> setTextStrokeColor(ColorCallback<DataLabelsContext> textStrokeColorCallback)
textStrokeColorCallback
- the text stroke color callback to setpublic final AbstractBuilder<T> setTextStrokeWidth(WidthCallback<DataLabelsContext> textStrokeWidthCallback)
textStrokeWidthCallback
- the text stroke width callback to setpublic final AbstractBuilder<T> setTextShadowBlur(TextShadowBlurCallback textShadowBlurCallback)
textShadowBlurCallback
- the text shadow blur callback to setpublic final AbstractBuilder<T> setTextShadowColor(ColorCallback<DataLabelsContext> textShadowColorCallback)
textShadowColorCallback
- the text shadow color callback to setpublic final AbstractBuilder<T> setFont(FontCallback<DataLabelsContext> fontCallback)
fontCallback
- the font callback to setpublic final AbstractBuilder<T> setPadding(PaddingCallback<DataLabelsContext> paddingCallback)
paddingCallback
- the padding callback to setpublic final AbstractBuilder<T> setFontSize(int fontSize)
fontSize
- the font size.public final AbstractBuilder<T> setFontStyle(FontStyle fontStyle)
fontStyle
- Font style, follows CSS font-style label (i.e. normal, italic, oblique, initial, inherit).public final AbstractBuilder<T> setFontFamily(String fontFamily)
fontFamily
- Font family, follows CSS font-family label.public final AbstractBuilder<T> setFontWeight(Weight weight)
weight
- font weight, follows CSS font-style-weight label.public final AbstractBuilder<T> setFontLineHeight(double lineHeight)
lineHeight
- the line height.public final AbstractBuilder<T> setFontLineHeight(String lineHeight)
lineHeight
- the line height.public final AbstractBuilder<T> setPadding(int padding)
padding
- padding size to apply to all dimensions.public final AbstractBuilder<T> setPaddingLeft(int padding)
padding
- the padding left in pixel.public final AbstractBuilder<T> setPaddingRight(int padding)
padding
- the padding right in pixel.public final AbstractBuilder<T> setPaddingTop(int padding)
padding
- the padding top in pixel.public final AbstractBuilder<T> setPaddingBottom(int padding)
padding
- the padding bottom in pixel.public final AbstractBuilder<T> setClickEventHandler(ClickEventHandler clickEventHandler)
clickEventHandler
- the click event handler to setpublic final AbstractBuilder<T> setEnterEventHandler(EnterEventHandler enterEventHandler)
enterEventHandler
- the enter event handler to setpublic final AbstractBuilder<T> setLeaveEventHandler(LeaveEventHandler leaveEventHandler)
leaveEventHandler
- the leave event handler to set