public final class Toaster extends Object
Modifier and Type | Field and Description |
---|---|
static int |
MAXIMUM_OPEN_ITEMS
Maximum amount of open and shown toasts.
|
Modifier and Type | Method and Description |
---|---|
static Toaster |
get()
Singleton object to get the toaster instance
|
DefaultToastOptions |
getDefaults()
Returns the defaults of toast.
|
List<ToastItem> |
getHistoryItems()
Returns the list of toast items in the history.
|
int |
getMaxHistoryItems()
Returns the maximum amount of toast items you want to maintain in the history.
|
int |
getMaxOpenItems()
Returns the maximum amount of open toast items you want to maintain on DOM.
|
MaximumOpenItemsPolicy |
getMaxOpenItemsPolicy()
Returns the policy to apply when the maximum amount of open items is reached.
|
void |
setMaxHistoryItems(int maxHistoryItems)
Sets the maximum amount of toast items you want to maintain in the history.
|
void |
setMaxOpenItems(int maxOpenItems)
Sets the maximum amount of open toast items you want to maintain on DOM.
Maximum value is . |
void |
setMaxOpenItemsPolicy(MaximumOpenItemsPolicy policy)
Sets the policy to apply when the maximum amount of open items is reached.
|
Status |
show(IsToastType type,
List<String> label)
Creates and shows a toast configured by the passed options.
|
Status |
show(IsToastType type,
String... label)
Creates and shows a toast configured by the passed options.
|
Status |
show(IsToastType type,
String title,
List<String> label)
Creates and shows a toast with title and label.
|
Status |
show(IsToastType type,
String title,
String label)
Creates and shows a toast with title and label.
|
Status |
show(List<String> label)
Creates and shows a toast configured by the passed options.
|
Status |
show(Map<String,Object> context,
IsToastType type,
List<String> label)
Creates and shows a toast configured by the passed options.
|
Status |
show(Map<String,Object> context,
IsToastType type,
String... label)
Creates and shows a toast configured by the passed options.
|
Status |
show(Map<String,Object> context,
IsToastType type,
String title,
List<String> label)
Creates and shows a toast with title and label.
|
Status |
show(Map<String,Object> context,
IsToastType type,
String title,
String label)
Creates and shows a toast with title and label.
|
Status |
show(Map<String,Object> context,
List<String> label)
Creates and shows a toast configured by the passed options.
|
Status |
show(Map<String,Object> context,
String... label)
Creates and shows a toast configured by the passed options.
|
Status |
show(Map<String,Object> context,
String title,
List<String> label)
Creates and shows a toast with title and label.
|
Status |
show(Map<String,Object> context,
String title,
String label)
Creates and shows a toast with title and label.
|
Status |
show(Map<String,Object> context,
ToastOptions options,
List<String> label)
Creates and shows a toast configured by the passed options.
|
Status |
show(Map<String,Object> context,
ToastOptions options,
String... label)
Creates and shows a toast configured by the passed options.
|
Status |
show(Map<String,Object> context,
ToastOptions options,
String title,
List<String> label)
Creates and shows a toast configured by the passed options.
|
Status |
show(Map<String,Object> context,
ToastOptions options,
String title,
String label)
Creates and shows a toast configured by the passed options.
|
Status |
show(String... label)
Creates and shows a toast configured by the passed options.
|
Status |
show(String title,
List<String> label)
Creates and shows a toast with title and label.
|
Status |
show(String title,
String label)
Creates and shows a toast with title and label.
|
Status |
show(ToastOptions options,
List<String> label)
Creates and shows a toast configured by the passed options.
|
Status |
show(ToastOptions options,
String... label)
Creates and shows a toast configured by the passed options.
|
Status |
show(ToastOptions options,
String title,
List<String> label)
Creates and shows a toast configured by the passed options.
|
Status |
show(ToastOptions options,
String title,
String label)
Creates and shows a toast configured by the passed options.
|
public static final int MAXIMUM_OPEN_ITEMS
public static Toaster get()
public DefaultToastOptions getDefaults()
public Status show(String... label)
label
- label of the toastpublic Status show(List<String> label)
label
- label of the toastpublic Status show(IsToastType type, String... label)
type
- type of the toastlabel
- label of the toastpublic Status show(IsToastType type, List<String> label)
type
- type of the toastlabel
- label of the toastpublic Status show(ToastOptions options, String... label)
options
- configuration of the toast to showlabel
- label of the toastpublic Status show(ToastOptions options, List<String> label)
options
- configuration of the toast to showlabel
- label of the toastpublic Status show(String title, String label)
title
- title of the toastlabel
- label of the toastpublic Status show(String title, List<String> label)
title
- title of the toastlabel
- label of the toastpublic Status show(IsToastType type, String title, String label)
type
- type of the toasttitle
- title of the toastlabel
- label of the toastpublic Status show(IsToastType type, String title, List<String> label)
type
- type of the toasttitle
- title of the toastlabel
- label of the toastpublic Status show(ToastOptions options, String title, String label)
options
- configuration of the toast to showtitle
- title of the toastlabel
- label of the toastpublic Status show(ToastOptions options, String title, List<String> label)
options
- configuration of the toast to showtitle
- title of the toastlabel
- label of the toastpublic Status show(Map<String,Object> context, String... label)
context
- context of toast executionlabel
- label of the toastpublic Status show(Map<String,Object> context, List<String> label)
context
- context of toast executionlabel
- label of the toastpublic Status show(Map<String,Object> context, IsToastType type, String... label)
context
- context of toast executiontype
- type of the toastlabel
- label of the toastpublic Status show(Map<String,Object> context, IsToastType type, List<String> label)
context
- context of toast executiontype
- type of the toastlabel
- label of the toastpublic Status show(Map<String,Object> context, ToastOptions options, String... label)
context
- context of toast executionoptions
- configuration of the toast to showlabel
- label of the toastpublic Status show(Map<String,Object> context, ToastOptions options, List<String> label)
context
- context of toast executionoptions
- configuration of the toast to showlabel
- label of the toastpublic Status show(Map<String,Object> context, String title, String label)
context
- context of toast executiontitle
- title of the toastlabel
- label of the toastpublic Status show(Map<String,Object> context, String title, List<String> label)
context
- context of toast executiontitle
- title of the toastlabel
- label of the toastpublic Status show(Map<String,Object> context, IsToastType type, String title, String label)
context
- context of toast executiontype
- type of the toasttitle
- title of the toastlabel
- label of the toastpublic Status show(Map<String,Object> context, IsToastType type, String title, List<String> label)
context
- context of toast executiontype
- type of the toasttitle
- title of the toastlabel
- label of the toastpublic Status show(Map<String,Object> context, ToastOptions options, String title, String label)
context
- context of toast executionoptions
- configuration of the toast to showtitle
- title of the toastlabel
- label of the toastpublic Status show(Map<String,Object> context, ToastOptions options, String title, List<String> label)
context
- context of toast executionoptions
- configuration of the toast to showtitle
- title of the toastlabel
- label of the toastpublic int getMaxHistoryItems()
public void setMaxHistoryItems(int maxHistoryItems)
maxHistoryItems
- the maximum amount of toast items you want to maintain in the historypublic List<ToastItem> getHistoryItems()
public MaximumOpenItemsPolicy getMaxOpenItemsPolicy()
public void setMaxOpenItemsPolicy(MaximumOpenItemsPolicy policy)
policy
- the policy to apply when the maximum amount of open items is reachedpublic int getMaxOpenItems()
public void setMaxOpenItems(int maxOpenItems)
maxOpenItems
- the maximum amount of open toast items you want to maintain on DOM