Class AbstractElement<D extends IsDefaultOptionsElement>
- java.lang.Object
-
- org.pepstock.charba.client.commons.NativeObjectContainer
-
- org.pepstock.charba.client.commons.AbstractNode
-
- org.pepstock.charba.client.options.AbstractModel<Elements,D>
-
- org.pepstock.charba.client.options.AbstractElement<D>
-
- Type Parameters:
D
- defaults provider class
public abstract class AbstractElement<D extends IsDefaultOptionsElement> extends AbstractModel<Elements,D>
Options can be configured for four different types of elements: arc, lines, points, and bars.
When set, these options apply to all objects of that type unless specifically overridden by the configuration attached to a dataset.- Author:
- Andrea "Stock" Stocchero
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IsColor
getBackgroundColor()
Returns the background color.String
getBackgroundColorAsString()
Returns the background color.IsColor
getBorderColor()
Returns the border color.String
getBorderColorAsString()
Returns the border color.int
getBorderWidth()
Returns the border width.IsColor
getHoverBackgroundColor()
Returns the background color when hovered.String
getHoverBackgroundColorAsString()
Returns the background color when hovered.IsColor
getHoverBorderColor()
Returns the border color when hovered.String
getHoverBorderColorAsString()
Returns the border color when hovered.int
getHoverBorderWidth()
Returns the border width when hovered.void
setBackgroundColor(String backgroundColor)
Sets the background color.void
setBackgroundColor(IsColor backgroundColor)
Sets the background color.void
setBorderColor(String borderColor)
Sets the border color.void
setBorderColor(IsColor borderColor)
Sets the border color.void
setBorderWidth(int borderWidth)
Sets the border width.void
setHoverBackgroundColor(String backgroundColor)
Sets the background color when hovered.void
setHoverBackgroundColor(IsColor backgroundColor)
Sets the background color when hovered.void
setHoverBorderColor(String borderColor)
Sets the border color when hovered.void
setHoverBorderColor(IsColor borderColor)
Sets the border color when hovered.void
setHoverBorderWidth(int borderWidth)
Sets the border width when hovered.-
Methods inherited from class org.pepstock.charba.client.options.AbstractModel
getDefaultValues, getParent, loadPadding, setCallbackToModel, setCallbackToModel, setEventToModel
-
Methods inherited from class org.pepstock.charba.client.commons.AbstractNode
checkAndAddToParent, getChildKey, getParentNode, getRootNode, getUpdateListener, retrieveRoot, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setElementAndAddToParent, setInternalCallbackToModel, setInternalCallbackToModel, setUpdateListener, 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
checkAndGetColor, 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, 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
-
setBackgroundColor
public final void setBackgroundColor(IsColor backgroundColor)
Sets the background color.- Parameters:
backgroundColor
- the background color.
-
setBackgroundColor
public final void setBackgroundColor(String backgroundColor)
Sets the background color.- Parameters:
backgroundColor
- the background color.
-
getBackgroundColorAsString
public final String getBackgroundColorAsString()
Returns the background color.- Returns:
- the background color.
-
getBackgroundColor
public final IsColor getBackgroundColor()
Returns the background color.- Returns:
- the background color.
-
setBorderWidth
public final void setBorderWidth(int borderWidth)
Sets the border width.- Parameters:
borderWidth
- the border width.
-
getBorderWidth
public final int getBorderWidth()
Returns the border width.- Returns:
- the border width.
-
setBorderColor
public final void setBorderColor(IsColor borderColor)
Sets the border color.- Parameters:
borderColor
- the border color.
-
setBorderColor
public final void setBorderColor(String borderColor)
Sets the border color.- Parameters:
borderColor
- the border color.
-
getBorderColorAsString
public final String getBorderColorAsString()
Returns the border color.- Returns:
- the border color.
-
getBorderColor
public final IsColor getBorderColor()
Returns the border color.- Returns:
- the border color.
-
setHoverBackgroundColor
public final void setHoverBackgroundColor(IsColor backgroundColor)
Sets the background color when hovered.- Parameters:
backgroundColor
- the background color when hovered.
-
setHoverBackgroundColor
public final void setHoverBackgroundColor(String backgroundColor)
Sets the background color when hovered.- Parameters:
backgroundColor
- the background color when hovered.
-
getHoverBackgroundColorAsString
public final String getHoverBackgroundColorAsString()
Returns the background color when hovered.- Returns:
- the background color when hovered.
-
getHoverBackgroundColor
public final IsColor getHoverBackgroundColor()
Returns the background color when hovered.- Returns:
- the background color when hovered.
-
setHoverBorderWidth
public final void setHoverBorderWidth(int borderWidth)
Sets the border width when hovered.- Parameters:
borderWidth
- the border width when hovered.
-
getHoverBorderWidth
public final int getHoverBorderWidth()
Returns the border width when hovered.- Returns:
- the border width when hovered.
-
setHoverBorderColor
public final void setHoverBorderColor(IsColor borderColor)
Sets the border color when hovered.- Parameters:
borderColor
- the border color when hovered.
-
setHoverBorderColor
public final void setHoverBorderColor(String borderColor)
Sets the border color when hovered.- Parameters:
borderColor
- the border color when hovered.
-
getHoverBorderColorAsString
public final String getHoverBorderColorAsString()
Returns the border color when hovered.- Returns:
- the border color when hovered.
-
getHoverBorderColor
public final IsColor getHoverBorderColor()
Returns the border color when hovered.- Returns:
- the border color when hovered.
-
-