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
getAreaBackgroundColor()
Returns the area background color.
If it has been set a gradient or pattern, returnsnull
, otherwise the default color.Gradient
getAreaBackgroundColorAsGradient()
Returns the area background gradient.Pattern
getAreaBackgroundColorAsPattern()
Returns the area background pattern.
If it has been set a color or gradient, returnsnull
.String
getAreaBackgroundColorAsString()
Returns the area background color.
If it has been set a gradient or pattern, returnsnull
, otherwise the default color, "transparent".ColorType
getAreaColorType()
Returns the type of background color has been set.IsColor
getBackgroundColor()
Returns the background color.
If it has been set a gradient or pattern, returnsnull
, otherwise the default color.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.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
setAreaBackgroundColor(String color)
Sets the area background color.void
setAreaBackgroundColor(Gradient gradient)
Sets the area background gradient.void
setAreaBackgroundColor(IsColor color)
Sets the area background color.void
setAreaBackgroundColor(Pattern pattern)
Sets the area background pattern.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.- Returns:
- the background color.
If it has been set a gradient or pattern, returnsnull
, otherwise the default color.
-
getBackgroundColor
public IsColor getBackgroundColor()
Returns the background color.
If it has been set a gradient or pattern, returnsnull
, otherwise the default color.- Returns:
- the background color.
If it has been set a gradient or pattern, returnsnull
, otherwise the default color.
-
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.
-
getAreaColorType
public ColorType getAreaColorType()
Returns the type of background color has been set.- Returns:
- the type of background color has been set.
-
getAreaBackgroundColorAsString
public String getAreaBackgroundColorAsString()
Returns the area background color.
If it has been set a gradient or pattern, returnsnull
, otherwise the default color, "transparent".- Returns:
- the area background color.
If it has been set a gradient or pattern, returnsnull
, otherwise the default color.
-
getAreaBackgroundColor
public IsColor getAreaBackgroundColor()
Returns the area background color.
If it has been set a gradient or pattern, returnsnull
, otherwise the default color.- Returns:
- the area background color.
If it has been set a gradient or pattern, returnsnull
, otherwise the default color.
-
getAreaBackgroundColorAsGradient
public Gradient getAreaBackgroundColorAsGradient()
Returns the area background gradient.
If it has been set a color or pattern, returnsnull
.- Returns:
- the area background gradient.
If it has been set a color or pattern, returnsnull
-
getAreaBackgroundColorAsPattern
public Pattern getAreaBackgroundColorAsPattern()
Returns the area background pattern.
If it has been set a color or gradient, returnsnull
.- Returns:
- the area background pattern.
If it has been set a color or pattern, returnsnull
-
setAreaBackgroundColor
public void setAreaBackgroundColor(String color)
Sets the area background color.- Parameters:
color
- the area background color.
-
setAreaBackgroundColor
public void setAreaBackgroundColor(IsColor color)
Sets the area background color.- Parameters:
color
- the area background color.
-
setAreaBackgroundColor
public void setAreaBackgroundColor(Gradient gradient)
Sets the area background gradient.- Parameters:
gradient
- the area background gradient.
-
setAreaBackgroundColor
public void setAreaBackgroundColor(Pattern pattern)
Sets the area background pattern.- Parameters:
pattern
- the area 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
-
-