Class DefaultToastOptions
- java.lang.Object
-
- org.pepstock.charba.client.commons.NativeObjectContainer
-
- org.pepstock.charba.client.commons.AbstractNode
-
- org.pepstock.charba.client.utils.toast.DefaultToastOptions
-
- All Implemented Interfaces:
IsDefaultToastOptions
public final class DefaultToastOptions extends AbstractNode
Provides the defaults of the toast options.- Author:
- Andrea "Stock" Stocchero
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Action
getAction()
Returns the actions element.Align
getAlign()
Returns the alignment of the toast action.int
getBorderRadius()
Returns the border radius (in pixels).Img
getIcon()
Returns the icon image set for toast.Label
getLabel()
Returns the label element.ModifierKey
getModifierKey()
Returns the modifier key to close the toast by clicking on it.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.Title
getTitle()
Returns the title element.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.void
setAlign(Align align)
Sets the alignment of the toast action.void
setAutoHide(boolean hide)
Sets whether to make the toast notification sticky, which means that the toast notification will never auto dismiss until clicked.void
setBorderRadius(int borderRadius)
Sets the border radius (in pixels) of toast container.void
setHideProgressBar(boolean hide)
Setstrue
whether to hide the progress bar.void
setHideShadow(boolean hide)
Setstrue
whether to hide the shadow of toast.void
setIcon(Img icon)
Sets the icon image set for toast.void
setModifierKey(ModifierKey modifierKey)
Sets the modifier key to close the toast by clicking on it.void
setProgressBarHeight(int height)
Sets the height (in pixels) of the toast progress bar.void
setProgressBarType(IsProgressBarType type)
Sets the type of the toast progress bar.void
setTimeout(int timeout)
Sets how long the toast notification should last.void
setType(IsToastType type)
Sets the type of the toast.-
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, 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, 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.utils.toast.IsDefaultToastOptions
getText
-
-
-
-
Method Detail
-
getTitle
public final Title getTitle()
Returns the title element.- Specified by:
getTitle
in interfaceIsDefaultToastOptions
- Returns:
- the title
-
getLabel
public final Label getLabel()
Returns the label element.- Specified by:
getLabel
in interfaceIsDefaultToastOptions
- Returns:
- the label
-
getAction
public final Action getAction()
Returns the actions element.- Specified by:
getAction
in interfaceIsDefaultToastOptions
- Returns:
- the actions
-
setType
public final void setType(IsToastType type)
Sets the type of the toast.- Parameters:
type
- the type of the toast
-
setProgressBarType
public final void setProgressBarType(IsProgressBarType type)
Sets the type of the toast progress bar.- Parameters:
type
- the type of the toast progress bar
-
setProgressBarHeight
public final void setProgressBarHeight(int height)
Sets the height (in pixels) of the toast progress bar.- Parameters:
height
- the height (in pixels) of the toast progress bar
-
setHideProgressBar
public final void setHideProgressBar(boolean hide)
Setstrue
whether to hide the progress bar.- Parameters:
hide
-true
whether to hide the progress bar
-
setHideShadow
public final void setHideShadow(boolean hide)
Setstrue
whether to hide the shadow of toast.- Parameters:
hide
-true
whether the shadow of toast
-
setAutoHide
public final void setAutoHide(boolean hide)
Sets whether to make the toast notification sticky, which means that the toast notification will never auto dismiss until clicked.- Parameters:
hide
- whether to make the toast notification sticky, which means that the toast notification will never auto dismiss until clicked
-
setTimeout
public final void setTimeout(int timeout)
Sets how long the toast notification should last.- Parameters:
timeout
- how long the toast notification should last
-
setIcon
public final void setIcon(Img icon)
Sets the icon image set for toast.- Parameters:
icon
- the icon image set for toast
-
setBorderRadius
public final void setBorderRadius(int borderRadius)
Sets the border radius (in pixels) of toast container.- Parameters:
borderRadius
- the border radius (in pixels) of toast container
-
setModifierKey
public final void setModifierKey(ModifierKey modifierKey)
Sets the modifier key to close the toast by clicking on it.- Parameters:
modifierKey
- the modifier key to close the toast by clicking on it
-
setAlign
public final void setAlign(Align align)
Sets the alignment of the toast action.- Parameters:
align
- the alignment of the toast action
-
getType
public final IsToastType getType()
Returns the type of the toast.- Specified by:
getType
in interfaceIsDefaultToastOptions
- Returns:
- the type of the toast
-
getProgressBarType
public final 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 final 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 final boolean isHideProgressBar()
Returnstrue
whether to hide the progress bar.- Specified by:
isHideProgressBar
in interfaceIsDefaultToastOptions
- Returns:
true
whether to hide the progress bar
-
isHideShadow
public final 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 final 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 final 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 final 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).
-
getModifierKey
public ModifierKey getModifierKey()
Returns the modifier key to close the toast by clicking on it.- Specified by:
getModifierKey
in interfaceIsDefaultToastOptions
- Returns:
- the modifier key to close the toast by clicking on it
-
getAlign
public final Align getAlign()
Returns the alignment of the toast action.- Specified by:
getAlign
in interfaceIsDefaultToastOptions
- Returns:
- the alignment of the toast action
-
-