Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears this status message.
|
Image |
getIcon()
Gets the icon (may be null) that is displayed with this status.
|
ActionListener |
getListener()
Returns the listener added to perform a particular action.
|
String |
getMessage()
Returns the text that will be displayed for this status.
|
String |
getMessageUIID()
Gets the UIID to use for styling the text of this status message.
|
int |
getProgress()
Returns the progress of this status.
|
String |
getUiid()
Gets the UIID that should be used for styling the status component while
this status is displayed.
|
boolean |
isShowProgressIndicator() |
void |
setExpires(int millis)
Directs the status to be cleared (if it isn't already cleared() after a given number of milliseconds.
|
void |
setIcon(Image icon)
Sets the icon that is to be displayed with this status.
|
void |
setListener(ActionListener listener)
Sets the action listener needed to perform an action when the bar is tapped
ToastBar . |
void |
setMessage(String message)
Sets the message that should be displayed in the
ToastBar . |
void |
setMessageUIID(String messageUIID)
Sets the UIID to use for styling the text of this status message.
|
void |
setProgress(int progress)
Sets the progress (-1..100) that should be displayed in the progress bar
for this status.
|
void |
setShowProgressIndicator(boolean showProgressIndicator)
Sets whether this status message should include an infinite progress indicator (e.g.
|
void |
setUiid(String uiid)
Sets the UIID that should be used for styling the status component while
this status is displayed.
|
void |
show()
Shows this status message.
|
void |
showDelayed(int millis)
Schedules this status message to be shown after a specified number of milliseconds,
if it hasn't been cleared or shown first.
|
public void setExpires(int millis)
millis
- The maximum number of milliseconds that the status message should be displayed for.
Helpful for error messages that only need to be displayed for a few seconds.public void setMessage(String message)
ToastBar
.message
- public void setListener(ActionListener listener)
ToastBar
.listener
- public void setProgress(int progress)
progress
- public void show()
If you don't want to show the status immediately, but rather to wait some delay, you can use
the showDelayed(int)
method instead.
showDelayed(int)
public void showDelayed(int millis)
This is handy if you want to show a status for an operation that usually completes very quickly, but could potentially hang. In such a case you might decide not to display a status message at all unless the operation takes more than 500ms to complete.
If you want to show the status immediately, use the show()
method instead.
millis
- Number of milliseconds to wait before showing the status.public void clear()
public String getMessage()
public ActionListener getListener()
public int getProgress()
public Image getIcon()
public void setIcon(Image icon)
icon
- the icon to setpublic boolean isShowProgressIndicator()
public void setShowProgressIndicator(boolean showProgressIndicator)
showProgressIndicator
- the showProgressIndicator to setpublic String getMessageUIID()
public void setMessageUIID(String messageUIID)
messageUIID
- the messageUIID to setpublic String getUiid()
public void setUiid(String uiid)
uiid
- the uiid to set