## org.gnu.gtk
Class ToolBar

    java.lang.Object
      org.gnu.glib.Struct
          org.gnu.glib.GObject
              org.gnu.gtk.GtkObject
                  org.gnu.gtk.Widget
                      org.gnu.gtk.Container
                          org.gnu.gtk.ToolBar

public class ToolBar
extends Container

The ToolBar is used to construct a toolbar. It is the container that controls the position of a set of icons that are mouse sensitive.

Constructor Summary
`ToolBar()` Create a new ToolBar
`ToolBar(org.gnu.glib.Handle hndl)`

Method Summary
`void` `addListener(ToolBarListener listener)` Register an object to handle dialog events.
`void` `appendSpace()` Deprecated.
`void` `appendWidget(Widget widget, java.lang.String tooltip, java.lang.String helpText)` Deprecated.
`int` `getDropIndex(int x, int y)` Returns the position corresponding to the indicated point on ToolBar.
`java.lang.Class` `getEventListenerClass(java.lang.String signal)`
`EventType` `getEventType(java.lang.String signal)`
`ToolItem` `getItem(int position)` Return the ToolItem on the ToolBar from the position specified.
`int` `getItemIndex(ToolItem item)` Return the position of an item on the ToolBar starting from 0.
`int` `getNumItems()` Return the number of items on the ToolBar.
`ReliefStyle` `getReliefStyle()` Returns the ReliefStyle of Buttons on the ToolBar.
`boolean` `getShowArrow()` Returns whether the ToolBar has an overflow menu.
`static ToolBar` `getToolBar(org.gnu.glib.Handle handle)` Internal static factory method to be used by Java-Gnome only.
`static Type` `getType()` Retrieve the runtime type used by the GLib library.
`void` `insert(ToolItem item, int position)` Insert a ToolItem into the ToolBar at a specified position.
`void` `insertSpace(int position)` Deprecated.
`void` `insertWidget(Widget widget, java.lang.String tooltip, java.lang.String helpText, int index)` Deprecated.
`boolean` `isToolTips()`
`void` `prependSpace()` Deprecated.
`void` `prependWidget(Widget widget, java.lang.String tooltip, java.lang.String helpText)` Deprecated.
`void` `removeListener(ToolBarListener listener)` Removes a listener
`void` `removeSpace(int position)` Deprecated.
`void` `setDropHighlightItem(ToolItem item, int index)` Highlights ToolBar to give an idea of what it would look like if a ToolItem was added to the ToolBar and the provided index.
`void` `setIconSize(IconSize iconSize)` Deprecated.
`void` `setOrientation(Orientation orientation)` Set whether the ToolBar should appear horizontally or vertically.
`void` `setShowArrow(boolean showArrow)` Sets whether to show an overflow menu when ToolBar doesn't have room for all of its' items.
`void` `setStyle(ToolBarStyle style)` Alter the view of the ToolBar to display either icons only, text only, or both.
`void` `setToolTips(boolean enable)` Sets if the tooltips of the ToolBar should be active or not.

Methods inherited from class org.gnu.gtk.Container
`add, addListener, getBorderWidth, getChildren, getResizeMode, remove, removeListener, resizeChildren, setBorderWidth, setResizeMode`

Methods inherited from class org.gnu.gtk.Widget

`activate, addAccelerator, addEvents, addListener, addListener, addListener, addListener, addListener, addListener, addListener, addListener, addListener, addListener, addListener, canActivateAccel, createContext, createLayout, draw, drawArea, drawArea, finish, getAccessible, getColormap, getContext, getData, getDisplay, getDragData, getExtensionEvents, getModifierStyle, getName, getParent, getParentWindow, getPointer, getRootWindow, getScreen, getSensitive, getStyle, getToplevel, getWidget, getWindow, grabDefault, grabFocus, hasFocus, hasScreen, hide, hideAll, highlight, highlight, intersect, isAncestor, makeWidget, modifyStyle, popColormap, pushColormap, realize, removeAccelerator, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, reparent, setBackgroundColor, setBaseColor, setColormap, setDoubleBuffered, setDragDestination, setDragIcon, setDragIconPixbuf, setDragIconStock, setDragSource, setEvents, setExtensionEvents, setFont, setForegroundColor, setMinimumSize, setName, setNoDragDestination, setNoDragSource, setSensitive, setTextColor, shapeCombineMask, show, showAll, unHighlight, unHighlight`

Methods inherited from class org.gnu.gtk.GtkObject
`destroy, sink`

Methods inherited from class org.gnu.glib.GObject

`addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addListener, collect, freezeNotify, getBooleanProperty, getData, getDoubleProperty, getFloatProperty, getGObjectFromHandle, getIntProperty, getJavaObjectProperty, getLongProperty, getPixbufProperty, getProperty, getStringProperty, hasProperty, notify, removeEventHandler, removeListener, setBooleanProperty, setData, setDoubleProperty, setFloatProperty, setIntProperty, setJavaObjectProperty, setLongProperty, setPixbufProperty, setProperty, setStringProperty, thawNotify`

Methods inherited from class org.gnu.glib.Struct
`equals, getHandle, getNullHandle, hashCode`

