Class LegendTitle

  • All Implemented Interfaces:
    HasLegendText

    public class LegendTitle
    extends Object
    implements HasLegendText
    This is the title configuration of the legend.
    Author:
    Andrea "Stock" Stocchero
    • Method Detail

      • getPadding

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

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

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

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

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

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

        public void setDisplay​(boolean display)
        Sets true if the title is shown.
        Parameters:
        display - if true the title is shown.
      • isDisplay

        public boolean isDisplay()
        Returns true if the title is shown.
        Returns:
        if true the title is shown.
      • setText

        public void setText​(String text)
        Sets the title text to display.
        Specified by:
        setText in interface HasLegendText
        Parameters:
        text - the title text to display.
      • getText

        public String getText()
        Returns the title text to display.
        Specified by:
        getText in interface HasLegendText
        Returns:
        the title text to display
      • setText

        public void setText​(SafeHtml text)
        Sets the text that will be displayed, as HTML.
        This field is used ONLY by HtmlLegend plugin and not by CHART.js.
        Specified by:
        setText in interface HasLegendText
        Parameters:
        text - the text that will be displayed, as HTML
      • getTextAsHtml

        public SafeHtml getTextAsHtml()
        Returns the text that will be displayed, as HTML.
        If is not HTML, returns Undefined.STRING. This field is used ONLY by HtmlLegend plugin and not by CHART.js.
        Specified by:
        getTextAsHtml in interface HasLegendText
        Returns:
        the text that will be displayed, as HTML.
      • isHtmlText

        public boolean isHtmlText()
        Returns true if the text of legend's title is HTML.
        This field is used ONLY by HtmlLegend plugin and not by CHART.js.
        Specified by:
        isHtmlText in interface HasLegendText
        Returns:
        true if the text of legend's title is HTML
      • setHtmlText

        public void setHtmlText​(boolean htmlText)
        Sets true if the text of legend's titleis HTML.
        This field is used ONLY by HtmlLegend plugin and not by CHART.js.
        Specified by:
        setHtmlText in interface HasLegendText
        Parameters:
        htmlText - true if the text of legend's title is HTML
      • getOptions

        protected final ConfigurationOptions getOptions()
        Returns the configuration options.
        Returns:
        the configuration options.
      • getConfiguration

        protected final ExtendedOptions getConfiguration()
        Returns the configuration element.
        Returns:
        the configuration element.
      • getChart

        public final IsChart getChart()
        Returns the chart instance
        Returns:
        the chart