java-gnome version 4.0.19

org.gnome.gtk
Class InfoBar

Object
  extended by org.freedesktop.bindings.Pointer
      extended by org.freedesktop.bindings.Proxy
          extended by org.gnome.glib.Object
              extended by org.gnome.gtk.Object
                  extended by org.gnome.gtk.Widget
                      extended by org.gnome.gtk.Container
                          extended by org.gnome.gtk.Box
                              extended by org.gnome.gtk.HBox
                                  extended by org.gnome.gtk.InfoBar

public class InfoBar
extends HBox

A InfoBar is a widget that can be used to show messages to a user without showing a dialog. You can add buttons and widgets like in a Dialog.

The style of the InfoBar can be changed using the type of the message to show to the user. It is possible to control the sensitivity of the action widgets by using the setResponseSensitive() method.

Since:
4.0.16
Author:
Guillaume Mazoyer

Nested Class Summary
static interface InfoBar.Close
          This signal arises when a user uses a keybinding to dismiss the InfoBar.
static interface InfoBar.Response
          This signal arises when a user activates one of the Widgets laid out in the action area of the InfoBar.
 
Nested classes/interfaces inherited from class org.gnome.gtk.Widget
Widget.ButtonPressEvent, Widget.ButtonReleaseEvent, Widget.EnterNotifyEvent, Widget.ExposeEvent, Widget.FocusInEvent, Widget.FocusOutEvent, Widget.Hide, Widget.KeyPressEvent, Widget.KeyReleaseEvent, Widget.LeaveNotifyEvent, Widget.MapEvent, Widget.MotionNotifyEvent, Widget.PopupMenu, Widget.ScrollEvent, Widget.UnmapEvent, Widget.VisibilityNotifyEvent
 
Nested classes/interfaces inherited from class org.gnome.gtk.Object
Object.Destroy
 
Constructor Summary
InfoBar()
          Create a new InfoBar.
 
Method Summary
 void add(Widget widget)
          Add a Widget to the content area of the InfoBar.
 void addActionWidget(Widget child, ResponseType response)
          Add an activatable widget to the action area of this InfoBar.
 Button addButton(Stock stock, ResponseType response)
          Add a Button whose icon and label are taken from a given Stock.
 Button addButton(String text, ResponseType response)
          Adds an action Button with the given text as its label to the end of the InfoBar's action area.
 void connect(InfoBar.Close handler)
          Hook up a InfoBar.Close handler.
 void connect(InfoBar.Response handler)
          Hook up a InfoBar.Response handler.
 void response(ResponseType response)
          Cause a InfoBar.Response signal with the specified ResponseType to be emitted by this InfoBar.
 void setDefaultResponse(ResponseType response)
          Set the widget with the given response as the default widget of this InfoBar.
 void setMessageType(MessageType type)
          Set the type of the message.
 void setResponseSensitive(ResponseType response, boolean setting)
          Set the sensitivity of the widget associated with the given response.
 
Methods inherited from class org.gnome.gtk.Box
getSpacing, packEnd, packStart, reorderChild, setSpacing
 
Methods inherited from class org.gnome.gtk.Container
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, getAllocation, getCanDefault, getCanFocus, getHasFocus, getName, getParent, getRequisition, getSensitive, getToplevel, getWindow, grabAdd, grabDefault, grabFocus, grabRemove, hide, isSensitive, modifyBackground, modifyBase, modifyFont, modifyText, queueDraw, queueDrawArea, realize, setCanDefault, setCanFocus, setColormap, setEvents, setName, setSensitive, setSizeRequest, setTooltipMarkup, setTooltipText, show, showAll
 
Methods inherited from class org.gnome.gtk.Object
connect, destroy
 
Methods inherited from class org.freedesktop.bindings.Pointer
toString
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InfoBar

public InfoBar()
Create a new InfoBar.

Since:
4.0.16
Method Detail

add

public void add(Widget widget)
Add a Widget to the content area of the InfoBar.

Overrides:
add in class Container
Since:
4.0.16

addActionWidget

public void addActionWidget(Widget child,
                            ResponseType response)
Add an activatable widget to the action area of this InfoBar.

Since:
4.0.16

addButton

public Button addButton(Stock stock,
                        ResponseType response)
Add a Button whose icon and label are taken from a given Stock. It is, as ever, recommended to use a Stock Button for common actions. See addButton().

Since:
4.0.16

addButton

public Button addButton(String text,
                        ResponseType response)
Adds an action Button with the given text as its label to the end of the InfoBar's action area. The given ResponseType will be returned back in the InfoBar's Response signal when the Button added as a result of this call is clicked.

Since:
4.0.16

connect

public void connect(InfoBar.Close handler)
Hook up a InfoBar.Close handler.

Since:
4.0.16

connect

public void connect(InfoBar.Response handler)
Hook up a InfoBar.Response handler.

Since:
4.0.16

response

public void response(ResponseType response)
Cause a InfoBar.Response signal with the specified ResponseType to be emitted by this InfoBar.

Since:
4.0.16

setDefaultResponse

public void setDefaultResponse(ResponseType response)
Set the widget with the given response as the default widget of this InfoBar. Pressing "Enter" activates the default widget.

Be careful! The InfoBar must be in a widget hierarchy to use this method.

Since:
4.0.16

setMessageType

public void setMessageType(MessageType type)
Set the type of the message. It is used to define what color to use when drawing the message area.

Since:
4.0.16

setResponseSensitive

public void setResponseSensitive(ResponseType response,
                                 boolean setting)
Set the sensitivity of the widget associated with the given response.

Since:
4.0.16


java-gnome