javax.swing.plaf.basic
Class BasicMenuItemUI.MenuKeyHandler

java.lang.Object
  extended byjavax.swing.plaf.basic.BasicMenuItemUI.MenuKeyHandler
All Implemented Interfaces:
EventListener, MenuKeyListener
Enclosing class:
BasicMenuItemUI

private class BasicMenuItemUI.MenuKeyHandler
extends Object
implements MenuKeyListener


Constructor Summary
private BasicMenuItemUI.MenuKeyHandler()
           
 
Method Summary
private  char lower(char keyChar)
           
 void menuKeyPressed(MenuKeyEvent e)
          Invoked when a key has been pressed.
 void menuKeyReleased(MenuKeyEvent e)
          Invoked when a key has been released.
 void menuKeyTyped(MenuKeyEvent e)
          Handles the mnemonic key typed in the MenuItem if this menuItem is in a standalone popup menu.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicMenuItemUI.MenuKeyHandler

private BasicMenuItemUI.MenuKeyHandler()
Method Detail

menuKeyTyped

public void menuKeyTyped(MenuKeyEvent e)
Handles the mnemonic key typed in the MenuItem if this menuItem is in a standalone popup menu. This invocation normally handled in BasicMenuUI.MenuKeyHandler.menuKeyPressed. Ideally, the MenuKeyHandlers for both BasicMenuItemUI and BasicMenuUI can be consolidated into BasicPopupMenuUI but that would require an semantic change. This would result in a performance win since we can shortcut a lot of the needless processing from MenuSelectionManager.processKeyEvent(). See 4670831.

Specified by:
menuKeyTyped in interface MenuKeyListener

menuKeyPressed

public void menuKeyPressed(MenuKeyEvent e)
Description copied from interface: MenuKeyListener
Invoked when a key has been pressed.

Specified by:
menuKeyPressed in interface MenuKeyListener

menuKeyReleased

public void menuKeyReleased(MenuKeyEvent e)
Description copied from interface: MenuKeyListener
Invoked when a key has been released.

Specified by:
menuKeyReleased in interface MenuKeyListener

lower

private char lower(char keyChar)