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