public class KeplerContextMenuFactory extends PtolemyMenuFactory implements diva.gui.toolbox.MenuFactory
Modifier and Type | Class and Description |
---|---|
static class |
KeplerContextMenuFactory.Factory
A factory that creates the KeplerContextMenuFactory - used by the config
|
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
_menuBaseName |
Constructor and Description |
---|
KeplerContextMenuFactory(diva.graph.GraphController controller)
Create a new menu factory that contains no menu item factories.
|
Modifier and Type | Method and Description |
---|---|
diva.gui.toolbox.JContextMenu |
create(diva.canvas.Figure figure)
Create an instance of the menu associated with this factory.
|
protected java.util.Map<java.lang.String,javax.swing.Action> |
getOriginalMenuItemsMap(NamedObj object,
boolean isWorkflow)
get Map of name/value pairs containing menu paths of original PTII
context- menu items, and their correspondign Action objects
|
protected java.awt.Component |
getParent(diva.canvas.Figure figure) |
_getObjectFromFigure, addMenuItemFactory, getController, menuItemFactoryList, removeMenuItemFactory
protected java.lang.String _menuBaseName
public KeplerContextMenuFactory(diva.graph.GraphController controller)
controller
- GraphControllerpublic diva.gui.toolbox.JContextMenu create(diva.canvas.Figure figure)
create
in interface diva.gui.toolbox.MenuFactory
create
in class PtolemyMenuFactory
figure
- The figure for which to create a context menu.protected java.util.Map<java.lang.String,javax.swing.Action> getOriginalMenuItemsMap(NamedObj object, boolean isWorkflow)
object
- NamedObjisWorkflow
- boolean - @todo - FIXME - this is a gnarly hack because a
workflow is actually a TypedCompositeActor, so if we just rely
in the "instanceof" checks like we do for other context menus,
this code will assume the workflow is actually an actor, and
will display the actor context menu instead of the workflow
oneprotected java.awt.Component getParent(diva.canvas.Figure figure)