org.gnu.gtk

Class Menu

public class Menu extends MenuShell

Deprecated: This class is part of the java-gnome 2.x family of libraries, which, due to their inefficiency and complexity, are no longer being maintained and have been abandoned by the java-gnome project. This class may in the future have an equivalent in java-gnome 4.0, try looking for org.gnome.gtk.Menu. You should be aware that there is a considerably different API in the new library: the architecture is completely different and most notably internals are no longer exposed to public view.

A Menu is a MenuShell that implements a drop down menu consisting of a list of MenuItem objects which can be navigated and activated by the user to perform application functions.
Constructor Summary
Menu()
Create a new Menu.
Menu(Handle handle)
Create a new Menu from a handle to a native resource.
Method Summary
voiddetach()
Detaches the menu from the widget to which it had been attached.
ArrayListgetAttachedMenus()
Returns a list of the menus which are attached to this widget.
static MenugetMenu(Handle handle)
Create a new Menu from a handle to a native resource.
StringgetTitle()
Returns the title of the menu.
static TypegetType()
Retrieve the runtime type used by the GLib library.
voidpopup()
Displays a menu and makes it available for selection.
voidreorderMenuItem(MenuItem child, int position)
Move a MenuItem to a new position within the Menu.
voidsetAccelGroup(AccelGroup accelGroup)
Set the AccelGroup which holds global accelerators for the menu.
voidsetTitle(String title)
Sets the title string for this Menu.

Constructor Detail

Menu

public Menu()

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Create a new Menu.

Menu

public Menu(Handle handle)

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Create a new Menu from a handle to a native resource.

Method Detail

detach

public void detach()

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Detaches the menu from the widget to which it had been attached.

getAttachedMenus

public ArrayList getAttachedMenus()

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Returns a list of the menus which are attached to this widget.

getMenu

public static Menu getMenu(Handle handle)

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Create a new Menu from a handle to a native resource.

getTitle

public String getTitle()

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Returns the title of the menu.

Returns: The title for the menu.

getType

public static Type getType()

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Retrieve the runtime type used by the GLib library.

popup

public void popup()

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Displays a menu and makes it available for selection. Applications can use this method to provide context-sensitive menus.

reorderMenuItem

public void reorderMenuItem(MenuItem child, int position)

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Move a MenuItem to a new position within the Menu.

Parameters: child The MenuItem to be moved. position The new position to place the MenuItem.

setAccelGroup

public void setAccelGroup(AccelGroup accelGroup)

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Set the AccelGroup which holds global accelerators for the menu. The accelerator group needs to also be added to all windows that this menu is being used in.

Parameters: accelGroup The AccelGroup to be associated with this Menu.

setTitle

public void setTitle(String title)

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Sets the title string for this Menu. The title is displayed when the menu is shown as a tearoff menu.

Parameters: title The title for the Menu.