ptolemy.vergil.toolbox
Interface MenuItemFactory

All Known Implementing Classes:
ActorEditorGraphController.ListenToActorFactory, BasicGraphFrame.DocumentationMenuItemFactory, BasicGraphFrame.OpenLibraryMenuItemFactory, BreakpointDialogFactory, MenuActionFactory, PortDialogFactory, RadioMenuActionFactory, RenameDialogFactory, TransformationEditor.MatchingAttributeActionsFactory

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 38798 2005-07-08 20:00:01Z cxh $
Author:
Steve Neuendorffer and Edward A. Lee
Accepted Rating:
Red (cxh)
Proposed Rating:
Red (cxh)

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.
 

Method Detail

create

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.