Class ActionItem
- java.lang.Object
- 
- org.pepstock.charba.client.commons.NativeObjectContainer
- 
- org.pepstock.charba.client.commons.AbstractNode
- 
- org.pepstock.charba.client.utils.toast.Action
- 
- org.pepstock.charba.client.utils.toast.ActionItem
 
 
 
 
- 
- All Implemented Interfaces:
- IsDefaultFontContainer,- HasFont,- IsDefaultAction,- IsDefaultContentElement
 
 public final class ActionItem extends Action Defines user action to show on a toast in order to enable the user to act with the toast.- Author:
- Andrea "Stock" Stocchero
 
- 
- 
Constructor SummaryConstructors Constructor Description ActionItem(String id, String content, ActionClickEventHandler handler)Creates the action with the id of the action, the content to show on the toast and the handler to invoke when the user will click on the action.ActionItem(String content, ActionClickEventHandler handler)Creates the action with the content to show on the toast and the handler to invoke when the user will click on the action.
 The id of the action has been created automatically.ActionItem(Key id, String content, ActionClickEventHandler handler)Creates the action with the id of the action, the content to show on the toast and the handler to invoke when the user will click on the action.ActionItem(Key id, ActionClickEventHandler handler)Creates the action with the id of the toast and the handler to invoke when the user will click on the action.
 The content is the value of the id.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)ActionClickEventHandlergetClickEventHandler()Returns the action click event handler instance.StringgetColorAsString()Returns the font color as string.StringgetContent()Returns the content to show in the toast.FontContainergetFontContainer()Returns a font container instance to use in the default methods of this interface.KeygetId()Returns the action unique id.inthashCode()- 
Methods inherited from class org.pepstock.charba.client.utils.toast.ActiongetBackgroundColor, getBackgroundColorAsString, getBorderColor, getBorderColorAsString, getBorderRadius, getBorderStyle, getBorderWidth, setBackgroundColor, setBackgroundColor, setBorderColor, setBorderColor, setBorderRadius, setBorderStyle, setBorderWidth
 - 
Methods inherited from class org.pepstock.charba.client.commons.AbstractNodecheckAndAddToParent, 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.NativeObjectContainercheckAndGetColor, 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.Objectclone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.pepstock.charba.client.options.HasFontgetColor, getFont, setColor, setColor
 - 
Methods inherited from interface org.pepstock.charba.client.utils.toast.IsDefaultContentElementgetColorAsString
 
- 
 
- 
- 
- 
Constructor Detail- 
ActionItempublic ActionItem(Key id, ActionClickEventHandler handler) Creates the action with the id of the toast and the handler to invoke when the user will click on the action.
 The content is the value of the id.- Parameters:
- id- id of the toast
- handler- the handler to use when a click was performed on the toast
 
 - 
ActionItempublic ActionItem(String content, ActionClickEventHandler handler) Creates the action with the content to show on the toast and the handler to invoke when the user will click on the action.
 The id of the action has been created automatically.- Parameters:
- content- content to show on the toast
- handler- the handler to use when a click was performed on the toast
 
 - 
ActionItempublic ActionItem(String id, String content, ActionClickEventHandler handler) Creates the action with the id of the action, the content to show on the toast and the handler to invoke when the user will click on the action.- Parameters:
- id- id of the action
- content- content to show on the toast
- handler- the handler to use when a click was performed on the toast
 
 - 
ActionItempublic ActionItem(Key id, String content, ActionClickEventHandler handler) Creates the action with the id of the action, the content to show on the toast and the handler to invoke when the user will click on the action.- Parameters:
- id- id of the action
- content- content to show on the toast
- handler- the handler to use when a click was performed on the toast
 
 
- 
 - 
Method Detail- 
getIdpublic Key getId() Returns the action unique id.- Returns:
- the action unique id
 
 - 
getContentpublic String getContent() Returns the content to show in the toast.- Returns:
- the content to show in the toast
 
 - 
getClickEventHandlerpublic ActionClickEventHandler getClickEventHandler() Returns the action click event handler instance.- Returns:
- the action click event handler instance
 
 - 
getFontContainerpublic final FontContainer getFontContainer() Description copied from interface:HasFontReturns a font container instance to use in the default methods of this interface.- Specified by:
- getFontContainerin interface- HasFont
- Returns:
- a font container instance
 
 - 
getColorAsStringpublic String getColorAsString() Description copied from interface:IsDefaultFontContainerReturns the font color as string.- Specified by:
- getColorAsStringin interface- HasFont
- Specified by:
- getColorAsStringin interface- IsDefaultContentElement
- Specified by:
- getColorAsStringin interface- IsDefaultFontContainer
- Returns:
- font color as string
 
 
- 
 
-