Package org.pepstock.charba.client.data
Class HoverFlexDataset
- java.lang.Object
-
- org.pepstock.charba.client.commons.NativeObjectContainer
-
- org.pepstock.charba.client.commons.AbstractNode
-
- org.pepstock.charba.client.data.Dataset
-
- org.pepstock.charba.client.data.HoverFlexDataset
-
- All Implemented Interfaces:
HasCallbackScope
,HasDataset
,IsDefaultAnimationContainer
,IsDefaultAnimationTransition
,HasAnimationOptions
- Direct Known Subclasses:
BarDataset
,HoverDataset
,MatrixDataset
,TreeMapDataset
public abstract class HoverFlexDataset extends Dataset
This dataset is managing some common properties related to background and border colors where every property can be set as a single value or an array.- Author:
- Andrea "Stock" Stocchero
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.pepstock.charba.client.data.Dataset
Dataset.CanvasObjectProperty, Dataset.CommonProperty
-
-
Field Summary
-
Fields inherited from class org.pepstock.charba.client.data.Dataset
DEFAULT_HIDDEN, DEFAULT_NORMALIZED, DEFAULT_PARSING
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
HoverFlexDataset(Type type, IsDefaultOptions defaultValues, boolean hidden)
Creates the dataset using a default and chart type related to the dataset.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<IsColor>
getBackgroundColor()
Returns the fill colors of the elements.
If property is missing or not a color, returns an empty list.List<Gradient>
getBackgroundColorAsGradient()
Returns the fill gradient of elements.
If property is missing or not a gradient, returns an empty list.List<Pattern>
getBackgroundColorAsPatterns()
Returns the fill patters of elements.
If property is missing or not a pattern, returns an empty list.List<String>
getBackgroundColorAsString()
Returns the fill colors of the elements.
If property is missing or not a color, returns an empty list.List<IsColor>
getBorderColor()
Returns the color of the bar border.List<Gradient>
getBorderColorAsGradient()
Returns the gradient of the bar border.
If property is missing or not a gradient, returns an empty list.List<String>
getBorderColorAsString()
Returns the color of the bar border.List<Integer>
getBorderWidth()
Returns the stroke width of the bar in pixels.
If a callback has been set, returns an empty list.protected ArrayString
getColors(Key key, String defaultvalue)
Returns an array of colors as string.List<IsColor>
getHoverBackgroundColor()
Returns the fill color of the elements when hovered.
If property is missing or not a color, returns an empty list.List<Gradient>
getHoverBackgroundColorAsGradient()
Returns the fill gradients of elements when hovered.
If property is missing or not a gradient, returns an empty list.List<Pattern>
getHoverBackgroundColorAsPatterns()
Returns the fill patters of elements when hovered.
If property is missing or not a pattern, returns an empty list.List<String>
getHoverBackgroundColorAsString()
Returns the fill color of the elements when hovered.
If property is missing or not a color, returns an empty list.List<IsColor>
getHoverBorderColor()
Returns the stroke color of the elements when hovered.List<Gradient>
getHoverBorderColorAsGradient()
Returns the stroke gradients of the elements when hovered.
If property is missing or not a pattern, returns an empty list.List<String>
getHoverBorderColorAsString()
Returns the stroke color of the elements when hovered.List<Integer>
getHoverBorderWidth()
Returns the stroke width of the elements when hovered.protected ArrayInteger
getWidths(Key key, int defaultvalue)
Returns an array of widths as integervoid
setBackgroundColor(String... backgroundColor)
Sets the fill colors of the elements.void
setBackgroundColor(Gradient... backgroundColor)
Sets the fill gradient of the elements.void
setBackgroundColor(IsColor... backgroundColor)
Sets the fill colors of the elements.void
setBackgroundColor(Pattern... backgroundColor)
Sets the fill pattern of the elements.void
setBorderColor(String... borderColor)
Sets the color of the bar border.void
setBorderColor(Gradient... borderColor)
Sets the gradient of the bar border as gradient.void
setBorderColor(IsColor... borderColor)
Sets the color of the bar border.void
setBorderWidth(int... borderWidth)
Sets the stroke width of the bar in pixels.protected void
setColors(Key key, String... colors)
Sets a color property in the dataset, setting a single value or an array.protected void
setColors(Key key, IsColor... colors)
Sets a color property in the dataset, setting a single value or an array.void
setHoverBackgroundColor(String... colors)
Sets the fill color of the elements when hovered.void
setHoverBackgroundColor(Gradient... colors)
Sets the fill gradient of the elements when hovered.void
setHoverBackgroundColor(IsColor... colors)
Sets the fill color of the elements when hovered.void
setHoverBackgroundColor(Pattern... colors)
Sets the fill pattern of the elements when hovered.void
setHoverBorderColor(String... colors)
Sets the stroke color of the elements when hovered.void
setHoverBorderColor(Gradient... colors)
Sets the stroke gradient of elements when hovered as gradient.void
setHoverBorderColor(IsColor... colors)
Sets the stroke color of the elements when hovered.void
setHoverBorderWidth(int... widths)
Sets the stroke width of the elements when hovered.protected void
setWidths(Key key, int... widths)
Sets a width property in the dataset, setting a single value or an array.-
Methods inherited from class org.pepstock.charba.client.data.Dataset
createContext, getAnimationContainer, getBackgroundColorCallback, getBorderColorCallback, getClip, getClipAsObject, getData, getData, getDataCount, getDataset, getDataType, getDefaultBackgroundColorAsString, getDefaultBorderColorAsString, getDefaultBorderWidth, getDefaultHoverBackgroundColorAsString, getDefaultHoverBorderColorAsString, getDefaultHoverBorderWidth, getDefaultValues, getHoverBackgroundColorCallback, getHoverBorderColorCallback, getId, getLabel, getOptions, getOptions, getScope, getType, getTypedDataset, hasOptions, invokeColorCallback, isClip, isHidden, isNormalized, isParsing, removeOptions, setBackgroundColor, setBackgroundColor, setBorderColor, setBorderColor, setClip, setClip, setClip, setData, setData, setHidden, setHoverBackgroundColor, setHoverBackgroundColor, setHoverBorderColor, setHoverBorderColor, setLabel, setNormalized, setOptions, setOptions, setParsing
-
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
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.pepstock.charba.client.options.HasAnimationOptions
getAnimation, getAnimations, getTransitions, isAnimationEnabled, setAnimationEnabled
-
-
-
-
Constructor Detail
-
HoverFlexDataset
protected HoverFlexDataset(Type type, IsDefaultOptions defaultValues, boolean hidden)
Creates the dataset using a default and chart type related to the dataset.- Parameters:
type
- chart type related to the datasetdefaultValues
- default optionshidden
- iftrue
, it will be initially hidden.
-
-
Method Detail
-
setColors
protected void setColors(Key key, String... colors)
Sets a color property in the dataset, setting a single value or an array.- Parameters:
key
- property keycolors
- colors value to be set
-
setColors
protected void setColors(Key key, IsColor... colors)
Sets a color property in the dataset, setting a single value or an array.- Parameters:
key
- property keycolors
- colors value to be set
-
getColors
protected ArrayString getColors(Key key, String defaultvalue)
Returns an array of colors as string.- Parameters:
key
- property keydefaultvalue
- default value if key does not exist- Returns:
- an array of colors
-
setWidths
protected void setWidths(Key key, int... widths)
Sets a width property in the dataset, setting a single value or an array.- Parameters:
key
- property keywidths
- widths value to be set
-
getWidths
protected ArrayInteger getWidths(Key key, int defaultvalue)
Returns an array of widths as integer- Parameters:
key
- property keydefaultvalue
- default value if key does not exist- Returns:
- an array of widths
-
setBackgroundColor
public void setBackgroundColor(IsColor... backgroundColor)
Sets the fill colors of the elements.- Parameters:
backgroundColor
- the fill colors of the elements.
-
setBackgroundColor
public void setBackgroundColor(String... backgroundColor)
Sets the fill colors of the elements.- Parameters:
backgroundColor
- the fill colors of the elements.
-
setBackgroundColor
public void setBackgroundColor(Pattern... backgroundColor)
Sets the fill pattern of the elements.- Parameters:
backgroundColor
- the fill pattern of element.
-
setBackgroundColor
public void setBackgroundColor(Gradient... backgroundColor)
Sets the fill gradient of the elements.- Parameters:
backgroundColor
- the fill gradient of the elements.
-
getBackgroundColorAsString
public List<String> getBackgroundColorAsString()
Returns the fill colors of the elements.
If property is missing or not a color, returns an empty list.- Returns:
- list of the fill colors of the elements.
If property is missing or not a color, returns an empty list.
-
getBackgroundColor
public List<IsColor> getBackgroundColor()
Returns the fill colors of the elements.
If property is missing or not a color, returns an empty list.- Returns:
- list of the fill colors of the elements.
If property is missing or not a color, returns an empty list.
-
getBackgroundColorAsPatterns
public List<Pattern> getBackgroundColorAsPatterns()
Returns the fill patters of elements.
If property is missing or not a pattern, returns an empty list.- Returns:
- list of the fill patterns of elements.
If property is missing or not a pattern, returns an empty list.
-
getBackgroundColorAsGradient
public List<Gradient> getBackgroundColorAsGradient()
Returns the fill gradient of elements.
If property is missing or not a gradient, returns an empty list.- Returns:
- the fill gradient of elements.
If property is missing or not a gradient, returns an empty list.
-
setBorderColor
public void setBorderColor(IsColor... borderColor)
Sets the color of the bar border.- Parameters:
borderColor
- the color of the bar border
-
setBorderColor
public void setBorderColor(String... borderColor)
Sets the color of the bar border.- Parameters:
borderColor
- the color of the bar border
-
setBorderColor
public void setBorderColor(Gradient... borderColor)
Sets the gradient of the bar border as gradient.- Parameters:
borderColor
- the gradient of the bar border as gradient.
-
getBorderColorAsString
public List<String> getBorderColorAsString()
Returns the color of the bar border.- Returns:
- list of the color of the bar border
-
getBorderColor
public List<IsColor> getBorderColor()
Returns the color of the bar border.- Returns:
- list of the color of the bar border
-
getBorderColorAsGradient
public List<Gradient> getBorderColorAsGradient()
Returns the gradient of the bar border.
If property is missing or not a gradient, returns an empty list.- Returns:
- the gradient of the bar border.
If property is missing or not a gradient, returns an empty list.
-
setBorderWidth
public void setBorderWidth(int... borderWidth)
Sets the stroke width of the bar in pixels.- Parameters:
borderWidth
- the stroke width of the bar in pixels.
-
getBorderWidth
public List<Integer> getBorderWidth()
Returns the stroke width of the bar in pixels.
If a callback has been set, returns an empty list.- Returns:
- list of the stroke width of the bar in pixels.
If a callback has been set, returns an empty list.
-
setHoverBackgroundColor
public void setHoverBackgroundColor(IsColor... colors)
Sets the fill color of the elements when hovered.- Parameters:
colors
- the fill color of the elements when hovered
-
setHoverBackgroundColor
public void setHoverBackgroundColor(String... colors)
Sets the fill color of the elements when hovered.- Parameters:
colors
- the fill color of the elements when hovered
-
setHoverBackgroundColor
public void setHoverBackgroundColor(Pattern... colors)
Sets the fill pattern of the elements when hovered.- Parameters:
colors
- the fill pattern of element when hovered
-
setHoverBackgroundColor
public void setHoverBackgroundColor(Gradient... colors)
Sets the fill gradient of the elements when hovered.- Parameters:
colors
- the fill gradient of the elements when hovered
-
getHoverBackgroundColorAsString
public List<String> getHoverBackgroundColorAsString()
Returns the fill color of the elements when hovered.
If property is missing or not a color, returns an empty list.- Returns:
- list of the fill color of the elements when hovered.
If property is missing or not a color, returns an empty list.
-
getHoverBackgroundColor
public List<IsColor> getHoverBackgroundColor()
Returns the fill color of the elements when hovered.
If property is missing or not a color, returns an empty list.- Returns:
- list of the fill color of the elements when hovered.
If property is missing or not a color, returns an empty list.
-
getHoverBackgroundColorAsPatterns
public List<Pattern> getHoverBackgroundColorAsPatterns()
Returns the fill patters of elements when hovered.
If property is missing or not a pattern, returns an empty list.- Returns:
- list of the fill patterns of elements when hovered.
If property is missing or not a pattern, returns an empty list.
-
getHoverBackgroundColorAsGradient
public List<Gradient> getHoverBackgroundColorAsGradient()
Returns the fill gradients of elements when hovered.
If property is missing or not a gradient, returns an empty list.- Returns:
- list of the fill gradients of elements when hovered.
If property is missing or not a gradient, returns an empty list.
-
setHoverBorderColor
public void setHoverBorderColor(IsColor... colors)
Sets the stroke color of the elements when hovered.- Parameters:
colors
- the stroke color of the elements when hovered
-
setHoverBorderColor
public void setHoverBorderColor(String... colors)
Sets the stroke color of the elements when hovered.- Parameters:
colors
- the stroke color of the elements when hovered
-
setHoverBorderColor
public void setHoverBorderColor(Gradient... colors)
Sets the stroke gradient of elements when hovered as gradient.- Parameters:
colors
- the stroke gradient of elements when hovered as gradient
-
getHoverBorderColorAsString
public List<String> getHoverBorderColorAsString()
Returns the stroke color of the elements when hovered.- Returns:
- list of the stroke color of the elements when hovered
-
getHoverBorderColor
public List<IsColor> getHoverBorderColor()
Returns the stroke color of the elements when hovered.- Returns:
- list of the stroke color of the elements when hovered
-
getHoverBorderColorAsGradient
public List<Gradient> getHoverBorderColorAsGradient()
Returns the stroke gradients of the elements when hovered.
If property is missing or not a pattern, returns an empty list.- Returns:
- list of the stroke gradients of the elements when hovered.
If property is missing or not a pattern, returns an empty list
-
setHoverBorderWidth
public void setHoverBorderWidth(int... widths)
Sets the stroke width of the elements when hovered.- Parameters:
widths
- the stroke width of the elements when hovered
-
-