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
PopupMenuFactory
instance 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 void
keyPressed(KeyEvent event)
Invoked when a key has been pressed.void
keyReleased(KeyEvent event)
Invoked when a key has been released.void
keyTyped(KeyEvent event)
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 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:
mouseClicked
in interfaceMouseListener
-
mousePressed
public void mousePressed(MouseEvent event)
Invoked when a mouse button has been pressed on a component.- Specified by:
mousePressed
in interfaceMouseListener
-
mouseReleased
public void mouseReleased(MouseEvent event)
Invoked when a mouse button has been released on a component.- Specified by:
mouseReleased
in interfaceMouseListener
-
mouseEntered
public void mouseEntered(MouseEvent event)
Invoked when the mouse enters a component.- Specified by:
mouseEntered
in interfaceMouseListener
-
mouseExited
public void mouseExited(MouseEvent event)
Invoked when the mouse exits a component.- Specified by:
mouseExited
in interfaceMouseListener
-
keyPressed
public void keyPressed(KeyEvent event)
Invoked when a key has been pressed.- Specified by:
keyPressed
in interfaceKeyListener
-
keyReleased
public void keyReleased(KeyEvent event)
Invoked when a key has been released.- Specified by:
keyReleased
in 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:
keyTyped
in interfaceKeyListener
-
-