Skip to content

Instantly share code, notes, and snippets.

@shannah
Created February 19, 2016 22:58

Revisions

  1. shannah created this gist Feb 19, 2016.
    6 changes: 6 additions & 0 deletions BasicUsage.java
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    Status status = StatusBar.getInstance().createStatus();
    status.setMessage("Hello world");
    status.show();

    //... Some time later you must clear the status
    status.clear();
    7 changes: 7 additions & 0 deletions ShowingProgressIndicator.java
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    Status status = StatusBar.getInstance().createStatus();
    status.setMessage("Hello world");
    status.setShowProgressIndicator(true);
    status.show();

    // ... Some time later you must clear it
    status.clear();
    4 changes: 4 additions & 0 deletions UsingSetExpires.java
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,4 @@
    Status status = StatusBar.getInstance().createStatus();
    status.setMessage("Hello world");
    status.setExpires(3000); // only show the status for 3 seconds, then have it automatically clear
    status.show();
    6 changes: 6 additions & 0 deletions UsingShowDelayed.java
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    Status status = StatusBar.getInstance().createStatus();
    status.setMessage("Hello world");
    status.showDelayed(300); // Wait 300 ms to show the status

    // ... Some time later, clear the status... this may be before it shows at all
    status.clear();