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 IsDefaultAction
getAction()
Returns the actions of the toast.List<ToastItemAction>
getActions()
Returns the actions to the toast.Align
getAlign()
Returns the alignment of the toast actions.int
getBorderRadius()
Returns the border radius (in pixels).ClickEventHandler
getClickEventHandler()
Returns the CLICK event hander, if set, otherwisenull
.CloseHandler
getCloseHandler()
Returns the CLOSE hander, if set, otherwisenull
.Img
getIcon()
Returns the icon image set for toast.IsDefaultContentElement
getLabel()
Returns the label of the toast.OpenHandler
getOpenHandler()
Returns the OPEN hander, if set, otherwisenull
.int
getProgressBarHeight()
Returns the height (in pixels) of the toast progress bar.IsProgressBarType
getProgressBarType()
Returns the type of the toast progress bar.int
getTimeout()
Returns how long the toast notification should last.IsDefaultContentElement
getTitle()
Returns the title of the toast.IsToastType
getType()
Returns the type of the toast.boolean
isAutoHide()
Returns whether to make the toast notification sticky, which means that the toast notification will never auto dismiss until clicked.boolean
isHideProgressBar()
Returnstrue
whether to hide the progress bar.boolean
isHideShadow()
Returnstrue
whether 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:
getTitle
in interfaceIsDefaultToastOptions
- Returns:
- the title of the toast
-
getLabel
public IsDefaultContentElement getLabel()
Returns the label of the toast.- Specified by:
getLabel
in interfaceIsDefaultToastOptions
- Returns:
- the label of the toast
-
getAction
public IsDefaultAction getAction()
Returns the actions of the toast.- Specified by:
getAction
in 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:
getType
in interfaceIsDefaultToastOptions
- Returns:
- the type of the toast
-
getProgressBarType
public IsProgressBarType getProgressBarType()
Returns the type of the toast progress bar.- Specified by:
getProgressBarType
in 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:
getProgressBarHeight
in interfaceIsDefaultToastOptions
- Returns:
- the height (in pixels) of the toast progress bar
-
isHideProgressBar
public boolean isHideProgressBar()
Returnstrue
whether to hide the progress bar.- Specified by:
isHideProgressBar
in interfaceIsDefaultToastOptions
- Returns:
true
whether to hide the progress bar
-
isHideShadow
public boolean isHideShadow()
Returnstrue
whether to hide the shadow of toast.- Specified by:
isHideShadow
in interfaceIsDefaultToastOptions
- Returns:
true
whether 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:
isAutoHide
in 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:
getTimeout
in interfaceIsDefaultToastOptions
- Returns:
- how long the toast notification should last
-
getIcon
public Img getIcon()
Returns the icon image set for toast.- Specified by:
getIcon
in interfaceIsDefaultToastOptions
- Returns:
- the icon image set for toast
-
getBorderRadius
public int getBorderRadius()
Returns the border radius (in pixels).- Specified by:
getBorderRadius
in interfaceIsDefaultToastOptions
- Returns:
- the border radius (in pixels).
-
getAlign
public Align getAlign()
Returns the alignment of the toast actions.- Specified by:
getAlign
in interfaceIsDefaultToastOptions
- Returns:
- the alignment of the toast actions
-
-