Package javax.swing.event

Examples of javax.swing.event.PopupMenuListener


  public void showPopup() {

    ActionPopupMenu menu = ActionManager.getInstance().createActionPopupMenu("POPUP", myActionGroup);
    JPopupMenu menuComponent = menu.getComponent();
    menuComponent.addPopupMenuListener(
      new PopupMenuListener() {
        public void popupMenuWillBecomeVisible(PopupMenuEvent e) {}

        public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {
          myForcePressed = false;
          repaint();
View Full Code Here


            public void actionPerformed(ActionEvent e) {
                performAction();
            }
        });

        popup.addPopupMenuListener(new PopupMenuListener() {

            public void popupMenuCanceled(PopupMenuEvent e) {
                dropDownButton.setSelected(false);
            }
View Full Code Here

            legendEntry.setNumberRegressionPoints(Integer.parseInt(((JSpinner)e.getSource()).getValue().toString()));
          }

        })
       
        addPopupMenuListener(new PopupMenuListener() {

          @Override
          public void popupMenuWillBecomeVisible(PopupMenuEvent e) {
            // TODO Auto-generated method stub
          }
View Full Code Here

    // 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

    private static HashSet<IGVPopupMenu> instances = new HashSet();

    public IGVPopupMenu() {
        instances.add(this);
        addPopupMenuListener(new PopupMenuListener() {
            public void popupMenuWillBecomeVisible(PopupMenuEvent popupMenuEvent) {

            }

            public void popupMenuWillBecomeInvisible(PopupMenuEvent popupMenuEvent) {
View Full Code Here

        genomeComboBox = new JComboBox();
        genomeComboBox.setMinimumSize(new Dimension(180, 27));
        genomeComboBox.setPreferredSize(new Dimension(180, 27));

        genomeComboBox.addPopupMenuListener(new PopupMenuListener() {
            @Override
            public void popupMenuWillBecomeVisible(PopupMenuEvent e) {
                try {
                    adjustPopupWidth(genomeComboBox);
                } catch (Exception e1) {
View Full Code Here

    };
   
    final JComboBox combo = (JComboBox)editor;
   
    combo.setRenderer(new Renderer());
    combo.addPopupMenuListener(new PopupMenuListener() {
      public void popupMenuCanceled(PopupMenuEvent e) {}
      public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {
        ComboBoxPropertyEditor.this.firePropertyChange(oldValue,
          combo.getSelectedItem());
      }
View Full Code Here

                setEditable(true);
                setEditor(new ComboEditor(textEditor));
            }
           
            // popup menu listener to determine when to close editor and commit value
            addPopupMenuListener(new PopupMenuListener() {
               
                ///** marks whether popup has been canceled.
                boolean cancelled = false; // is there a better way to do this?
               
                public void popupMenuCanceled(PopupMenuEvent e) {
View Full Code Here

                    }
                }
            });           
           
            // Create a popup listener that selects the new name field text whenever an item is selected.
            PopupMenuListener popupMenuListener = new PopupMenuListener() {
                public void popupMenuWillBecomeVisible(PopupMenuEvent e) {}
                public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {
                    newNameField.requestFocus();
                    newNameField.selectAll();
                }
View Full Code Here

            menuItem.addChangeListener(itemChangeArmer);
        }
       
        // Add a popup menu listener that will strip off the item change armer as a listener
        // when the popup menu disappears
        popupMenu.addPopupMenuListener(new PopupMenuListener() {
            public void popupMenuCanceled(PopupMenuEvent e){}
            public void popupMenuWillBecomeVisible(PopupMenuEvent e){}

            public void popupMenuWillBecomeInvisible(PopupMenuEvent e){
                for (int i = 0; i < nMenuItems; i++) {
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.