java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.TabbedPaneUI
javax.swing.plaf.basic.BasicTabbedPaneUI
- 所有已实现的接口:
SwingConstants
- 已知子类:
MetalTabbedPaneUI,SynthTabbedPaneUI
TabbedPaneUI 的基本 L&F 实现。
-
内部类总结
内部类修饰符和类型类描述class此类应被视为“受保护”的内部类。class此类应被视为“受保护”的内部类。class此类应被视为“受保护”的内部类。class此类应被视为“受保护”的内部类。class此类应被视为“受保护”的内部类。 -
字段摘要
字段修饰符和类型Field描述protected Rectangle用于一般布局计算的矩形,以避免动态构建许多新的矩形。protected Insets内容边框插入protected ColorDark shadow 颜色protected KeyStroke已弃用。从 Java 2 平台 v1.3 开始。protected Color焦点颜色protected FocusListener焦点变化监听protected Color高亮颜色protected KeyStroke已弃用。从 Java 2 平台 v1.3 开始。protected Color灯光高亮颜色protected int最大标签高度protected int最大标签宽度protected MouseListener鼠标改变监听protected PropertyChangeListener属性变化监听protected Rectangle[]制表符protected KeyStroke已弃用。从 Java 2 平台 v1.3 开始。protected int运行次数protected int选定的运行protected Insets选定的标签insetsprotected Color阴影颜色protected Insets选项卡区域插入protected ChangeListener选项卡更改监听protected Insets标签内嵌protected JTabbedPane选项卡窗格protected int选项卡运行叠加protected int[]标签运行protected int文本图标间隙protected KeyStroke已弃用。从 Java 2 平台 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 -
构造方法总结
构造方法 -
方法总结
修饰符和类型方法描述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 ChangeListener创建一个更改监听。protected FocusListener创建一个焦点监听。protected LayoutManager由installUI调用以创建布局管理器对象来管理JTabbedPane。protected MouseListener创建鼠标监听。protected PropertyChangeListener创建属性更改监听。protected JButtoncreateScrollButton(int direction) 创建并返回一个 JButton,它将为用户提供一种在特定方向滚动选项卡的方法。static ComponentUI创建一个用户界面。protected void展开选项卡运行数组。protected intgetBaseline(int tab) 返回指定选项卡的基线。intgetBaseline(JComponent c, int width, int height) 返回基线。protected int返回基线偏移量。返回一个枚举,指示组件的基线如何随着大小的变化而变化。protected InsetsgetContentBorderInsets(int tabPlacement) 返回内容边框insets。protected int返回具有焦点的选项卡的索引。protected FontMetrics返回字体指标。protected IcongetIconForTab(int tabIndex) 返回选项卡的图标。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 int返回鼠标当前位于的选项卡,如果鼠标不再位于任何选项卡上,则返回-1。protected intgetRunForTab(int tabCount, int tabIndex) 返回选项卡的运行。protected InsetsgetSelectedTabPadInsets(int tabPlacement) 返回选定的标签垫insets。protected InsetsgetTabAreaInsets(int tabPlacement) 返回选项卡区域insets。protected RectanglegetTabBounds(int tabIndex, Rectangle dest) 返回 JTabbedPane 组件坐标空间中指定选项卡的边界。getTabBounds(JTabbedPane pane, int i) 返回指定选项卡索引的边界。protected InsetsgetTabInsets(int tabPlacement, int tabIndex) 返回制表符插入。protected intgetTabLabelShiftX(int tabPlacement, int tabIndex, boolean isSelected) 返回选项卡标签偏移 x。protected intgetTabLabelShiftY(int tabPlacement, int tabIndex, boolean isSelected) 返回选项卡标签 shift y。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 Component返回可见组件。protected void为 JTabbedPane 创建并安装任何必需的子组件。protected void安装默认值。protected void安装键盘操作。protected void安装监听。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) 导航选定的选项卡。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) 旋转insets。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 void从 JTabbedPane 中删除所有已安装的子组件。protected void卸载默认值。protected void卸载键盘操作。protected void卸载监听。在类 javax.swing.plaf.ComponentUI 中声明的方法
contains, getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSize, getPreferredSize, installUI, paint, uninstallUI, update
-
字段详细信息
-
tabPane
选项卡窗格 -
highlight
高亮颜色 -
lightHighlight
灯光高亮颜色 -
shadow
阴影颜色 -
darkShadow
Dark shadow 颜色 -
focus
焦点颜色 -
textIconGap
protected int textIconGap文本图标间隙 -
tabRunOverlay
protected int tabRunOverlay选项卡运行叠加 -
tabInsets
标签内嵌 -
selectedTabPadInsets
选定的标签insets -
tabAreaInsets
选项卡区域插入 -
contentBorderInsets
内容边框插入 -
upKey
已弃用。从 Java 2 平台 v1.3 开始。从 Java 2 平台 v1.3 开始,不再使用这个以前未记录的字段。键绑定现在由 LookAndFeel 定义,请参阅键绑定规范以获取更多详细信息。 -
downKey
已弃用。从 Java 2 平台 v1.3 开始。从 Java 2 平台 v1.3 开始,不再使用这个以前未记录的字段。键绑定现在由 LookAndFeel 定义,请参阅键绑定规范以获取更多详细信息。 -
leftKey
已弃用。从 Java 2 平台 v1.3 开始。从 Java 2 平台 v1.3 开始,不再使用这个以前未记录的字段。键绑定现在由 LookAndFeel 定义,请参阅键绑定规范以获取更多详细信息。 -
rightKey
已弃用。从 Java 2 平台 v1.3 开始。从 Java 2 平台 v1.3 开始,不再使用这个以前未记录的字段。键绑定现在由 LookAndFeel 定义,请参阅键绑定规范以获取更多详细信息。 -
tabRuns
protected int[] tabRuns标签运行 -
runCount
protected int runCount运行次数 -
selectedRun
protected int selectedRun选定的运行 -
rects
制表符 -
maxTabHeight
protected int maxTabHeight最大标签高度 -
maxTabWidth
protected int maxTabWidth最大标签宽度 -
tabChangeListener
选项卡更改监听 -
propertyChangeListener
属性变化监听 -
mouseListener
鼠标改变监听 -
focusListener
焦点变化监听 -
calcRect
用于一般布局计算的矩形,以避免动态构建许多新的矩形。
-
-
构造方法详细信息
-
BasicTabbedPaneUI
public BasicTabbedPaneUI()构造一个BasicTabbedPaneUI
-
-
方法详情
-
createUI
创建一个用户界面。- 参数:
c- 一个组件- 返回:
- 一个用户界面
-
createLayoutManager
由installUI调用以创建布局管理器对象来管理JTabbedPane。- 返回:
- 布局管理器对象
- 参见:
-
installComponents
protected void installComponents()为 JTabbedPane 创建并安装任何必需的子组件。由 installUI 调用。- 自从:
- 1.4
-
createScrollButton
创建并返回一个 JButton,它将为用户提供一种在特定方向滚动选项卡的方法。返回的 JButton 必须是 UIResource 的实例。- 参数:
direction- SwingConstants 常量之一:SOUTH、NORTH、EAST 或 WEST- 返回:
- 供用户使用的小部件
- 抛出:
IllegalArgumentException- 如果方向不是 NORTH、SOUTH、EAST 或 WEST 之一- 自从:
- 1.5
- 参见:
-
uninstallComponents
protected void uninstallComponents()从 JTabbedPane 中删除所有已安装的子组件。由 uninstallUI 调用。- 自从:
- 1.4
-
installDefaults
protected void installDefaults()安装默认值。 -
uninstallDefaults
protected void uninstallDefaults()卸载默认值。 -
installListeners
protected void installListeners()安装监听。 -
uninstallListeners
protected void uninstallListeners()卸载监听。 -
createMouseListener
创建鼠标监听。- 返回:
- 鼠标监听
-
createFocusListener
创建一个焦点监听。- 返回:
- 专注的倾听者
-
createChangeListener
创建一个更改监听。- 返回:
- 改变监听
-
createPropertyChangeListener
创建属性更改监听。- 返回:
- 属性更改监听
-
installKeyboardActions
protected void installKeyboardActions()安装键盘操作。 -
uninstallKeyboardActions
protected void uninstallKeyboardActions()卸载键盘操作。 -
setRolloverTab
protected void setRolloverTab(int index) 将鼠标当前悬停的选项卡设置为index。如果鼠标不再位于任何选项卡上,index将为 -1。不进行任何检查以确保传入的索引标识有效选项卡。- 参数:
index- 鼠标悬停的选项卡的索引。- 自从:
- 1.5
-
getRolloverTab
protected int getRolloverTab()返回鼠标当前位于的选项卡,如果鼠标不再位于任何选项卡上,则返回-1。- 返回:
-
鼠标当前位于的选项卡,或者
-1如果鼠标不再位于任何选项卡上 - 自从:
- 1.5
-
getBaseline
返回基线。- 重写:
getBaseline在类ComponentUI中- 参数:
c-JComponent正在请求基线width- 获取基线的宽度height- 获取基线的高度- 返回:
- 基线或值 < 0 表示没有合理的基线
- 抛出:
NullPointerException- 如果c是nullIllegalArgumentException- 如果宽度或高度 < 0- 自从:
- 1.6
- 参见:
-
getBaselineResizeBehavior
返回一个枚举,指示组件的基线如何随着大小的变化而变化。- 重写:
getBaselineResizeBehavior在类ComponentUI中- 参数:
c-JComponent返回基线调整大小行为- 返回:
- 一个枚举,指示基线如何随着组件大小的变化而变化
- 抛出:
NullPointerException- 如果c是null- 自从:
- 1.6
- 参见:
-
getBaseline
protected int getBaseline(int tab) 返回指定选项卡的基线。- 参数:
tab- 获取基线的选项卡索引- 返回:
- 基线或值 < 0 表示没有合理的基线
- 抛出:
IndexOutOfBoundsException- 如果索引超出范围(索引 < 0 || 索引 >= 选项卡计数)- 自从:
- 1.6
-
getBaselineOffset
protected int getBaselineOffset()返回基线偏移量。这通常与getTabLabelShiftY相同。- 返回:
- 抵消基线的金额
- 自从:
- 1.6
-
paintTabArea
在选项卡区域绘制选项卡。由 paint() 调用。图形参数必须是有效的Graphics对象。选项卡位置可以是:JTabbedPane.TOP、JTabbedPane.BOTTOM、JTabbedPane.LEFT或JTabbedPane.RIGHT。所选索引必须是有效的选项卡式窗格选项卡索引(0 到选项卡计数 - 1,含)或 -1 如果当前未选择任何选项卡。未指定无效参数的处理。- 参数:
g- 用于渲染的图形对象tabPlacement- JTabbedPane 中选项卡的位置selectedIndex- 所选组件的选项卡索引- 自从:
- 1.4
-
paintTab
protected void paintTab(Graphics g, int tabPlacement, Rectangle [] rects, int tabIndex, Rectangle iconRect, Rectangle textRect) 绘制一个选项卡。- 参数:
g- 图形tabPlacement- 选项卡放置rects- 选项卡矩形tabIndex- 选项卡索引iconRect- 图标矩形textRect- 文本矩形
-
layoutLabel
protected void layoutLabel(int tabPlacement, FontMetrics metrics, int tabIndex, String title, Icon icon, Rectangle tabRect, Rectangle iconRect, Rectangle textRect, boolean isSelected) 放置一个标签。- 参数:
tabPlacement- 选项卡放置metrics- 字体指标tabIndex- 选项卡索引title- 标题icon- 图标tabRect- 选项卡矩形iconRect- 图标矩形textRect- 文本矩形isSelected- 选择状态
-
paintIcon
protected void paintIcon(Graphics g, int tabPlacement, int tabIndex, Icon icon, Rectangle iconRect, boolean isSelected) 绘制一个图标。- 参数:
g- 图形tabPlacement- 选项卡放置tabIndex- 选项卡索引icon- 图标iconRect- 图标矩形isSelected- 选择状态
-
paintText
protected void paintText(Graphics g, int tabPlacement, Font font, FontMetrics metrics, int tabIndex, String title, Rectangle textRect, boolean isSelected) 绘制文本。- 参数:
g- 图形tabPlacement- 选项卡放置font- 字体metrics- 字体指标tabIndex- 选项卡索引title- 标题textRect- 文本矩形isSelected- 选择状态
-
getTabLabelShiftX
protected int getTabLabelShiftX(int tabPlacement, int tabIndex, boolean isSelected) 返回选项卡标签偏移 x。- 参数:
tabPlacement- 选项卡放置tabIndex- 选项卡索引isSelected- 选择状态- 返回:
- 选项卡标签移动 x
-
getTabLabelShiftY
protected int getTabLabelShiftY(int tabPlacement, int tabIndex, boolean isSelected) 返回选项卡标签 shift y。- 参数:
tabPlacement- 选项卡放置tabIndex- 选项卡索引isSelected- 选择状态- 返回:
- 选项卡标签移动 y
-
paintFocusIndicator
protected void paintFocusIndicator(Graphics g, int tabPlacement, Rectangle [] rects, int tabIndex, Rectangle iconRect, Rectangle textRect, boolean isSelected) 绘制焦点指示器。- 参数:
g- 图形tabPlacement- 选项卡放置rects- 选项卡矩形tabIndex- 选项卡索引iconRect- 图标矩形textRect- 文本矩形isSelected- 选择状态
-
paintTabBorder
protected void paintTabBorder(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected) 在选项卡周围绘制边框。请注意,此功能不会绘制选项卡的背景,而是在其他地方完成。- 参数:
g- 绘制的图形上下文tabPlacement- 选项卡的位置(左、右、下、上)tabIndex- 选项卡相对于其他选项卡的索引x- 选项卡的 x 坐标y- 选项卡的 y 坐标w- 选项卡的宽度h- 选项卡的高度isSelected- 一个boolean决定标签是否被选中
-
paintTabBackground
protected void paintTabBackground(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected) 绘制选项卡背景。- 参数:
g- 绘制的图形上下文tabPlacement- 选项卡的位置(左、右、下、上)tabIndex- 选项卡相对于其他选项卡的索引x- 选项卡的 x 坐标y- 选项卡的 y 坐标w- 选项卡的宽度h- 选项卡的高度isSelected- 一个boolean决定标签是否被选中
-
paintContentBorder
绘制内容边框。- 参数:
g- 绘制的图形上下文tabPlacement- 选项卡的位置(左、右、下、上)selectedIndex- 所选组件的选项卡索引
-
paintContentBorderTopEdge
protected void paintContentBorderTopEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h) 绘制内容边框的上边缘。- 参数:
g- 绘制的图形上下文tabPlacement- 选项卡的位置(左、右、下、上)selectedIndex- 所选组件的选项卡索引x- 选项卡的 x 坐标y- 选项卡的 y 坐标w- 选项卡的宽度h- 选项卡的高度
-
paintContentBorderLeftEdge
protected void paintContentBorderLeftEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h) 绘制内容边框的左边缘。- 参数:
g- 绘制的图形上下文tabPlacement- 选项卡的位置(左、右、下、上)selectedIndex- 所选组件的选项卡索引x- 选项卡的 x 坐标y- 选项卡的 y 坐标w- 选项卡的宽度h- 选项卡的高度
-
paintContentBorderBottomEdge
protected void paintContentBorderBottomEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h) 绘制内容边框底部边缘。- 参数:
g- 绘制的图形上下文tabPlacement- 选项卡的位置(左、右、下、上)selectedIndex- 所选组件的选项卡索引x- 选项卡的 x 坐标y- 选项卡的 y 坐标w- 选项卡的宽度h- 选项卡的高度
-
paintContentBorderRightEdge
protected void paintContentBorderRightEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h) 绘制内容边框右边缘。- 参数:
g- 绘制的图形上下文tabPlacement- 选项卡的位置(左、右、下、上)selectedIndex- 所选组件的选项卡索引x- 选项卡的 x 坐标y- 选项卡的 y 坐标w- 选项卡的宽度h- 选项卡的高度
-
getTabBounds
返回指定选项卡索引的边界。边界是相对于 JTabbedPane 的坐标空间的。- 指定者:
getTabBounds在类TabbedPaneUI中- 参数:
pane- 窗格i- 索引- 返回:
- 制表符边界的矩形
-
getTabRunCount
从类复制的描述:TabbedPaneUI返回选项卡运行计数。- 指定者:
getTabRunCount在类TabbedPaneUI中- 参数:
pane- 窗格- 返回:
- 选项卡运行计数
-
tabForCoordinate
返回与 JTabbedPane 坐标空间中指定点相交的选项卡索引。- 指定者:
tabForCoordinate在类TabbedPaneUI中- 参数:
pane- 窗格x- x 坐标y- y 坐标- 返回:
- 坐标选项卡
-
getTabBounds
返回 JTabbedPane 组件坐标空间中指定选项卡的边界。这是必需的,因为默认情况下选项卡矩形是在呈现它们的组件的坐标空间中定义的,它可以是 JTabbedPane(对于 WRAP_TAB_LAYOUT)或 ScrollableTabPanel(SCROLL_TAB_LAYOUT)。只要选项卡矩形必须相对于 JTabbedPane 本身并且结果应该放在指定的 Rectangle 对象中(而不是每次都实例化并返回一个新的 Rectangle),就应该使用此方法。选项卡索引参数必须是有效的选项卡式窗格选项卡索引(0 到选项卡计数 - 1,含)。目标矩形参数必须是有效的Rectangle实例。未指定无效参数的处理。- 参数:
tabIndex- 选项卡的索引dest- 应放置结果的矩形- 返回:
- 结果矩形
- 自从:
- 1.4
-
getVisibleComponent
返回可见组件。- 返回:
- 可见组件
-
setVisibleComponent
设置可见组件。- 参数:
component- 组件
-
assureRectsCreated
protected void assureRectsCreated(int tabCount) 确保创建选项卡矩形。- 参数:
tabCount- 选项卡计数
-
expandTabRunsArray
protected void expandTabRunsArray()展开选项卡运行数组。 -
getRunForTab
protected int getRunForTab(int tabCount, int tabIndex) 返回选项卡的运行。- 参数:
tabCount- 选项卡计数tabIndex- 选项卡索引。- 返回:
- 标签的运行
-
lastTabInRun
protected int lastTabInRun(int tabCount, int run) 返回运行中的最后一个选项卡。- 参数:
tabCount- 选项卡计数run- 奔跑- 返回:
- 运行中的最后一个选项卡
-
getTabRunOverlay
protected int getTabRunOverlay(int tabPlacement) 返回选项卡运行重写。- 参数:
tabPlacement- 选项卡的位置(左、右、下、上)- 返回:
- 选项卡运行重写
-
getTabRunIndent
protected int getTabRunIndent(int tabPlacement, int run) 返回选项卡运行缩进。- 参数:
tabPlacement- 选项卡的位置(左、右、下、上)run- 选项卡运行- 返回:
- 选项卡运行缩进
-
shouldPadTabRun
protected boolean shouldPadTabRun(int tabPlacement, int run) 返回是否应填充选项卡运行。- 参数:
tabPlacement- 选项卡的位置(左、右、下、上)run- 选项卡运行- 返回:
- 标签运行是否应该被填充
-
shouldRotateTabRuns
protected boolean shouldRotateTabRuns(int tabPlacement) 返回标签运行是否应该旋转。- 参数:
tabPlacement- 选项卡的位置(左、右、下、上)- 返回:
- 标签运行是否应该旋转
-
getIconForTab
返回选项卡的图标。- 参数:
tabIndex- 选项卡的索引- 返回:
- 选项卡的图标
-
getTextViewForTab
返回为指定选项卡呈现程式化文本 (HTML) 所需的文本 View 对象,如果此选项卡不需要专门的文本呈现,则返回 null。这是为了支持选项卡内的 html 呈现。- 参数:
tabIndex- 选项卡的索引- 返回:
- 用于呈现选项卡文本的文本视图,如果不需要专门的呈现,则为 null
- 自从:
- 1.4
-
calculateTabHeight
protected int calculateTabHeight(int tabPlacement, int tabIndex, int fontHeight) 计算标签高度。- 参数:
tabPlacement- 选项卡的位置(左、右、下、上)tabIndex- 选项卡相对于其他选项卡的索引fontHeight- 字体高度- 返回:
- 选项卡高度
-
calculateMaxTabHeight
protected int calculateMaxTabHeight(int tabPlacement) 计算制表符的最大高度。- 参数:
tabPlacement- 选项卡的位置(左、右、下、上)- 返回:
- 最大标签高度
-
calculateTabWidth
计算标签宽度。- 参数:
tabPlacement- 选项卡的位置(左、右、下、上)tabIndex- 选项卡相对于其他选项卡的索引metrics- 字体指标- 返回:
- 选项卡宽度
-
calculateMaxTabWidth
protected int calculateMaxTabWidth(int tabPlacement) 计算制表符的最大宽度。- 参数:
tabPlacement- 选项卡的位置(左、右、下、上)- 返回:
- 制表符的最大宽度
-
calculateTabAreaHeight
protected int calculateTabAreaHeight(int tabPlacement, int horizRunCount, int maxTabHeight) 计算标签区域高度。- 参数:
tabPlacement- 选项卡的位置(左、右、下、上)horizRunCount- 水平运行计数maxTabHeight- 最大标签高度- 返回:
- 标签区域高度
-
calculateTabAreaWidth
protected int calculateTabAreaWidth(int tabPlacement, int vertRunCount, int maxTabWidth) 计算标签区域宽度。- 参数:
tabPlacement- 选项卡的位置(左、右、下、上)vertRunCount- 垂直运行计数maxTabWidth- 最大标签宽度- 返回:
- 选项卡区域宽度
-
getTabInsets
返回制表符插入。- 参数:
tabPlacement- 选项卡的位置(左、右、下、上)tabIndex- 选项卡索引- 返回:
- 选项卡插入
-
getSelectedTabPadInsets
返回选定的标签垫insets。- 参数:
tabPlacement- 选项卡的位置(左、右、下、上)- 返回:
- 选定的标签垫插入
-
getTabAreaInsets
返回选项卡区域insets。- 参数:
tabPlacement- 选项卡的位置(左、右、下、上)- 返回:
- 垫区insets
-
getContentBorderInsets
返回内容边框insets。- 参数:
tabPlacement- 选项卡的位置(左、右、下、上)- 返回:
- 内容边框插入
-
getFontMetrics
返回字体指标。- 返回:
- 字体指标
-
selectNextTabInRun
protected void selectNextTabInRun(int current) 选择运行中的下一个选项卡。- 参数:
current- 当前选项卡
-
selectPreviousTabInRun
protected void selectPreviousTabInRun(int current) 选择运行中的上一个选项卡。- 参数:
current- 当前选项卡
-
selectNextTab
protected void selectNextTab(int current) 选择下一个选项卡。- 参数:
current- 当前选项卡
-
selectPreviousTab
protected void selectPreviousTab(int current) 选择上一个选项卡。- 参数:
current- 当前选项卡
-
selectAdjacentRunTab
protected void selectAdjacentRunTab(int tabPlacement, int tabIndex, int offset) 选择相邻的选项卡运行。- 参数:
tabPlacement- 选项卡的位置(左、右、下、上)tabIndex- 选项卡相对于其他选项卡的索引offset- 选择偏移量
-
getFocusIndex
protected int getFocusIndex()返回具有焦点的选项卡的索引。- 返回:
- 具有焦点的选项卡的索引
- 自从:
- 1.5
-
getTabRunOffset
protected int getTabRunOffset(int tabPlacement, int tabCount, int tabIndex, boolean forward) 返回制表符运行偏移量。- 参数:
tabPlacement- 选项卡的位置(左、右、下、上)tabCount- 选项卡计数tabIndex- 选项卡相对于其他选项卡的索引forward- 转发与否- 返回:
- 制表符运行偏移
-
getPreviousTabIndex
protected int getPreviousTabIndex(int base) 返回上一个选项卡索引。- 参数:
base- 基地- 返回:
- 上一个选项卡索引
-
getNextTabIndex
protected int getNextTabIndex(int base) 返回下一个选项卡索引。- 参数:
base- 基地- 返回:
- 下一个标签索引
-
getNextTabIndexInRun
protected int getNextTabIndexInRun(int tabCount, int base) 返回运行中的下一个选项卡索引。- 参数:
tabCount- 选项卡计数base- 基地- 返回:
- 运行中的下一个选项卡索引
-
getPreviousTabIndexInRun
protected int getPreviousTabIndexInRun(int tabCount, int base) 返回运行中的前一个选项卡索引。- 参数:
tabCount- 选项卡计数base- 基地- 返回:
- 运行中的上一个选项卡索引
-
getPreviousTabRun
protected int getPreviousTabRun(int baseRun) 返回上一个选项卡运行。- 参数:
baseRun- 基本运行- 返回:
- 上一个选项卡运行
-
getNextTabRun
protected int getNextTabRun(int baseRun) 返回下一个选项卡运行。- 参数:
baseRun- 基本运行- 返回:
- 下一个选项卡运行
-
rotateInsets
旋转insets。- 参数:
topInsets- 顶部insetstargetInsets- 目标insetstargetPlacement- 目标位置
-