Package javax.swing.event

Examples of javax.swing.event.PopupMenuListener


            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


                    menu.add(menuItem);
                }
            }
        }

        menu.addPopupMenuListener(new PopupMenuListener() {
            @Override
            public void popupMenuWillBecomeVisible(PopupMenuEvent e) {
            }

            @Override
View Full Code Here

                setPermissionsDialog.createCenterPanel();
                setPermissionsDialog.show();
            }
        });
        popupMenu.add(adminMenuItem);
        popupMenu.addPopupMenuListener(new PopupMenuListener() {
            @Override
            public void popupMenuWillBecomeVisible(PopupMenuEvent e) {
                FlooHandler floohandler = context.getFlooHandler();
                if (floohandler == null) {
                    return;
View Full Code Here

    summary.setIcon(LogicConstants.getIcon("menucontextual_icon_ficha"));
    summary.addActionListener(this);
    menu.add(summary);
    summary.setEnabled(false);

    menu.addPopupMenuListener(new PopupMenuListener() {

      @SuppressWarnings("unchecked")
      @Override
      public void popupMenuWillBecomeVisible(PopupMenuEvent e) {
        eventOriginal = FleetControlMapViewer.this.mapView.lastMEvent;
View Full Code Here

            eventOriginal.getY()), mapView.zoomFactor);
      }
    });
    menu.add(cent);

    menu.addPopupMenuListener(new PopupMenuListener() {

      @Override
      public void popupMenuWillBecomeVisible(PopupMenuEvent e) {
        eventOriginal = HistoryMapViewer.this.mapView.lastMEvent;
      }
View Full Code Here

    /*
     * Test method for 'javax.swing.JPopupMenu.addPopupMenuListener(PopupMenuListener)'
     */
    public void testAddGetRemovePopupMenuListener() {
        PopupMenuListener listener1 = new ConcretePopupMenuListener();
        PopupMenuListener listener2 = new ConcretePopupMenuListener();
        PopupMenuListener listener3 = new ConcretePopupMenuListener();
        EventListener[] listenersArray = null;
        listenersArray = popup.getPopupMenuListeners();
        int initialValue = listenersArray.length;
        popup.addPopupMenuListener(listener1);
        popup.addPopupMenuListener(listener2);
View Full Code Here

        MenuUtilities.cleanPopupLayoutMetrics(popupMenu);
      }
    };
    this.popupMenu.addContainerListener(this.substanceContainerListener);

    this.substancePopupMenuListener = new PopupMenuListener() {
      @Override
      public void popupMenuWillBecomeVisible(PopupMenuEvent e) {
      }

      @Override
View Full Code Here

    if (span != null) {
      textComponent.setCaretPosition(span.start);
      textComponent.moveCaretPosition(span.end);
    }

    popup.addPopupMenuListener(new PopupMenuListener() {
      @Override
      public void popupMenuWillBecomeVisible(PopupMenuEvent e) {
      }

      @Override
View Full Code Here

          final RecordEntity entity = model.data.get(modelRow);
          entity.delete();
        }
      }
    });
    popup.addPopupMenuListener(new PopupMenuListener() {
     
      @Override
      public void popupMenuWillBecomeVisible(PopupMenuEvent e) {
        int model = convertRowIndexToModel(getSelectedRow());
        boolean enable = !(model < 0 || model == getRowCount() - 1);
View Full Code Here

        hbox.add(_colorClasses = new JComboBox());
        hbox.add(_colorIds = new JComboBox());
        vert.add(createLabel("Colorizations:", hbox), GroupLayout.FIXED);
        _colorClasses.addActionListener(this);
        _colorIds.addActionListener(this);
        _colorClasses.addPopupMenuListener(new PopupMenuListener() {
            public void popupMenuCanceled (PopupMenuEvent e) { }
            public void popupMenuWillBecomeInvisible (PopupMenuEvent e) { }
            public void popupMenuWillBecomeVisible (PopupMenuEvent e) {
                recomputeColorClasses();
            }
View Full Code Here

TOP

Related Classes of javax.swing.event.PopupMenuListener

Copyright © 2018 www.massapicom. 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.