Class LegendLabels

    • Method Detail

      • getBoxHandler

        public org.pepstock.charba.client.options.BoxHandler getBoxHandler()
      • 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).
      • setPointStyleWidth

        public void setPointStyleWidth​(double pointStyleWidth)
        Sets if usePointStyle is true, the width of the point style used for the legend.
        Parameters:
        pointStyleWidth - if usePointStyle is true, the width of the point style used for the legend.
      • getPointStyleWidth

        public double getPointStyleWidth()
        Returns if usePointStyle is true, the width of the point style used for the legend.
        Specified by:
        getPointStyleWidth in interface IsDefaultLegendLabels
        Returns:
        if usePointStyle is true, the width of the point style used for the legend.
      • 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.
      • isUseBorderRadius

        public boolean isUseBorderRadius()
        Returns if label border radius will match corresponding borderRadius.
        Specified by:
        isUseBorderRadius in interface IsDefaultLegendLabels
        Returns:
        if label border radius will match corresponding borderRadius.
      • setUseBorderRadius

        public void setUseBorderRadius​(boolean useRadius)
        Sets if label border radius will match corresponding borderRadius.
        Parameters:
        useRadius - if label border radius will match corresponding borderRadius.
      • setBorderRadius

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

        public int getBorderRadius()
        Returns the border radius (in pixels).
        Specified by:
        getBorderRadius in interface IsDefaultLegendLabels
        Returns:
        the border radius (in pixels).
      • 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.