java.lang.Object javax.swing.plaf.ComponentUI javax.swing.plaf.TabbedPaneUI javax.swing.plaf.basic.BasicTabbedPaneUI
public class BasicTabbedPaneUI
TabbedPaneUI 的基本 L&F 实现。
嵌套类摘要 | |
---|---|
class |
BasicTabbedPaneUI.FocusHandler 此类应视为“受保护”内部类。 |
class |
BasicTabbedPaneUI.MouseHandler 此类应视为“受保护”内部类。 |
class |
BasicTabbedPaneUI.PropertyChangeHandler 此类应视为“受保护”内部类。 |
class |
BasicTabbedPaneUI.TabbedPaneLayout 此类应视为“受保护”内部类。 |
class |
BasicTabbedPaneUI.TabSelectionHandler 此类应视为“受保护”内部类。 |
字段摘要 | |
---|---|
protected Rectangle |
calcRect 用于通用布局计算以避免运行中构造多个新 Rectangle 的矩形。 |
protected Insets |
contentBorderInsets |
protected Color |
darkShadow |
protected KeyStroke |
downKey 已过时。 从 Java 2 platform v1.3 开始。 |
protected Color |
focus |
protected FocusListener |
focusListener |
protected Color |
highlight |
protected KeyStroke |
leftKey 已过时。 从 Java 2 platform v1.3 开始。 |
protected Color |
lightHighlight |
protected int |
maxTabHeight |
protected int |
maxTabWidth |
protected MouseListener |
mouseListener |
protected PropertyChangeListener |
propertyChangeListener |
protected Rectangle[] |
rects |
protected KeyStroke |
rightKey 已过时。 从 Java 2 platform v1.3 开始。 |
protected int |
runCount |
protected int |
selectedRun |
protected Insets |
selectedTabPadInsets |
protected Color |
shadow |
protected Insets |
tabAreaInsets |
protected ChangeListener |
tabChangeListener |
protected Insets |
tabInsets |
protected JTabbedPane |
tabPane |
protected int |
tabRunOverlay |
protected int[] |
tabRuns |
protected int |
textIconGap |
protected KeyStroke |
upKey 已过时。 从 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 void |
assureRectsCreated(int tabCount) |
protected int |
calculateMaxTabHeight(int tabPlacement) |
protected int |
calculateMaxTabWidth(int tabPlacement) |
protected int |
calculateTabAreaHeight(int tabPlacement, int horizRunCount, int maxTabHeight) |
protected int |
calculateTabAreaWidth(int tabPlacement, int vertRunCount, int maxTabWidth) |
protected int |
calculateTabHeight(int tabPlacement, int tabIndex, int fontHeight) |
protected int |
calculateTabWidth(int tabPlacement, int tabIndex, FontMetrics metrics) |
protected ChangeListener |
createChangeListener() |
protected FocusListener |
createFocusListener() |
protected LayoutManager |
createLayoutManager() 由 installUI 调用,用于创建布局管理器对象以管理 JTabbedPane 。 |
protected MouseListener |
createMouseListener() |
protected PropertyChangeListener |
createPropertyChangeListener() |
protected JButton |
createScrollButton(int direction) 创建并返回一个 JButton,它将为用户提供朝某一特定方向滚动选项卡的方式。 |
static ComponentUI |
createUI(JComponent c) |
protected void |
expandTabRunsArray() |
protected int |
getBaseline(int tab) 返回指定选项卡的基线。 |
int |
getBaseline(JComponent c, int width, int height) 返回基线。 |
protected int |
getBaselineOffset() 返回基线偏移的距离。 |
Component.BaselineResizeBehavior |
getBaselineResizeBehavior(JComponent c) 返回一个枚举,它指示该组件的基线如何随大小的改变而发生更改。 |
protected Insets |
getContentBorderInsets(int tabPlacement) |
protected int |
getFocusIndex() 返回具有焦点的选项卡的索引。 |
protected FontMetrics |
getFontMetrics() |
protected Icon |
getIconForTab(int tabIndex) |
Dimension |
getMaximumSize(JComponent c) 返回指定组件的适合外观的最大大小。 |
Dimension |
getMinimumSize(JComponent c) 返回指定组件的适合外观的最小大小。 |
protected int |
getNextTabIndex(int base) |
protected int |
getNextTabIndexInRun(int tabCount, int base) |
protected int |
getNextTabRun(int baseRun) |
protected int |
getPreviousTabIndex(int base) |
protected int |
getPreviousTabIndexInRun(int tabCount, int base) |
protected int |
getPreviousTabRun(int baseRun) |
protected int |
getRolloverTab() 返回当前有鼠标位于其上方的选项卡;如果鼠标不再位于任何选项卡上,则返回 -1 。 |
protected int |
getRunForTab(int tabCount, int tabIndex) |
protected Insets |
getSelectedTabPadInsets(int tabPlacement) |
protected Insets |
getTabAreaInsets(int tabPlacement) |
protected Rectangle |
getTabBounds(int tabIndex, Rectangle dest) 返回 JTabbedPane 组件的坐标空间中指定选项卡的边界。 |
Rectangle |
getTabBounds(JTabbedPane pane, int i) 返回指定选项卡索引的边界。 |
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) |
int |
getTabRunCount(JTabbedPane pane) |
protected int |
getTabRunIndent(int tabPlacement, int run) |
protected int |
getTabRunOffset(int tabPlacement, int tabCount, int tabIndex, boolean forward) |
protected int |
getTabRunOverlay(int tabPlacement) |
protected View |
getTextViewForTab(int tabIndex) 返回为指定选项卡呈现样式化文本 (HTML) 所需的文本 View 对象;如果此选项卡不需要任何特殊化的文本呈现,则返回 null。 |
protected Component |
getVisibleComponent() |
protected void |
installComponents() 创建并安装 JTabbedPane 的所有必需的子组件。 |
protected void |
installDefaults() |
protected void |
installKeyboardActions() |
protected void |
installListeners() |
void |
installUI(JComponent c) 配置指定组件,使其适合外观。 |
protected int |
lastTabInRun(int tabCount, int run) |
protected void |
layoutLabel(int tabPlacement, FontMetrics metrics, int tabIndex, String title, Icon icon, Rectangle tabRect, Rectangle iconRect, Rectangle textRect, boolean isSelected) |
protected void |
navigateSelectedTab(int direction) |
void |
paint(Graphics g, JComponent c) 绘制指定组件,使其适合外观。 |
protected void |
paintContentBorder(Graphics g, int tabPlacement, int selectedIndex) |
protected void |
paintContentBorderBottomEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h) |
protected void |
paintContentBorderLeftEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h) |
protected void |
paintContentBorderRightEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h) |
protected void |
paintContentBorderTopEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h) |
protected void |
paintFocusIndicator(Graphics g, int tabPlacement, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect, boolean isSelected) |
protected void |
paintIcon(Graphics g, int tabPlacement, int tabIndex, Icon icon, Rectangle iconRect, boolean isSelected) |
protected void |
paintTab(Graphics g, int tabPlacement, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect) |
protected void |
paintTabArea(Graphics g, int tabPlacement, int selectedIndex) 在选项卡区域绘制选项卡。 |
protected void |
paintTabBackground(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected) |
protected void |
paintTabBorder(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected) 此方法围绕每个选项卡绘制边框。 |
protected void |
paintText(Graphics g, int tabPlacement, Font font, FontMetrics metrics, int tabIndex, String title, Rectangle textRect, boolean isSelected) |
protected static void |
rotateInsets(Insets topInsets, Insets targetInsets, int targetPlacement) |
protected void |
selectAdjacentRunTab(int tabPlacement, int tabIndex, int offset) |
protected void |
selectNextTab(int current) |
protected void |
selectNextTabInRun(int current) |
protected void |
selectPreviousTab(int current) |
protected void |
selectPreviousTabInRun(int current) |
protected void |
setRolloverTab(int index) 将当前有鼠标位于其上方的选项卡设置为 index 。 |
protected void |
setVisibleComponent(Component component) |
protected boolean |
shouldPadTabRun(int tabPlacement, int run) |
protected boolean |
shouldRotateTabRuns(int tabPlacement) |
int |
tabForCoordinate(JTabbedPane pane, int x, int y) 返回与 JTabbedPane 的坐标空间中的指定点相交的选项卡索引。 |
protected void |
uninstallComponents() 从 JTabbedPane 移除所有已安装的子组件。 |
protected void |
uninstallDefaults() |
protected void |
uninstallKeyboardActions() |
protected void |
uninstallListeners() |
void |
uninstallUI(JComponent c) 在 installUI 期间,在指定组件上反向执行的配置操作。 |
从类 javax.swing.plaf.ComponentUI 继承的方法 |
---|
contains, getAccessibleChild, getAccessibleChildrenCount, getPreferredSize, update |
从类 java.lang.Object 继承的方法 |
---|
clone, equals, finalize, getClass, hashCode
|