Package org.esa.snap.ui
Class PopupMenuHandler
java.lang.Object
org.esa.snap.ui.PopupMenuHandler
- All Implemented Interfaces:
KeyListener
,MouseListener
,EventListener
A handler which can be registered on components as a mouse listener.
This handler pops-up a popup menu if the corresponding event is a popup menu trigger on a given platform. The
popup-menu is created by the PopupMenuFactory
instance passed to the constructor of this class.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionPopupMenuHandler
(PopupMenuFactory popupMenuFactory) Constructs a new pop-up menu handler for th given pop-up menu factory. -
Method Summary
Modifier and TypeMethodDescriptionvoid
keyPressed
(KeyEvent event) Invoked when a key has been pressed.void
keyReleased
(KeyEvent event) Invoked when a key has been released.void
Invoked when a key has been typed.void
mouseClicked
(MouseEvent event) Invoked when the mouse has been clicked on a component.void
mouseEntered
(MouseEvent event) Invoked when the mouse enters a component.void
mouseExited
(MouseEvent event) Invoked when the mouse exits a component.void
mousePressed
(MouseEvent event) Invoked when a mouse button has been pressed on a component.void
mouseReleased
(MouseEvent event) Invoked when a mouse button has been released on a component.
-
Constructor Details
-
PopupMenuHandler
Constructs a new pop-up menu handler for th given pop-up menu factory.- Parameters:
popupMenuFactory
- the factory for the menu, must not benull
-
-
Method Details
-
mouseClicked
Invoked when the mouse has been clicked on a component.- Specified by:
mouseClicked
in interfaceMouseListener
-
mousePressed
Invoked when a mouse button has been pressed on a component.- Specified by:
mousePressed
in interfaceMouseListener
-
mouseReleased
Invoked when a mouse button has been released on a component.- Specified by:
mouseReleased
in interfaceMouseListener
-
mouseEntered
Invoked when the mouse enters a component.- Specified by:
mouseEntered
in interfaceMouseListener
-
mouseExited
Invoked when the mouse exits a component.- Specified by:
mouseExited
in interfaceMouseListener
-
keyPressed
Invoked when a key has been pressed.- Specified by:
keyPressed
in interfaceKeyListener
-
keyReleased
Invoked when a key has been released.- Specified by:
keyReleased
in interfaceKeyListener
-
keyTyped
Invoked when a key has been typed. This event occurs when a key press is followed by a key release.- Specified by:
keyTyped
in interfaceKeyListener
-