MMenuItem

Description

A MMenuItem is an item embedded by MMenu or MPopupMenu.

A simple example

1    //Menu Item created with an action
2    MMenuItem item = new MMenuItem(container, menu, "new1", this, "openDialog");
3
4    //Menu Item without action
5    item = new MMenuItem(container,menu,"new2");
6    item.addAction(this,"openNewWindow");

API

  • Constructors
MMenuItem(MContainer container, IMenu menu, String itemText) Constructs a new instance of this class given its parent container, a menu of item and its text
MMenuItem(MContainer container,IMenu menu, String itemText,Object actionObject, String actionMethodName) Constructs a new instance of this class given its parent container, a menu of item ,its text ,action's object and a method's name
  • Methods
void addAction(Object actionObject, String actionMethodName) Adds an action to the item
MenuItem getItem() Gets an item
void setCascadeStyle() Sets an item with cascade style
void setPushStyle() Sets an item with push style
  • See also superclasses
    • MonoiComponent

MMenuItem.jpg (2 kB) Frédéric ESNAULT, 02/27/2012 12:53 pm