public class PtolemyMenuFactory extends java.lang.Object implements MenuFactory
Red (johnr) |
Red (eal) |
Constructor and Description |
---|
PtolemyMenuFactory(GraphController controller)
Create a new menu factory that contains no menu item factories.
|
Modifier and Type | Method and Description |
---|---|
protected NamedObj |
_getObjectFromFigure(Figure figure)
Return the Ptolemy object that the given figure represents.
|
void |
addMenuItemFactory(MenuItemFactory factory)
Add a menu item factory to this creator.
|
JContextMenu |
create(Figure figure)
Create an instance of the menu associated with this factory.
|
GraphController |
getController()
Return the graph controller that created this menu factory.
|
java.util.List |
menuItemFactoryList()
Return the list of menu item factories.
|
void |
removeMenuItemFactory(MenuItemFactory factory)
Remove the given menu item factory from the factory list.
|
public PtolemyMenuFactory(GraphController controller)
controller
- The controller.public void addMenuItemFactory(MenuItemFactory factory)
factory
- The menu item factory to add.public JContextMenu create(Figure figure)
create
in interface MenuFactory
figure
- The figure for which to create a context menu.public GraphController getController()
public java.util.List menuItemFactoryList()
public void removeMenuItemFactory(MenuItemFactory factory)
factory
- The factory to be removed.protected NamedObj _getObjectFromFigure(Figure figure)
figure
- The figure.