org.gnu.gtk
public class MenuItem extends Item
Constructor Summary | |
---|---|
MenuItem()
Construct a new menu item. | |
MenuItem(Handle handle)
Create a new MenuItem with a handle to a native resource returned from a
call to the native libraries. | |
MenuItem(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. |
Class | getEventListenerClass(String signal) |
EventType | getEventType(String signal) |
static MenuItem | getMenuItem(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.
|
Parameters: handle The handle that represents a pointer to a native resource.
Parameters: label The label to display in the menu item. hasMnemonic Indicates if the provided string contains mnemonics
Parameters: listener The object that has implemented the MenuItemListener interface that is to receive the menu item events.
Parameters: handle The handle that represents a pointer to a native resource.
Parameters: listener The object that is to no longer receive menuitem events.
Parameters: submenu The submenu.