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 TypeMethodDescriptionvoidkeyPressed(KeyEvent event) Invoked when a key has been pressed.voidkeyReleased(KeyEvent event) Invoked when a key has been released.voidInvoked when a key has been typed.voidmouseClicked(MouseEvent event) Invoked when the mouse has been clicked on a component.voidmouseEntered(MouseEvent event) Invoked when the mouse enters a component.voidmouseExited(MouseEvent event) Invoked when the mouse exits a component.voidmousePressed(MouseEvent event) Invoked when a mouse button has been pressed on a component.voidmouseReleased(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:
mouseClickedin interfaceMouseListener
-
mousePressed
Invoked when a mouse button has been pressed on a component.- Specified by:
mousePressedin interfaceMouseListener
-
mouseReleased
Invoked when a mouse button has been released on a component.- Specified by:
mouseReleasedin interfaceMouseListener
-
mouseEntered
Invoked when the mouse enters a component.- Specified by:
mouseEnteredin interfaceMouseListener
-
mouseExited
Invoked when the mouse exits a component.- Specified by:
mouseExitedin interfaceMouseListener
-
keyPressed
Invoked when a key has been pressed.- Specified by:
keyPressedin interfaceKeyListener
-
keyReleased
Invoked when a key has been released.- Specified by:
keyReleasedin interfaceKeyListener
-
keyTyped
Invoked when a key has been typed. This event occurs when a key press is followed by a key release.- Specified by:
keyTypedin interfaceKeyListener
-