ptolemy.vergil.toolbox
Interface MenuItemFactory
- All Known Implementing Classes:
- ArgumentDialogFactory, BreakpointDialogFactory, MenuActionFactory, PortDialogFactory, RenameDialogFactory
- public interface MenuItemFactory
This is an interface for factories that create menu items.
Objects that implement this interface can be used in conjunction
with a MenuCreator to implement context menu items.
- Since:
- Ptolemy II 1.0
- Version:
- $Id: MenuItemFactory.java,v 1.19 2004/04/13 05:12:44 cxh Exp $
- Author:
- Steve Neuendorffer and Edward A. Lee
- Accepted Rating:
- Proposed Rating:
|
Method Summary |
javax.swing.JMenuItem |
create(JContextMenu menu,
NamedObj target)
Add an item to the given context menu that will operate on
specified target, and return the menu item. |
create
public javax.swing.JMenuItem create(JContextMenu menu,
NamedObj target)
- Add an item to the given context menu that will operate on
specified target, and return the menu item. Return null to
decline to add a menu item for the specified target.
- Parameters:
menu - The context menu to add to.target - The object that the menu item command will operate on.
- Returns:
- A menu item, or null to decline to provide a menu item.