org.gnu.gtk

Class MenuToolButton

public class MenuToolButton extends ToolButton

A {@link ToolItem} containing a button with an additional dropdown menu.

A MenuToolButton is a {@link 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(Handle handle)
Construct a MenuToolButton from a native handle.
MenuToolButton()
Create a new MenuToolButton.
MenuToolButton(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, String label)
Create a new MenuToolButton with the given icon widget and label.
MenuToolButton(GtkStockItem stockid)
Create a new MenuToolButton from stock.
Method Summary
MenugetMenu()
Gets the {@link Menu} associated with this MenuToolButton.
static MenuToolButtongetMenuToolButton(Handle handle)
Internal static factory method to be used by Java-Gnome only.
static TypegetType()
Retrieve the runtime type used by the GLib library.
voidsetArrowToolTip(ToolTips tooltips, String tip_text, String tip_private)
Set the tooltip associated with the arrow menu.
voidsetMenu(Menu menu)
Sets the {@link Menu} that is popped up when the user clicks on the arrow.

Constructor Detail

MenuToolButton

public MenuToolButton(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(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, 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 {@link GtkStockItem} to create.

Method Detail

getMenu

public Menu getMenu()
Gets the {@link Menu} associated with this MenuToolButton.

getMenuToolButton

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

getType

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

setArrowToolTip

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

setMenu

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