org.crosswire.common.swing.desktop

## Class TabPopupListener

- java.lang.Object
- - java.awt.event.MouseAdapter
  - - org.crosswire.common.swing.desktop.TabPopupListener

- All Implemented Interfaces:
    MouseListener, MouseMotionListener, MouseWheelListener, EventListener

      public class TabPopupListener
      extends MouseAdapter

  A mouse listener for a tabbed pane that can display a popup menu.
  Author:
    DM Smith
  See Also:
    `The GNU General Public License for details.`

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private JPopupMenu` | `popup` The popup for the tabs
    `private JTabbedPane` | `tabs` The tabs for which the popup applies

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TabPopupListener(JTabbedPane tabbedPane, JPopupMenu popupMenu)` Create a listener to mouse events on a JTabbedPane and show a popup if requested.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `private void` | `doPopup(MouseEvent e)` Popup if the mouse event indicates it should be shown
    `void` | `mouseClicked(MouseEvent e)`
    `void` | `mousePressed(MouseEvent e)`
    `void` | `mouseReleased(MouseEvent e)`

    - ### Methods inherited from class java.awt.event.MouseAdapter

      `mouseDragged, mouseEntered, mouseExited, mouseMoved, mouseWheelMoved`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### tabs

          private JTabbedPane tabs

      The tabs for which the popup applies

    - #### popup

          private JPopupMenu popup

      The popup for the tabs

  - ### Constructor Detail

    - #### TabPopupListener

          public TabPopupListener(JTabbedPane tabbedPane,
                          JPopupMenu popupMenu)

      Create a listener to mouse events on a JTabbedPane and show a popup if requested.
      Parameters:
        `tabbedPane` - The tab pane on which to listen for popup events
        `popupMenu` - the popup to display

  - ### Method Detail

    - #### mouseClicked

          public void mouseClicked(MouseEvent e)

      Specified by:
        `mouseClicked` in interface `MouseListener`
      Overrides:
        `mouseClicked` in class `MouseAdapter`

    - #### mouseReleased

          public void mouseReleased(MouseEvent e)

      Specified by:
        `mouseReleased` in interface `MouseListener`
      Overrides:
        `mouseReleased` in class `MouseAdapter`

    - #### mousePressed

          public void mousePressed(MouseEvent e)

      Specified by:
        `mousePressed` in interface `MouseListener`
      Overrides:
        `mousePressed` in class `MouseAdapter`

    - #### doPopup

          private void doPopup(MouseEvent e)

      Popup if the mouse event indicates it should be shown
      Parameters:
        `e` -