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... |
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.
|
Construct BarMenu based on the heads and associated commands. Do not use "::" in commands! |
|
Add the default SaMethodMenu to the bar.
|
|
Add the SaMethodMenu with the given name.
|
|
Add the SaMethodMenu with the given name and prefixKey.
|
|
Enable/disable the given menu item. To do: only works for part of menu given via constructor. |
|
Add a BarMenu event listener.
|
|
Remove the given BarMenu event listener.
|
|
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. |
|
A menu separator.
|
|
The help menu.
|