Class HtmlLegendOptions
- java.lang.Object
-
- org.pepstock.charba.client.commons.NativeObjectContainer
-
- org.pepstock.charba.client.commons.AbstractNode
-
- org.pepstock.charba.client.plugins.AbstractPluginOptions
-
- org.pepstock.charba.client.impl.plugins.HtmlLegendOptions
-
- All Implemented Interfaces:
IsDefaultEventHandler
,HasEvents
public final class HtmlLegendOptions extends AbstractPluginOptions
Configuration options ofHtmlLegend.ID
plugin.
This is mapping the configuration both default global and per chart instance.- Author:
- Andrea "Stock" Stocchero
-
-
Field Summary
Fields Modifier and Type Field Description static CursorType
DEFAULT_CURSOR_POINTER
Default cursor type when the cursor is over,CursorType.POINTER
.static boolean
DEFAULT_DISPLAY
Default display if legend must be showed.static int
DEFAULT_MAXIMUM_LEGEND_COLUMNS
Default maximum legends columns to show.
-
Constructor Summary
Constructors Constructor Description HtmlLegendOptions()
Builds the object with new java script object setting the default value of plugin.
The global plugin options is used, if exists, as defaults values.HtmlLegendOptions(IsChart chart)
Builds the object with a chart instance in order to get the right defaults.
If the plugin options have not been set by chart type, it will use the global.
-
Method Summary
All Methods Instance Methods Concrete Methods Default Methods Modifier and Type Method Description CursorType
getCursorPointer()
Returns the cursor type when the cursor is over the dataset item.default CursorType
getCursorPointer()
Returns the cursor type when the cursor is over the dataset item.HtmlLegendItemCallback
getLegendItemCallback()
Returns the callback which can be implemented to change the text of legend for a specific item, as HTML.default HtmlLegendItemCallback
getLegendTextCallback()
Returns the callback which can be implemented to change the text of legend for a specific item, as HTML.HtmlLegendTitleCallback
getLegendTitleCallback()
Returns the callback which can be implemented to change the text of legend's title, as HTML.int
getMaximumLegendColumns()
Returns the maximum amount of columns of legend.boolean
isDisplay()
Returns if the legend is shown.void
setCursorPointer(CursorType cursor)
Sets the cursor type when the cursor is over the dataset item.void
setDisplay(boolean display)
Sets if the legend is shown.void
setLegendItemCallback(HtmlLegendItemCallback legendTextCallback)
Sets the callback which can be implemented to change the text of legend for a specific item, as HTML.void
setLegendTitleCallback(HtmlLegendTitleCallback legendTitleCallback)
Sets the callback which can be implemented to change the text of legend's title, as HTML.void
setMaximumLegendColumns(int maxColumns)
Sets the maximum amount of columns of legend.-
Methods inherited from class org.pepstock.charba.client.plugins.AbstractPluginOptions
applyingDefaults, applyingDefaults, getEventsOptionHandler, getId, getPluginId, loadGlobalsPluginOptions, store, store, store, store
-
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, 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, 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, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
-
-
-
-
Field Detail
-
DEFAULT_MAXIMUM_LEGEND_COLUMNS
public static final int DEFAULT_MAXIMUM_LEGEND_COLUMNS
Default maximum legends columns to show.- See Also:
- Constant Field Values
-
DEFAULT_DISPLAY
public static final boolean DEFAULT_DISPLAY
Default display if legend must be showed.- See Also:
- Constant Field Values
-
DEFAULT_CURSOR_POINTER
public static final CursorType DEFAULT_CURSOR_POINTER
Default cursor type when the cursor is over,CursorType.POINTER
.
-
-
Constructor Detail
-
HtmlLegendOptions
public HtmlLegendOptions()
Builds the object with new java script object setting the default value of plugin.
The global plugin options is used, if exists, as defaults values.
-
HtmlLegendOptions
public HtmlLegendOptions(IsChart chart)
Builds the object with a chart instance in order to get the right defaults.
If the plugin options have not been set by chart type, it will use the global.- Parameters:
chart
- chart type to use to get the default values by chart
-
-
Method Detail
-
setDisplay
public void setDisplay(boolean display)
Sets if the legend is shown.- Parameters:
display
- if the legend is shown.
-
isDisplay
public boolean isDisplay()
Returns if the legend is shown.- Returns:
true
if the legend is shown.
-
getLegendItemCallback
public HtmlLegendItemCallback getLegendItemCallback()
Returns the callback which can be implemented to change the text of legend for a specific item, as HTML.- Returns:
- the callback which can be implemented to change the text of legend for a specific item, as HTML
-
setLegendItemCallback
public void setLegendItemCallback(HtmlLegendItemCallback legendTextCallback)
Sets the callback which can be implemented to change the text of legend for a specific item, as HTML.- Parameters:
legendTextCallback
- the callback which can be implemented to change the text of legend for a specific item, as HTML
-
getLegendTitleCallback
public HtmlLegendTitleCallback getLegendTitleCallback()
Returns the callback which can be implemented to change the text of legend's title, as HTML.- Returns:
- the callback which can be implemented to change the text of legend's title, as HTML
-
setLegendTitleCallback
public void setLegendTitleCallback(HtmlLegendTitleCallback legendTitleCallback)
Sets the callback which can be implemented to change the text of legend's title, as HTML.- Parameters:
legendTitleCallback
- the callback which can be implemented to change the text of legend's title, as HTML
-
setMaximumLegendColumns
public void setMaximumLegendColumns(int maxColumns)
Sets the maximum amount of columns of legend.- Parameters:
maxColumns
- the maximum amount of columns of legend
-
getMaximumLegendColumns
public int getMaximumLegendColumns()
Returns the maximum amount of columns of legend.- Returns:
- he maximum amount of columns of legend
-
getLegendTextCallback
public default HtmlLegendItemCallback getLegendTextCallback()
Returns the callback which can be implemented to change the text of legend for a specific item, as HTML.- Returns:
- the callback which can be implemented to change the text of legend for a specific item, as HTML
-
getCursorPointer
public default CursorType getCursorPointer()
Returns the cursor type when the cursor is over the dataset item.- Returns:
- cursor type when the cursor is over the dataset item
-
setCursorPointer
public final void setCursorPointer(CursorType cursor)
Sets the cursor type when the cursor is over the dataset item.- Parameters:
cursor
- cursor type when the cursor is over the dataset item
-
getCursorPointer
public final CursorType getCursorPointer()
Returns the cursor type when the cursor is over the dataset item.- Returns:
- cursor type when the cursor is over the dataset item
-
-