Examples of addPopupMenuListener()


Examples of javax.swing.JPopupMenu.addPopupMenuListener()

      else {
        throw new RuntimeException("no popup menu found!");
      }
    }
    final Object userObject = node.getUserObject();
    popup.addPopupMenuListener(new DelegatingPopupMenuListener(listener, userObject));
    }

  public JMenuItem addRadioItem(final String category, final AFreeplaneAction action, final boolean isSelected) {
    assert action != null;
    final String actionKey = "$" + action.getKey() + '$';
View Full Code Here

Examples of javax.swing.JPopupMenu.addPopupMenuListener()

            popup.addSeparator();
          }
        }

        // on popup close make more-button unselected
        popup.addPopupMenuListener(new PopupMenuListener() {

          public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {
            setSelected(false);
          }
View Full Code Here

Examples of javax.swing.JPopupMenu.addPopupMenuListener()

    // open the color changing popup 
    if (popupManager != null && e.isPopupTrigger()) {
      setBorder(focusBorder); //TODO: Externalize the color of this?
      JPopupMenu popup = popupManager.getPopup(this);
      popup.show(this, e.getX(), e.getY());
      popup.addPopupMenuListener(new PopupMenuListener() {

        @Override
        public void popupMenuCanceled(PopupMenuEvent arg0) {
          setBorder(EMPTY_BORDER);
        }
View Full Code Here

Examples of javax.swing.JPopupMenu.addPopupMenuListener()

            nonGemPopupMenu.add(GemCutter.makeNewMenuItem(getTidyTableTopAction()));
            nonGemPopupMenu.add(GemCutter.makeNewMenuItem(getFitTableTopAction()));
        }
       
        // This listener enables/disables the add emitter item and resets the popup location
        nonGemPopupMenu.addPopupMenuListener(new PopupMenuListener() {
           
            public void popupMenuWillBecomeVisible(PopupMenuEvent e) {
               
                // Get the names of all the collectors.
                List<String> sortedReflectorNames = new ArrayList<String>();
View Full Code Here

Examples of javax.swing.JPopupMenu.addPopupMenuListener()

                   
                        JPopupMenu popup = ((JMenu)evt.getSource()).getPopupMenu();
                        RunDropDownMenuListener menuListener = new RunDropDownMenuListener();
                       
                        // Add the new listener
                        popup.addPopupMenuListener(menuListener);
                        runMenuItem.addChangeListener(menuListener);

                        // Add the menu item to the listeners internal menuitem->gem map
                        DisplayedGem displayedGem = getTableTop().getDisplayedGem(currentGemToRun);
                        menuListener.addMenuItem(runMenuItem, displayedGem);
View Full Code Here

Examples of javax.swing.JPopupMenu.addPopupMenuListener()

            if (qualificationType == QualificationType.UnqualifiedArgument) {

                gemCodePanel.getVariablesDisplay().selectPanelForArgument(identifier.getName());
                gemCodePanel.getQualificationsDisplay().clearSelection();
                JPopupMenu menu = getArgumentPopupMenu(identifier);
                menu.addPopupMenuListener(editorMenuFocusListener);
                return menu;
            }

            // Qualified symbol ?
            if (qualificationType.isResolvedTopLevelSymbol()) {
View Full Code Here

Examples of javax.swing.JPopupMenu.addPopupMenuListener()

            // Qualified symbol ?
            if (qualificationType.isResolvedTopLevelSymbol()) {
                gemCodePanel.getQualificationsDisplay().selectPanelForIdentifier(identifier);
                gemCodePanel.getVariablesDisplay().clearSelection();
                JPopupMenu menu = getQualificationPopupMenu(identifier);
                menu.addPopupMenuListener(editorMenuFocusListener);
                return menu;
            }

            // Ambiguity ?
            if (qualificationType == QualificationType.UnqualifiedAmbiguousTopLevelSymbol) {
View Full Code Here

Examples of javax.swing.JPopupMenu.addPopupMenuListener()

            // Ambiguity ?
            if (qualificationType == QualificationType.UnqualifiedAmbiguousTopLevelSymbol) {
                gemCodePanel.getQualificationsDisplay().selectPanelForIdentifier(identifier);
                gemCodePanel.getVariablesDisplay().clearSelection();
                JPopupMenu menu = getAmbiguityPopupMenu(identifier);
                menu.addPopupMenuListener(editorMenuFocusListener);
                return menu;
            }

            // Local Variable ?
            if (qualificationType == QualificationType.UnqualifiedLocalVariable) {
View Full Code Here

Examples of javax.swing.JPopupMenu.addPopupMenuListener()

                CodeAnalyser.AnalysedIdentifier analysedIdentifier = identifier.getReference();
                if (analysedIdentifier != null) {

                    JPopupMenu menu = new JPopupMenu();
                    menu.add(new RenameLocalVarMenuItem(analysedIdentifier));
                    menu.addPopupMenuListener(new HighlightVariablePopupListener(analysedIdentifier));
                    return menu;
                }
            }

            // This menu only handles ambiguities, arguments, or qualified
View Full Code Here

Examples of javax.swing.JPopupMenu.addPopupMenuListener()

                SourceIdentifier.Category type = identifier.getCategory();
                boolean mapQualified = (qualificationType == CodeAnalyser.AnalysedIdentifier.QualificationType.UnqualifiedResolvedTopLevelSymbol);
               
                getQualificationsDisplay().selectPanelForIdentifier(identifier);
                JPopupMenu menu = getQualificationPopupMenu(unqualifiedName, moduleName, type, mapQualified);
                menu.addPopupMenuListener(editorMenuFocusListener);
                return menu;
            }
           
            // Ambiguity ?
            if (qualificationType == CodeAnalyser.AnalysedIdentifier.QualificationType.UnqualifiedAmbiguousTopLevelSymbol) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.