org.xnap.commons.gui.util
Class PopupListener

java.lang.Object
  extended by java.awt.event.MouseAdapter
      extended by org.xnap.commons.gui.util.PopupListener
All Implemented Interfaces:
MouseListener, EventListener

public class PopupListener
extends MouseAdapter

Provides a mouse event listener that displays a popup menu if the user presses the platform dependent popup button.


Constructor Summary
PopupListener()
           
PopupListener(JMenu menu)
           
PopupListener(JPopupMenu popup)
           
 
Method Summary
 JPopupMenu getPopupMenu()
           
 void mousePressed(MouseEvent e)
           
 void mouseReleased(MouseEvent e)
           
protected  void showPopup(Component source, int x, int y)
          Shows the popup menu.
 
Methods inherited from class java.awt.event.MouseAdapter
mouseClicked, mouseEntered, mouseExited
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PopupListener

public PopupListener(JMenu menu)

PopupListener

public PopupListener(JPopupMenu popup)

PopupListener

public PopupListener()
Method Detail

mousePressed

public void mousePressed(MouseEvent e)
Specified by:
mousePressed in interface MouseListener
Overrides:
mousePressed in class MouseAdapter

mouseReleased

public void mouseReleased(MouseEvent e)
Specified by:
mouseReleased in interface MouseListener
Overrides:
mouseReleased in class MouseAdapter

showPopup

protected void showPopup(Component source,
                         int x,
                         int y)
Shows the popup menu.

See Also:
GUIHelper.showPopupMenu(JPopupMenu, Component, int, int)

getPopupMenu

public JPopupMenu getPopupMenu()


Copyright © 2004-2007 XNap Commons Team. All Rights Reserved.