org.gnu.gtk
Class MenuToolButton

java.lang.Object
  extended by org.gnu.glib.Struct
      extended by org.gnu.glib.GObject
          extended by org.gnu.gtk.GtkObject
              extended by org.gnu.gtk.Widget
                  extended by org.gnu.gtk.Container
                      extended by org.gnu.gtk.Bin
                          extended by org.gnu.gtk.ToolItem
                              extended by org.gnu.gtk.ToolButton
                                  extended by org.gnu.gtk.MenuToolButton

public class MenuToolButton
extends ToolButton

A ToolItem containing a button with an additional dropdown menu.

A MenuToolButton is a ToolItem that contains a button and a small additional button with an arrow. When clicked, the arrow button pops up a dropdown menu.

Since:
2.6

Constructor Summary
MenuToolButton()
          Create a new MenuToolButton.
MenuToolButton(GtkStockItem stockid)
          Create a new MenuToolButton from stock.
MenuToolButton(org.gnu.glib.Handle handle)
          Construct a MenuToolButton from a native handle.
MenuToolButton(java.lang.String label)
          Create a new MenuToolButton with the given label.
MenuToolButton(Widget icon)
          Create a new MenuToolButton with the given icon widget.
MenuToolButton(Widget icon, java.lang.String label)
          Create a new MenuToolButton with the given icon widget and label.
 
Method Summary
 Menu getMenu()
          Gets the Menu associated with this MenuToolButton.
static MenuToolButton getMenuToolButton(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 setArrowToolTip(ToolTips tooltips, java.lang.String tip_text, java.lang.String tip_private)
          Set the tooltip associated with the arrow menu.
 void setMenu(Menu menu)
          Sets the Menu that is popped up when the user clicks on the arrow.
 
Methods inherited from class org.gnu.gtk.ToolButton
addListener, getEventListenerClass, getEventType, getIconWidget, getLabel, getLabelWidget, getStockId, getToolButton, getUseUnderline, removeListener, setIconWidget, setLabel, setLabelWidget, setStockId, setUseUnderline
 
Methods inherited from class org.gnu.gtk.ToolItem
getExpand, getHomogeneous, getIconSize, getIsImportant, getOrientation, getProxyMenuItem, getReliefStyle, getToolbarStyle, getToolItem, getUseDragWindow, getVisibleHorizontal, getVisibleVertical, rebuildMenu, retrieveProxyMenuItem, setExpand, setHomogeneous, setIsImportant, setProxyMenuItem, setTooltip, setToolTip, setUseDragWindow, setVisibleHorizontal, setVisibleVertical
 
Methods inherited from class org.gnu.gtk.Bin
getChild
 
Methods inherited from class org.gnu.gtk.Container
add, addListener, getBooleanChildProperty, getBorderWidth, getChildProperty, getChildren, getIntChildProperty, getResizeMode, remove, removeListener, resizeChildren, setBooleanChildProperty, setBorderWidth, setChildProperty, setIntChildProperty, 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, getAllocation, getCanFocus, 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, setCanFocus, 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, 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

MenuToolButton

public MenuToolButton(org.gnu.glib.Handle handle)
Construct a MenuToolButton from a native handle. For internal use only!


MenuToolButton

public MenuToolButton()
Create a new MenuToolButton. No icon widget or label will be set.


MenuToolButton

public MenuToolButton(java.lang.String label)
Create a new MenuToolButton with the given label. No icon widget will be set.

Parameters:
label - A String that will be used as label.

MenuToolButton

public MenuToolButton(Widget icon)
Create a new MenuToolButton with the given icon widget. No label will be set.

Parameters:
icon - A Widget that will be used as icon widget.

MenuToolButton

public MenuToolButton(Widget icon,
                      java.lang.String label)
Create a new MenuToolButton with the given icon widget and label.

Parameters:
icon - A Widget that will be used as icon widget.
label - A String that will be used as label.

MenuToolButton

public MenuToolButton(GtkStockItem stockid)
Create a new MenuToolButton from stock. The new MenuToolButton will contain an icon and label from the stock item indicated by stockid.

Parameters:
stockid - The GtkStockItem to create.
Method Detail

getMenuToolButton

public static MenuToolButton getMenuToolButton(org.gnu.glib.Handle handle)
Internal static factory method to be used by Java-Gnome only.


setMenu

public void setMenu(Menu menu)
Sets the Menu that is popped up when the user clicks on the arrow. If menu is null, the arrow button becomes insensitive.


getMenu

public Menu getMenu()
Gets the Menu associated with this MenuToolButton.


setArrowToolTip

public void setArrowToolTip(ToolTips tooltips,
                            java.lang.String tip_text,
                            java.lang.String tip_private)
Set the tooltip associated with the arrow menu.


getType

public static Type getType()
Retrieve the runtime type used by the GLib library.