Package javax.swing

Examples of javax.swing.JPopupMenu.show()


    ti.addMouseListener(new MouseListener()
    {

      public void mouseClicked(MouseEvent e)
      {
        popup.show(e.getComponent(), e.getX() - popup.getWidth(), e.getY() - popup.getHeight());

      }

      public void mouseEntered(MouseEvent e)
      {
View Full Code Here


      }

      public void mousePressed(MouseEvent e)
      {
        popup.show(e.getComponent(), e.getX() - popup.getWidth(), e.getY() - popup.getHeight());

      }

      public void mouseReleased(MouseEvent e)
      {
View Full Code Here

                    Model model = (Model) getModel();
                    if (!model._isPressed()) {
                        if (isInArrowArea(e.getPoint()) && menu.getComponentCount() > 0) {
                            model._press();
                            menu.addPopupMenuListener(getMenuListener());
                            menu.show(JDropDownToggleButton.this, 0, getHeight());
                            popupMenuOperation = true;
                        }
                    } else {
                        model._release();
                        menu.removePopupMenuListener(getMenuListener());
View Full Code Here

        items = new ArrayList<JPopupButtonItem>();
        addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                JPopupMenu menu = createPopup();
                menu.show(JPopupButton.this, 0, getHeight());
            }
        });
    }

    public JPopupMenu createPopup() {
View Full Code Here

            @Override
            public void mousePressed(MouseEvent e) {
                if (mouseSelection && statusLabel.isEnabled()) {
                    JPopupMenu menu = createPopup();
                    menu.show(statusLabel, 0, statusLabel.getHeight());
                }
            }
        });

        if (UIUtils.isAquaLookAndFeel()) {
View Full Code Here

                    Model model = (Model) getModel();
                    if (!model._isPressed()) {
                        if (isInArrowArea(e.getPoint()) && menu.getComponentCount() > 0) {
                            model._press();
                            menu.addPopupMenuListener(getMenuListener());
                            menu.show(JDropDownButton.this, 0, getHeight());
                            popupMenuOperation = true;
                        }
                    } else {
                        model._release();
                        menu.removePopupMenuListener(getMenuListener());
View Full Code Here

                }
            });
            popup.add(checkBox);
        }

        popup.show(c, 8, 8);
    }

    public static void showColumnSelectionDialog(ColumnSelectionModel[] columns, String dialogTitle) {
        ColumnSelectionPanel panel = new ColumnSelectionPanel(columns);
        int res = JOptionPane.showConfirmDialog(null, panel, dialogTitle, JOptionPane.OK_CANCEL_OPTION);
View Full Code Here

            public void mousePressed(MouseEvent e) {
                if (isInArrowArea(e.getPoint())) {
                    JPopupMenu popup = getPopupMenu();
                    if (null != popup) {
                        popup.show(JMenuToggleButton.this, 0, getHeight());
                    }
                }
            }

            public void mouseEntered(MouseEvent e) {
View Full Code Here

                    }
                    menu.addSeparator();
                    menuItem = new JStatusMenuItem(Main.getString("cancel"), Main.getString("statusbar_menutableheader_cancel_help"), m_statusBar);
                    menu.add(menuItem);
                   // m_statusBar.saveText();
                    menu.show(ev.getComponent(), ev.getX(), ev.getY());
                }
            }
        });
    }
   
View Full Code Here

                        menu.addSeparator();

                        menuItem = new JStatusMenuItem(Main.getString("cancel"), Main.getString("statusbar_menuimg_cancel_help"), m_statusBar);
                        menu.add(menuItem);
                        m_statusBar.saveText();
                        menu.show(m_imgView, ev.getX(), ev.getY());
                    }
                }
            }
        });
    }
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.