net.sf.swinglib.listeners
Class PopupListener
java.lang.Object
java.awt.event.MouseAdapter
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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PopupListener
public PopupListener(JComponent comp,
JPopupMenu menu)
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