org.gnome.gtk

## Class Statusbar

- Object
- - org.freedesktop.bindings.Pointer
  - - org.freedesktop.bindings.Proxy
    - - org.gnome.glib.Object
      - - org.gnome.gtk.Widget
        - - org.gnome.gtk.Container
          - - org.gnome.gtk.Box
            - - org.gnome.gtk.HBox
              - - org.gnome.gtk.Statusbar

- All Implemented Interfaces:
    Orientable

      public class Statusbar
      extends HBox

  The space at the bottom of an application Window where status messages are displayed.

  A Statusbar should generally be present at the bottom of a GNOME application's main Window by being the first Widget to be packed with respect to the end of the VBox used to vertically layout such a Window:

       status = new Statusbar();
       vbox.packEnd(status, false, false, 0);
       window.add(vbox);

  in fact, this is so much a convention that a Statusbar should be present regardless of whether or not you plan to have messages to display. Make sure you pack it into the top level VBox with expand and fill set to `false` as shown. Statusbars somewhat by definition should stay narrow; they shouldn't grow thicker if the user resizes vertically.

  The text in the Statusbar is set with `setMessage()`. Most applications leave the Statusbar empty as a default state, but if you wish to inform the user of things being in a normal state, you can certainly do so:

       status.setMessage("Ready");

  or similar words appropriate to your program.

  Statusbars are excellent for providing hints to the user about what the user can do next (see `Inkscape` as a terrific example), or to update the user with what the application is up to when processing. Keep in mind, however, that this is considered only an assistance; people don't necessarily look to the Statusbar when wondering what is going on (and further, many applications allow the user to turn the Statusbar off entirely). If you need to provide urgent information to the user then use a Dialog.

  As a Box subclass, you can pack other Widgets into the Statusbar. This is a great place for a ProgressBar if you have a long running worker thread that needs to report its percentage completion. Widgets so added will be packed after the Label that is (obviously) internally present to display the status messages. If it is a small Window you may want to constrain the size of the ProgressBar lest it blot out the message:

       status = new Statusbar();
       bar = new ProgressBar();
       bar.setSizeRequest(30, -1);
       status.packEnd(bar, false, false, 0);

  then later:

       status.setMessage("Sending all your files to the CIA...");
       bar.setFraction(0.35);

  A visible Statusbar usually drawn with a grip in the bottom right corner which most users will recognized as a stylized visual indication that the Window can be resized. If necessary, it can be suppressed by calling `setHasResizeGrip(false)`.

  The underlying API in `GtkStatusbar` is ridiculously complicated for absolutely no good reason. We have therefore compressed its hideous stack-based mechanism into the simple single-message interface presented here.

  Since:
    4.0.6
  Author:
    Andrew Cowie

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.gnome.gtk.Widget

      `Widget.ButtonPressEvent, Widget.ButtonReleaseEvent, Widget.Destroy, Widget.Draw, Widget.EnterNotifyEvent, Widget.FocusInEvent, Widget.FocusOutEvent, Widget.Hide, Widget.KeyPressEvent, Widget.KeyReleaseEvent, Widget.LeaveNotifyEvent, Widget.MapEvent, Widget.MotionNotifyEvent, Widget.PopupMenu, Widget.ScrollEvent, Widget.SizeAllocate, Widget.UnmapEvent, Widget.VisibilityNotifyEvent`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Statusbar()` Construct a new Statusbar.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `setMessage(String text)` Set the message showing in the Statusbar.

    - ### Methods inherited from class org.gnome.gtk.Box

      `getOrientation, getSpacing, packEnd, packStart, reorderChild, setOrientation, setSpacing`

    - ### Methods inherited from class org.gnome.gtk.Container

      `add, getChildren, remove, setBorderWidth`

    - ### Methods inherited from class org.gnome.gtk.Widget

      `activate, addEvents, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, destroy, getAllocatedHeight, getAllocatedWidth, getAllocation, getCanDefault, getCanFocus, getHasFocus, getName, getParent, getPreferredHeightForWidthMinimum, getPreferredHeightForWidthNatural, getPreferredHeightMinimum, getPreferredHeightNatural, getPreferredWidthForHeightMinimum, getPreferredWidthForHeightNatural, getPreferredWidthMinimum, getPreferredWidthNatural, getRequestMode, getRequisition, getSensitive, getStyleContext, getToplevel, getWindow, grabAdd, grabDefault, grabFocus, grabRemove, hide, isSensitive, overrideBackground, overrideColor, overrideFont, queueDraw, queueDrawArea, realize, setAlignHorizontal, setAlignVertical, setCanDefault, setCanFocus, setEvents, setExpandHorizontal, setExpandVertical, setName, setSensitive, setSizeRequest, setTooltipMarkup, setTooltipText, show, showAll`

    - ### Methods inherited from class org.freedesktop.bindings.Pointer

      `toString`

    - ### Methods inherited from class Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### Statusbar

          public Statusbar()

      Construct a new Statusbar. The initial message is empty (you don't need to explicitly set it to be so).
      Since:
        4.0.6

  - ### Method Detail

    - #### setMessage

          public void setMessage(String text)

      Set the message showing in the Statusbar. You can call this frequently with whatever indication you wish to display to the user; the last message will be discarded.

      If you want to clear the message, simply pass the empty string, `""`.

      Since:
        4.0.6