public class SynthTabbedPaneUI extends BasicTabbedPaneUI implements PropertyChangeListener, SynthUI
JTabbedPane提供Synth L&F UI代表。 
        从样式查找selectedTabPadInsets属性,其中代表所选选项卡的其他插入。 
BasicTabbedPaneUI.FocusHandler, BasicTabbedPaneUI.MouseHandler, BasicTabbedPaneUI.PropertyChangeHandler, BasicTabbedPaneUI.TabbedPaneLayout, BasicTabbedPaneUI.TabSelectionHandlercalcRect, contentBorderInsets, darkShadow, downKey, focus, focusListener, highlight, leftKey, lightHighlight, maxTabHeight, maxTabWidth, mouseListener, propertyChangeListener, rects, rightKey, runCount, selectedRun, selectedTabPadInsets, shadow, tabAreaInsets, tabChangeListener, tabInsets, tabPane, tabRunOverlay, tabRuns, textIconGap, 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 | 
|---|
| SynthTabbedPaneUI() | 
| Modifier and Type | Method and Description | 
|---|---|
| protected int | calculateMaxTabHeight(int tabPlacement) | 
| protected int | calculateMaxTabWidth(int tabPlacement) | 
| protected int | calculateTabWidth(int tabPlacement, int tabIndex, FontMetrics metrics) | 
| protected LayoutManager | createLayoutManager()
              调用 
              installUI创建一个布局管理器对象来管理JTabbedPane。 | 
| protected MouseListener | createMouseListener()
              被覆盖以跟踪所选标签是否也被按下。 
             | 
| protected JButton | createScrollButton(int direction)
              创建并返回一个JButton,它将向用户提供一种在特定方向滚动选项卡的方法。 
             | 
| static ComponentUI | createUI(JComponent c)
              为给定的组件创建一个新的UI对象。 
             | 
| protected int | getBaseline(int tab)
              返回指定选项卡的基线。 
             | 
| SynthContext | getContext(JComponent c)
              返回指定组件的上下文。 
             | 
| protected FontMetrics | getFontMetrics() | 
| protected Insets | getTabInsets(int tabPlacement, int tabIndex) | 
| protected int | getTabLabelShiftX(int tabPlacement, int tabIndex, boolean isSelected) | 
| protected int | getTabLabelShiftY(int tabPlacement, int tabIndex, boolean isSelected) | 
| 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 | paintTabArea(Graphics g, int tabPlacement, int selectedIndex)
              绘制标签区域中的选项卡。 
             | 
| void | propertyChange(PropertyChangeEvent e)
              当绑定属性更改时,此方法将被调用。 
             | 
| protected void | setRolloverTab(int index)
              将鼠标目前的选项卡设置为 
              index。 | 
| protected void | uninstallDefaults() | 
| protected void | uninstallListeners() | 
| void | update(Graphics g, JComponent c)
              通知此UI代理重新绘制指定的组件。 
             | 
assureRectsCreated, calculateTabAreaHeight, calculateTabAreaWidth, calculateTabHeight, createChangeListener, createFocusListener, createPropertyChangeListener, expandTabRunsArray, getBaseline, getBaselineOffset, getBaselineResizeBehavior, getContentBorderInsets, getFocusIndex, getIconForTab, getMaximumSize, getMinimumSize, getNextTabIndex, getNextTabIndexInRun, getNextTabRun, getPreviousTabIndex, getPreviousTabIndexInRun, getPreviousTabRun, getRolloverTab, getRunForTab, getSelectedTabPadInsets, getTabAreaInsets, getTabBounds, getTabBounds, getTabRunCount, getTabRunIndent, getTabRunOffset, getTabRunOverlay, getTextViewForTab, getVisibleComponent, installComponents, installKeyboardActions, installUI, lastTabInRun, layoutLabel, navigateSelectedTab, paintContentBorder, paintContentBorderBottomEdge, paintContentBorderLeftEdge, paintContentBorderRightEdge, paintContentBorderTopEdge, paintFocusIndicator, paintIcon, paintTab, paintTabBackground, paintTabBorder, paintText, rotateInsets, selectAdjacentRunTab, selectNextTab, selectNextTabInRun, selectPreviousTab, selectPreviousTabInRun, setVisibleComponent, shouldPadTabRun, shouldRotateTabRuns, tabForCoordinate, uninstallComponents, uninstallKeyboardActions, uninstallUIcontains, getAccessibleChild, getAccessibleChildrenCount, getPreferredSizepublic static ComponentUI createUI(JComponent c)
c - 创建UI对象的组件 
           protected void installDefaults()
