Package org.esa.snap.ui
Class PopupMenuHandler
- java.lang.Object
-
- org.esa.snap.ui.PopupMenuHandler
-
- All Implemented Interfaces:
KeyListener,MouseListener,EventListener
public class PopupMenuHandler extends Object implements MouseListener, KeyListener
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
PopupMenuFactoryinstance passed to the constructor of this class.- See Also:
PopupMenuFactory
-
-
Constructor Summary
Constructors Constructor Description PopupMenuHandler(PopupMenuFactory popupMenuFactory)Constructs a new pop-up menu handler for th given pop-up menu factory.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidkeyPressed(KeyEvent event)Invoked when a key has been pressed.voidkeyReleased(KeyEvent event)Invoked when a key has been released.voidkeyTyped(KeyEvent event)Invoked 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 Detail
-
PopupMenuHandler
public PopupMenuHandler(PopupMenuFactory popupMenuFactory)
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 Detail
-
mouseClicked
public void mouseClicked(MouseEvent event)
Invoked when the mouse has been clicked on a component.- Specified by:
mouseClickedin interfaceMouseListener
-
mousePressed
public void mousePressed(MouseEvent event)
Invoked when a mouse button has been pressed on a component.- Specified by:
mousePressedin interfaceMouseListener
-
mouseReleased
public void mouseReleased(MouseEvent event)
Invoked when a mouse button has been released on a component.- Specified by:
mouseReleasedin interfaceMouseListener
-
mouseEntered
public void mouseEntered(MouseEvent event)
Invoked when the mouse enters a component.- Specified by:
mouseEnteredin interfaceMouseListener
-
mouseExited
public void mouseExited(MouseEvent event)
Invoked when the mouse exits a component.- Specified by:
mouseExitedin interfaceMouseListener
-
keyPressed
public void keyPressed(KeyEvent event)
Invoked when a key has been pressed.- Specified by:
keyPressedin interfaceKeyListener
-
keyReleased
public void keyReleased(KeyEvent event)
Invoked when a key has been released.- Specified by:
keyReleasedin interfaceKeyListener
-
keyTyped
public void keyTyped(KeyEvent event)
Invoked when a key has been typed. This event occurs when a key press is followed by a key release.- Specified by:
keyTypedin interfaceKeyListener
-
-