Interface IsTitle
-
- All Superinterfaces:
IsDefaultAbstractTitle,IsDefaultFontContainer,IsDefaultPluginElement
- All Known Implementing Classes:
AbstractTitle,Subtitle,Title
public interface IsTitle extends IsDefaultAbstractTitle
Interface to map a title and subtitle elements.- Author:
- Andrea "Stock" Stocchero
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IsFontgetFont()Returns the font element.PaddinggetPadding()Returns the padding to apply around labels.List<String>getText()Returns the title text to display, as a list of strings.voidsetAlign(ElementAlign alignment)Sets the alignment of the element.voidsetColor(String color)Sets the font color.voidsetDisplay(boolean display)Setstrueif the element is shown.voidsetFullSize(boolean fullSize)Marks that this box should take the full width/height of the canvas (moving other boxes).voidsetPosition(Position position)Sets the position of element.voidsetText(String... text)Sets the title text to display.
If specified as an array, text is rendered on multiple lines.-
Methods inherited from interface org.pepstock.charba.client.defaults.IsDefaultAbstractTitle
isFullSize
-
Methods inherited from interface org.pepstock.charba.client.defaults.IsDefaultFontContainer
getColorAsString
-
Methods inherited from interface org.pepstock.charba.client.defaults.IsDefaultPluginElement
getAlign, getPosition, isDisplay
-
-
-
-
Method Detail
-
setDisplay
void setDisplay(boolean display)
Setstrueif the element is shown.- Parameters:
display- iftruethe element is shown.
-
setPosition
void setPosition(Position position)
Sets the position of element.- Parameters:
position- the position of element.
-
setAlign
void setAlign(ElementAlign alignment)
Sets the alignment of the element.- Parameters:
alignment- alignment of the element.
-
setFullSize
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)
-
setText
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.
-
getText
List<String> getText()
Returns the title text to display, as a list of strings.- Returns:
- a list of strings or an empty list if not exist
-
setColor
void setColor(String color)
Sets the font color.- Parameters:
color- font color.
-
getFont
IsFont getFont()
Description copied from interface:IsDefaultFontContainerReturns the font element.- Specified by:
getFontin interfaceIsDefaultFontContainer- Returns:
- the font
-
getPadding
Padding getPadding()
Description copied from interface:IsDefaultAbstractTitleReturns the padding to apply around labels. Only top and bottom are implemented.- Specified by:
getPaddingin interfaceIsDefaultAbstractTitle- Returns:
- Padding to apply around labels. Only top and bottom are implemented.
-
-