javax.swing.plaf.basic

Class BasicMenuItemUI.MouseInputHandler

protected class BasicMenuItemUI.MouseInputHandler extends Object implements MouseInputListener

This class handles mouse events occuring inside the menu item. Most of the events are forwarded for processing to MenuSelectionManager of the current menu hierarchy.
Constructor Summary
protected MouseInputHandler()
Creates a new MouseInputHandler object.
Method Summary
voidmouseClicked(MouseEvent e)
This method is called when mouse is clicked on the menu item.
voidmouseDragged(MouseEvent e)
This method is called when mouse is dragged inside the menu item.
voidmouseEntered(MouseEvent e)
This method is called when mouse enters menu item.
voidmouseExited(MouseEvent e)
This method is called when mouse exits menu item.
voidmouseMoved(MouseEvent e)
This method is called when mouse is inside the menu item.
voidmousePressed(MouseEvent e)
This method is called when mouse is pressed.
voidmouseReleased(MouseEvent e)
This method is called when mouse is released.

Constructor Detail

MouseInputHandler

protected MouseInputHandler()
Creates a new MouseInputHandler object.

Method Detail

mouseClicked

public void mouseClicked(MouseEvent e)
This method is called when mouse is clicked on the menu item. It forwards this event to MenuSelectionManager.

Parameters: e A {@link MouseEvent}.

mouseDragged

public void mouseDragged(MouseEvent e)
This method is called when mouse is dragged inside the menu item. It forwards this event to MenuSelectionManager.

Parameters: e A {@link MouseEvent}.

mouseEntered

public void mouseEntered(MouseEvent e)
This method is called when mouse enters menu item. When this happens menu item is considered to be selected and selection path in MenuSelectionManager is set. This event is also forwarded to MenuSelection Manager for further processing.

Parameters: e A {@link MouseEvent}.

mouseExited

public void mouseExited(MouseEvent e)
This method is called when mouse exits menu item. The event is forwarded to MenuSelectionManager for processing.

Parameters: e A {@link MouseEvent}.

mouseMoved

public void mouseMoved(MouseEvent e)
This method is called when mouse is inside the menu item. This event is forwarder to MenuSelectionManager for further processing.

Parameters: e A {@link MouseEvent}.

mousePressed

public void mousePressed(MouseEvent e)
This method is called when mouse is pressed. This event is forwarded to MenuSelectionManager for further processing.

Parameters: e A {@link MouseEvent}.

mouseReleased

public void mouseReleased(MouseEvent e)
This method is called when mouse is released. If the mouse is released inside this menuItem, then this menu item is considered to be chosen and the menu hierarchy should be closed.

Parameters: e A {@link MouseEvent}.