public final class ToastOptions extends AbstractNode
Constructor and Description |
---|
ToastOptions()
Creates the object with an empty configuration instance.
|
Modifier and Type | Method and Description |
---|---|
Action |
getAction()
Returns the actions element.
|
List<ActionItem> |
getActions()
Returns the actions to the toast.
|
Align |
getAlign()
Returns the alignment of the toast action.
|
int |
getBorderRadius()
Returns the border radius (in pixels).
|
ClickEventHandler |
getClickEventHandler()
Returns the CLICK event hander, if set, otherwise
null . |
CloseHandler |
getCloseHandler()
Returns the CLOSE hander, if set, otherwise
null . |
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.
|
OpenHandler |
getOpenHandler()
Returns the OPEN hander, if set, otherwise
null . |
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()
Returns
true whether to hide the progress bar. |
boolean |
isHideShadow()
Returns
true whether to hide the shadow of toast. |
void |
setActions(ActionItem... actions)
Sets the actions to the toast.
|
void |
setActions(List<ActionItem> actions)
Sets the actions to the 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 |
setClickEventHandler(ClickEventHandler clickEventHandler)
Sets the CLICK event hander.
|
void |
setCloseHandler(CloseHandler closeHandler)
Sets the CLOSE hander.
|
void |
setHideProgressBar(boolean hide)
Sets
true whether to hide the progress bar. |
void |
setHideShadow(boolean hide)
Sets
true 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 |
setOpenHandler(OpenHandler openHandler)
Sets the OPEN hander.
|
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.
|
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
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getText
public ToastOptions()
public ClickEventHandler getClickEventHandler()
null
.null
.public void setClickEventHandler(ClickEventHandler clickEventHandler)
clickEventHandler
- the CLICK event hander.public OpenHandler getOpenHandler()
null
.null
.public void setOpenHandler(OpenHandler openHandler)
openHandler
- the OPEN hander.public CloseHandler getCloseHandler()
null
.null
.public void setCloseHandler(CloseHandler closeHandler)
closeHandler
- the CLOSE hander.public void setActions(ActionItem... actions)
actions
- the actions to the toastpublic void setActions(List<ActionItem> actions)
actions
- the actions to the toastpublic List<ActionItem> getActions()
public final Title getTitle()
getTitle
in interface IsDefaultToastOptions
public final Label getLabel()
getLabel
in interface IsDefaultToastOptions
public final Action getAction()
getAction
in interface IsDefaultToastOptions
public final void setType(IsToastType type)
type
- the type of the toastpublic final void setProgressBarType(IsProgressBarType type)
type
- the type of the toast progress barpublic final void setProgressBarHeight(int height)
height
- the height (in pixels) of the toast progress barpublic final void setHideProgressBar(boolean hide)
true
whether to hide the progress bar.hide
- true
whether to hide the progress barpublic final void setHideShadow(boolean hide)
true
whether to hide the shadow of toast.hide
- true
whether the shadow of toastpublic final void setAutoHide(boolean hide)
hide
- whether to make the toast notification sticky, which means that the toast notification will never auto dismiss until clickedpublic final void setTimeout(int timeout)
timeout
- how long the toast notification should lastpublic final void setIcon(Img icon)
icon
- the icon image set for toastpublic final void setBorderRadius(int borderRadius)
borderRadius
- the border radius (in pixels) of toast containerpublic final void setModifierKey(ModifierKey modifierKey)
modifierKey
- the modifier key to close the toast by clicking on itpublic final void setAlign(Align align)
align
- the alignment of the toast actionpublic final IsToastType getType()
getType
in interface IsDefaultToastOptions
public final IsProgressBarType getProgressBarType()
getProgressBarType
in interface IsDefaultToastOptions
public final int getProgressBarHeight()
getProgressBarHeight
in interface IsDefaultToastOptions
public final boolean isHideProgressBar()
true
whether to hide the progress bar.isHideProgressBar
in interface IsDefaultToastOptions
true
whether to hide the progress barpublic final boolean isHideShadow()
true
whether to hide the shadow of toast.isHideShadow
in interface IsDefaultToastOptions
true
whether to hide the shadow of toastpublic final boolean isAutoHide()
isAutoHide
in interface IsDefaultToastOptions
public final int getTimeout()
getTimeout
in interface IsDefaultToastOptions
public final Img getIcon()
getIcon
in interface IsDefaultToastOptions
public int getBorderRadius()
getBorderRadius
in interface IsDefaultToastOptions
public ModifierKey getModifierKey()
getModifierKey
in interface IsDefaultToastOptions
public final Align getAlign()
getAlign
in interface IsDefaultToastOptions