public class InfoBar extends HBox
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.
Modifier and Type | Class and Description |
---|---|
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.
|
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.QueryTooltip, Widget.ScrollEvent, Widget.SizeAllocate, Widget.UnmapEvent, Widget.VisibilityNotifyEvent
Constructor and Description |
---|
InfoBar()
Create a new
InfoBar . |
Modifier and Type | Method and Description |
---|---|
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 . |
getOrientation, getSpacing, packEnd, packStart, reorderChild, setOrientation, setSpacing
getChildren, remove, setBorderWidth
activate, addEvents, connect, 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
public void add(Widget widget)
public void addActionWidget(Widget child, ResponseType response)
public Button addButton(Stock stock, ResponseType response)
addButton()
.public Button addButton(String text, ResponseType response)
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.public void connect(InfoBar.Close handler)
InfoBar.Close
handler.public void connect(InfoBar.Response handler)
InfoBar.Response
handler.public void response(ResponseType response)
public void setDefaultResponse(ResponseType response)
Be careful! The InfoBar must be in a widget hierarchy to use this method.
public void setMessageType(MessageType type)
public void setResponseSensitive(ResponseType response, boolean setting)
response
.