org.xnap.gui.event
Class PopupListener

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

public class PopupListener
extends java.awt.event.MouseAdapter

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


Constructor Summary
PopupListener(javax.swing.JMenu menu)
           
PopupListener(javax.swing.JPopupMenu popup)
           
 
Method Summary
 void mousePressed(java.awt.event.MouseEvent e)
           
 void mouseReleased(java.awt.event.MouseEvent e)
           
protected  void showPopup(java.awt.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(javax.swing.JMenu menu)

PopupListener

public PopupListener(javax.swing.JPopupMenu popup)
Method Detail

mousePressed

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

mouseReleased

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

showPopup

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

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


Copyright © 2001-2005 XNap Team. All Rights Reserved.