|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gnu.glib.Struct
org.gnu.glib.GObject
org.gnu.gtk.GtkObject
org.gnu.gtk.Widget
org.gnu.gtk.Container
org.gnu.gtk.MenuShell
public abstract class MenuShell
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 | |
---|---|
void |
activateItem(MenuItem menuItem,
boolean forceDeactivate)
Activates the MenuItem within the MenuShell. |
void |
append(MenuItem child)
Append a new MenuItem to the end of the MenuShell's item list. |
void |
cancel()
Cancels the selection within the menu shell. |
void |
deactivate()
Deactivates the MenuShell. |
void |
deselect()
Deselects the currently selected item from the MenuShell. |
boolean |
getTakeFocus()
|
static Type |
getType()
Retrieve the runtime type used by the GLib library. |
void |
insert(MenuItem child,
int position)
Adds a new MenuItem to the MenuShell's item list at the requested position. |
void |
prepend(MenuItem child)
Adds a new MenuItem to the beginning of the MenuShell's item list. |
void |
selectFirst(boolean searchSensitive)
Select the first visible or selectable child of the menu shell. |
void |
selectItem(MenuItem menuItem)
Selects the MenuItem from the MenuShell. |
void |
setTakeFocus(boolean takeFocus)
|
Methods inherited from class org.gnu.gtk.Container |
---|
add, addListener, getBooleanChildProperty, getBorderWidth, getChildProperty, getChildren, getEventListenerClass, getEventType, getIntChildProperty, getResizeMode, remove, removeListener, resizeChildren, setBooleanChildProperty, setBorderWidth, setChildProperty, setIntChildProperty, setResizeMode |
Methods inherited from class org.gnu.gtk.GtkObject |
---|
destroy, sink |
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 |
Method Detail |
---|
public void append(MenuItem child)
child
- The MenuItem to addpublic void prepend(MenuItem child)
child
- The MenuItem to add.public void insert(MenuItem child, int position)
child
- The MenuItem to add.position
- The position in the item list where child
is
added. Positions are zero based.public void deactivate()
public void selectItem(MenuItem menuItem)
menuItem
- The MenuItem to select.public void deselect()
public void activateItem(MenuItem menuItem, boolean forceDeactivate)
menuItem
- The MenuItem to activate.forceDeactivate
- If true
, force the deactivation of the
MenuShell after the MenuItem is activated.public void selectFirst(boolean searchSensitive)
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.public void cancel()
public boolean getTakeFocus()
public void setTakeFocus(boolean takeFocus)
public static Type getType()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |