|
|||||||||
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.Bin
org.gnu.gtk.Item
org.gnu.gtk.MenuItem
public class MenuItem
The MenuItem widget and derived widgets are the only valid children for Menus. Their function is to correctly handle highlighting, alignment, events, and submenus.
Constructor Summary | |
---|---|
MenuItem()
Construct a new menu item. |
|
MenuItem(org.gnu.glib.Handle handle)
Create a new MenuItem with a handle to a native resource returned from a call to the native libraries. |
|
MenuItem(java.lang.String label,
boolean hasMnemonic)
Construct a new menu item with the provided label. |
Method Summary | |
---|---|
void |
addListener(MenuItemListener listener)
Register an object to receive event notification. |
void |
emitActivate()
Emits the "activate" signal on this MenuItem. |
void |
emitDeselect()
Emits the "deselect" signal on this MenuItem. |
java.lang.Class |
getEventListenerClass(java.lang.String signal)
|
EventType |
getEventType(java.lang.String signal)
|
static MenuItem |
getMenuItem(org.gnu.glib.Handle handle)
Create a new MenuItem with a handle to a native resource returned from a call to the native libraries. |
static Type |
getType()
Retrieve the runtime type used by the GLib library. |
void |
removeListener(MenuItemListener listener)
Unregister an object that was receiving menuitem event notification. |
void |
removeSubmenu()
Removes the widget's submenu. |
void |
setLeftJustified()
MenuItem's are left justified by default. |
void |
setRightJustified()
Sets whether the menu item appears to the right side of the menu bar. |
void |
setSubmenu(Menu submenu)
Sets the submenu, or changes it. |
Methods inherited from class org.gnu.gtk.Item |
---|
addListener, deselect, removeListener, select, toggle |
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.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 |
Constructor Detail |
---|
public MenuItem()
public MenuItem(org.gnu.glib.Handle handle)
handle
- The handle that represents a pointer to a native resource.public MenuItem(java.lang.String label, boolean hasMnemonic)
label
- The label to display in the menu item.hasMnemonic
- Indicates if the provided string contains mnemonicsMethod Detail |
---|
public static MenuItem getMenuItem(org.gnu.glib.Handle handle)
handle
- The handle that represents a pointer to a native resource.public void setRightJustified()
public void setLeftJustified()
public void setSubmenu(Menu submenu)
submenu
- The submenu.public void removeSubmenu()
public void emitDeselect()
public void emitActivate()
public java.lang.Class getEventListenerClass(java.lang.String signal)
getEventListenerClass
in class Item
public EventType getEventType(java.lang.String signal)
getEventType
in class Item
public void addListener(MenuItemListener listener)
listener
- The object that has implemented the MenuItemListener interface
that is to receive the menu item events.public void removeListener(MenuItemListener listener)
listener
- The object that is to no longer receive menuitem events.public static Type getType()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |