Class Subtitle
- java.lang.Object
- 
- org.pepstock.charba.client.configuration.Subtitle
 
- 
- All Implemented Interfaces:
- IsScriptableFontProvider<ChartContext>,- IsScriptablePaddingProvider<ChartContext>
 
 public class Subtitle extends Object Configures the chart title which defines text to draw at the top of the chart.- Author:
- Andrea "Stock" Stocchero
 
- 
- 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description ElementAligngetAlign()Returns the alignment of the title.ElementAlignCallback<ChartContext>getAlignCallback()Returns the align callback, if set, otherwisenull.IsChartgetChart()Returns the chart instanceIsColorgetColor()Returns the font color.StringgetColorAsString()Returns the font color as string.ColorCallback<ChartContext>getColorCallback()Returns the color callback, if set, otherwisenull.protected ExtendedOptionsgetConfiguration()Returns the configuration element.SimpleDisplayCallback<ChartContext>getDisplayCallback()Returns the callback to set if the title is shown.FontgetFont()Returns the font element.FontCallback<ChartContext>getFontCallback()Returns the font callback, if set, otherwisenull.FullSizeCallback<ChartContext>getFullSizeCallback()Returns the callback to set if marks that this box should take the full width/height of the canvas (moving other boxes).protected ConfigurationOptionsgetOptions()Returns the configuration options.PaddinggetPadding()Returns the padding element.PaddingCallback<ChartContext>getPaddingCallback()Returns the padding callback, if set, otherwisenull.PositiongetPosition()Returns the position of title.PositionCallback<ChartContext>getPositionCallback()Returns the position callback, if set, otherwisenull.List<String>getText()Returns the title text to display, as a list of strings.TextCallback<ChartContext>getTextCallback()Returns the text callback, if set, otherwisenull.booleanisDisplay()Returns if the title is shown.booleanisFullSize()Returns if marks that this box should take the full width/height of the canvas (moving other boxes).voidsetAlign(ElementAlignCallback<ChartContext> alignCallback)Sets the align callback.voidsetAlign(NativeCallback alignCallback)Sets the align callback.voidsetAlign(ElementAlign alignment)Sets the alignment of the title.voidsetColor(String color)Sets the font color.voidsetColor(ColorCallback<ChartContext> colorCallback)Sets the color callback.voidsetColor(NativeCallback colorCallback)Sets the color callback.voidsetColor(IsColor color)Sets the font color.voidsetDisplay(boolean display)Sets if the title is shown.voidsetDisplay(NativeCallback displayCallback)Sets if the title is shown by a callback.voidsetDisplay(SimpleDisplayCallback<ChartContext> displayCallback)Sets if the title is shown by a callback.voidsetFont(FontCallback<ChartContext> fontCallback)Sets the font callback.voidsetFont(NativeCallback fontCallback)Sets the font callback.voidsetFullSize(boolean fullSize)Marks that this box should take the full width/height of the canvas (moving other boxes).voidsetFullSize(FullSizeCallback<ChartContext> fullSizeCallback)Sets if marks that this box should take the full width/height of the canvas (moving other boxes) is shown by a callback.voidsetFullSize(NativeCallback fullSizeCallback)Sets if marks that this box should take the full width/height of the canvas (moving other boxes) is shown by a callback.voidsetPadding(NativeCallback paddingCallback)Sets the padding callback.voidsetPadding(PaddingCallback<ChartContext> paddingCallback)Sets the padding callback.voidsetPosition(NativeCallback positionCallback)Sets the position callback.voidsetPosition(PositionCallback<ChartContext> positionCallback)Sets the position callback.voidsetPosition(Position position)Sets the position of title.voidsetText(String... text)Sets the title text to display.voidsetText(NativeCallback textCallback)Sets the text callback.voidsetText(TextCallback<ChartContext> textCallback)Sets the text callback.
 
- 
- 
- 
Method Detail- 
getFontpublic Font getFont() Returns the font element.- Returns:
- the font
 
 - 
getPaddingpublic Padding getPadding() Returns the padding element.- Returns:
- the padding
 
 - 
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) Sets if the title is shown.- Parameters:
- display- if the title is shown.
 
 - 
isDisplaypublic boolean isDisplay() Returns if the title is shown.- Returns:
- if the title is shown.
 
 - 
setTextpublic void setText(String... text) Sets the title text to display. If specified as an array, text is rendered on multiple lines.- Parameters:
- text- the title text to display. If specified as an array, text is rendered on multiple lines.
 
 - 
getTextpublic List<String> getText() Returns the title text to display, as a list of strings.- Returns:
- a list of strings
 
 - 
setPositionpublic void setPosition(Position position) Sets the position of title.- Parameters:
- position- the position of title.
 
 - 
getPositionpublic Position getPosition() Returns the position of title.- Returns:
- the position of title.
 
 - 
setFullSizepublic void setFullSize(boolean fullSize) Marks that this box should take the full width/height of the canvas (moving other boxes).- Parameters:
- fullSize- Marks that this box should take the full width/height of the canvas (moving other boxes)
 
 - 
isFullSizepublic boolean isFullSize() Returns if marks that this box should take the full width/height of the canvas (moving other boxes).- Returns:
- Marks that this box should take the full width/height of the canvas (moving other boxes)
 
 - 
