Package org.pepstock.charba.client.items
Interface HasLegendText
-
- All Known Implementing Classes:
LegendLabelItem,LegendTitle,LegendTitle
public interface HasLegendTextInterface to map object which contains a text to show inside a legend element.
Used byLegendItemandLegendTitle.- Author:
- Andrea "Stock" Stocchero
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description LegendTextHandlergetLegendTextHandler()Returns a legend text handler instance to use in the default methods of this interface.default StringgetText()Returns the text that will be displayeddefault SafeHtmlgetTextAsHtml()Returns the label that will be displayed, as HTML.
If is not HTML, returnsUndefined.STRING.default booleanisHtmlText()Returnstrueif the text of legend item is HTML.
This field is used ONLY byHtmlLegendplugin and not by CHART.js.default voidsetHtmlText(boolean htmlText)Setstrueif the text of legend item is HTML.
This field is used ONLY byHtmlLegendplugin and not by CHART.js.default voidsetText(String text)Sets the text that will be displayed.default voidsetText(SafeHtml text)Sets the label that will be displayed, as HTML.
This field is used ONLY byHtmlLegendplugin and not by CHART.js.
-
-
-
Method Detail
-
getLegendTextHandler
LegendTextHandler getLegendTextHandler()
Returns a legend text handler instance to use in the default methods of this interface.- Returns:
- a legend text handler instance
-
getText
default String getText()
Returns the text that will be displayed- Returns:
- the text that will be displayed.
-
setText
default void setText(String text)
Sets the text that will be displayed.- Parameters:
text- the text that will be displayed
-
setText
default void setText(SafeHtml text)
Sets the label that will be displayed, as HTML.
This field is used ONLY byHtmlLegendplugin and not by CHART.js.- Parameters:
text- the label that will be displayed, as HTML
-
getTextAsHtml
default SafeHtml getTextAsHtml()
Returns the label that will be displayed, as HTML.
If is not HTML, returnsUndefined.STRING. This field is used ONLY byHtmlLegendplugin and not by CHART.js.- Returns:
- the label that will be displayed, as HTML.
-
isHtmlText
default boolean isHtmlText()
Returnstrueif the text of legend item is HTML.
This field is used ONLY byHtmlLegendplugin and not by CHART.js.- Returns:
trueif the text of legend item is HTML
-
setHtmlText
default void setHtmlText(boolean htmlText)
Setstrueif the text of legend item is HTML.
This field is used ONLY byHtmlLegendplugin and not by CHART.js.- Parameters:
htmlText-trueif the text of legend item is HTML
-
-