Search in sources :

Example 16 with ActionManager

use of org.apache.cayenne.modeler.action.ActionManager 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

ActionManager (org.apache.cayenne.modeler.action.ActionManager)16 BorderLayout (java.awt.BorderLayout)9 JPopupMenu (javax.swing.JPopupMenu)7 JToolBar (javax.swing.JToolBar)7 Icon (javax.swing.Icon)6 TableColumnPreferences (org.apache.cayenne.modeler.pref.TableColumnPreferences)6 CayenneTable (org.apache.cayenne.modeler.util.CayenneTable)6 CayenneAction (org.apache.cayenne.modeler.util.CayenneAction)4 DefaultFormBuilder (com.jgoodies.forms.builder.DefaultFormBuilder)3 FormLayout (com.jgoodies.forms.layout.FormLayout)3 JTextField (javax.swing.JTextField)3 RemoveAttributeAction (org.apache.cayenne.modeler.action.RemoveAttributeAction)3 TextAdapter (org.apache.cayenne.modeler.util.TextAdapter)3 CopyAttributeRelationshipAction (org.apache.cayenne.modeler.action.CopyAttributeRelationshipAction)2 CutAttributeRelationshipAction (org.apache.cayenne.modeler.action.CutAttributeRelationshipAction)2 RemoveAttributeRelationshipAction (org.apache.cayenne.modeler.action.RemoveAttributeRelationshipAction)2 RemoveCallbackMethodAction (org.apache.cayenne.modeler.action.RemoveCallbackMethodAction)2 RemoveRelationshipAction (org.apache.cayenne.modeler.action.RemoveRelationshipAction)2 BoardTableCellRenderer (org.apache.cayenne.modeler.util.BoardTableCellRenderer)2 ValidationException (org.apache.cayenne.validation.ValidationException)2