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 IsColorgetBackgroundColor()Returns the background color.StringgetBackgroundColorAsString()Returns the background color.IsColorgetBorderColor()Returns the border color.StringgetBorderColorAsString()Returns the border color.intgetBorderWidth()Returns the border width.IsColorgetHoverBackgroundColor()Returns the background color when hovered.StringgetHoverBackgroundColorAsString()Returns the background color when hovered.IsColorgetHoverBorderColor()Returns the border color when hovered.StringgetHoverBorderColorAsString()Returns the border color when hovered.intgetHoverBorderWidth()Returns the border width when hovered.voidsetBackgroundColor(String backgroundColor)Sets the background color.voidsetBackgroundColor(IsColor backgroundColor)Sets the background color.voidsetBorderColor(String borderColor)Sets the border color.voidsetBorderColor(IsColor borderColor)Sets the border color.voidsetBorderWidth(int borderWidth)Sets the border width.voidsetHoverBackgroundColor(String backgroundColor)Sets the background color when hovered.voidsetHoverBackgroundColor(IsColor backgroundColor)Sets the background color when hovered.voidsetHoverBorderColor(String borderColor)Sets the border color when hovered.voidsetHoverBorderColor(IsColor borderColor)Sets the border color when hovered.voidsetHoverBorderWidth(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, 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
-
-
-
-
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.
-
-