Class LegendTitle
- java.lang.Object
- 
- org.pepstock.charba.client.configuration.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 SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description IsChartgetChart()Returns the chart instanceIsColorgetColor()Returns the font color.StringgetColorAsString()Returns the font color as string.protected ExtendedOptionsgetConfiguration()Returns the configuration element.FontgetFont()Returns the font element.LegendTextHandlergetLegendTextHandler()Returns a legend text handler instance to use in the default methods of this interface.protected ConfigurationOptionsgetOptions()Returns the configuration options.PaddinggetPadding()Returns the padding element.StringgetText()Returns the title text to display.SafeHtmlgetTextAsHtml()Returns the text that will be displayed, as HTML.
 If is not HTML, returnsUndefined.STRING.booleanisDisplay()Returnstrueif the title is shown.booleanisHtmlText()Returnstrueif the text of legend's title is HTML.
 This field is used ONLY byHtmlLegendplugin and not by CHART.js.voidsetColor(String color)Sets the font color.voidsetColor(IsColor color)Sets the font color.voidsetDisplay(boolean display)Setstrueif the title is shown.voidsetHtmlText(boolean htmlText)Setstrueif the text of legend's titleis HTML.
 This field is used ONLY byHtmlLegendplugin and not by CHART.js.voidsetText(String text)Sets the title text to display.voidsetText(SafeHtml text)Sets the text that will be displayed, as HTML.
 This field is used ONLY byHtmlLegendplugin and not by CHART.js.
 
- 
- 
- 
Method Detail- 
getLegendTextHandlerpublic LegendTextHandler getLegendTextHandler() Description copied from interface:HasLegendTextReturns a legend text handler instance to use in the default methods of this interface.- Specified by:
- getLegendTextHandlerin interface- HasLegendText
- Returns:
- a legend text handler instance
 
 - 
getPaddingpublic Padding getPadding() Returns the padding element.- Returns:
- the padding
 
 - 
getFontpublic Font getFont() Returns the font element.- Returns:
- the font
 
 - 
setColorpublic void setColor(IsColor color) Sets the font color.- Parameters:
- color- font color.
 
 - 
setColorpublic void setColor(String color) Sets the font color.- Parameters:
- color- font color.
 
 - 
getColorAsStringpublic String getColorAsString() Returns the font color as string.- Returns:
- font color as string
 
 - 
getColorpublic IsColor getColor() Returns the font color.- Returns:
- font color
 
 - 
setDisplaypublic void setDisplay(boolean display) Setstrueif the title is shown.- Parameters:
- display- if- truethe title is shown.
 
 - 
isDisplaypublic boolean isDisplay() Returnstrueif the title is shown.- Returns:
- if truethe title is shown.
 
 - 
setTextpublic void setText(String text) Sets the title text to display.- Specified by:
- setTextin interface- HasLegendText
- Parameters:
- text- the title text to display.
 
 - 
getTextpublic String getText() Returns the title text to display.- Specified by:
- getTextin interface- HasLegendText
- Returns:
- the title text to display
 
 - 
setTextpublic void setText(SafeHtml text) Sets the text that will be displayed, as HTML.
 This field is used ONLY byHtmlLegendplugin and not by CHART.js.- Specified by:
- setTextin interface- HasLegendText
- Parameters:
- text- the text that will be displayed, as HTML
 
 - 
getTextAsHtmlpublic SafeHtml getTextAsHtml() Returns the text that will be displayed, as HTML.
 If is not HTML, returnsUndefined.STRING. This field is used ONLY byHtmlLegendplugin and not by CHART.js.- Specified by:
- getTextAsHtmlin interface- HasLegendText
- Returns:
- the text that will be displayed, as HTML.
 
 - 
isHtmlTextpublic boolean isHtmlText() Returnstrueif the text of legend's title is HTML.
 This field is used ONLY byHtmlLegendplugin and not by CHART.js.- Specified by:
- isHtmlTextin interface- HasLegendText
- Returns:
- trueif the text of legend's title is HTML
 
 - 
setHtmlTextpublic void setHtmlText(boolean htmlText) Setstrueif the text of legend's titleis HTML.
 This field is used ONLY byHtmlLegendplugin and not by CHART.js.- Specified by:
- setHtmlTextin interface- HasLegendText
- Parameters:
- htmlText-- trueif the text of legend's title is HTML
 
 - 
getOptionsprotected final ConfigurationOptions getOptions() Returns the configuration options.- Returns:
- the configuration options.
 
 - 
getConfigurationprotected final ExtendedOptions getConfiguration() Returns the configuration element.- Returns:
- the configuration element.
 
 - 
getChartpublic final IsChart getChart() Returns the chart instance- Returns:
- the chart
 
 
- 
 
-