Class ToastItemOptions
- java.lang.Object
-
- org.pepstock.charba.client.utils.toast.ToastItemOptions
-
- All Implemented Interfaces:
IsDefaultToastOptions
public final class ToastItemOptions extends Object implements IsDefaultToastOptions
Wrapper ofToastOptions, used byToastItem, which exposes all "get" methods in order to be immutable.- Author:
- Andrea "Stock" Stocchero
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IsDefaultActiongetAction()Returns the actions of the toast.List<ToastItemAction>getActions()Returns the actions to the toast.AligngetAlign()Returns the alignment of the toast actions.intgetBorderRadius()Returns the border radius (in pixels).ClickEventHandlergetClickEventHandler()Returns the CLICK event hander, if set, otherwisenull.CloseHandlergetCloseHandler()Returns the CLOSE hander, if set, otherwisenull.ImggetIcon()Returns the icon image set for toast.IsDefaultContentElementgetLabel()Returns the label of the toast.OpenHandlergetOpenHandler()Returns the OPEN hander, if set, otherwisenull.intgetProgressBarHeight()Returns the height (in pixels) of the toast progress bar.IsProgressBarTypegetProgressBarType()Returns the type of the toast progress bar.intgetTimeout()Returns how long the toast notification should last.IsDefaultContentElementgetTitle()Returns the title of the toast.IsToastTypegetType()Returns the type of the toast.booleanisAutoHide()Returns whether to make the toast notification sticky, which means that the toast notification will never auto dismiss until clicked.booleanisHideProgressBar()Returnstruewhether to hide the progress bar.booleanisHideShadow()Returnstruewhether to hide the shadow of toast.-
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.utils.toast.IsDefaultToastOptions
getModifierKey, getText
-
-
-
-
Method Detail
-
getClickEventHandler
public ClickEventHandler getClickEventHandler()
Returns the CLICK event hander, if set, otherwisenull.- Returns:
- the CLICK event hander, if set, otherwise
null.
-
getOpenHandler
public OpenHandler getOpenHandler()
Returns the OPEN hander, if set, otherwisenull.- Returns:
- the OPEN hander, if set, otherwise
null.
-
getCloseHandler
public CloseHandler getCloseHandler()
Returns the CLOSE hander, if set, otherwisenull.- Returns:
- the CLOSE hander, if set, otherwise
null.
-
getTitle
public IsDefaultContentElement getTitle()
Returns the title of the toast.- Specified by:
getTitlein interfaceIsDefaultToastOptions- Returns:
- the title of the toast
-
getLabel
public IsDefaultContentElement getLabel()
Returns the label of the toast.- Specified by:
getLabelin interfaceIsDefaultToastOptions- Returns:
- the label of the toast
-
getAction
public IsDefaultAction getAction()
Returns the actions of the toast.- Specified by:
getActionin interfaceIsDefaultToastOptions- Returns:
- the actions of the toast
-
getActions
public List<ToastItemAction> getActions()
Returns the actions to the toast.- Returns:
- the actions to the toast.
-
getType
public IsToastType getType()
Returns the type of the toast.- Specified by:
getTypein interfaceIsDefaultToastOptions- Returns:
- the type of the toast
-
getProgressBarType
public IsProgressBarType getProgressBarType()
Returns the type of the toast progress bar.- Specified by:
getProgressBarTypein interfaceIsDefaultToastOptions- Returns:
- the type of the toast progress bar
-
getProgressBarHeight
public int getProgressBarHeight()
Returns the height (in pixels) of the toast progress bar.- Specified by:
getProgressBarHeightin interfaceIsDefaultToastOptions- Returns:
- the height (in pixels) of the toast progress bar
-
isHideProgressBar
public boolean isHideProgressBar()
Returnstruewhether to hide the progress bar.- Specified by:
isHideProgressBarin interfaceIsDefaultToastOptions- Returns:
truewhether to hide the progress bar
-
isHideShadow
public boolean isHideShadow()
Returnstruewhether to hide the shadow of toast.- Specified by:
isHideShadowin interfaceIsDefaultToastOptions- Returns:
truewhether to hide the shadow of toast
-
isAutoHide
public boolean isAutoHide()
Returns whether to make the toast notification sticky, which means that the toast notification will never auto dismiss until clicked.- Specified by:
isAutoHidein interfaceIsDefaultToastOptions- Returns:
- whether to make the toast notification sticky, which means that the toast notification will never auto dismiss until clicked
-
getTimeout
public int getTimeout()
Returns how long the toast notification should last.- Specified by:
getTimeoutin interfaceIsDefaultToastOptions- Returns:
- how long the toast notification should last
-
getIcon
public Img getIcon()
Returns the icon image set for toast.- Specified by:
getIconin interfaceIsDefaultToastOptions- Returns:
- the icon image set for toast
-
getBorderRadius
public int getBorderRadius()
Returns the border radius (in pixels).- Specified by:
getBorderRadiusin interfaceIsDefaultToastOptions- Returns:
- the border radius (in pixels).
-
getAlign
public Align getAlign()
Returns the alignment of the toast actions.- Specified by:
getAlignin interfaceIsDefaultToastOptions- Returns:
- the alignment of the toast actions
-
-