所有类


javax.swing.plaf.basic
类 BasicMenuItemUI

java.lang.Object
  继承者 javax.swing.plaf.ComponentUI
      继承者 javax.swing.plaf.ButtonUI
          继承者 javax.swing.plaf.MenuItemUI
              继承者 javax.swing.plaf.basic.BasicMenuItemUI
直接已知子类:
BasicCheckBoxMenuItemUI, BasicMenuUI, BasicRadioButtonMenuItemUI

public class BasicMenuItemUI
   
   
   
   
extends MenuItemUI

BasicMenuItem 实现


嵌套类摘要
protected  class BasicMenuItemUI.MouseInputHandler
           
 
字段摘要
protected  Font acceleratorFont
           
protected  Color acceleratorForeground
           
protected  Color acceleratorSelectionForeground
           
protected  Icon arrowIcon
           
protected  Icon checkIcon
           
protected  int defaultTextIconGap
           
protected  Color disabledForeground
           
protected  MenuDragMouseListener menuDragMouseListener
           
protected  JMenuItem menuItem
           
protected  MenuKeyListener menuKeyListener
           
protected  MouseInputListener mouseInputListener
           
protected  boolean oldBorderPainted
           
protected  Color selectionBackground
           
protected  Color selectionForeground
           
 
构造方法摘要
BasicMenuItemUI()
           
 
方法摘要
protected  MenuDragMouseListener createMenuDragMouseListener(JComponent c)
           
protected  MenuKeyListener createMenuKeyListener(JComponent c)
           
protected  MouseInputListener createMouseInputListener(JComponent c)
           
static ComponentUI createUI(JComponent c)
           
protected  void doClick(MenuSelectionManager msm)
          要激活菜单项时调用此方法。
 Dimension getMaximumSize(JComponent c)
          返回指定组件的适合外观的最大大小。
 Dimension getMinimumSize(JComponent c)
          返回指定组件的适合外观的最小大小。
 MenuElement[] getPath()
           
protected  Dimension getPreferredMenuItemSize(JComponent c, Icon checkIcon, Icon arrowIcon, int defaultTextIconGap)
           
 Dimension getPreferredSize(JComponent c)
          返回指定组件的适合外观的首选大小。
protected  String getPropertyPrefix()
           
protected  void installComponents(JMenuItem menuItem)
           
protected  void installDefaults()
           
protected  void installKeyboardActions()
           
protected  void installListeners()
           
 void installUI(JComponent c)
          配置指定组件,使其适合外观。
 void paint(Graphics g, JComponent c)
          绘制指定组件,使其适合外观。
protected  void paintBackground(Graphics g, JMenuItem menuItem, Color bgColor)
          绘制菜单项的背景。
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)
          呈现当前菜单项的文本。
protected  void uninstallComponents(JMenuItem menuItem)
           
protected  void uninstallDefaults()
           
protected  void uninstallKeyboardActions()
           
protected  void uninstallListeners()
           
 void uninstallUI(JComponent c)
          在 installUI 期间,在指定组件上反向执行的配置操作。
 void update(Graphics g, JComponent c)
          使用 paintMenuItem() 绘制背景,从而重写 update(默认情况下填充不透明组件的背景)以调用 paint()。
 
从类 javax.swing.plaf.ComponentUI 继承的方法
contains, getAccessibleChild, getAccessibleChildrenCount
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

menuItem

protected JMenuItem menuItem

selectionBackground

protected Color selectionBackground

selectionForeground

protected Color selectionForeground

disabledForeground

protected Color disabledForeground

acceleratorForeground

protected Color acceleratorForeground

acceleratorSelectionForeground

protected Color acceleratorSelectionForeground

defaultTextIconGap

protected int defaultTextIconGap

微信小程序

微信扫一扫体验

微信公众账号

微信扫一扫加关注

发表
评论
返回
顶部