public class SynthToolBarUI extends BasicToolBarUI implements PropertyChangeListener, SynthUI
BasicToolBarUI.DockingListener, BasicToolBarUI.DragWindow, BasicToolBarUI.FrameListener, BasicToolBarUI.PropertyListener, BasicToolBarUI.ToolBarContListener, BasicToolBarUI.ToolBarFocusListenerconstraintBeforeFloating, dockingBorderColor, dockingColor, dockingListener, downKey, dragWindow, floatingBorderColor, floatingColor, focusedCompIndex, leftKey, propertyListener, rightKey, toolBar, toolBarContListener, toolBarFocusListener, upKeyDEFAULT, DISABLED, ENABLED, FOCUSED, MOUSE_OVER, PRESSED, SELECTEDBOTTOM, 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 | 
|---|
SynthToolBarUI()  |  
          
| Modifier and Type | Method and Description | 
|---|---|
protected LayoutManager |  
           createLayout() 
            
              创建一个 
               LayoutManager以与工具栏一起使用。 
             |  
          
static ComponentUI |  
           createUI(JComponent c) 
            
              为给定的组件创建一个新的UI对象。 
               |  
          
SynthContext |  
           getContext(JComponent c) 
            
              返回指定组件的上下文。 
               |  
          
protected void |  
           installComponents() |  
          
protected void |  
           installDefaults() |  
          
protected void |  
           installListeners() |  
          
void |  
           paint(Graphics g, JComponent c) 
            
              根据外观和外观绘制指定的组件。 
               |  
          
protected void |  
           paint(SynthContext context, Graphics g) 
            
              绘制工具栏。 
               |  
          
void |  
           paintBorder(SynthContext context, Graphics g, int x, int y, int w, int h) 
            
              画边框 
               |  
          
protected void |  
           paintContent(SynthContext context, Graphics g, Rectangle bounds) 
            
              绘制工具栏内容。 
               |  
          
protected void |  
           paintDragWindow(Graphics g) 
            
              绘制用于拖动的窗口的内容。 
               |  
          
void |  
           propertyChange(PropertyChangeEvent e) 
            
              当绑定属性更改时,此方法将被调用。 
               |  
          
protected void |  
           setBorderToNonRollover(Component c) 
            
              这个实现什么都不做,因为 
               JToolBar类的 
             rollover属性没有用在Synth Look and Feel中。 
             |  
          
protected void |  
           setBorderToNormal(Component c) 
            
              这个实现什么都不做,因为 
               JToolBar类的 
             rollover属性没有用在Synth Look and Feel中。 
             |  
          
protected void |  
           setBorderToRollover(Component c) 
            
              这个实现什么都不做,因为 
               JToolBar类的 
             rollover属性没有用在Synth Look and Feel中。 
             |  
          
protected void |  
           uninstallComponents() |  
          
protected void |  
           uninstallDefaults() |  
          
protected void |  
           uninstallListeners() |  
          
void |  
           update(Graphics g, JComponent c) 
            
              通知此UI代理重新绘制指定的组件。 
               |  
          
canDock, createDockingListener, createDragWindow, createFloatingFrame, createFloatingWindow, createFrameListener, createNonRolloverBorder, createPropertyListener, createRolloverBorder, createToolBarContListener, createToolBarFocusListener, dragTo, floatAt, getDockingColor, getFloatingColor, getNonRolloverBorder, getRolloverBorder, installKeyboardActions, installNonRolloverBorders, installNormalBorders, installRolloverBorders, installUI, isFloating, isRolloverBorders, navigateFocusedComp, setDockingColor, setFloating, setFloatingColor, setFloatingLocation, setOrientation, setRolloverBorders, uninstallKeyboardActions, uninstallUIcontains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSizepublic static ComponentUI createUI(JComponent c)
c - 创建UI对象的组件 
           protected void installDefaults()
protected void installListeners()
protected void uninstallListeners()
protected void uninstallDefaults()
protected void installComponents()
protected void uninstallComponents()
protected LayoutManager createLayout()
LayoutManager用于工具栏。 
          LayoutManager实例 
           public SynthContext getContext(JComponent c)
getContext在界面 
            SynthUI 
           c - 组件请求SynthContext。 
           public void update(Graphics g, JComponent c)
paint(SynthContext,Graphics)方法。 
            通常,此方法不需要被子类覆盖。 所有Look和Feel渲染代码应该位于paint方法中。 
update在 
            ComponentUI类 
           g - 用于绘画的 
            Graphics对象 
           c - 被绘的部件 
           paint(SynthContext,Graphics) 
           public void paint(Graphics g, JComponent c)
 Synth Look and Feel不使用此方法。 绘画由paint(SynthContext,Graphics)处理。 
paint在 
            ComponentUI 
           g - 用于绘画的 
            Graphics对象 
           c - 正在涂漆的组件 
           paint(SynthContext,Graphics) 
           public void paintBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
paintBorder在接口 
            SynthUI 
           context - 组件上下文 
           g - 
            Graphics上画 
           x - X坐标 
           y - Y坐标 
           w - 边框的宽度 
           h - 边框的高度 
           protected void setBorderToNonRollover(Component c)
JToolBar类的 
           rollover属性没有在Synth Look和Feel中使用。 
          setBorderToNonRollover在 
            BasicToolBarUI 
           c - 将安装非滚动边框的组件 
           BasicToolBarUI.createNonRolloverBorder() 
           protected void setBorderToRollover(Component c)
JToolBar类的 
           rollover属性没有用在Synth Look and Feel中。 
          setBorderToRollover在 
            BasicToolBarUI 
           c - 将安装滚动边框的组件 
           BasicToolBarUI.createRolloverBorder() 
           protected void setBorderToNormal(Component c)
JToolBar类的 
           rollover属性没有用在Synth Look and Feel中。 
          setBorderToNormal在 
            BasicToolBarUI 
           c - 将重新安装正常边框的组件 
           BasicToolBarUI.createNonRolloverBorder() 
           protected void paint(SynthContext context, Graphics g)
context - 正在绘制的组件的上下文 
           g - 用于绘画的 
            Graphics对象 
           update(Graphics,JComponent) 
           protected void paintContent(SynthContext context, Graphics g, Rectangle bounds)
context - 正在绘制的组件的上下文 
           g - 
            Graphics用于绘画的对象 
           bounds - 工具栏的边框 
           protected void paintDragWindow(Graphics g)
paintDragWindow在 
            BasicToolBarUI 
           g - 绘制图形。 
           public void propertyChange(PropertyChangeEvent e)
propertyChange在界面 
            PropertyChangeListener 
           e - 描述事件源和已更改的属性的PropertyChangeEvent对象。 
            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.