protected void installListeners()
protected void uninstallListeners()
protected void uninstallDefaults()
public SynthContext getContext(JComponent c)
getContext在界面 
            SynthUI 
           c - 组件请求SynthContext。 
           protected JButton createScrollButton(int direction)
createScrollButton在 
            BasicTabbedPaneUI类 
           direction - 其中一个SwingConstants常量:SOUTH,NORTH,EAST或WEST 
           JTabbedPane.setTabPlacement(int) , SwingConstants 
           public void propertyChange(PropertyChangeEvent e)
propertyChange在接口 
            PropertyChangeListener 
           e - 描述事件源和已更改属性的PropertyChangeEvent对象。 
           protected MouseListener createMouseListener()
protected int getTabLabelShiftX(int tabPlacement,
                                int tabIndex,
                                boolean isSelected) 
           protected int getTabLabelShiftY(int tabPlacement,
                                int tabIndex,
                                boolean isSelected) 
           public void update(Graphics g, JComponent c)
paint(SynthContext,Graphics)方法。 
            通常,此方法不需要被子类覆盖。 所有Look和Feel渲染代码应该在paint方法中。 
update在 
            ComponentUI 
           g - 用于绘画的 
            Graphics对象 
           c - 正在涂漆的组件 
           paint(SynthContext,Graphics) 
           protected int getBaseline(int tab)
getBaseline在 
            BasicTabbedPaneUI 
           tab - 获取基准的标签索引 
           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 - 边框的高度 
           public void paint(Graphics g, JComponent c)
 Synth Look and Feel不使用此方法。 绘画由paint(SynthContext,Graphics)处理。 
paint在 
            BasicTabbedPaneUI类 
           g - 用于绘画的 
            Graphics对象 
           c - 被涂的组件 
           paint(SynthContext,Graphics) 
           protected void paint(SynthContext context, Graphics g)
context - 正在绘制的组件的上下文 
           g - 用于绘画的 
            Graphics对象 
           update(Graphics,JComponent) 
           protected void paintTabArea(Graphics g, int tabPlacement, int selectedIndex)
BasicTabbedPaneUI 
          Graphics对象。 
           标签位置可以是: JTabbedPane.TOP , JTabbedPane.BOTTOM , JTabbedPane.LEFT ,或JTabbedPane.RIGHT 。 
           所选索引必须是有效的选项卡窗格选项卡索引(0至选项卡计数-1(含)),如果当前未选择任何选项卡,则为-1。 
           未指定无效参数的处理。 
          paintTabArea在 
            BasicTabbedPaneUI 
           g - 用于呈现的图形对象 
           tabPlacement - JTabbedPane中选项卡的位置 
           selectedIndex - 所选组件的选项卡索引 
           protected void setRolloverTab(int index)
index 。 
           如果鼠标不再位于任何选项卡上,那么index将为-1。 
           不进行任何检查,以确保传入的索引中标识有效的选项卡。 
          setRolloverTab在 
            BasicTabbedPaneUI 
           index - 鼠标结束的标签的索引。 
           protected int calculateMaxTabHeight(int tabPlacement)
protected int calculateTabWidth(int tabPlacement,
                                int tabIndex,
                                FontMetrics metrics) 
           protected int calculateMaxTabWidth(int tabPlacement)
protected Insets getTabInsets(int tabPlacement, int tabIndex)
protected FontMetrics getFontMetrics()
protected LayoutManager createLayoutManager()
installUI创建一个布局管理器对象来管理JTabbedPane 。 
           被覆盖以创建TabbedPaneLayout子类,它考虑到tabOverlap。 
          createLayoutManager在 
            BasicTabbedPaneUI 
           BasicTabbedPaneUI.TabbedPaneLayout , JTabbedPane.getTabLayoutPolicy() 
            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.