Class ChartBackgroundColorOptions
- 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.ChartBackgroundColorOptions
-
public final class ChartBackgroundColorOptions extends AbstractPluginOptions
Configuration options ofChartBackgroundColor.ID
plugin.- Author:
- Andrea "Stock" Stocchero
-
-
Constructor Summary
Constructors Constructor Description ChartBackgroundColorOptions()
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.ChartBackgroundColorOptions(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 Modifier and Type Method Description IsColor
getBackgroundColor()
Returns the background color.
If it has been set a gradient or pattern, returnsnull
, otherwise the default color, "white".Gradient
getBackgroundColorAsGradient()
Returns the background gradient.Pattern
getBackgroundColorAsPattern()
Returns the background pattern.
If it has been set a color or gradient, returnsnull
.String
getBackgroundColorAsString()
Returns the background color.
If it has been set a gradient or pattern, returnsnull
, otherwise the default color, "white".ColorType
getColorType()
Returns the type of background color has been set.GlobalCompositeOperation
getGlobalCompositeOperation()
Returns the type of compositing operation to apply when drawing new shapes.void
setBackgroundColor(String color)
Sets the background color.void
setBackgroundColor(Gradient gradient)
Sets the background gradient.void
setBackgroundColor(IsColor color)
Sets the background color.void
setBackgroundColor(Pattern pattern)
Sets the background pattern.void
setGlobalCompositeOperation(GlobalCompositeOperation globalCompositeOperation)
Sets the type of compositing operation to apply when drawing new shapes.-
Methods inherited from class org.pepstock.charba.client.plugins.AbstractPluginOptions
applyingDefaults, applyingDefaults, getEvents, getId, getPluginId, loadGlobalsPluginOptions, setEvents, setEvents, 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, 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
-
-
-
-
Constructor Detail
-
ChartBackgroundColorOptions
public ChartBackgroundColorOptions()
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.
-
ChartBackgroundColorOptions
public ChartBackgroundColorOptions(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 instance related to the plugin options
-
-
Method Detail
-
getColorType
public ColorType getColorType()
Returns the type of background color has been set.- Returns:
- the type of background color has been set.
-
getBackgroundColorAsString
public String getBackgroundColorAsString()
Returns the background color.
If it has been set a gradient or pattern, returnsnull
, otherwise the default color, "white".- Returns:
- the background color.
If it has been set a gradient or pattern, returnsnull
, otherwise the default color, "white".
-
getBackgroundColor
public IsColor getBackgroundColor()
Returns the background color.
If it has been set a gradient or pattern, returnsnull
, otherwise the default color, "white".- Returns:
- the background color.
If it has been set a gradient or pattern, returnsnull
, otherwise the default color, "white".
-
getBackgroundColorAsGradient
public Gradient getBackgroundColorAsGradient()
Returns the background gradient.
If it has been set a color or pattern, returnsnull
.- Returns:
- the background gradient.
If it has been set a color or pattern, returnsnull
-
getBackgroundColorAsPattern
public Pattern getBackgroundColorAsPattern()
Returns the background pattern.
If it has been set a color or gradient, returnsnull
.- Returns:
- the background pattern.
If it has been set a color or pattern, returnsnull
-
setBackgroundColor
public void setBackgroundColor(String color)
Sets the background color.- Parameters:
color
- the background color.
-
setBackgroundColor
public void setBackgroundColor(IsColor color)
Sets the background color.- Parameters:
color
- the background color.
-
setBackgroundColor
public void setBackgroundColor(Gradient gradient)
Sets the background gradient.- Parameters:
gradient
- the background gradient.
-
setBackgroundColor
public void setBackgroundColor(Pattern pattern)
Sets the background pattern.- Parameters:
pattern
- the background pattern.
-
setGlobalCompositeOperation
public void setGlobalCompositeOperation(GlobalCompositeOperation globalCompositeOperation)
Sets the type of compositing operation to apply when drawing new shapes.- Parameters:
globalCompositeOperation
- which of the compositing or blending mode operations to use
-
getGlobalCompositeOperation
public GlobalCompositeOperation getGlobalCompositeOperation()
Returns the type of compositing operation to apply when drawing new shapes.- Returns:
- which of the compositing or blending mode operations to use
-
-