Class LabelsContext
- java.lang.Object
- 
- org.pepstock.charba.client.commons.NativeObjectContainer
- 
- org.pepstock.charba.client.callbacks.ChartContext
- 
- org.pepstock.charba.client.callbacks.AbstractDatasetContext
- 
- org.pepstock.charba.client.labels.LabelsContext
 
 
 
 
- 
 public final class LabelsContext extends AbstractDatasetContext This object is wrapping the native java script object provided byLabelsPlugin.IDplugin when the callback function is called.- Author:
- Andrea "Stock" Stocchero
 
- 
- 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancheckIfPropertyIsValid(Key property)Checks if the key passed as argument is a key already used for other context properties.DataItemgetDataItem()Returns the value for the data set by aDataItem.StringgetLabel()Returns the label for the data set.LabelgetLabelOptions()Returns the label options of plugin.doublegetPercentage()Returns the percentage for the data set.protected booleanisConsistent()Returnstrueif the context is consistent.
 Custom context (the plugin ones) should extend it and check if the context is consistent before invoking the callback.- 
Methods inherited from class org.pepstock.charba.client.callbacks.AbstractDatasetContextgetDataIndex, getDatasetIndex, getDatasetItem, getElement, getMode, isActive
 - 
Methods inherited from class org.pepstock.charba.client.callbacks.ChartContextgetAttribute, getAttribute, getAttribute, getAttribute, getAttributes, getChart, getType, hasAttributes, setAttribute, setAttribute, setAttribute, setAttribute, setAttributes
 - 
Methods inherited from class org.pepstock.charba.client.commons.NativeObjectContainercheckDefaultValuesArgument, 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
 
- 
 
- 
- 
- 
Method Detail- 
getLabelOptionspublic Label getLabelOptions() Returns the label options of plugin.- Returns:
- the label options of the plugin
 
 - 
getLabelpublic String getLabel() Returns the label for the data set.- Returns:
- the label for the data set.
 
 - 
getPercentagepublic double getPercentage() Returns the percentage for the data set.- Returns:
- the percentage for the data set.
 
 - 
getDataItempublic DataItem getDataItem() Returns the value for the data set by aDataItem.- Returns:
- the value for the data set by a DataItem.
 
 - 
isConsistentprotected boolean isConsistent() Description copied from class:ChartContextReturnstrueif the context is consistent.
 Custom context (the plugin ones) should extend it and check if the context is consistent before invoking the callback.- Overrides:
- isConsistentin class- ChartContext
- Returns:
- trueif the context is consistent
 
 - 
checkIfPropertyIsValidprotected boolean checkIfPropertyIsValid(Key property) Description copied from class:ChartContextChecks if the key passed as argument is a key already used for other context properties.- Overrides:
- checkIfPropertyIsValidin class- AbstractDatasetContext
- Parameters:
- property- property to use to store a custom attribute
- Returns:
- trueif the property can be used to store an attribute.
 
 
- 
 
-