Class LabelItem

    • Method Detail

      • getPadding

        public final Padding getPadding()
        Returns the padding element.
        Returns:
        the padding element.
      • getFont

        public final Font getFont()
        Returns the font element.
        Returns:
        the font element.
      • getListeners

        public final Listeners getListeners()
        Returns the listeners element.
        Returns:
        the listeners element.
      • setListenersHandler

        public final void setListenersHandler​(AbstractEventHandler handler)
        Adds a event handler instance as listener for all events.
        Parameters:
        handler - event handler instance as listener for all events.
      • setAlign

        public final void setAlign​(Align align)
        Sets the position of the label relative to the anchor point position and orientation.
        Parameters:
        align - the position of the label relative to the anchor point position and orientation.
      • setAlign

        public final void 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).
        Parameters:
        align - the position of the label relative to the anchor point position and orientation, by a number representing the clockwise angle (in degree)
      • getAlign

        public final Align getAlign()
        Returns the position of the label relative to the anchor point position and orientation.
        Returns:
        the position of the label relative to the anchor point position and orientation.
      • getAlignDegrees

        public final double getAlignDegrees()
        Returns the position of the label relative to the anchor point position and orientation, by a number representing the clockwise angle (in degree).
        Returns:
        the position of the label relative to the anchor point position and orientation, by a number representing the clockwise angle (in degree)
      • setAnchor

        public final void setAnchor​(Anchor anchor)
        Sets the anchor point, which is defined by an orientation vector and a position on the data element.
        Parameters:
        anchor - the anchor point, which is defined by an orientation vector and a position on the data element.
      • getAnchor

        public final Anchor getAnchor()
        Returns the anchor point, which is defined by an orientation vector and a position on the data element.
        Returns:
        the anchor point, which is defined by an orientation vector and a position on the data element.
      • setBackgroundColor

        public final void setBackgroundColor​(IsColor color)
        Sets the background color.
        Parameters:
        color - the background color
      • setBackgroundColor

        public final void setBackgroundColor​(String color)
        Sets the background color.
        Parameters:
        color - the background color
      • getBackgroundColorAsString

        public final String getBackgroundColorAsString()
        Returns the background color as string.
        Returns:
        the background color as string.
      • getBackgroundColor

        public final IsColor getBackgroundColor()
        Returns the background color.
        Returns:
        the background color.
      • setBorderColor

        public final void setBorderColor​(IsColor color)
        Sets the border color.
        Parameters:
        color - the border color
      • setBorderColor

        public final void setBorderColor​(String color)
        Sets the border color.
        Parameters:
        color - the border color
      • getBorderColorAsString

        public final String getBorderColorAsString()
        Returns the border color as string.
        Returns:
        the border color as string.
      • getBorderColor

        public final IsColor getBorderColor()
        Returns the border color.
        Returns:
        the border color.
      • setBorderRadius

        public final void setBorderRadius​(double radius)
        Sets the border radius.
        Parameters:
        radius - the border radius.
      • getBorderRadius

        public final double getBorderRadius()
        Returns the border radius.
        Returns:
        the border radius.
      • setBorderWidth

        public final void setBorderWidth​(int width)
        Sets the border width.
        Parameters:
        width - the border width.
      • getBorderWidth

        public final int getBorderWidth()
        Returns the border width.
        Returns:
        the border width.
      • setClamp

        public final void setClamp​(boolean clamp)
        Sets 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).
        Parameters:
        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).
      • isClamp

        public final boolean isClamp()
        Returns 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).
        Returns:
        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).
      • setClip

        public final void setClip​(boolean clip)
        When the clip option is true, the part of the label which is outside the chart area will be masked.
        Parameters:
        clip - when the clip option is true, the part of the label which is outside the chart area will be masked.
      • isClip

        public final boolean isClip()
        When the clip option is true, the part of the label which is outside the chart area will be masked.
        Returns:
        when the clip option is true, the part of the label which is outside the chart area will be masked.
      • setColor

        public final void setColor​(IsColor color)
        Sets the color.
        Parameters:
        color - the color
      • setColor

        public final void setColor​(String color)
        Sets the color.
        Parameters:
        color - the color
      • getColorAsString

        public final String getColorAsString()
        Returns the color as string.
        Returns:
        the color as string.
      • getColor

        public final IsColor getColor()
        Returns the color.
        Returns:
        the color.
      • setDisplay

        public final void setDisplay​(boolean display)
        Sets the visibility of labels.
        Parameters:
        display - the visibility of labels.
      • setDisplay

        public final void setDisplay​(Display display)
        Sets the visibility of labels.
        Parameters:
        display - the visibility of labels.
      • getDisplay

        public final Display getDisplay()
        Returns the visibility of labels.
        Returns:
        the visibility of labels.
      • setOffset

        public final void setOffset​(int offset)
        Sets 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.
        Parameters:
        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.
      • getOffset

        public final int getOffset()
        Returns 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.
        Returns:
        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.
      • setOpacity

        public final void setOpacity​(double opacity)
        Sets the opacity.
        Parameters:
        opacity - the opacity.
      • getOpacity

        public final double getOpacity()
        Returns the opacity.
        Returns:
        the opacity.
      • setRotation

        public final void setRotation​(double rotation)
        Sets the clockwise rotation angle (in degrees) of the label, the rotation center point being the label center.
        Parameters:
        rotation - the clockwise rotation angle (in degrees) of the label, the rotation center point being the label center.
      • getRotation

        public final double getRotation()
        Returns the clockwise rotation angle (in degrees) of the label, the rotation center point being the label center.
        Returns:
        the clockwise rotation angle (in degrees) of the label, the rotation center point being the label center.
      • setTextAlign

        public final void setTextAlign​(TextAlign textAlign)
        Sets the text alignment being used when drawing the label text when multiple lines.
        Parameters:
        textAlign - the text alignment being used when drawing the label text when multiple lines
      • getTextAlign

        public final TextAlign getTextAlign()
        Returns the text alignment being used when drawing the label text when multiple lines.
        Returns:
        the text alignment being used when drawing the label text when multiple lines
      • setTextStrokeColor

        public final void setTextStrokeColor​(IsColor color)
        Sets the text stroke color.
        Parameters:
        color - the text stroke color
      • setTextStrokeColor

        public final void setTextStrokeColor​(String color)
        Sets the text stroke color.
        Parameters:
        color - the text stroke color.
      • getTextStrokeColorAsString

        public final String getTextStrokeColorAsString()
        Returns the text stroke color as string.
        Returns:
        the text stroke color as string.
      • getTextStrokeColor

        public final IsColor getTextStrokeColor()
        Returns the text stroke color.
        Returns:
        the text stroke color.
      • setTextStrokeWidth

        public final void setTextStrokeWidth​(int textStrokeWidth)
        Sets the text stroke width.
        Parameters:
        textStrokeWidth - the text stroke width.
      • getTextStrokeWidth

        public final int getTextStrokeWidth()
        Returns the text stroke width.
        Returns:
        the text stroke width.
      • setTextShadowBlur

        public final void setTextShadowBlur​(double textShadowBlur)
        Sets the text shadow blur.
        Parameters:
        textShadowBlur - the text shadow blur.
      • getTextShadowBlur

        public final double getTextShadowBlur()
        Returns the text shadow blur.
        Returns:
        the text shadow blur.
      • setTextShadowColor

        public final void setTextShadowColor​(IsColor color)
        Sets the text shadow color color.
        Parameters:
        color - the text shadow color color
      • setTextShadowColor

        public final void setTextShadowColor​(String color)
        Sets the text shadow color color.
        Parameters:
        color - the text shadow color color.
      • getTextShadowColorAsString

        public final String getTextShadowColorAsString()
        Returns the text shadow color as string.
        Returns:
        the text shadow color as string.
      • getTextShadowColor

        public final IsColor getTextShadowColor()
        Returns the text shadow color.
        Returns:
        the text shadow color.
      • getBackgroundColorCallback

        public final ColorCallback<DataLabelsContext> getBackgroundColorCallback()
        Returns the background color callback, if set, otherwise null.
        Returns:
        the background color callback, if set, otherwise null.
      • setBackgroundColor

        public final void setBackgroundColor​(ColorCallback<DataLabelsContext> backgroundColorCallback)
        Sets the background color callback.
        Parameters:
        backgroundColorCallback - the background color callback.
      • setBackgroundColor

        public final void setBackgroundColor​(NativeCallback backgroundColorCallback)
        Sets the background color callback.
        Parameters:
        backgroundColorCallback - the background color callback.
      • getBorderColorCallback

        public final ColorCallback<DataLabelsContext> getBorderColorCallback()
        Returns the border color callback, if set, otherwise null.
        Returns:
        the border color callback, if set, otherwise null.
      • setBorderColor

        public final void setBorderColor​(ColorCallback<DataLabelsContext> borderColorCallback)
        Sets the border color callback.
        Parameters:
        borderColorCallback - the border color callback.
      • setBorderColor

        public final void setBorderColor​(NativeCallback borderColorCallback)
        Sets the border color callback.
        Parameters:
        borderColorCallback - the border color callback.
      • getColorCallback

        public final ColorCallback<DataLabelsContext> getColorCallback()
        Returns the color callback, if set, otherwise null.
        Returns:
        the color callback, if set, otherwise null.
      • setColor

        public final void setColor​(ColorCallback<DataLabelsContext> colorCallback)
        Sets the color callback.
        Parameters:
        colorCallback - the color callback.
      • setColor

        public final void setColor​(NativeCallback colorCallback)
        Sets the color callback.
        Parameters:
        colorCallback - the color callback.
      • getFormatterCallback

        public final FormatterCallback getFormatterCallback()
        Returns the formatter callback, if set, otherwise null.
        Returns:
        the formatter callback, if set, otherwise null.
      • setFormatter

        public final void setFormatter​(FormatterCallback formatterCallback)
        Sets the formatter callback.
        Parameters:
        formatterCallback - the formatter callback to set
      • getAlignCallback

        public final AlignCallback getAlignCallback()
        Returns the align callback, if set, otherwise null.
        Returns:
        the align callback, if set, otherwise null.
      • setAlign

        public final void setAlign​(AlignCallback alignCallback)
        Sets the align callback.
        Parameters:
        alignCallback - the align callback to set
      • setAlign

        public final void setAlign​(NativeCallback alignCallback)
        Sets the align callback.
        Parameters:
        alignCallback - the align callback to set
      • getAnchorCallback

        public final AnchorCallback getAnchorCallback()
        Returns the anchor callback, if set, otherwise null.
        Returns:
        the anchor callback, if set, otherwise null.
      • setAnchor

        public final void setAnchor​(AnchorCallback anchorCallback)
        Sets the anchor callback.
        Parameters:
        anchorCallback - the anchor callback to set
      • setAnchor

        public final void setAnchor​(NativeCallback anchorCallback)
        Sets the anchor callback.
        Parameters:
        anchorCallback - the anchor callback to set
      • getBorderRadiusCallback

        public final RadiusCallback<DataLabelsContext> getBorderRadiusCallback()
        Returns the border radius callback, if set, otherwise null.
        Returns:
        the border radius callback, if set, otherwise null.
      • setBorderRadius

        public final void setBorderRadius​(RadiusCallback<DataLabelsContext> borderRadiusCallback)
        Sets the border radius callback.
        Parameters:
        borderRadiusCallback - the border radius callback to set
      • setBorderRadius

        public final void setBorderRadius​(NativeCallback borderRadiusCallback)
        Sets the border radius callback.
        Parameters:
        borderRadiusCallback - the border radius callback to set
      • getBorderWidthCallback

        public final WidthCallback<DataLabelsContext> getBorderWidthCallback()
        Returns the border width callback, if set, otherwise null.
        Returns:
        the border width callback, if set, otherwise null.
      • setBorderWidth

        public final void setBorderWidth​(WidthCallback<DataLabelsContext> borderWidthCallback)
        Sets the border width callback.
        Parameters:
        borderWidthCallback - the border width callback to set
      • setBorderWidth

        public final void setBorderWidth​(NativeCallback borderWidthCallback)
        Sets the border width callback.
        Parameters:
        borderWidthCallback - the border width callback to set
      • getClampCallback

        public final ClampCallback getClampCallback()
        Returns the clamp callback, if set, otherwise null.
        Returns:
        the clamp callback, if set, otherwise null.
      • setClamp

        public final void setClamp​(ClampCallback clampCallback)
        Sets the clamp callback.
        Parameters:
        clampCallback - the clamp callback to set
      • setClamp

        public final void setClamp​(NativeCallback clampCallback)
        Sets the clamp callback.
        Parameters:
        clampCallback - the clamp callback to set
      • getClipCallback

        public final ClipCallback getClipCallback()
        Returns the clip callback, if set, otherwise null.
        Returns:
        the clip callback, if set, otherwise null.
      • setClip

        public final void setClip​(ClipCallback clipCallback)
        Sets the clip callback.
        Parameters:
        clipCallback - the clip callback to set
      • setClip

        public final void setClip​(NativeCallback clipCallback)
        Sets the clip callback.
        Parameters:
        clipCallback - the clip callback to set
      • getDisplayCallback

        public final DisplayCallback<DataLabelsContext> getDisplayCallback()
        Returns the display callback, if set, otherwise null.
        Returns:
        the display callback, if set, otherwise null.
      • setDisplay

        public final void setDisplay​(DisplayCallback<DataLabelsContext> displayCallback)
        Sets the display callback.
        Parameters:
        displayCallback - the display callback to set
      • setDisplay

        public final void setDisplay​(NativeCallback displayCallback)
        Sets the display callback.
        Parameters:
        displayCallback - the display callback to set
      • getOffsetCallback

        public final OffsetCallback<DataLabelsContext> getOffsetCallback()
        Returns the offset callback, if set, otherwise null.
        Returns:
        the offset callback, if set, otherwise null.
      • setOffset

        public final void setOffset​(OffsetCallback<DataLabelsContext> offsetCallback)
        Sets the offset callback.
        Parameters:
        offsetCallback - the offset callback to set
      • setOffset

        public final void setOffset​(NativeCallback offsetCallback)
        Sets the offset callback.
        Parameters:
        offsetCallback - the offset callback to set
      • getOpacityCallback

        public final OpacityCallback getOpacityCallback()
        Returns the opacity callback, if set, otherwise null.
        Returns:
        the opacity callback, if set, otherwise null.
      • setOpacity

        public final void setOpacity​(OpacityCallback opacityCallback)
        Sets the opacity callback.
        Parameters:
        opacityCallback - the opacity callback to set
      • setOpacity

        public final void setOpacity​(NativeCallback opacityCallback)
        Sets the opacity callback.
        Parameters:
        opacityCallback - the opacity callback to set
      • getRotationCallback

        public final RotationCallback<DataLabelsContext> getRotationCallback()
        Returns the rotation callback, if set, otherwise null.
        Returns:
        the rotation callback, if set, otherwise null.
      • setRotation

        public final void setRotation​(RotationCallback<DataLabelsContext> rotationCallback)
        Sets the rotation callback.
        Parameters:
        rotationCallback - the rotation callback to set
      • setRotation

        public final void setRotation​(NativeCallback rotationCallback)
        Sets the rotation callback.
        Parameters:
        rotationCallback - the rotation callback to set
      • getTextAlignCallback

        public final TextAlignCallback<DataLabelsContext> getTextAlignCallback()
        Returns the text align callback, if set, otherwise null.
        Returns:
        the text align callback, if set, otherwise null.
      • setTextAlign

        public final void setTextAlign​(TextAlignCallback<DataLabelsContext> textAlignCallback)
        Sets the text align callback.
        Parameters:
        textAlignCallback - the text align callback to set
      • setTextAlign

        public final void setTextAlign​(NativeCallback textAlignCallback)
        Sets the text align callback.
        Parameters:
        textAlignCallback - the text align callback to set
      • getTextStrokeColorCallback

        public final ColorCallback<DataLabelsContext> getTextStrokeColorCallback()
        Returns the text stroke color callback, if set, otherwise null.
        Returns:
        the text stroke color callback, if set, otherwise null.
      • setTextStrokeColor

        public final void setTextStrokeColor​(ColorCallback<DataLabelsContext> textStrokeColorCallback)
        Sets the text stroke color callback.
        Parameters:
        textStrokeColorCallback - the text stroke color callback to set
      • setTextStrokeColor

        public final void setTextStrokeColor​(NativeCallback textStrokeColorCallback)
        Sets the text stroke color callback.
        Parameters:
        textStrokeColorCallback - the text stroke color callback to set
      • getTextStrokeWidthCallback

        public final WidthCallback<DataLabelsContext> getTextStrokeWidthCallback()
        Returns the text stroke width callback, if set, otherwise null.
        Returns:
        the text stroke width callback, if set, otherwise null.
      • setTextStrokeWidth

        public final void setTextStrokeWidth​(WidthCallback<DataLabelsContext> textStrokeWidthCallback)
        Sets the text stroke width callback.
        Parameters:
        textStrokeWidthCallback - the text stroke width callback to set
      • setTextStrokeWidth

        public final void setTextStrokeWidth​(NativeCallback textStrokeWidthCallback)
        Sets the text stroke width callback.
        Parameters:
        textStrokeWidthCallback - the text stroke width callback to set
      • getTextShadowBlurCallback

        public final TextShadowBlurCallback getTextShadowBlurCallback()
        Returns the text shadow blur callback, if set, otherwise null.
        Returns:
        the text shadow blur callback, if set, otherwise null.
      • setTextShadowBlur

        public final void setTextShadowBlur​(TextShadowBlurCallback textShadowBlurCallback)
        Sets the text shadow blur callback.
        Parameters:
        textShadowBlurCallback - the text shadow blur callback to set
      • setTextShadowBlur

        public final void setTextShadowBlur​(NativeCallback textShadowBlurCallback)
        Sets the text shadow blur callback.
        Parameters:
        textShadowBlurCallback - the text shadow blur callback to set
      • getTextShadowColorCallback

        public final ColorCallback<DataLabelsContext> getTextShadowColorCallback()
        Returns the text shadow color callback, if set, otherwise null.
        Returns:
        the text shadow color callback, if set, otherwise null.
      • setTextShadowColor

        public final void setTextShadowColor​(ColorCallback<DataLabelsContext> textShadowColorCallback)
        Sets the text shadow color callback.
        Parameters:
        textShadowColorCallback - the text shadow color callback to set
      • setTextShadowColor

        public final void setTextShadowColor​(NativeCallback textShadowColorCallback)
        Sets the text shadow color callback.
        Parameters:
        textShadowColorCallback - the text shadow color callback to set