setAlignpublic void setAlign(ElementAlign alignment) Sets the alignment of the title.- Parameters:
- alignment- alignment of the title.
 
 - 
getAlignpublic ElementAlign getAlign() Returns the alignment of the title.- Returns:
- alignment of the title.
 
 - 
getDisplayCallbackpublic SimpleDisplayCallback<ChartContext> getDisplayCallback() Returns the callback to set if the title is shown.- Returns:
- the callback instance to use
 
 - 
setDisplaypublic void setDisplay(SimpleDisplayCallback<ChartContext> displayCallback) Sets if the title is shown by a callback.- Parameters:
- displayCallback- the callback instance to use
 
 - 
setDisplaypublic void setDisplay(NativeCallback displayCallback) Sets if the title is shown by a callback.- Parameters:
- displayCallback- the callback instance to use
 
 - 
getFullSizeCallbackpublic FullSizeCallback<ChartContext> getFullSizeCallback() Returns the callback to set if marks that this box should take the full width/height of the canvas (moving other boxes).- Returns:
- the callback instance to use
 
 - 
setFullSizepublic void setFullSize(FullSizeCallback<ChartContext> fullSizeCallback) Sets if marks that this box should take the full width/height of the canvas (moving other boxes) is shown by a callback.- Parameters:
- fullSizeCallback- the callback instance to use
 
 - 
setFullSizepublic void setFullSize(NativeCallback fullSizeCallback) Sets if marks that this box should take the full width/height of the canvas (moving other boxes) is shown by a callback.- Parameters:
- fullSizeCallback- the callback instance to use
 
 - 
getPaddingCallbackpublic PaddingCallback<ChartContext> getPaddingCallback() Returns the padding callback, if set, otherwisenull.- Specified by:
- getPaddingCallbackin interface- IsScriptablePaddingProvider<ChartContext>
- Returns:
- the padding callback, if set, otherwise null.
 
 - 
setPaddingpublic void setPadding(PaddingCallback<ChartContext> paddingCallback) Sets the padding callback.- Specified by:
- setPaddingin interface- IsScriptablePaddingProvider<ChartContext>
- Parameters:
- paddingCallback- the padding callback to set
 
 - 
setPaddingpublic void setPadding(NativeCallback paddingCallback) Sets the padding callback.- Specified by:
- setPaddingin interface- IsScriptablePaddingProvider<ChartContext>
- Parameters:
- paddingCallback- the padding callback to set
 
 - 
getFontCallbackpublic FontCallback<ChartContext> getFontCallback() Returns the font callback, if set, otherwisenull.- Specified by:
- getFontCallbackin interface- IsScriptableFontProvider<ChartContext>
- Returns:
- the font callback, if set, otherwise null.
 
 - 
setFontpublic void setFont(FontCallback<ChartContext> fontCallback) Sets the font callback.- Specified by:
- setFontin interface- IsScriptableFontProvider<ChartContext>
- Parameters:
- fontCallback- the font callback to set
 
 - 
setFontpublic void setFont(NativeCallback fontCallback) Sets the font callback.- Specified by:
- setFontin interface- IsScriptableFontProvider<ChartContext>
- Parameters:
- fontCallback- the font callback to set
 
 - 
getColorCallbackpublic ColorCallback<ChartContext> getColorCallback() Returns the color callback, if set, otherwisenull.- Returns:
- the color callback, if set, otherwise null.
 
 - 
setColorpublic void setColor(ColorCallback<ChartContext> colorCallback) Sets the color callback.- Parameters:
- colorCallback- the color callback to set
 
 - 
setColorpublic void setColor(NativeCallback colorCallback) Sets the color callback.- Parameters:
- colorCallback- the color callback to set
 
 - 
getTextCallbackpublic TextCallback<ChartContext> getTextCallback() Returns the text callback, if set, otherwisenull.- Returns:
- the text callback, if set, otherwise null.
 
 - 
setTextpublic void setText(TextCallback<ChartContext> textCallback) Sets the text callback.- Parameters:
- textCallback- the text callback to set
 
 - 
setTextpublic void setText(NativeCallback textCallback) Sets the text callback.- Parameters:
- textCallback- the text callback to set
 
 - 
getPositionCallbackpublic PositionCallback<ChartContext> getPositionCallback() Returns the position callback, if set, otherwisenull.- Returns:
- the position callback, if set, otherwise null.
 
 - 
setPositionpublic void setPosition(PositionCallback<ChartContext> positionCallback) Sets the position callback.- Parameters:
- positionCallback- the position callback to set
 
 - 
setPositionpublic void setPosition(NativeCallback positionCallback) Sets the position callback.- Parameters:
- positionCallback- the position callback to set
 
 - 
getAlignCallbackpublic ElementAlignCallback<ChartContext> getAlignCallback() Returns the align callback, if set, otherwisenull.- Returns:
- the align callback, if set, otherwise null.
 
 - 
setAlignpublic void setAlign(ElementAlignCallback<ChartContext> alignCallback) Sets the align callback.- Parameters:
- alignCallback- the align callback to set
 
 - 
setAlignpublic void setAlign(NativeCallback alignCallback) Sets the align callback.- Parameters:
- alignCallback- the align callback to set
 
 - 
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
 
 
- 
 
-