|
java-gnome version 4.0.19 | ||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Objectorg.freedesktop.bindings.Pointer
org.freedesktop.bindings.Proxy
org.gnome.glib.Object
org.gnome.gtk.Object
org.gnome.gtk.Widget
org.gnome.gtk.Container
org.gnome.gtk.Toolbar
public class Toolbar
A Toolbar is a broad horizontal bar with several controls (usually largish graphical buttons) intended to provide a fast and convenient access to operations commonly used in an application.
In most cases, you will want to add some ToolButton
s to the
Toolbar, but you can also add other elements as well by creating a
ToolItem
and adding your own customized elements to it.
You can also group related items together by using a
SeparatorToolItem
to the Toolbar to create a separation between
them. Don't overdo that, however - too many separators result in a
cluttered appearance.
Note that the actual on screen appearance of the Toolbar is governed by the
user's theme and how they have configured Toolbars to appear. The choices
of "Text below Icons" (the usual default), "Text beside
Icons", "Icons only", and "Text only" are
available from the GNOME panel menu at System >
Menus
& Toolbars which runs the gnome-ui-properties
program.
Nested Class Summary |
---|
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 | |
---|---|
Toolbar()
Create a new, empty, Toolbar. |
Method Summary | |
---|---|
void |
add(Widget w)
Add a child Widget to this Container. |
void |
insert(ToolItem item,
int pos)
Insert a ToolItem in the Toolbar at a given position. |
void |
setStyle(ToolbarStyle style)
Set the appearance of a Toolbar. |
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 |
---|
public Toolbar()
Method Detail |
---|
public void add(Widget w)
Container
add
in class Container
public void insert(ToolItem item, int pos)
item
- The new item to add to the Toolbar.pos
- The position where the new item will be inserted. You can
use 0
to prepend the item at the beginning of
the Toolbar, or a negative value to append the item at the
end.public void setStyle(ToolbarStyle style)
Toolbars buttons can be customized to display either an icon, a text label, or both. As explained above, in the documentation for this class, the appearance of Toolbars is configured by the user as a desktop setting. This method will override those settings, so in most cases you should not use this method, and just let the user choose the appearance (s)he prefers.
However, some really complex applications might need several Toolbars and many buttons on each one, so configuring a compact Toolbar style can help to save screen space. In such cases this method may be useful, but the general advice is to use this with care, and avoid overriding of user settings unless you have a strong reason.
Finally, note that if you choose for example an ICONS
only
appearance, and a given ToolButton has no icon, its Label will be shown
instead, so GTK engine will do its best to keep Toolbar usable.
|
![]() java-gnome |
||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |