Class Action
- java.lang.Object
-
- org.pepstock.charba.client.commons.NativeObjectContainer
-
- org.pepstock.charba.client.commons.AbstractNode
-
- org.pepstock.charba.client.utils.toast.Action
-
- All Implemented Interfaces:
IsDefaultFontContainer,HasFont,IsDefaultAction,IsDefaultContentElement
- Direct Known Subclasses:
ActionItem
public class Action extends AbstractNode implements IsDefaultAction
Configures style of the toast actions.- 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.intgetBorderRadius()Returns the border radius (in pixels).BorderStylegetBorderStyle()Returns the border style for the action element.intgetBorderWidth()Returns the border width.StringgetColorAsString()Returns the font color as string.FontContainergetFontContainer()Returns a font container instance to use in the default methods of this interface.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.voidsetBorderRadius(int borderRadius)Sets the border radius (in pixels) of toast action.voidsetBorderStyle(BorderStyle style)Sets the border style for the action element.voidsetBorderWidth(int borderWidth)Sets the border width.-
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.HasFont
getColor, getFont, setColor, setColor
-
Methods inherited from interface org.pepstock.charba.client.utils.toast.IsDefaultContentElement
getColorAsString
-
-
-
-
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.- Specified by:
getBackgroundColorAsStringin interfaceIsDefaultAction- 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.- Specified by:
getBorderWidthin interfaceIsDefaultAction- 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.- Specified by:
getBorderColorAsStringin interfaceIsDefaultAction- Returns:
- the border color.
-
getBorderColor
public final IsColor getBorderColor()
Returns the border color.- Returns:
- the border color.
-
setBorderRadius
public final void setBorderRadius(int borderRadius)
Sets the border radius (in pixels) of toast action.- Parameters:
borderRadius- the border radius (in pixels) of toast action
-
getBorderRadius
public final int getBorderRadius()
Returns the border radius (in pixels).- Specified by:
getBorderRadiusin interfaceIsDefaultAction- Returns:
- the border radius (in pixels).
-
setBorderStyle
public final void setBorderStyle(BorderStyle style)
Sets the border style for the action element.- Parameters:
style- the border style for the action element.
-
getBorderStyle
public final BorderStyle getBorderStyle()
Returns the border style for the action element.- Specified by:
getBorderStylein interfaceIsDefaultAction- Returns:
- the border style for the action element
-
getFontContainer
public final FontContainer getFontContainer()
Description copied from interface:HasFontReturns a font container instance to use in the default methods of this interface.- Specified by:
getFontContainerin interfaceHasFont- Returns:
- a font container instance
-
getColorAsString
public String getColorAsString()
Description copied from interface:IsDefaultFontContainerReturns the font color as string.- Specified by:
getColorAsStringin interfaceHasFont- Specified by:
getColorAsStringin interfaceIsDefaultContentElement- Specified by:
getColorAsStringin interfaceIsDefaultFontContainer- Returns:
- font color as string
-
-