Package com.jidesoft.plaf.eclipse
Class EclipseMenuUI.MouseInputHandler
- java.lang.Object
-
- com.jidesoft.plaf.eclipse.EclipseMenuUI.MouseInputHandler
-
- All Implemented Interfaces:
java.awt.event.MouseListener,java.awt.event.MouseMotionListener,java.util.EventListener,javax.swing.event.MouseInputListener
- Enclosing class:
- EclipseMenuUI
protected class EclipseMenuUI.MouseInputHandler extends java.lang.Object implements javax.swing.event.MouseInputListenerInstantiated and used by a menu item to handle the current menu selection from mouse events. A MouseInputHandler processes and forwards all mouse events to a shared instance of the MenuSelectionManager. This class is protected so that it can be subclassed by other look and feels to implement their own mouse handling behavior. All overridden methods should call the parent methods so that the menu selection is correct.- Since:
- 1.4
- See Also:
MenuSelectionManager
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedMouseInputHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.awt.ContainergetFirstParentMenuElement(java.awt.Component comp)voidmouseClicked(java.awt.event.MouseEvent e)voidmouseDragged(java.awt.event.MouseEvent e)Invoked when a mouse button is pressed on the menu and then dragged.voidmouseEntered(java.awt.event.MouseEvent e)Invoked when the cursor enters the menu.voidmouseExited(java.awt.event.MouseEvent e)voidmouseMoved(java.awt.event.MouseEvent e)voidmousePressed(java.awt.event.MouseEvent e)voidmouseReleased(java.awt.event.MouseEvent e)Invoked when the mouse has been released on the menu.
-
-
-
Method Detail
-
mouseClicked
public void mouseClicked(java.awt.event.MouseEvent e)
- Specified by:
mouseClickedin interfacejava.awt.event.MouseListener
-
mousePressed
public void mousePressed(java.awt.event.MouseEvent e)
- Specified by:
mousePressedin interfacejava.awt.event.MouseListener
-
getFirstParentMenuElement
protected java.awt.Container getFirstParentMenuElement(java.awt.Component comp)
-
mouseReleased
public void mouseReleased(java.awt.event.MouseEvent e)
Invoked when the mouse has been released on the menu. Delegates the mouse event to the MenuSelectionManager.- Specified by:
mouseReleasedin interfacejava.awt.event.MouseListener- Parameters:
e- the mouse event
-
mouseEntered
public void mouseEntered(java.awt.event.MouseEvent e)
Invoked when the cursor enters the menu. This method sets the selected path for the MenuSelectionManager and handles the case in which a menu item is used to pop up an additional menu, as in a hierarchical menu system.- Specified by:
mouseEnteredin interfacejava.awt.event.MouseListener- Parameters:
e- the mouse event; not used
-
mouseExited
public void mouseExited(java.awt.event.MouseEvent e)
- Specified by:
mouseExitedin interfacejava.awt.event.MouseListener
-
mouseDragged
public void mouseDragged(java.awt.event.MouseEvent e)
Invoked when a mouse button is pressed on the menu and then dragged. Delegates the mouse event to the MenuSelectionManager.- Specified by:
mouseDraggedin interfacejava.awt.event.MouseMotionListener- Parameters:
e- the mouse event- See Also:
MouseMotionListener.mouseDragged(java.awt.event.MouseEvent)
-
mouseMoved
public void mouseMoved(java.awt.event.MouseEvent e)
- Specified by:
mouseMovedin interfacejava.awt.event.MouseMotionListener
-
-