Creates a new instance of MyMenu @param parentView @param menuListener @param menuCommands @param caption @param il
(MenuListener menuListener, String caption, ImageList il, Vector menuCommands)
| 49 | * @param il |
| 50 | */ |
| 51 | public MyMenu(MenuListener menuListener, String caption, ImageList il, Vector menuCommands) { |
| 52 | super(caption, il); |
| 53 | this.ml=menuListener; |
| 54 | this.commands = menuCommands; |
| 55 | |
| 56 | for (int i=0; i<commands.size(); i++) { |
| 57 | MenuCommand c=(MenuCommand)commands.elementAt(i); |
| 58 | addItem(c.name, i, c.img); |
| 59 | } |
| 60 | show(); |
| 61 | } |
| 62 | |
| 63 | public void eventOk(){ |
| 64 | MenuItem me=(MenuItem) getFocusedObject(); |