Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.statcato.utils
Class PopupListener

    java.lang.Object
      java.awt.event.MouseAdapter
          org.statcato.utils.PopupListener

All Implemented Interfaces:
  java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.MouseWheelListener, java.util.EventListener

    public class PopupListener

extends java.awt.event.MouseAdapter

A mouse listener for popups.

Since:
  1.0
Version:
  %I%, %G%
Author:
  Margaret Yau

Constructor Summary
`PopupListener(javax.swing.JPopupMenu popupMenu)` Constructor, given a popup menu for which the listener is used.

Method Summary
`void` | `maybeShowPopup(java.awt.event.MouseEvent e)` Shows the popup menu if the given mouse event should trigger a popup.
`void` | `mousePressed(java.awt.event.MouseEvent e)`
`void` | `mouseReleased(java.awt.event.MouseEvent e)`

Methods inherited from class java.awt.event.MouseAdapter
`mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mouseWheelMoved`

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.JPopupMenu popupMenu)

  Constructor, given a popup menu for which the listener is used.

  Parameters:
    `popupMenu` - popup menu corresponding to this listener

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`

### maybeShowPopup

    public void maybeShowPopup(java.awt.event.MouseEvent e)

  Shows the popup menu if the given mouse event should trigger a popup.

  Parameters:
    `e` - mouse event

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD