所有类


javax.swing.plaf.basic
类 BasicTabbedPaneUI

java.lang.Object
  继承者 javax.swing.plaf.ComponentUI
      继承者 javax.swing.plaf.TabbedPaneUI
          继承者 javax.swing.plaf.basic.BasicTabbedPaneUI
所有已实现的接口:
SwingConstants
直接已知子类:
MetalTabbedPaneUI

public class BasicTabbedPaneUI
   
   
   
   
extends TabbedPaneUI
implements SwingConstants

TabbedPaneUI 的基本 L&F 实现。


嵌套类摘要
 classBasicTabbedPaneUI.FocusHandler
          此类应视为“受保护”内部类。
 classBasicTabbedPaneUI.MouseHandler
          此类应视为“受保护”内部类。
 classBasicTabbedPaneUI.PropertyChangeHandler
          此类应视为“受保护”内部类。
 classBasicTabbedPaneUI.TabbedPaneLayout
          此类应视为“受保护”内部类。
 classBasicTabbedPaneUI.TabSelectionHandler
          此类应视为“受保护”内部类。
 
字段摘要
protected  RectanglecalcRect
          用于通用布局计算以避免运行中构造多个新 Rectangle 的矩形。
protected  InsetscontentBorderInsets
           
protected  ColordarkShadow
           
protected  KeyStrokedownKey
          已过时。 从 Java 2 platform v1.3 开始。
protected  Colorfocus
           
protected  FocusListenerfocusListener
           
protected  Colorhighlight
           
protected  KeyStrokeleftKey
          已过时。 从 Java 2 platform v1.3 开始。
protected  ColorlightHighlight
           
protected  intmaxTabHeight
           
protected  intmaxTabWidth
           
protected  MouseListenermouseListener
           
protected  PropertyChangeListenerpropertyChangeListener
           
protected  Rectangle[]rects
           
protected  KeyStrokerightKey
          已过时。 从 Java 2 platform v1.3 开始。
protected  intrunCount
           
protected  intselectedRun
           
protected  InsetsselectedTabPadInsets
           
protected  Colorshadow
           
protected  InsetstabAreaInsets
           
protected  ChangeListenertabChangeListener
           
protected  InsetstabInsets
           
protected  JTabbedPanetabPane
           
protected  inttabRunOverlay
           
protected  int[]tabRuns
           
protected  inttextIconGap
           
protected  KeyStrokeupKey
          已过时。 从 Java 2 platform v1.3 开始。
 
从接口 javax.swing.SwingConstants 继承的字段
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
 
构造方法摘要
BasicTabbedPaneUI()
           
 
方法摘要
protected  voidassureRectsCreated(int tabCount)
           
protected  intcalculateMaxTabHeight(int tabPlacement)
           
protected  intcalculateMaxTabWidth(int tabPlacement)
           
protected  intcalculateTabAreaHeight(int tabPlacement, int horizRunCount, int maxTabHeight)
           
protected  intcalculateTabAreaWidth(int tabPlacement, int vertRunCount, int maxTabWidth)
           
protected  intcalculateTabHeight(int tabPlacement, int tabIndex, int fontHeight)
           
protected  intcalculateTabWidth(int tabPlacement, int tabIndex, FontMetrics metrics)
           
protected  ChangeListenercreateChangeListener()
           
protected  FocusListenercreateFocusListener()
           
protected  LayoutManagercreateLayoutManager()
          由 installUI 调用,用于创建布局管理器对象以管理 JTabbedPane
protected  MouseListenercreateMouseListener()
           
protected  PropertyChangeListenercreatePropertyChangeListener()
           
protected  JButtoncreateScrollButton(int direction)
          创建并返回一个 JButton,它将为用户提供朝某一特定方向滚动选项卡的方式。
static ComponentUIcreateUI(JComponent c)
           
protected  voidexpandTabRunsArray()
           
protected  InsetsgetContentBorderInsets(int tabPlacement)
           
protected  intgetFocusIndex()
          返回具有焦点的选项卡的索引。
protected  FontMetricsgetFontMetrics()
           
protected  IcongetIconForTab(int tabIndex)
           
 DimensiongetMaximumSize(JComponent c)
          返回指定组件的适合外观的最大大小。
 DimensiongetMinimumSize(JComponent c)
          返回指定组件的适合外观的最小大小。
protected  intgetNextTabIndex(int base)
           
protected  intgetNextTabIndexInRun(int tabCount, int base)
           
protected  intgetNextTabRun(int baseRun)
           
protected  intgetPreviousTabIndex(int base)
           
protected  intgetPreviousTabIndexInRun(int tabCount, int base)
           
protected  intgetPreviousTabRun(int baseRun)
           
protected  intgetRolloverTab()
          返回当前有鼠标位于其上方的选项卡,如果鼠标不再位于任何选项卡上,则返回 -1。
