Class LabelsOptions
- 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.labels.LabelsOptions
-
- All Implemented Interfaces:
IsDefaultEventHandler,HasEvents
public final class LabelsOptions extends AbstractPluginOptions
This is the object to map theLabelsPlugin.IDplugin options, both at chart and global level.- Author:
- Andrea "Stock" Stocchero
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.pepstock.charba.client.plugins.AbstractPluginOptions
AbstractPluginOptions.Property
-
-
Constructor Summary
Constructors Constructor Description LabelsOptions()Creates newLabelsPlugin.IDplugin options.LabelsOptions(IsChart chart)Creates newLabelsPlugin.IDplugin options, relating to chart instance for default.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LabelcreateLabel(String id)Creates new label (if not exist) using the label if passed as argument.LabelcreateLabel(LabelId id)Creates new label (if not exist) using the label if passed as argument.LabelgetLabel(String id)Returns the label with the id passed as argument ornullif not exist.LabelgetLabel(LabelId id)Returns the label with the id passed as argument ornullif not exist.List<Label>getLabels()Returns the collection of labels.booleanhasLabel(String id)Returnstrueif the label with the id passed as argument exists.booleanhasLabel(LabelId id)Returnstrueif the label with the id passed as argument exists.voidremoveLabel(String id)Removes the label by the id passed as argument, if exists.voidremoveLabel(LabelId id)Removes the label by the id passed as argument, if exists.-
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, retrieveRoot, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setElementAndAddToParent, setInternalCallbackToModel, setInternalCallbackToModel, 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, 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
-
-
-
-
Constructor Detail
-
LabelsOptions
public LabelsOptions()
Creates newLabelsPlugin.IDplugin options.
-
LabelsOptions
public LabelsOptions(IsChart chart)
Creates newLabelsPlugin.IDplugin options, relating to chart instance for default.- Parameters:
chart- chart instance related to the plugin options
-
-
Method Detail
-
createLabel
public Label createLabel(String id)
Creates new label (if not exist) using the label if passed as argument.- Parameters:
id- label id to use- Returns:
- new empty label object
-
createLabel
public Label createLabel(LabelId id)
Creates new label (if not exist) using the label if passed as argument.- Parameters:
id- label id to use- Returns:
- new empty label object
-
hasLabel
public boolean hasLabel(String id)
Returnstrueif the label with the id passed as argument exists.- Parameters:
id- label id to check- Returns:
trueif the label with the id passed as argument exists
-
hasLabel
public boolean hasLabel(LabelId id)
Returnstrueif the label with the id passed as argument exists.- Parameters:
id- label id to check- Returns:
trueif the label with the id passed as argument exists
-
removeLabel
public void removeLabel(String id)
Removes the label by the id passed as argument, if exists.- Parameters:
id- label id to check
-
removeLabel
public void removeLabel(LabelId id)
Removes the label by the id passed as argument, if exists.- Parameters:
id- label id to check
-
getLabels
public List<Label> getLabels()
Returns the collection of labels.- Returns:
- the collection of labels
-
getLabel
public Label getLabel(String id)
Returns the label with the id passed as argument ornullif not exist.- Parameters:
id- label id to use to retrieve the label- Returns:
- the label or
nullif not exist
-
-