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.crosswire.common.swing.desktop
Class TabPopupListener

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

All Implemented Interfaces:
  MouseListener, EventListener

    public class TabPopupListener

extends MouseAdapter

A mouse listener for a tabbed pane that can display a popup menu.

Author:
  DM Smith [ dmsmith555 at yahoo dot com]
See Also:
  `for license details. The copyright to this program is held by it's authors.`

Field Summary
`private JPopupMenu` | `popup` The popup for the tabs
`private JTabbedPane` | `tabs` The tabs for which the popup applies

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

Method Summary
`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
`mouseEntered, mouseExited`

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` -

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