Main Page   Packages   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

BarMenu Class Reference

Representation of an (extended) menu bar. More...

List of all members.

Public Methods

 BarMenu (String[] heads, String[][] commands)
 Construct BarMenu based on the heads and associated commands. More...

void addSaMethodMenu ()
 Add the default SaMethodMenu to the bar. More...

void addSaMethodMenu (String saClassName)
 Add the SaMethodMenu with the given name. More...

void addSaMethodMenu (String saClassName, String prefixKey)
 Add the SaMethodMenu with the given name and prefixKey. More...

void setEnabled (boolean b, String command)
 Enable/disable the given menu item. More...

void addBarMenuListener (BarMenuListener l)
 Add a BarMenu event listener. More...

void removeBarMenuListener (BarMenuListener l)
 Remove the given BarMenu event listener. More...

void actionPerformed (ActionEvent event)
 Implementation of ActionListener. More...


Static Public Attributes

final String DELIM = "_--_"
 A menu separator. More...

final String HELP = "Help"
 The help menu. More...


Detailed Description

Representation of an (extended) menu bar.

It needs an array of heads that will serve as names for the pulldown menus of the menu bar. For each head an array of commands is also expected. Submenus with string addressable functions based on the information in the registry can be added using addSaMethodMenu. Upon menu selections by the user this menu bar sends BarMenuEvents to the associated BarMenuListeners.


Constructor & Destructor Documentation

BarMenu::BarMenu String    heads[],
String    commands[][]
[inline]
 

Construct BarMenu based on the heads and associated commands.

Do not use "::" in commands!


Member Function Documentation

void BarMenu::addSaMethodMenu   [inline]
 

Add the default SaMethodMenu to the bar.

void BarMenu::addSaMethodMenu String    saClassName [inline]
 

Add the SaMethodMenu with the given name.

void BarMenu::addSaMethodMenu String    saClassName,
String    prefixKey
[inline]
 

Add the SaMethodMenu with the given name and prefixKey.

void BarMenu::setEnabled boolean    b,
String    command
[inline]
 

Enable/disable the given menu item.

To do: only works for part of menu given via constructor.

void BarMenu::addBarMenuListener BarMenuListener    l [inline]
 

Add a BarMenu event listener.

void BarMenu::removeBarMenuListener BarMenuListener    l [inline]
 

Remove the given BarMenu event listener.

void BarMenu::actionPerformed ActionEvent    event [inline]
 

Implementation of ActionListener.

Checks whether the event came from an SaMethodMenu or a normal menu By looking for "::" in the action command. Sends a BarMenuEvent to the listeners.


Member Data Documentation

final String BarMenu::DELIM = "_--_" [static]
 

A menu separator.

final String BarMenu::HELP = "Help" [static]
 

The help menu.


The documentation for this class was generated from the following file:
Generated on Tue Jan 8 14:14:21 2002 for JavaReference by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001