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 [ dmsmith555 at yahoo dot com]
- See Also:
for license details.
The copyright to this program is held by it's authors.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
tabs
private JTabbedPane tabs
- The tabs for which the popup applies
popup
private JPopupMenu popup
- The popup for the tabs
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 eventspopupMenu
- the popup to display
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
-