Class Captions
- java.lang.Object
-
- org.pepstock.charba.client.commons.NativeObjectContainer
-
- org.pepstock.charba.client.commons.AbstractNode
-
- org.pepstock.charba.client.treemap.Captions
-
public final class Captions extends AbstractNode
The captions can control if and how a caption, to represent the group of the chart, can be shown in the rectangle,- Author:
- Andrea "Stock" Stocchero
-
-
Field Summary
Fields Modifier and Type Field Description static Align
DEFAULT_ALIGN
Default label alignment,Align.LEFT
static String
DEFAULT_COLOR
Default label color,HtmlColor.TRANSPARENT
static boolean
DEFAULT_DISPLAY
Default captions display, true.static int
DEFAULT_PADDING
Default label padding, 3
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Align
getAlign()
Returns the text horizontal alignment used when drawing the label.AlignCallback
getAlignCallback()
Returns the align callback, if set, otherwisenull
.IsColor
getColor()
Returns the color of the text.String
getColorAsString()
Returns the color of the text.ColorCallback<DatasetContext>
getColorCallback()
Returns the color callback, if set, otherwisenull
.IsFont
getFont()
Returns the font object.FontCallback<DatasetContext>
getFontCallback()
Returns the font callback, if set, otherwisenull
.FormatterCallback
getFormatterCallback()
Returns the formatter callback, if set, otherwisenull
.IsColor
getHoverColor()
Returns the hover color of the text.String
getHoverColorAsString()
Returns the hover color of the text.ColorCallback<DatasetContext>
getHoverColorCallback()
Returns the hover color callback, if set, otherwisenull
.IsFont
getHoverFont()
Returns the font object when hovered.FontCallback<DatasetContext>
getHoverFontCallback()
Returns the hover font callback, if set, otherwisenull
.int
getPadding()
Returns the padding to apply around labels.boolean
isDisplay()
Returnstrue
whether the element should be displayed.void
setAlign(NativeCallback alignCallback)
Sets the align callback.void
setAlign(AlignCallback alignCallback)
Sets the align callback.void
setAlign(Align align)
Sets the text horizontal alignment used when drawing the label.void
setColor(String color)
Sets the color of the text.void
setColor(ColorCallback<DatasetContext> colorCallback)
Sets the color callback.void
setColor(NativeCallback colorCallback)
Sets the color callback.void
setColor(IsColor color)
Sets the color of the text.void
setDisplay(boolean display)
Setstrue
whether the element should be displayed.void
setFont(FontCallback<DatasetContext> fontCallback)
Sets the font callback.void
setFont(NativeCallback fontCallback)
Sets the font callback.void
setFormatter(NativeCallback formatterCallback)
Sets the formatter callback.void
setFormatter(FormatterCallback formatterCallback)
Sets the formatter callback.void
setHoverColor(String hoverColor)
Sets the hover color of the text.void
setHoverColor(ColorCallback<DatasetContext> hoverColorCallback)
Sets the hover color callback.void
setHoverColor(NativeCallback hoverColorCallback)
Sets the hover color callback.void
setHoverColor(IsColor hoverColor)
Sets the hover color of the text.void
setHoverFont(FontCallback<DatasetContext> hoverFontCallback)
Sets the hover font callback.void
setHoverFont(NativeCallback hoverFontCallback)
Sets the hover font callback.void
setPadding(int padding)
Sets the padding to apply around labels.-
Methods inherited from class org.pepstock.charba.client.commons.AbstractNode
checkAndAddToParent, getChildKey, getParentNode, getRootNode, retrieveRoot, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setElementAndAddToParent, setInternalCallbackToModel, setInternalCallbackToModel, 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
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, 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, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
-
-
-
-
Field Detail
-
DEFAULT_DISPLAY
public static final boolean DEFAULT_DISPLAY
Default captions display, true.- See Also:
- Constant Field Values
-
DEFAULT_ALIGN
public static final Align DEFAULT_ALIGN
Default label alignment,Align.LEFT
-
DEFAULT_COLOR
public static final String DEFAULT_COLOR
Default label color,HtmlColor.TRANSPARENT
-
DEFAULT_PADDING
public static final int DEFAULT_PADDING
Default label padding, 3- See Also:
- Constant Field Values
-
-
Method Detail
-
getFont
public final IsFont getFont()
Returns the font object.- Returns:
- the font object.
-
getHoverFont
public final IsFont getHoverFont()
Returns the font object when hovered.- Returns:
- the font object when hovered
-
setAlign
public final void setAlign(Align align)
Sets the text horizontal alignment used when drawing the label.- Parameters:
align
- the text horizontal alignment used when drawing the label.
-
getAlign
public final Align getAlign()
Returns the text horizontal alignment used when drawing the label.- Returns:
- the text horizontal alignment used when drawing the label.
-
setColor
public final void setColor(IsColor color)
Sets the color of the text.- Parameters:
color
- the color of the text
-
setColor
public final void setColor(String color)
Sets the color of the text.- Parameters:
color
- the color of the text
-
getColorAsString
public final String getColorAsString()
Returns the color of the text.- Returns:
- the color of the text
-
getColor
public final IsColor getColor()
Returns the color of the text.- Returns:
- the color of the text
-
setHoverColor
public final void setHoverColor(IsColor hoverColor)
Sets the hover color of the text.- Parameters:
hoverColor
- the hover color of the text
-
setHoverColor
public final void setHoverColor(String hoverColor)
Sets the hover color of the text.- Parameters:
hoverColor
- the hover color of the text
-
getHoverColorAsString
public final String getHoverColorAsString()
Returns the hover color of the text.- Returns:
- the hover color of the text
-
getHoverColor
public final IsColor getHoverColor()
Returns the hover color of the text.- Returns:
- the hover color of the text
-
setPadding
public final void setPadding(int padding)
Sets the padding to apply around labels.- Parameters:
padding
- padding to apply around labels.
-
getPadding
public final int getPadding()
Returns the padding to apply around labels.- Returns:
- padding to apply around labels.
-
getFormatterCallback
public final FormatterCallback getFormatterCallback()
Returns the formatter callback, if set, otherwisenull
.- Returns:
- the formatter callback, if set, otherwise
null
.
-
setFormatter
public final void setFormatter(FormatterCallback formatterCallback)
Sets the formatter callback.- Parameters:
formatterCallback
- the formatter callback.
-
setFormatter
public final void setFormatter(NativeCallback formatterCallback)
Sets the formatter callback.- Parameters:
formatterCallback
- the formatter callback.
-
getColorCallback
public final ColorCallback<DatasetContext> getColorCallback()
Returns the color callback, if set, otherwisenull
.- Returns:
- the color callback, if set, otherwise
null
.
-
setColor
public final void setColor(ColorCallback<DatasetContext> colorCallback)
Sets the color callback.- Parameters:
colorCallback
- the color callback.
-
setColor
public final void setColor(NativeCallback colorCallback)
Sets the color callback.- Parameters:
colorCallback
- the color callback.
-
getHoverColorCallback
public final ColorCallback<DatasetContext> getHoverColorCallback()
Returns the hover color callback, if set, otherwisenull
.- Returns:
- the hover color callback, if set, otherwise
null
.
-
setHoverColor
public final void setHoverColor(ColorCallback<DatasetContext> hoverColorCallback)
Sets the hover color callback.- Parameters:
hoverColorCallback
- the hover color callback.
-
setHoverColor
public final void setHoverColor(NativeCallback hoverColorCallback)
Sets the hover color callback.- Parameters:
hoverColorCallback
- the color callback.
-
getAlignCallback
public final AlignCallback getAlignCallback()
Returns the align callback, if set, otherwisenull
.- Returns:
- the align callback, if set, otherwise
null
.
-
setAlign
public final void setAlign(AlignCallback alignCallback)
Sets the align callback.- Parameters:
alignCallback
- the align callback.
-
setAlign
public final void setAlign(NativeCallback alignCallback)
Sets the align callback.- Parameters:
alignCallback
- the align callback.
-
getFontCallback
public final FontCallback<DatasetContext> getFontCallback()
Returns the font callback, if set, otherwisenull
.- Returns:
- the font callback, if set, otherwise
null
.
-
setFont
public final void setFont(FontCallback<DatasetContext> fontCallback)
Sets the font callback.- Parameters:
fontCallback
- the font callback to set
-
setFont
public final void setFont(NativeCallback fontCallback)
Sets the font callback.- Parameters:
fontCallback
- the font callback to set
-
getHoverFontCallback
public final FontCallback<DatasetContext> getHoverFontCallback()
Returns the hover font callback, if set, otherwisenull
.- Returns:
- the hover font callback, if set, otherwise
null
.
-
setHoverFont
public final void setHoverFont(FontCallback<DatasetContext> hoverFontCallback)
Sets the hover font callback.- Parameters:
hoverFontCallback
- the hover font callback to set
-
setHoverFont
public final void setHoverFont(NativeCallback hoverFontCallback)
Sets the hover font callback.- Parameters:
hoverFontCallback
- the hover font callback to set
-
setDisplay
public final void setDisplay(boolean display)
Setstrue
whether the element should be displayed.- Parameters:
display
-true
whether the element should be displayed
-
isDisplay
public final boolean isDisplay()
Returnstrue
whether the element should be displayed.- Returns:
true
whether the element should be displayed
-
-