1 | protected ArgoJMenu buildShowPopUp() { | | 1 | /** |
2 | ArgoJMenu showMenu = super.buildShowPopUp(); | | 2 | * Build a collection of menu items relevant for a right-click |
3 | | | 3 | * pop-up menu on a Stereotype. |
4 | Iterator i = ActionCompartmentDisplay.getActions().iterator(); | | 4 | * {@inheritDoc} |
5 | while (i.hasNext()) { | | 5 | */ |
6 | showMenu.add((Action) i.next()); | | 6 | @Override |
7 | } | | 7 | public Vector getPopUpActions(MouseEvent me) { |
8 | return showMenu; | | 8 | Vector popUpActions = super.getPopUpActions(me); |
9 | } | | 9 | |
| | | 10 | // Add... |
| | | 11 | ArgoJMenu addMenu = new ArgoJMenu("menu.popup.add"); |
| | | 12 | // TODO: Add Tags & Constraints |
| | | 13 | // addMenu.add(TargetManager.getInstance().getAddAttributeAction()); |
| | | 14 | // addMenu.add(TargetManager.getInstance().getAddOperationAction()); |
| | | 15 | addMenu.add(new ActionAddNote()); |
| | | 16 | addMenu.add(new ActionNewTagDefinition()); |
| | | 17 | addMenu.add(ActionEdgesDisplay.getShowEdges()); |
| | | 18 | addMenu.add(ActionEdgesDisplay.getHideEdges()); |
| | | 19 | popUpActions.add(popUpActions.size() - getPopupAddOffset(), addMenu); |
| | | 20 | |
| | | 21 | // Show ... |
| | | 22 | ArgoJMenu showMenu = new ArgoJMenu("menu.popup.show"); |
| | | 23 | for (Action action : ActionCompartmentDisplay.getActions()) { |
| | | 24 | showMenu.add(action); |
| | | 25 | } |
| | | 26 | if (showMenu.getComponentCount() > 0) { |
| | | 27 | popUpActions.add(popUpActions.size() - getPopupAddOffset(), |
| | | 28 | showMenu); |
| | | 29 | } |
| | | 30 | |
| | | 31 | // Modifiers ... |
| | | 32 | popUpActions.add(popUpActions.size() - getPopupAddOffset(), |
| | | 33 | buildModifierPopUp(ABSTRACT | LEAF | ROOT)); |
| | | 34 | |
| | | 35 | // Visibility ... |
| | | 36 | popUpActions.add(popUpActions.size() - getPopupAddOffset(), |
| | | 37 | buildVisibilityPopUp()); |
| | | 38 | |
| | | 39 | return popUpActions; |
| | | 40 | } |