Class ScaleTitle
- java.lang.Object
-
- org.pepstock.charba.client.commons.NativeObjectContainer
-
- org.pepstock.charba.client.commons.AbstractNode
-
- org.pepstock.charba.client.options.AbstractModel<AbstractScale,IsDefaultScaleTitle>
-
- org.pepstock.charba.client.options.ScaleTitle
-
- All Implemented Interfaces:
IsDefaultFontContainer
,IsDefaultScaleTitle
,HasFont
public final class ScaleTitle extends AbstractModel<AbstractScale,IsDefaultScaleTitle> implements IsDefaultScaleTitle, HasFont
When creating a chart, you want to tell the viewer what data they are viewing. To do this, you need to label the axis.
The scale Title configuration defines options for the scale title. Note that this only applies to cartesian axes.- Author:
- Andrea "Stock" Stocchero
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ScaleTitleAlign
getAlign()
Returns the alignment of the axis title.FontContainer
getFontContainer()
Returns a font container instance to use in the default methods of this interface.Padding
getPadding()
Returns the padding element.List<String>
getText()
Returns the title text to display, as a list of strings.boolean
isDisplay()
Iftrue
, display the axis title.void
setAlign(ScaleTitleAlign align)
Sets the alignment of the axis title.void
setDisplay(boolean display)
Iftrue
, display the axis title.void
setText(String... text)
Sets the title text to display.
If specified as an array, text is rendered on multiple lines.-
Methods inherited from class org.pepstock.charba.client.options.AbstractModel
getDefaultValues, getParent, loadPadding, setCallbackToModel, setCallbackToModel, setEventToModel
-
Methods inherited from class org.pepstock.charba.client.commons.AbstractNode
checkAndAddToParent, getChildKey, getParentNode, getRootNode, getUpdateListener, retrieveRoot, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setElementAndAddToParent, setInternalCallbackToModel, setInternalCallbackToModel, setUpdateListener, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent
-
Methods inherited from class org.pepstock.charba.client.commons.NativeObjectContainer
checkAndGetColor, checkDefaultValuesArgument, empty, getArrayValue, getElement, getIncrementalId, getNativeChart, getNativeEvent, getNativeObject, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, has, has, isType, keys, loadNativeObject, remove, remove, setArrayValue, setArrayValue, setArrayValue, setElement, setEmptyValue, setNewIncrementalId, setNewIncrementalId, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
-
-
-
-
Method Detail
-
getFontContainer
public FontContainer getFontContainer()
Description copied from interface:HasFont
Returns a font container instance to use in the default methods of this interface.- Specified by:
getFontContainer
in interfaceHasFont
- Returns:
- a font container instance
-
getPadding
public Padding getPadding()
Returns the padding element.- Specified by:
getPadding
in interfaceIsDefaultScaleTitle
- Returns:
- the padding
-
setDisplay
public void setDisplay(boolean display)
Iftrue
, display the axis title.- Parameters:
display
- iftrue
, display the axis title.
-
isDisplay
public boolean isDisplay()
Iftrue
, display the axis title.- Specified by:
isDisplay
in interfaceIsDefaultScaleTitle
- Returns:
- if
true
, display the axis title.
-
setText
public 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
public 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
-
setAlign
public void setAlign(ScaleTitleAlign align)
Sets the alignment of the axis title.- Parameters:
align
- the alignment of the axis title
-
getAlign
public ScaleTitleAlign getAlign()
Returns the alignment of the axis title.- Specified by:
getAlign
in interfaceIsDefaultScaleTitle
- Returns:
- the alignment of the axis title
-
-