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

ExtMenuBar Class Reference

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

Inheritance diagram for ExtMenuBar::

CorbaExtMenuBar List of all members.

Public Methods

 ExtMenuBar (Object user)
 Construct an ExtMenuBar. More...

JMenu addMenu (String menuName)
 Add a new menu to the bar. More...

void addSubMenu (String menuName, String subMenuName)
 Add a sub menu to the given menu. More...

void addGroupMenu (String menuName, String[] options, String funcName, String selected)
 Add an group of items (RadioButtons) to the given menu. More...

void addCheckBoxItem (String menuName, String itemName, String funcName, boolean checked)
 Add a check-box menu item to the given menu. More...

void addColorsMenu (String menuName, String funcName)
 Add color items to the given menu. More...

void addMenuItem (String menuName, JMenuItem item)
void addMenuItem (String menuName, Action ac)
void addMenuItem (String menuName, String itemName, Action ac)
void addMenuItem (String menuName, String itemName, String funcName)
 Add an item to the given menu. More...

void addMenuItem (String menuName, String itemName, CallableMethod method)
 Add an item to the given menu. More...

void addMenuItem (String menuName, String itemName, Object target, CallableMethod method)
 Add an item to the given menu. More...

void addMenuItem (String menuName, String itemName, Object target, CallableMethod targetMethod, Object user, String userMethodName)
 Add an item to the given menu. More...

void addSeparator (String menuName)
 Add a separator to the given menu. 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 actionPerformed (ActionEvent event)
 Implementation of ActionListener. More...


Static Public Methods

JMenuItem colorMenuItem (int i)
JMenuItem colorMenuItem (Color c)

Static Public Attributes

final Color[] colors = listColors()

Protected Attributes

Object _user

Detailed Description

Representation of an (extended) menu bar.


Constructor & Destructor Documentation

ExtMenuBar::ExtMenuBar Object    user [inline]
 

Construct an ExtMenuBar.

The user object will be called whenever a menu item is selected.


Member Function Documentation

JMenu ExtMenuBar::addMenu String    menuName [inline]
 

Add a new menu to the bar.

void ExtMenuBar::addSubMenu String    menuName,
String    subMenuName
[inline]
 

Add a sub menu to the given menu.

void ExtMenuBar::addGroupMenu String    menuName,
String    options[],
String    funcName,
String    selected
[inline]
 

Add an group of items (RadioButtons) to the given menu.

The member function "funcName" of the user should have the following signature: public void "funcName"(String option)

"option" is the option selected from the group

void ExtMenuBar::addCheckBoxItem String    menuName,
String    itemName,
String    funcName,
boolean    checked
[inline]
 

Add a check-box menu item to the given menu.

The member function "funcName" of the user should have the following signature: public void "funcName"(boolean val)

void ExtMenuBar::addColorsMenu String    menuName,
String    funcName
[inline]
 

Add color items to the given menu.

The member function "funcName" of the user should have the following signature: public void "funcName"(Color color)

"color" is the color selected

JMenuItem ExtMenuBar::colorMenuItem int    i [inline, static]
 

JMenuItem ExtMenuBar::colorMenuItem Color    c [inline, static]
 

void ExtMenuBar::addMenuItem String    menuName,
JMenuItem    item
[inline]
 

void ExtMenuBar::addMenuItem String    menuName,
Action    ac
[inline]
 

void ExtMenuBar::addMenuItem String    menuName,
String    itemName,
Action    ac
[inline]
 

void ExtMenuBar::addMenuItem String    menuName,
String    itemName,
String    funcName
[inline]
 

Add an item to the given menu.

Upon selection, the bar will call \_user.funcName (without arguments).

void ExtMenuBar::addMenuItem String    menuName,
String    itemName,
CallableMethod    method
[inline]
 

Add an item to the given menu.

Upon selection, the bar will invoke the given method on the \_user object. Method invocation is direct in case the method has no arguments, otherwise the bar will first pop a JavaFuncDialog.

void ExtMenuBar::addMenuItem String    menuName,
String    itemName,
Object    target,
CallableMethod    method
[inline]
 

Add an item to the given menu.

Upon selection, the bar will invoke the given method on the target object. Method invocation is direct in case the method has no arguments, otherwise the bar will first pop a JavaFuncDialog.

void ExtMenuBar::addMenuItem String    menuName,
String    itemName,
Object    target,
CallableMethod    targetMethod,
Object    user,
String    userMethodName
[inline]
 

Add an item to the given menu.

This method provides method invocation via an intermediate call to a user. The intermediate user is necessary in case the target object is not known at menu construction time.

The member function "userMethodName" of this user will be called (either directly or via a JavaFuncDialog) upon selection of the menu item. The function should have the following signature: public void "userMethodName"(Object target, CallableMethod method, Object[] argVals) "target" is the target specified at menu construction time "method" is the method to be invoked on target "argVals" are the arguments of the method entered via the dialog box

"userMethodName" is resposible for invoking the callable method on the given target or (more likely) an object of its own choice, e.g. method.invoke(mytarget, argVals);

void ExtMenuBar::addSeparator String    menuName [inline]
 

Add a separator to the given menu.

void ExtMenuBar::addSaMethodMenu   [inline]
 

Add the default SaMethodMenu to the bar.

void ExtMenuBar::addSaMethodMenu String    saClassName [inline]
 

Add the SaMethodMenu with the given name.

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

Add the SaMethodMenu with the given name and prefixKey.

void ExtMenuBar::actionPerformed ActionEvent    event [inline]
 

Implementation of ActionListener.


Member Data Documentation

final Color [] ExtMenuBar::colors = listColors() [static]
 

Object ExtMenuBar::_user [protected]
 


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