org.gnu.gtk

Class MenuShell

public abstract class MenuShell extends Container

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.MenuShell. 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.

The MenuShell class is an abstract base class used to derive the Menu and MenuBar subclasses.

A MenuShell is a container of MenuItem objects arranged in a list which can be navigated, selected, and activated by the user to perform application functions. A MenuItem can have a submenu associated with it, allowing for nested hierarchical menus.

Method Summary
voidactivateItem(MenuItem menuItem, boolean forceDeactivate)
Activates the MenuItem within the MenuShell.
voidappend(MenuItem child)
Append a new MenuItem to the end of the MenuShell's item list.
voidcancel()
Cancels the selection within the menu shell.
voiddeactivate()
Deactivates the MenuShell.
voiddeselect()
Deselects the currently selected item from the MenuShell.
booleangetTakeFocus()
static TypegetType()
Retrieve the runtime type used by the GLib library.
voidinsert(MenuItem child, int position)
Adds a new MenuItem to the MenuShell's item list at the requested position.
voidprepend(MenuItem child)
Adds a new MenuItem to the beginning of the MenuShell's item list.
voidselectFirst(boolean searchSensitive)
Select the first visible or selectable child of the menu shell.
voidselectItem(MenuItem menuItem)
Selects the MenuItem from the MenuShell.
voidsetTakeFocus(boolean takeFocus)

Method Detail

activateItem

public void activateItem(MenuItem menuItem, boolean forceDeactivate)

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.

Activates the MenuItem within the MenuShell.

Parameters: menuItem The MenuItem to activate. forceDeactivate If true, force the deactivation of the MenuShell after the MenuItem is activated.

append

public void append(MenuItem child)

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.

Append a new MenuItem to the end of the MenuShell's item list.

Parameters: child The MenuItem to add

cancel

public void cancel()

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.

Cancels the selection within the menu shell.

deactivate

public void deactivate()

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.

Deactivates the MenuShell. Typically this results in the MenuShell being erased from the screen.

deselect

public void deselect()

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.

Deselects the currently selected item from the MenuShell.

getTakeFocus

public boolean getTakeFocus()

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.

insert

public void insert(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.

Adds a new MenuItem to the MenuShell's item list at the requested position.

Parameters: child The MenuItem to add. position The position in the item list where child is added. Positions are zero based.

prepend

public void prepend(MenuItem child)

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.

Adds a new MenuItem to the beginning of the MenuShell's item list.

Parameters: child The MenuItem to add.

selectFirst

public void selectFirst(boolean searchSensitive)

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.

Select the first visible or selectable child of the menu shell. It won't select tearoff items unless the only item is a tearoff item.

Parameters: searchSensitive If TRUE, search for the first selectable menu item, otherwise select nothing if the first item isn't sensitive. This should be FALSE if the menu is being popped up initially.

selectItem

public void selectItem(MenuItem menuItem)

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.

Selects the MenuItem from the MenuShell.

Parameters: menuItem The MenuItem to select.

setTakeFocus

public void setTakeFocus(boolean takeFocus)