Home » openjdk-7 » javax » swing » plaf » basic » [javadoc | source]
public class: BasicMenuItemUI [javadoc | source]

Direct Known Subclasses:
    SynthMenuItemUI, BasicCheckBoxMenuItemUI, SynthRadioButtonMenuItemUI, BasicRadioButtonMenuItemUI, SynthMenuUI, BasicMenuUI, SynthCheckBoxMenuItemUI

BasicMenuItem implementation
Nested Class Summary:
protected class  BasicMenuItemUI.MouseInputHandler   
class  BasicMenuItemUI.Handler   
Field Summary
protected  JMenuItem menuItem     
protected  Color selectionBackground     
protected  Color selectionForeground     
protected  Color disabledForeground     
protected  Color acceleratorForeground     
protected  Color acceleratorSelectionForeground     
protected  String acceleratorDelimiter    Accelerator delimiter string, such as {@code '+'} in {@code 'Ctrl+C'}.
    since: 1.7 -
protected  int defaultTextIconGap     
protected  Font acceleratorFont     
protected  MouseInputListener mouseInputListener     
protected  MenuDragMouseListener menuDragMouseListener     
protected  MenuKeyListener menuKeyListener     
protected  PropertyChangeListener propertyChangeListener    PropertyChangeListener returned from createPropertyChangeListener. You should not need to access this field, rather if you want to customize the PropertyChangeListener override createPropertyChangeListener. 
 Handler handler     
protected  Icon arrowIcon     
protected  Icon checkIcon     
protected  boolean oldBorderPainted     
Method from javax.swing.plaf.basic.BasicMenuItemUI Summary:
createInputMap,   createMenuDragMouseListener,   createMenuKeyListener,   createMouseInputListener,   createPropertyChangeListener,   createUI,   doClick,   getHandler,   getMaximumSize,   getMinimumSize,   getPath,   getPreferredMenuItemSize,   getPreferredSize,   getPropertyPrefix,   installComponents,   installDefaults,   installKeyboardActions,   installLazyActionMap,   installListeners,   installUI,   loadActionMap,   paint,   paintBackground,   paintMenuItem,   paintText,   printMenuElementArray,   uninstallComponents,   uninstallDefaults,   uninstallKeyboardActions,   uninstallListeners,   uninstallUI,   update,   updateAcceleratorBinding
Methods from javax.swing.plaf.ComponentUI:
contains,   createUI,   getAccessibleChild,   getAccessibleChildrenCount,   getBaseline,   getBaselineResizeBehavior,   getMaximumSize,   getMinimumSize,   getPreferredSize,   installUI,   paint,   uninstallUI,   update
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from javax.swing.plaf.basic.BasicMenuItemUI Detail:
 InputMap createInputMap(int condition) 
 protected MenuDragMouseListener createMenuDragMouseListener(JComponent c) 
 protected MenuKeyListener createMenuKeyListener(JComponent c) 
 protected MouseInputListener createMouseInputListener(JComponent c) 
 protected PropertyChangeListener createPropertyChangeListener(JComponent c) 
    Creates a PropertyChangeListener which will be added to the menu item. If this method returns null then it will not be added to the menu item.
 public static ComponentUI createUI(JComponent c) 
 protected  void doClick(MenuSelectionManager msm) 
    Call this method when a menu item is to be activated. This method handles some of the details of menu item activation such as clearing the selected path and messaging the JMenuItem's doClick() method.
 Handler getHandler() 
 public Dimension getMaximumSize(JComponent c) 
 public Dimension getMinimumSize(JComponent c) 
 public MenuElement[] getPath() 
 protected Dimension getPreferredMenuItemSize(JComponent c,
    Icon checkIcon,
    Icon arrowIcon,
    int defaultTextIconGap) 
 public Dimension getPreferredSize(JComponent c) 
 protected String getPropertyPrefix() 
 protected  void installComponents(JMenuItem menuItem) 
 protected  void installDefaults() 
 protected  void installKeyboardActions() 
  void installLazyActionMap() 
 protected  void installListeners() 
 public  void installUI(JComponent c) 
 static  void loadActionMap(LazyActionMap map) 
 public  void paint(Graphics g,
    JComponent c) 
 protected  void paintBackground(Graphics g,
    JMenuItem menuItem,
    Color bgColor) 
    Draws the background of the menu item.
 protected  void paintMenuItem(Graphics g,
    JComponent c,
    Icon checkIcon,
    Icon arrowIcon,
    Color background,
    Color foreground,
    int defaultTextIconGap) 
 protected  void paintText(Graphics g,
    JMenuItem menuItem,
    Rectangle textRect,
    String text) 
    Renders the text of the current menu item.

  void printMenuElementArray(MenuElement[] path,
    boolean dumpStack) 
 protected  void uninstallComponents(JMenuItem menuItem) 
 protected  void uninstallDefaults() 
 protected  void uninstallKeyboardActions() 
 protected  void uninstallListeners() 
 public  void uninstallUI(JComponent c) 
 public  void update(Graphics g,
    JComponent c) 
    We draw the background in paintMenuItem() so override update (which fills the background of opaque components by default) to just call paint().
  void updateAcceleratorBinding()