# Class ToastBar.Status

java.lang.Object
com.codename1.components.ToastBar.Status

Enclosing class:
  `ToastBar`

public class ToastBar.Status extends Object
Represents a single status message.

- ## Method Summary

  Modifier and Type
  Method
  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()`

  ###### Returns

  `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. spinning beach ball).
  `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.

  ### Methods inherited from class Object

  `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`
  Modifier and Type
  Method
  Description
  `protected Object`
  `clone()`
  `boolean`
  `equals(Object obj)`
  Indicates whether some other object is "equal to" this one.
  `final Class`
  `getClass()`
  Returns the runtime class of an object.
  `int`
  `hashCode()`
  Returns a hash code value for the object.
  `final void`
  `notify()`
  Wakes up a single thread that is waiting on this object's monitor.
  `final void`
  `notifyAll()`
  Wakes up all threads that are waiting on this object's monitor.
  `String`
  `toString()`
  Returns a string representation of the object.
  `final void`
  `wait()`
  Causes current thread to wait until another thread invokes the method or the method for this object.
  `final void`
  `wait(long timeout)`
  Causes current thread to wait until either another thread invokes the method or the method for this object, or a specified amount of time has elapsed.
  `final void`
  `wait(long timeout, int nanos)`
  Causes current thread to wait until another thread invokes the method or the method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.

- ## 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`: @param 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.

  - ### 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(int)

  - ### 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`: 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`.

    ###### Parameters

    - `message`

  - ### 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`.

    ###### Parameters

    - `listener`

  - ### 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

    ###### Parameters

    - `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`: 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`: 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`: 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`: the uiid to set