Home » openjdk-7 » javax » swing » plaf » basic » [javadoc | source]
javax.swing.plaf.basic
static class: BasicPopupMenuUI.MenuKeyboardHelper [javadoc | source]
java.lang.Object
   javax.swing.plaf.basic.BasicPopupMenuUI$MenuKeyboardHelper

All Implemented Interfaces:
    KeyListener, ChangeListener

This helper is added to MenuSelectionManager as a ChangeListener to listen to menu selection changes. When a menu is activated, it passes focus to its parent JRootPane, and installs an ActionMap/InputMap pair on that JRootPane. Those maps are necessary in order for menu navigation to work. When menu is being deactivated, it restores focus to the component that has had it before menu activation, and uninstalls the maps. This helper is also installed as a KeyListener on root pane when menu is active. It forwards key events to MenuSelectionManager for mnemonic keys handling.
Method from javax.swing.plaf.basic.BasicPopupMenuUI$MenuKeyboardHelper Summary:
addUIActionMap,   addUIInputMap,   getActivePopup,   keyPressed,   keyReleased,   keyTyped,   removeItems,   removeUIActionMap,   removeUIInputMap,   stateChanged,   uninstall
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from javax.swing.plaf.basic.BasicPopupMenuUI$MenuKeyboardHelper Detail:
  void addUIActionMap(JComponent c,
    ActionMap map) 
  void addUIInputMap(JComponent c,
    InputMap map) 
 JPopupMenu getActivePopup(MenuElement[] path) 
    Return the last JPopupMenu in path, or null if none found
 public  void keyPressed(KeyEvent ev) 
 public  void keyReleased(KeyEvent ev) 
 public  void keyTyped(KeyEvent ev) 
  void removeItems() 
  void removeUIActionMap(JComponent c,
    ActionMap map) 
  void removeUIInputMap(JComponent c,
    InputMap map) 
 public  void stateChanged(ChangeEvent ev) 
  void uninstall()