protected  intgetRunForTab(int tabCount, int tabIndex)
           
protected  InsetsgetSelectedTabPadInsets(int tabPlacement)
           
protected  InsetsgetTabAreaInsets(int tabPlacement)
           
protected  RectanglegetTabBounds(int tabIndex, Rectangle dest)
          返回 JTabbedPane 组件的坐标空间中指定选项卡的边界。
 RectanglegetTabBounds(JTabbedPane pane, int i)
          返回指定选项卡索引的边界。
protected  InsetsgetTabInsets(int tabPlacement, int tabIndex)
           
protected  intgetTabLabelShiftX(int tabPlacement, int tabIndex, boolean isSelected)
           
protected  intgetTabLabelShiftY(int tabPlacement, int tabIndex, boolean isSelected)
           
 intgetTabRunCount(JTabbedPane pane)
           
protected  intgetTabRunIndent(int tabPlacement, int run)
           
protected  intgetTabRunOffset(int tabPlacement, int tabCount, int tabIndex, boolean forward)
           
protected  intgetTabRunOverlay(int tabPlacement)
           
protected  ViewgetTextViewForTab(int tabIndex)
          返回为指定选项卡呈现样式化文本 (HTML) 所需的文本 View 对象;如果此选项卡不需要任何特殊化的文本呈现,则返回 null。
protected  ComponentgetVisibleComponent()
           
protected  voidinstallComponents()
          创建并安装 JTabbedPane 的所有必需的子组件。
protected  voidinstallDefaults()
           
protected  voidinstallKeyboardActions()
           
protected  voidinstallListeners()
           
 voidinstallUI(JComponent c)
          配置指定组件,使其适合外观。
protected  intlastTabInRun(int tabCount, int run)
           
protected  voidlayoutLabel(int tabPlacement, FontMetrics metrics, int tabIndex, String title, Icon icon, Rectangle tabRect, Rectangle iconRect, Rectangle textRect, boolean isSelected)
           
protected  voidnavigateSelectedTab(int direction)
           
 voidpaint(Graphics g, JComponent c)
          绘制指定组件,使其适合外观。
protected  voidpaintContentBorder(Graphics g, int tabPlacement, int selectedIndex)
           
protected  voidpaintContentBorderBottomEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
           
protected  voidpaintContentBorderLeftEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
           
protected  voidpaintContentBorderRightEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
           
protected  voidpaintContentBorderTopEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
           
protected  voidpaintFocusIndicator(Graphics g, int tabPlacement, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect, boolean isSelected)
           
protected  voidpaintIcon(Graphics g, int tabPlacement, int tabIndex, Icon icon, Rectangle iconRect, boolean isSelected)
           
protected  voidpaintTab(Graphics g, int tabPlacement, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect)
           
protected  voidpaintTabArea(Graphics g, int tabPlacement, int selectedIndex)
          在选项卡区域绘制选项卡。
protected  voidpaintTabBackground(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected)
           
protected  voidpaintTabBorder(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected)
          此方法围绕每个选项卡绘制边框。
protected  voidpaintText(Graphics g, int tabPlacement, Font font, FontMetrics metrics, int tabIndex, String title, Rectangle textRect, boolean isSelected)
           
protected static voidrotateInsets(Insets topInsets, Insets targetInsets, int targetPlacement)
           
protected  voidselectAdjacentRunTab(int tabPlacement, int tabIndex, int offset)
           
protected  voidselectNextTab(int current)
           
protected  voidselectNextTabInRun(int current)
           
protected  voidselectPreviousTab(int current)
           
protected  voidselectPreviousTabInRun(int current)
           
protected  voidsetRolloverTab(int index)
          将当前有鼠标位于其上方的选项卡设置为 index
protected  voidsetVisibleComponent(Component component)
           
protected  booleanshouldPadTabRun(int tabPlacement, int run)
           
protected  booleanshouldRotateTabRuns(int tabPlacement)
           
 inttabForCoordinate(JTabbedPane pane, int x, int y)
          返回与 JTabbedPane 的坐标空间中的指定点相交的选项卡索引。
protected  voiduninstallComponents()
          从 JTabbedPane 移除所有已安装的子组件。
protected  voiduninstallDefaults()
           
protected  voiduninstallKeyboardActions()
           
protected  voiduninstallListeners()
           
 voiduninstallUI(JComponent c)
          在 installUI 期间,在指定组件上反向执行的配置操作。
 
从类 javax.swing.plaf.ComponentUI 继承的方法
contains, getAccessibleChild, getAccessibleChildrenCount, getPreferredSize, update
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

tabPane

protected JTabbedPane tabPane

highlight

protected Color highlight

lightHighlight

protected Color lightHighlight

shadow

protected Color shadow

darkShadow

protected Color darkShadow

focus

protected Color focus

textIconGap

protected int textIconGap