public class ToastBar.Status
- Object
- ToastBar.Status
Methods
public void setExpires(int millis) | Directs the status to be cleared (if it isn’t already cleared() after a given number of milliseconds. |
public void show() | Shows this status message. |
public 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 clear() | Clears this status message. |
public String getMessage() | Returns the text that will be displayed for this status. |
public void setMessage(String message) | Sets the message that should be displayed in the ToastBar. |
public ActionListener getListener() | Returns the listener added to perform a particular action. |
public void setListener(ActionListener listener) | Sets the action listener needed to perform an action when the bar is tapped ToastBar. |
public int getProgress() | Returns the progress of this status. |
public void setProgress(int progress) | Sets the progress (-1..100) that should be displayed in the progress bar for this status. |
public Image getIcon() | Gets the icon (may be null) that is displayed with this status. |
public void setIcon(Image icon) | Sets the icon that is to be displayed with this status. |
public boolean isShowProgressIndicator() | |
public void setShowProgressIndicator(boolean showProgressIndicator) | Sets whether this status message should include an infinite progress indicator (e.g. spinning beach ball). |
public String getMessageUIID() | Gets the UIID to use for styling the text of this status message. |
public void setMessageUIID(String messageUIID) | Sets the UIID to use for styling the text of this status message. |
public String getUiid() | Gets the UIID that should be used for styling the status component while this status is displayed. |
public void setUiid(String uiid) | Sets the UIID that should be used for styling the status component while this status is displayed. |
Inherited methods
Method details
setExpires
public void setExpires(int millis)Parameters
millisint- 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.
show
public void show()Shows this status message. Call this method after making any changes to the status that you want to have displayed. This will always cause any currently-displayed status to be replaced by this status.
If you don’t want to show the status immediately, but rather to wait some delay, you can use
the #showDelayed(int) method instead.
See also
showDelayed
public 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.
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.
Parameters
millisint- Number of milliseconds to wait before showing the status.
clear
public void clear()getMessage
public String getMessage()Returns
setMessage
public void setMessage(String message)ToastBar.getListener
public ActionListener getListener()Returns
setListener
public void setListener(ActionListener listener)ToastBar.getProgress
public int getProgress()Returns
setProgress
public void setProgress(int progress)getIcon
public Image getIcon()Returns
setIcon
public void setIcon(Image icon)Parameters
iconImage- the icon to set
isShowProgressIndicator
public boolean isShowProgressIndicator()Returns
setShowProgressIndicator
public void setShowProgressIndicator(boolean showProgressIndicator)Parameters
showProgressIndicatorboolean- the showProgressIndicator to set
getMessageUIID
public String getMessageUIID()Returns
setMessageUIID
public void setMessageUIID(String messageUIID)Parameters
messageUIIDString- the messageUIID to set
getUiid
public String getUiid()Returns
setUiid
public void setUiid(String uiid)Parameters
uiidString- the uiid to set