Search in sources :

Example 1 with RemoveEntityAction

use of org.apache.cayenne.modeler.graph.action.RemoveEntityAction in project cayenne by apache.

the class BaseGraphBuilder method createPopupMenu.

/**
 * Creates popup menu
 */
protected JPopupMenu createPopupMenu() {
    ActionManager actionManager = Application.getInstance().getActionManager();
    JPopupMenu menu = new JPopupMenu();
    menu.add(new EntityDisplayAction(this).buildMenu());
    menu.addSeparator();
    menu.add(new EntityDisplayAction(this, actionManager.getAction(CreateAttributeAction.class)).buildMenu());
    menu.add(new EntityDisplayAction(this, actionManager.getAction(CreateRelationshipAction.class)).buildMenu());
    menu.addSeparator();
    menu.add(new RemoveEntityAction(this));
    return menu;
}
Also used : ActionManager(org.apache.cayenne.modeler.action.ActionManager) CreateAttributeAction(org.apache.cayenne.modeler.action.CreateAttributeAction) CreateRelationshipAction(org.apache.cayenne.modeler.action.CreateRelationshipAction) RemoveEntityAction(org.apache.cayenne.modeler.graph.action.RemoveEntityAction) EntityDisplayAction(org.apache.cayenne.modeler.graph.action.EntityDisplayAction) JPopupMenu(javax.swing.JPopupMenu)

Aggregations

JPopupMenu (javax.swing.JPopupMenu)1 ActionManager (org.apache.cayenne.modeler.action.ActionManager)1 CreateAttributeAction (org.apache.cayenne.modeler.action.CreateAttributeAction)1 CreateRelationshipAction (org.apache.cayenne.modeler.action.CreateRelationshipAction)1 EntityDisplayAction (org.apache.cayenne.modeler.graph.action.EntityDisplayAction)1 RemoveEntityAction (org.apache.cayenne.modeler.graph.action.RemoveEntityAction)1