Package org.pepstock.charba.client.items
Interface HasLegendText
-
- All Known Implementing Classes:
LegendLabelItem
,LegendTitle
,LegendTitle
public interface HasLegendText
Interface to map object which contains a text to show inside a legend element.
Used byLegendItem
andLegendTitle
.- Author:
- Andrea "Stock" Stocchero
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description LegendTextHandler
getLegendTextHandler()
Returns a legend text handler instance to use in the default methods of this interface.default String
getText()
Returns the text that will be displayeddefault SafeHtml
getTextAsHtml()
Returns the label that will be displayed, as HTML.
If is not HTML, returnsUndefined.STRING
.default boolean
isHtmlText()
Returnstrue
if the text of legend item is HTML.
This field is used ONLY byHtmlLegend
plugin and not by CHART.js.default void
setHtmlText(boolean htmlText)
Setstrue
if the text of legend item is HTML.
This field is used ONLY byHtmlLegend
plugin and not by CHART.js.default void
setText(String text)
Sets the text that will be displayed.default void
setText(SafeHtml text)
Sets the label that will be displayed, as HTML.
This field is used ONLY byHtmlLegend
plugin 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 byHtmlLegend
plugin 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 byHtmlLegend
plugin and not by CHART.js.- Returns:
- the label that will be displayed, as HTML.
-
isHtmlText
default boolean isHtmlText()
Returnstrue
if the text of legend item is HTML.
This field is used ONLY byHtmlLegend
plugin and not by CHART.js.- Returns:
true
if the text of legend item is HTML
-
setHtmlText
default void setHtmlText(boolean htmlText)
Setstrue
if the text of legend item is HTML.
This field is used ONLY byHtmlLegend
plugin and not by CHART.js.- Parameters:
htmlText
-true
if the text of legend item is HTML
-
-