Example #1
0
  private void mouseRightPopupMenu(final Point viewCoords) {
    String partialPlanName = partialPlan.getPartialPlanName();
    PwPlanningSequence planSequence = PlanWorks.getPlanWorks().getPlanSequence(partialPlan);
    JPopupMenu mouseRightPopup = new JPopupMenu();

    JMenuItem nodeByKeyItem = new JMenuItem("Find by Key");
    createNodeByKeyItem(nodeByKeyItem);
    mouseRightPopup.add(nodeByKeyItem);

    JMenuItem findEntityPathItem = new JMenuItem("Find Entity Path");
    createFindEntityPathItem(findEntityPathItem);
    mouseRightPopup.add(findEntityPathItem);

    if (highlightPathNodesList != null) {
      JMenuItem highlightPathItem = new JMenuItem("Highlight Current Path");
      createHighlightPathItem(highlightPathItem, highlightPathNodesList);
      mouseRightPopup.add(highlightPathItem);
    }

    createOpenViewItems(
        partialPlan,
        partialPlanName,
        planSequence,
        mouseRightPopup,
        viewListenerList,
        ViewConstants.NAVIGATOR_VIEW);

    JMenuItem overviewWindowItem = new JMenuItem("Overview Window");
    createOverviewWindowItem(overviewWindowItem, this, viewCoords);
    mouseRightPopup.add(overviewWindowItem);

    this.createZoomItem(jGoView, zoomFactor, mouseRightPopup, this);

    createAllViewItems(
        partialPlan, partialPlanName, planSequence, viewListenerList, mouseRightPopup);

    ViewGenerics.showPopupMenu(mouseRightPopup, this, viewCoords);
  } // end mouseRightPopupMenu