Class LegendLabels

    • Method Detail

      • getBoxHandler

        public org.pepstock.charba.client.options.BoxHandler getBoxHandler()
      • getPointStyleHandler

        public org.pepstock.charba.client.options.PointStyleHandler getPointStyleHandler()
      • getFontContainer

        public FontContainer getFontContainer()
        Description copied from interface: HasFont
        Returns a font container instance to use in the default methods of this interface.
        Specified by:
        getFontContainer in interface HasFont
        Returns:
        a font container instance
      • setUsePointStyle

        public void setUsePointStyle​(boolean usePointStyle)
        Sets if label style will match corresponding point style (size is based on font size, boxWidth is not used in this case).
        Parameters:
        usePointStyle - if label style will match corresponding point style (size is based on font size, boxWidth is not used in this case).
      • isUsePointStyle

        public boolean isUsePointStyle()
        Returns if label style will match corresponding point style (size is based on font size, boxWidth is not used in this case).
        Specified by:
        isUsePointStyle in interface IsDefaultLegendLabels
        Returns:
        true if label style will match corresponding point style (size is based on font size, boxWidth is not used in this case).
      • setPadding

        public void setPadding​(int padding)
        Sets the padding to apply around labels. Only top and bottom are implemented.
        Parameters:
        padding - padding to apply around labels. Only top and bottom are implemented.
      • getPadding

        public int getPadding()
        Returns the padding to apply around labels. Only top and bottom are implemented.
        Specified by:
        getPadding in interface IsDefaultLegendLabels
        Returns:
        padding to apply around labels. Only top and bottom are implemented.
      • setTextAlign

        public void setTextAlign​(TextAlign align)
        Sets the horizontal alignment of the label text.
        Parameters:
        align - the horizontal alignment of the label text.
      • getTextAlign

        public TextAlign getTextAlign()
        Returns the horizontal alignment of the label text.
        Specified by:
        getTextAlign in interface IsDefaultLegendLabels
        Returns:
        the horizontal alignment of the label text.
      • setBoxWidth

        public default void setBoxWidth​(int boxWidth)
        Sets the width of colored box.
        Parameters:
        boxWidth - width of colored box.
      • getBoxWidth

        public default int getBoxWidth()
        Returns the width of colored box.
        Specified by:
        getBoxWidth in interface IsDefaultBoxHandler
        Returns:
        width of colored box.
      • setBoxHeight

        public default void setBoxHeight​(int boxHeight)
        Sets the height of colored box.
        Parameters:
        boxHeight - width of colored box.
      • getBoxHeight

        public default int getBoxHeight()
        Returns the height of colored box.
        Specified by:
        getBoxHeight in interface IsDefaultBoxHandler
        Returns:
        height of colored box.
      • setPointStyle

        public default void setPointStyle​(PointStyle pointStyle)
        Sets the style of the point.
        Parameters:
        pointStyle - array of the style of the point.
      • setPointStyle

        public default void setPointStyle​(Img pointStyle)
        Sets the style of the point as image.
        Parameters:
        pointStyle - image element of the style of the point as image.
      • getPointStyleAsImage

        public default Img getPointStyleAsImage()
        Returns the style of the point as image.
        If property is missing or not an image, returns null.
        Specified by:
        getPointStyleAsImage in interface IsDefaultPointStyleHandler
        Returns:
        image of the style of the point as image.
        If property is missing or not a image, returns null.
      • setPointStyle

        public default void setPointStyle​(Canvas pointStyle)
        Sets the style of the point as canvas.
        Parameters:
        pointStyle - canvas element of the style of the point as canvas.
      • getPointStyleAsCanvas

        public default Canvas getPointStyleAsCanvas()
        Returns the style of the point as canvas.
        If property is missing or not an canvas, returns null.
        Specified by:
        getPointStyleAsCanvas in interface IsDefaultPointStyleHandler
        Returns:
        image of the style of the point as canvas.
        If property is missing or not a canvas, returns null.