All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class CH.ifa.draw.util.CommandMenu

java.lang.Object
   |
   +----java.awt.MenuComponent
           |
           +----java.awt.MenuItem
                   |
                   +----java.awt.Menu
                           |
                           +----CH.ifa.draw.util.CommandMenu

public class CommandMenu
extends Menu
implements ActionListener

Constructor Index

 o CommandMenu(String)

Method Index

 o actionPerformed(ActionEvent)
Executes the command.
 o add(Command)
Adds a command to the menu.
 o add(Command, MenuShortcut)
Adds a command with the given short cut to the menu.
 o checkEnabled()
 o enable(String, boolean)
Changes the enabling/disabling state of a named menu item.
 o remove(Command)
 o remove(MenuItem)

Constructors

 o CommandMenu
 public CommandMenu(String name)

Methods

 o add
 public synchronized void add(Command command)
Adds a command to the menu. The item's label is the command's name.

 o add
 public synchronized void add(Command command,
                              MenuShortcut shortcut)
Adds a command with the given short cut to the menu. The item's label is the command's name.

 o remove
 public synchronized void remove(Command command)
 o remove
 public synchronized void remove(MenuItem item)
 o enable
 public synchronized void enable(String name,
                                 boolean state)
Changes the enabling/disabling state of a named menu item.

 o checkEnabled
 public synchronized void checkEnabled()
 o actionPerformed
 public void actionPerformed(ActionEvent e)
Executes the command.


All Packages  Class Hierarchy  This Package  Previous  Next  Index