- java.lang.Object
 -  
      
- javax.swing.plaf.ComponentUI
 -  
        
- javax.swing.plaf.MenuBarUI
 -  
          
- javax.swing.plaf.basic.BasicMenuBarUI
 -  
            
- javax.swing.plaf.metal.MetalMenuBarUI
 
 
 
 
 
-  
       
public class MetalMenuBarUI extends BasicMenuBarUI
金属执行MenuBarUI。 此课程负责提供JMenuBar的金属外观。- 从以下版本开始:
 - 1.5
 - 另请参见:
 -  
         
MenuBarUI 
 
-  
        
       
-  
             
字段汇总
-  
               
声明的属性在类 javax.swing.plaf.basic.BasicMenuBarUI
changeListener, containerListener, menuBar 
 -  
               
 
-  
             
构造方法摘要
构造方法 构造器 描述 MetalMenuBarUI() 
-  
             
方法摘要
所有方法 静态方法 实例方法 具体的方法 变量和类型 方法 描述 static ComponentUIcreateUI(JComponent x)为传入的组件创建ComponentUI实现。voidinstallUI(JComponent c)配置适合金属外观的指定组件。voiduninstallUI(JComponent c)在installUI期间反转在指定组件上完成的配置。voidupdate(Graphics g, JComponent c)如有必要,绘制组件的背景,然后调用paint。-  
               
声明方法的类 javax.swing.plaf.basic.BasicMenuBarUI
createChangeListener, createContainerListener, installDefaults, installKeyboardActions, installListeners, uninstallDefaults, uninstallKeyboardActions, uninstallListeners 
-  
               
声明方法的类 javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize, paint 
 -  
               
 
 -  
             
 
-  
        
       
-  
             
方法详细信息
-  
createUI
public static ComponentUI createUI(JComponent x)
为传入的组件创建ComponentUI实现。- 参数
 -  
              
x- 为其创建ComponentUI实现的JComponent - 结果
 - 
               ComponentUI实现 
              
x - 异常
 -  
              
NullPointerException- 如果x为空 
 
-  
installUI
public void installUI(JComponent c)
配置适合金属外观的指定组件。- 重写:
 -  
              
installUI在课堂上ComponentUI - 参数
 -  
              
c- 正在安装此UI委托的组件 - 异常
 -  
              
NullPointerException- 如果c为空。 - 另请参见:
 -  
              
ComponentUI.uninstallUI(javax.swing.JComponent),JComponent.setUI(javax.swing.plaf.ComponentUI),JComponent.updateUI() 
 
-  
uninstallUI
public void uninstallUI(JComponent c)
在installUI期间反转在指定组件上完成的配置。- 重写:
 -  
              
uninstallUI类ComponentUI - 参数
 -  
              
c- 正在安装此UI委托的组件 - 异常
 -  
              
NullPointerException- 如果c为空。 - 另请参见:
 -  
              
ComponentUI.installUI(javax.swing.JComponent),JComponent.updateUI() 
 
-  
update
public void update(Graphics g, JComponent c)
如有必要,绘制组件的背景,然后调用paint。- 重写:
 -  
              
update在课堂上ComponentUI - 参数
 -  
              
g- 要绘制的图形 -  
              
c- JComponent上绘画 - 异常
 -  
              
NullPointerException- 如果g或c为空 - 从以下版本开始:
 - 1.5
 - 另请参见:
 -  
              
ComponentUI.update(java.awt.Graphics, javax.swing.JComponent),ComponentUI.paint(java.awt.Graphics, javax.swing.JComponent) 
 
 -  
 
 -