|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.event.MouseAdapter
info.monitorenter.gui.chart.events.PopupListener
public final class PopupListener
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.
Constructor Summary | |
---|---|
PopupListener(JPopupMenu popup)
Creates an instance that will show the given popup upon a right mouse click on a JComponent this instance will be registered as
listener to. |
Method Summary | |
---|---|
MouseEvent |
getLastPopupMouseEvent()
Returns the lastPopupMouseEvent. |
JPopupMenu |
getPopup()
|
static PopupListener |
lookup(JPopupMenu popup)
Returns the listener for the given popup or null, if there is no listener for that popup. |
void |
mousePressed(MouseEvent me)
|
void |
mouseReleased(MouseEvent me)
|
Methods inherited from class java.awt.event.MouseAdapter |
---|
mouseClicked, mouseEntered, mouseExited |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PopupListener(JPopupMenu popup)
JComponent
this instance will be registered as
listener to.
popup
- the popup to show upon a right mouse click on a
JComponent
this instance will be registered as
listener to.Component.addMouseListener(java.awt.event.MouseListener)
Method Detail |
---|
public static PopupListener lookup(JPopupMenu popup)
popup
- the popup to search the listener for.
public final MouseEvent getLastPopupMouseEvent()
public final JPopupMenu getPopup()
public void mousePressed(MouseEvent me)
mousePressed
in interface MouseListener
mousePressed
in class MouseAdapter
MouseListener.mousePressed(java.awt.event.MouseEvent)
public void mouseReleased(MouseEvent me)
mouseReleased
in interface MouseListener
mouseReleased
in class MouseAdapter
MouseListener.mouseReleased(java.awt.event.MouseEvent)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |