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).
      • 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.