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 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
getBorderRadius()
Returns the border radius (in pixels).BorderStyle
getBorderStyle()
Returns the border style for the action element.int
getBorderWidth()
Returns the border width.String
getColorAsString()
Returns the font color as string.FontContainer
getFontContainer()
Returns a font container instance to use in the default methods of this interface.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
setBorderRadius(int borderRadius)
Sets the border radius (in pixels) of toast action.void
setBorderStyle(BorderStyle style)
Sets the border style for the action element.void
setBorderWidth(int borderWidth)
Sets the border width.-
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
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
-
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:
getBackgroundColorAsString
in 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:
getBorderWidth
in 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:
getBorderColorAsString
in 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:
getBorderRadius
in 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:
getBorderStyle
in interfaceIsDefaultAction
- Returns:
- the border style for the action element
-
getFontContainer
public final FontContainer getFontContainer()
Description copied from interface:HasFont
Returns a font container instance to use in the default methods of this interface.- Specified by:
getFontContainer
in interfaceHasFont
- Returns:
- a font container instance
-
getColorAsString
public String getColorAsString()
Description copied from interface:IsDefaultFontContainer
Returns the font color as string.- Specified by:
getColorAsString
in interfaceHasFont
- Specified by:
getColorAsString
in interfaceIsDefaultContentElement
- Specified by:
getColorAsString
in interfaceIsDefaultFontContainer
- Returns:
- font color as string
-
-