net.sf.swinglib.listeners
Class PopupListener

java.lang.Object
  extended by java.awt.event.MouseAdapter
      extended by net.sf.swinglib.listeners.PopupListener
All Implemented Interfaces:
MouseListener, EventListener

public class PopupListener
extends MouseAdapter

A mouse listener that will attach a popup menu to a given component.


Constructor Summary
PopupListener(JComponent comp, JPopupMenu menu)
           
 
Method Summary
static void attach(JComponent comp, JPopupMenu menu)
          Creates a new instance and attaches it to the component.
 void mousePressed(MouseEvent evt)
           
 void mouseReleased(MouseEvent evt)
           
 
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(JComponent comp,
                     JPopupMenu menu)
Method Detail

attach

public static void attach(JComponent comp,
                          JPopupMenu menu)
Creates a new instance and attaches it to the component.


mousePressed

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

mouseReleased

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