Class PopupListener
java.lang.Object
java.awt.event.MouseAdapter
info.monitorenter.gui.chart.events.PopupListener
- All Implemented Interfaces:
MouseListener,MouseMotionListener,MouseWheelListener,EventListener
A general purpose
PopupListener.
It is used to connect JPopupMenu instances with the components
retrieved from factory methods (of factory
LayoutFactory).
Note that instances have to be registered as a listener on components via
Component.addMouseListener(java.awt.event.MouseListener) to
make it working.
- Version:
- $Revision: 1.10 $
- Author:
- Achim Westermann
-
Constructor Summary
ConstructorsConstructorDescriptionPopupListener(JPopupMenu popup) Creates an instance that will show the given popup upon a right mouse click on aJComponentthis instance will be registered as listener to. -
Method Summary
Modifier and TypeMethodDescriptionfinal MouseEventReturns the lastPopupMouseEvent.final JPopupMenugetPopup()static PopupListenerlookup(JPopupMenu popup) Returns the listener for the given popup or null, if there is no listener for that popup.voidvoidMethods inherited from class java.awt.event.MouseAdapter
mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mouseWheelMoved
-
Constructor Details
-
PopupListener
Creates an instance that will show the given popup upon a right mouse click on aJComponentthis instance will be registered as listener to.- Parameters:
popup- the popup to show upon a right mouse click on aJComponentthis instance will be registered as listener to.- See Also:
-
-
Method Details
-
lookup
Returns the listener for the given popup or null, if there is no listener for that popup.- Parameters:
popup- the popup to search the listener for.- Returns:
- the listener for the given popup or null, if there is no listener for that popup.
-
getLastPopupMouseEvent
Returns the lastPopupMouseEvent.- Returns:
- the lastPopupMouseEvent
-
getPopup
- Returns:
- the popup menu.
-
mousePressed
- Specified by:
mousePressedin interfaceMouseListener- Overrides:
mousePressedin classMouseAdapter- See Also:
-
mouseReleased
- Specified by:
mouseReleasedin interfaceMouseListener- Overrides:
mouseReleasedin classMouseAdapter- See Also:
-