- java.lang.Object
-
- javax.swing.plaf.ComponentUI
-
- javax.swing.plaf.TabbedPaneUI
-
- javax.swing.plaf.basic.BasicTabbedPaneUI
-
- javax.swing.plaf.metal.MetalTabbedPaneUI
-
- 实现的所有接口
-
SwingConstants
public class MetalTabbedPaneUI extends BasicTabbedPaneUI
BasicTabbedPaneUI的Metal子类。警告:此类的序列化对象与以后的Swing版本不兼容。 当前的序列化支持适用于运行相同版本Swing的应用程序之间的短期存储或RMI。 从1.4开始,
java.beans
软件包中添加了对所有JavaBeansjava.beans
长期存储的支持。 请参阅XMLEncoder
。
-
-
嵌套类汇总
嵌套类 变量和类型 类 描述 class
MetalTabbedPaneUI.TabbedPaneLayout
该类应被视为“受保护”的内部类。-
嵌套类/接口声明在类 javax.swing.plaf.basic.BasicTabbedPaneUI
BasicTabbedPaneUI.FocusHandler, BasicTabbedPaneUI.MouseHandler, BasicTabbedPaneUI.PropertyChangeHandler, BasicTabbedPaneUI.TabSelectionHandler
-
-
字段汇总
字段 变量和类型 字段 描述 protected int
minTabWidth
窗格的最小宽度。protected Color
selectColor
所选窗格的颜色。protected Color
selectHighlight
高光的颜色。protected Color
tabAreaBackground
标签背景的颜色。-
声明的属性在类 javax.swing.plaf.basic.BasicTabbedPaneUI
calcRect, 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, upKey
-
Fields declared in interface 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
-
-
构造方法摘要
构造方法 构造器 描述 MetalTabbedPaneUI()
-
方法摘要
所有方法 静态方法 实例方法 具体的方法 变量和类型 方法 描述 static ComponentUI
createUI(JComponent x)
构造MetalTabbedPaneUI
。protected int
getBaselineOffset()
返回基线偏移量。protected Color
getColorForGap(int currentRun, int x, int y)
返回间隙的颜色。protected int
getTabLabelShiftX(int tabPlacement, int tabIndex, boolean isSelected)
重写为Java L&F无所作为。protected int
getTabLabelShiftY(int tabPlacement, int tabIndex, boolean isSelected)
重写为Java L&F无所作为。protected void
paintBottomTabBorder(int tabIndex, Graphics g, int x, int y, int w, int h, int btm, int rght, boolean isSelected)
绘制底部标签边框。protected void
paintHighlightBelowTab()
油漆突出显示在标签下方。protected void
paintLeftTabBorder(int tabIndex, Graphics g, int x, int y, int w, int h, int btm, int rght, boolean isSelected)
绘制左侧标签边框。protected void
paintRightTabBorder(int tabIndex, Graphics g, int x, int y, int w, int h, int btm, int rght, boolean isSelected)
绘制右侧标签边框。protected void
paintTopTabBorder(int tabIndex, Graphics g, int x, int y, int w, int h, int btm, int rght, boolean isSelected)
绘制顶部选项卡边框。protected boolean
shouldFillGap(int currentRun, int tabIndex, int x, int y)
如果应填补间隙,则返回true
。protected boolean
shouldRotateTabRuns(int tabPlacement, int selectedRun)
如果应旋转制表符,则返回true
。-
声明方法的类 javax.swing.plaf.basic.BasicTabbedPaneUI
assureRectsCreated, calculateMaxTabHeight, calculateMaxTabWidth, calculateTabAreaHeight, calculateTabAreaWidth, calculateTabHeight, calculateTabWidth, createChangeListener, createFocusListener, createLayoutManager, createMouseListener, createPropertyChangeListener, createScrollButton, expandTabRunsArray, getBaseline, getBaseline, getBaselineResizeBehavior, getContentBorderInsets, getFocusIndex, getFontMetrics, getIconForTab, getNextTabIndex, getNextTabIndexInRun, getNextTabRun, getPreviousTabIndex, getPreviousTabIndexInRun, getPreviousTabRun, getRolloverTab, getRunForTab, getSelectedTabPadInsets, getTabAreaInsets, getTabBounds, getTabBounds, getTabInsets, getTabRunIndent, getTabRunOffset, getTabRunOverlay, getTextViewForTab, getVisibleComponent, installComponents, installDefaults, installKeyboardActions, installListeners, lastTabInRun, layoutLabel, navigateSelectedTab, paintContentBorder, paintContentBorderBottomEdge, paintContentBorderLeftEdge, paintContentBorderRightEdge, paintContentBorderTopEdge, paintFocusIndicator, paintIcon, paintTab, paintTabArea, paintTabBackground, paintTabBorder, paintText, rotateInsets, selectAdjacentRunTab, selectNextTab, selectNextTabInRun, selectPreviousTab, selectPreviousTabInRun, setRolloverTab, setVisibleComponent, shouldPadTabRun, shouldRotateTabRuns, tabForCoordinate, uninstallComponents, uninstallDefaults, uninstallKeyboardActions, uninstallListeners
-
声明方法的类 javax.swing.plaf.TabbedPaneUI
getTabRunCount
-
声明方法的类 javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSize, getPreferredSize, installUI, paint, uninstallUI, update
-
-
-
-
方法详细信息
-
createUI
public static ComponentUI createUI(JComponent x)
构造MetalTabbedPaneUI
。- 参数
-
x
- 一个组件 - 结果
-
MetalTabbedPaneUI
一个实例
-
paintTopTabBorder
protected void paintTopTabBorder(int tabIndex, Graphics g, int x, int y, int w, int h, int btm, int rght, boolean isSelected)
绘制顶部选项卡边框。- 参数
-
tabIndex
- 制表符索引 -
g
-实例Graphics
-
x
- X坐标 -
y
- Y坐标 -
w
- 宽度 -
h
- 高度 -
btm
- 底部 -
rght
- 对 -
isSelected
- 选择
-
shouldFillGap
protected boolean shouldFillGap(int currentRun, int tabIndex, int x, int y)
如果应填补缺口,则返回true
。- 参数
-
currentRun
- 当前运行 -
tabIndex
- 选项卡索引 -
x
- X坐标 -
y
- Y坐标 - 结果
-
true
如果应该填补空白
-
getColorForGap
protected Color getColorForGap(int currentRun, int x, int y)
返回间隙的颜色。- 参数
-
currentRun
- 当前运行 -
x
- X坐标 -
y
- Y坐标 - 结果
- 差距的颜色
-
paintLeftTabBorder
protected void paintLeftTabBorder(int tabIndex, Graphics g, int x, int y, int w, int h, int btm, int rght, boolean isSelected)
绘制左侧标签边框。- 参数
-
tabIndex
- 选项卡索引 -
g
-实例Graphics
-
x
- X坐标 -
y
- Y坐标 -
w
- 宽度 -
h
- 高度 -
btm
- 底部 -
rght
- 对 -
isSelected
- 选择
-
paintBottomTabBorder
protected void paintBottomTabBorder(int tabIndex, Graphics g, int x, int y, int w, int h, int btm, int rght, boolean isSelected)
绘制底部标签边框。- 参数
-
tabIndex
- 选项卡索引 -
g
-实例Graphics
-
x
- X坐标 -
y
- Y坐标 -
w
- 宽度 -
h
- 高度 -
btm
- 底部 -
rght
- 对 -
isSelected
- 选择
-
paintRightTabBorder
protected void paintRightTabBorder(int tabIndex, Graphics g, int x, int y, int w, int h, int btm, int rght, boolean isSelected)
绘制右侧标签边框。- 参数
-
tabIndex
- 选项卡索引 -
g
-实例Graphics
-
x
- X坐标 -
y
- Y坐标 -
w
- 宽度 -
h
- 高度 -
btm
- 底部 -
rght
- 对 -
isSelected
- 选择
-
getTabLabelShiftX
protected int getTabLabelShiftX(int tabPlacement, int tabIndex, boolean isSelected)
重写为Java L&F无所作为。- 重写:
-
getTabLabelShiftX
,类BasicTabbedPaneUI
- 参数
-
tabPlacement
- 选项卡位置 -
tabIndex
- 选项卡索引 -
isSelected
- 选择状态 - 结果
- 标签标签移位x
-
getTabLabelShiftY
protected int getTabLabelShiftY(int tabPlacement, int tabIndex, boolean isSelected)
重写为Java L&F无所作为。- 重写:
-
getTabLabelShiftY
类BasicTabbedPaneUI
- 参数
-
tabPlacement
- 选项卡位置 -
tabIndex
- 选项卡索引 -
isSelected
- 选择状态 - 结果
- 标签标签转移y
-
getBaselineOffset
protected int getBaselineOffset()
返回基线偏移量。 这通常与getTabLabelShiftY
相同。- 重写:
-
getBaselineOffset
,类BasicTabbedPaneUI
- 结果
- 相当于抵消基线的数量
- 从以下版本开始:
- 1.6
-
paintHighlightBelowTab
protected void paintHighlightBelowTab()
油漆突出显示在标签下方。
-
shouldRotateTabRuns
protected boolean shouldRotateTabRuns(int tabPlacement, int selectedRun)
如果应旋转制表符,则返回true
。- 参数
-
tabPlacement
- 标签展示位置 -
selectedRun
- 选定的运行 - 结果
-
true
如果应运行选项卡运行。
-
-