Methods inherited from class java.lang.Object
`getClass, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ToolBar

    public ToolBar()

  Create a new ToolBar

### ToolBar

    public ToolBar(org.gnu.glib.Handle hndl)

Method Detail

### getToolBar

    public static ToolBar getToolBar(org.gnu.glib.Handle handle)

  Internal static factory method to be used by Java-Gnome only.

### appendWidget

    public void appendWidget(Widget widget,
                             java.lang.String tooltip,
                             java.lang.String helpText)

  Deprecated.

  Add a widget to the end of the toolbar.

  Parameters:
    `widget` - The widget to add to the end of the ToolBar.
    `tooltip` - The text for the tooltip for this item.
    `helpText` - Context sensitive help about this item.

### prependWidget

    public void prependWidget(Widget widget,
                              java.lang.String tooltip,
                              java.lang.String helpText)

  Deprecated.

  Add a widget to the beginning of the toolbar.

  Parameters:
    `widget` - The widget to add to the beginning of the ToolBar.
    `tooltip` - The text for the tooltip for this item.
    `helpText` - Context sensitive help about this item.

### insertWidget

    public void insertWidget(Widget widget,
                             java.lang.String tooltip,
                             java.lang.String helpText,
                             int index)

  Deprecated.

  Insert a Widget in the ToolBar at the given position

  Parameters:
    `widget` - The widget to add to the ToolBar.
    `tooltip` - The text for the tooltip for this item.
    `helpText` - Context sensitive help about this item.
    `index` - The location in the ToolBar to insert this Widget.

### appendSpace

    public void appendSpace()

  Deprecated.

  Add a space to the end of the ToolBar.

### prependSpace

    public void prependSpace()

  Deprecated.

  Add a space to the beginning of the ToolBar.

### insertSpace

    public void insertSpace(int position)

  Deprecated.

  Insert a space in the ToolBar at the specified location.

  Parameters:
    `position` - The location to insert the space.

### removeSpace

    public void removeSpace(int position)

  Deprecated.

  Remove a space from the ToolBar.

  Parameters:
    `position` - The position of the space to remove.

### setOrientation

    public void setOrientation(Orientation orientation)

  Set whether the ToolBar should appear horizontally or vertically.

  Parameters:
    `orientation` - Specifies the direction of the ToolBar.

### setStyle

    public void setStyle(ToolBarStyle style)

  Alter the view of the ToolBar to display either icons only, text only, or both.

  Parameters:
    `style` - Determines how to display the items.

### isToolTips

    public boolean isToolTips()

### setToolTips

    public void setToolTips(boolean enable)

  Sets if the tooltips of the ToolBar should be active or not.

  Parameters:
    `enable` - Should the tooltips be enabled.

### setIconSize

    public void setIconSize(IconSize iconSize)

  Deprecated.

  Sets the size of the stock icons in the ToolBar.

  Parameters:
    `iconSize` - The size of the icons.

### getType

    public static Type getType()

  Retrieve the runtime type used by the GLib library.

### insert

    public void insert(ToolItem item,
                       int position)

  Insert a ToolItem into the ToolBar at a specified position. If position is 0 then the item is prepended to the start of the ToolBar. If position is negative then it is appended to the end of the ToolBar.

  Parameters:
    `item` -
    `position` -

### getItemIndex

    public int getItemIndex(ToolItem item)

  Return the position of an item on the ToolBar starting from 0.

  Parameters:
    `item` -

### getNumItems

    public int getNumItems()

  Return the number of items on the ToolBar.

### getItem

    public ToolItem getItem(int position)

  Return the ToolItem on the ToolBar from the position specified.

  Parameters:
    `position` -

### getShowArrow

    public boolean getShowArrow()

  Returns whether the ToolBar has an overflow menu.

### setShowArrow

    public void setShowArrow(boolean showArrow)

  Sets whether to show an overflow menu when ToolBar doesn't have room for all of its' items.

  Parameters:
    `showArrow` -

### getReliefStyle

    public ReliefStyle getReliefStyle()

  Returns the ReliefStyle of Buttons on the ToolBar.

### getDropIndex

    public int getDropIndex(int x,
                            int y)

  Returns the position corresponding to the indicated point on ToolBar. This is useful when dragging items to the ToolBar: this functions returns the position a new item would be inserted.

  Parameters:
    `x` -
    `y` -

### setDropHighlightItem

    public void setDropHighlightItem(ToolItem item,
                                     int index)

  Highlights ToolBar to give an idea of what it would look like if a ToolItem was added to the ToolBar and the provided index.

  Parameters:
    `item` -
    `index` -

### addListener

    public void addListener(ToolBarListener listener)

  Register an object to handle dialog events.

  See Also:
    `ToolBarListener`

### removeListener

    public void removeListener(ToolBarListener listener)

  Removes a listener

  See Also:
    `addListener(ToolBarListener)`

### getEventListenerClass

    public java.lang.Class getEventListenerClass(java.lang.String signal)

  Overrides:
    `getEventListenerClass` in class `Container`

### getEventType

    public EventType getEventType(java.lang.String signal)

  Overrides:
    `getEventType` in class `Container`