public class MetalToolBarUI extends BasicToolBarUI
| Modifier and Type | Class and Description | 
|---|---|
| protected class  | MetalToolBarUI.MetalContainerListener | 
| protected class  | MetalToolBarUI.MetalDockingListener | 
| protected class  | MetalToolBarUI.MetalRolloverListener | 
BasicToolBarUI.DockingListener, BasicToolBarUI.DragWindow, BasicToolBarUI.FrameListener, BasicToolBarUI.PropertyListener, BasicToolBarUI.ToolBarContListener, BasicToolBarUI.ToolBarFocusListener| Modifier and Type | Field and Description | 
|---|---|
| protected ContainerListener | contListener
              此保护字段是实现特定的。 
             | 
| protected PropertyChangeListener | rolloverListener
              此保护字段是实现特定的。 
             | 
constraintBeforeFloating, dockingBorderColor, dockingColor, dockingListener, downKey, dragWindow, floatingBorderColor, floatingColor, focusedCompIndex, leftKey, propertyListener, rightKey, toolBar, toolBarContListener, toolBarFocusListener, upKeyBOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST| Constructor and Description | 
|---|
| MetalToolBarUI() | 
| Modifier and Type | Method and Description | 
|---|---|
| protected ContainerListener | createContainerListener()
              创建一个将添加到JToolBar的容器监听器。 
             | 
| protected MouseInputListener | createDockingListener() | 
| protected Border | createNonRolloverBorder()
              创建工具栏组件的非滚动边框。 
             | 
| protected Border | createRolloverBorder()
              为工具栏组件创建滚动边框。 
             | 
| protected PropertyChangeListener | createRolloverListener()
              创建一个将添加到JToolBar的属性更改侦听器。 
             | 
| static ComponentUI | createUI(JComponent c) | 
| protected void | installListeners() | 
| void | installUI(JComponent c)
              适当地配置指定的组件的外观和感觉。 
             | 
| protected void | setBorderToNonRollover(Component c)
              将组件的边框设置为具有 
              BasicToolBarUI.createNonRolloverBorder()方法创建的非滚动边框。 | 
| protected void | setDragOffset(Point p) | 
| protected void | uninstallListeners() | 
| void | uninstallUI(JComponent c)
              在installUI中反转在 
              installUI上完成的installUI。 | 
| void | update(Graphics g, JComponent c)
              如果需要涂抹组件的背景,然后调用 
              paint。 | 
canDock, createDragWindow, createFloatingFrame, createFloatingWindow, createFrameListener, createPropertyListener, createToolBarContListener, createToolBarFocusListener, dragTo, floatAt, getDockingColor, getFloatingColor, getNonRolloverBorder, getRolloverBorder, installComponents, installDefaults, installKeyboardActions, installNonRolloverBorders, installNormalBorders, installRolloverBorders, isFloating, isRolloverBorders, navigateFocusedComp, paintDragWindow, setBorderToNormal, setBorderToRollover, setDockingColor, setFloating, setFloatingColor, setFloatingLocation, setOrientation, setRolloverBorders, uninstallComponents, uninstallDefaults, uninstallKeyboardActionscontains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize, paintprotected ContainerListener contListener
protected PropertyChangeListener rolloverListener
createRolloverListener() 
           public static ComponentUI createUI(JComponent c)
public void installUI(JComponent c)
ComponentUI 
          ComponentUI实例作为指定组件上的UI委托时,将调用此方法。 
           该方法应该完全配置组件的外观,包括以下内容: 
           LayoutManager上安装LayoutManager。 PropertyChangeListener上创建/安装PropertyChangeListener,以便适当地检测和响应组件属性更改。 installUI在 
            BasicToolBarUI 
           c - 正在安装此UI代理的组件 
           ComponentUI.uninstallUI(javax.swing.JComponent) , 
            JComponent.setUI(javax.swing.plaf.ComponentUI) , 
            JComponent.updateUI() 
           public void uninstallUI(JComponent c)
ComponentUI 
          installUI上完成的installUI 。 
           当将此UIComponent实例作为指定组件的UI委托删除时,将调用此方法。 
           该方法应该撤消在installUI中执行的installUI ,小心使JComponent实例处于干净状态(无外部侦听器,外观特定属性对象等)。 
           这应该包括以下内容: 
           uninstallUI在 
            BasicToolBarUI 
           c - 从中删除此UI代理的组件; 
            这个参数经常被忽略,但如果UI对象是无状态的并且被多个组件共享,则可能会被使用 
           ComponentUI.installUI(javax.swing.JComponent) , 
            JComponent.updateUI() 
           protected void installListeners()
protected void uninstallListeners()
protected Border createRolloverBorder()
BasicToolBarUI 
          覆盖此方法以提供备用的翻转边框。
protected Border createNonRolloverBorder()
BasicToolBarUI 
          覆盖此方法以提供备用的翻转边框。
protected void setBorderToNonRollover(Component c)
BasicToolBarUI 
          BasicToolBarUI.createNonRolloverBorder()方法创建的非滚动边框。 
          setBorderToNonRollover在 
            BasicToolBarUI 
           c - 将安装非滚动边框的组件 
           BasicToolBarUI.createNonRolloverBorder() 
           protected ContainerListener createContainerListener()
ContainerListener的实例或null 
           protected PropertyChangeListener createRolloverListener()
PropertyChangeListener的实例或null 
           protected MouseInputListener createDockingListener()
protected void setDragOffset(Point p)
public void update(Graphics g, JComponent c)
paint 。 
          update在 
            ComponentUI 
           g - 绘图的图形 
           c - JComponent绘画 
           NullPointerException - 如果 
            g或 
            c为空 
           ComponentUI.update(java.awt.Graphics, javax.swing.JComponent) , 
            ComponentUI.paint(java.awt.Graphics, javax.swing.JComponent) 
            Submit a bug or feature 
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
 Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.