public class ToastBar.Status

  1. Object
  2. ToastBar.Status
Represents a single status message.

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)
Directs the status to be cleared (if it isn’t already cleared() after a given number of milliseconds.

Parameters

millis int
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.

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

millis int
Number of milliseconds to wait before showing the status.

clear

public void clear()
Clears this status message. This any pending “showDelayed” requests for this status.

getMessage

public String getMessage()
Returns the text that will be displayed for this status.

Returns

the message

setMessage

public void setMessage(String message)
Sets the message that should be displayed in the ToastBar.

getListener

public ActionListener getListener()
Returns the listener added to perform a particular action.

Returns

the listener

setListener

public void setListener(ActionListener listener)
Sets the action listener needed to perform an action when the bar is tapped ToastBar.

getProgress

public int getProgress()
Returns the progress of this status. A value of -1 indicates that the progress bar should not be shown. Values between 0 and 100 inclusive will be rendered on a progress bar (slider) in the status component.

Returns

the progress

setProgress

public void setProgress(int progress)
Sets the progress (-1..100) that should be displayed in the progress bar for this status. When set to -1 it will act as an infinite progress

getIcon

public Image getIcon()
Gets the icon (may be null) that is displayed with this status.

Returns

the icon

setIcon

public void setIcon(Image icon)
Sets the icon that is to be displayed with this status. Set this to null to not show an icon.

Parameters

icon Image
the icon to set

isShowProgressIndicator

public boolean isShowProgressIndicator()

Returns

the showProgressIndicator

setShowProgressIndicator

public void setShowProgressIndicator(boolean showProgressIndicator)
Sets whether this status message should include an infinite progress indicator (e.g. spinning beach ball).

Parameters

showProgressIndicator boolean
the showProgressIndicator to set

getMessageUIID

public String getMessageUIID()
Gets the UIID to use for styling the text of this status message.

Returns

the messageUIID

setMessageUIID

public void setMessageUIID(String messageUIID)
Sets the UIID to use for styling the text of this status message.

Parameters

messageUIID String
the messageUIID to set

getUiid

public String getUiid()
Gets the UIID that should be used for styling the status component while this status is displayed.

Returns

the uiid

setUiid

public void setUiid(String uiid)
Sets the UIID that should be used for styling the status component while this status is displayed.

Parameters

uiid String
the uiid to set