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 IsFont
getFont()
Returns the font element.Padding
getPadding()
Returns the padding to apply around labels.List<String>
getText()
Returns the title text to display, as a list of strings.void
setAlign(ElementAlign alignment)
Sets the alignment of the element.void
setColor(String color)
Sets the font color.void
setDisplay(boolean display)
Setstrue
if the element is shown.void
setFullSize(boolean fullSize)
Marks that this box should take the full width/height of the canvas (moving other boxes).void
setPosition(Position position)
Sets the position of element.void
setText(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)
Setstrue
if the element is shown.- Parameters:
display
- iftrue
the 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:IsDefaultFontContainer
Returns the font element.- Specified by:
getFont
in interfaceIsDefaultFontContainer
- Returns:
- the font
-
getPadding
Padding getPadding()
Description copied from interface:IsDefaultAbstractTitle
Returns the padding to apply around labels. Only top and bottom are implemented.- Specified by:
getPadding
in interfaceIsDefaultAbstractTitle
- Returns:
- Padding to apply around labels. Only top and bottom are implemented.
-
-