public class Title extends Object
Modifier and Type | Method and Description |
---|---|
ElementAlign |
getAlign()
Returns the alignment of the title.
|
ElementAlignCallback<ChartContext> |
getAlignCallback()
Returns the align callback, if set, otherwise
null . |
IsChart |
getChart()
Returns the chart instance
|
IsColor |
getColor()
Returns the font color.
|
String |
getColorAsString()
Returns the font color as string.
|
ColorCallback<ChartContext> |
getColorCallback()
Returns the color callback, if set, otherwise
null . |
protected ExtendedOptions |
getConfiguration()
Returns the configuration element.
|
DisplayCallback<ChartContext> |
getDisplayCallback()
Returns the callback to set if the title is shown.
|
Font |
getFont()
Returns the font element.
|
FontCallback<ChartContext> |
getFontCallback()
Returns the font callback, if set, otherwise
null . |
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 ConfigurationOptions |
getOptions()
Returns the configuration options.
|
Padding |
getPadding()
Returns the padding element.
|
PaddingCallback<ChartContext> |
getPaddingCallback()
Returns the padding callback, if set, otherwise
null . |
Position |
getPosition()
Returns the position of title.
|
PositionCallback<ChartContext> |
getPositionCallback()
Returns the position callback, if set, otherwise
null . |
List<String> |
getText()
Returns the title text to display, as a list of strings.
|
TextCallback<ChartContext> |
getTextCallback()
Returns the text callback, if set, otherwise
null . |
boolean |
isDisplay()
Returns if the title is shown.
|
boolean |
isFullSize()
Returns if marks that this box should take the full width/height of the canvas (moving other boxes).
|
void |
setAlign(ElementAlign alignment)
Sets the alignment of the title.
|
void |
setAlign(ElementAlignCallback<ChartContext> alignCallback)
Sets the align callback.
|
void |
setAlign(NativeCallback alignCallback)
Sets the align callback.
|
void |
setColor(ColorCallback<ChartContext> colorCallback)
Sets the color callback.
|
void |
setColor(IsColor color)
Sets the font color.
|
void |
setColor(NativeCallback colorCallback)
Sets the color callback.
|
void |
setColor(String color)
Sets the font color.
|
void |
setDisplay(boolean display)
Sets if the title is shown.
|
void |
setDisplay(DisplayCallback<ChartContext> displayCallback)
Sets if the title is shown by a callback.
|
void |
setDisplay(NativeCallback displayCallback)
Sets if the title is shown by a callback.
|
void |
setFont(FontCallback<ChartContext> fontCallback)
Sets the font callback.
|
void |
setFont(NativeCallback fontCallback)
Sets the font callback.
|
void |
setFullSize(boolean fullSize)
Marks that this box should take the full width/height of the canvas (moving other boxes).
|
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.
|
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.
|
void |
setPadding(NativeCallback paddingCallback)
Sets the padding callback.
|
void |
setPadding(PaddingCallback<ChartContext> paddingCallback)
Sets the padding callback.
|
void |
setPosition(NativeCallback positionCallback)
Sets the position callback.
|
void |
setPosition(Position position)
Sets the position of title.
|
void |
setPosition(PositionCallback<ChartContext> positionCallback)
Sets the position callback.
|
void |
setText(NativeCallback textCallback)
Sets the text callback.
|
void |
setText(String... text)
Sets the title text to display.
|
void |
setText(TextCallback<ChartContext> textCallback)
Sets the text callback.
|
public Font getFont()
public Padding getPadding()
public void setColor(IsColor color)
color
- font color.public void setColor(String color)
color
- font color.public String getColorAsString()
public IsColor getColor()
public void setDisplay(boolean display)
display
- if the title is shown.public boolean isDisplay()
public void setText(String... text)
text
- the title text to display. If specified as an array, text is rendered on multiple lines.public List<String> getText()
public void setPosition(Position position)
position
- the position of title.public Position getPosition()
public void setFullSize(boolean fullSize)
fullSize
- Marks that this box should take the full width/height of the canvas (moving other boxes)public boolean isFullSize()
public void setAlign(ElementAlign alignment)
alignment
- alignment of the title.public ElementAlign getAlign()
public DisplayCallback<ChartContext> getDisplayCallback()
public void setDisplay(DisplayCallback<ChartContext> displayCallback)
displayCallback
- the callback instance to usepublic void setDisplay(NativeCallback displayCallback)
displayCallback
- the callback instance to usepublic FullSizeCallback<ChartContext> getFullSizeCallback()
public void setFullSize(FullSizeCallback<ChartContext> fullSizeCallback)
fullSizeCallback
- the callback instance to usepublic void setFullSize(NativeCallback fullSizeCallback)
fullSizeCallback
- the callback instance to usepublic PaddingCallback<ChartContext> getPaddingCallback()
null
.getPaddingCallback
in interface IsScriptablePaddingProvider<ChartContext>
null
.public void setPadding(PaddingCallback<ChartContext> paddingCallback)
setPadding
in interface IsScriptablePaddingProvider<ChartContext>
paddingCallback
- the padding callback to setpublic void setPadding(NativeCallback paddingCallback)
setPadding
in interface IsScriptablePaddingProvider<ChartContext>
paddingCallback
- the padding callback to setpublic FontCallback<ChartContext> getFontCallback()
null
.getFontCallback
in interface IsScriptableFontProvider<ChartContext>
null
.public void setFont(FontCallback<ChartContext> fontCallback)
setFont
in interface IsScriptableFontProvider<ChartContext>
fontCallback
- the font callback to setpublic void setFont(NativeCallback fontCallback)
setFont
in interface IsScriptableFontProvider<ChartContext>
fontCallback
- the font callback to setpublic ColorCallback<ChartContext> getColorCallback()
null
.null
.public void setColor(ColorCallback<ChartContext> colorCallback)
colorCallback
- the color callback to setpublic void setColor(NativeCallback colorCallback)
colorCallback
- the color callback to setpublic TextCallback<ChartContext> getTextCallback()
null
.null
.public void setText(TextCallback<ChartContext> textCallback)
textCallback
- the text callback to setpublic void setText(NativeCallback textCallback)
textCallback
- the text callback to setpublic PositionCallback<ChartContext> getPositionCallback()
null
.null
.public void setPosition(PositionCallback<ChartContext> positionCallback)
positionCallback
- the position callback to setpublic void setPosition(NativeCallback positionCallback)
positionCallback
- the position callback to setpublic ElementAlignCallback<ChartContext> getAlignCallback()
null
.null
.public void setAlign(ElementAlignCallback<ChartContext> alignCallback)
alignCallback
- the align callback to setpublic void setAlign(NativeCallback alignCallback)
alignCallback
- the align callback to setprotected final ConfigurationOptions getOptions()
protected final ExtendedOptions getConfiguration()
public final IsChart getChart()