java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.TabbedPaneUI
javax.swing.plaf.basic.BasicTabbedPaneUI
javax.swing.plaf.synth.SynthTabbedPaneUI
- 所有已实现的接口:
-
PropertyChangeListener
,EventListener
,SynthConstants
,SynthUI
,SwingConstants
为
JTabbedPane
提供Synth L&F UI代理。
从样式中查找selectedTabPadInsets
属性,该属性表示选定选项卡的额外插图。
- 自版本:
- 1.7
-
Nested Class Summary
Nested classes/interfaces declared in class javax.swing.plaf.basic.BasicTabbedPaneUI
BasicTabbedPaneUI.FocusHandler, BasicTabbedPaneUI.MouseHandler, BasicTabbedPaneUI.PropertyChangeHandler, BasicTabbedPaneUI.TabbedPaneLayout, BasicTabbedPaneUI.TabSelectionHandler
-
Field Summary
Fields declared in class 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
Fields declared in interface javax.swing.plaf.synth.SynthConstants
DEFAULT, DISABLED, ENABLED, FOCUSED, MOUSE_OVER, PRESSED, SELECTED
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected LayoutManager
由installUI
调用以创建一个布局管理器对象来管理JTabbedPane
。protected MouseListener
创建一个鼠标监听器。static ComponentUI
为给定组件创建一个新的UI对象。返回指定组件的上下文。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) 绘制边框。void
当绑定属性更改时调用此方法。void
update
(Graphics g, JComponent c) 通知此UI代理重新绘制指定的组件。Methods declared in class javax.swing.plaf.basic.BasicTabbedPaneUI
assureRectsCreated, calculateMaxTabHeight, calculateMaxTabWidth, calculateTabAreaHeight, calculateTabAreaWidth, calculateTabHeight, calculateTabWidth, createChangeListener, createFocusListener, createPropertyChangeListener, createScrollButton, expandTabRunsArray, getBaseline, getBaseline, getBaselineOffset, getBaselineResizeBehavior, getContentBorderInsets, getFocusIndex, getFontMetrics, getIconForTab, getNextTabIndex, getNextTabIndexInRun, getNextTabRun, getPreviousTabIndex, getPreviousTabIndexInRun, getPreviousTabRun, getRolloverTab, getRunForTab, getSelectedTabPadInsets, getTabAreaInsets, getTabBounds, getTabBounds, getTabInsets, getTabLabelShiftX, getTabLabelShiftY, getTabRunCount, 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
Methods declared in class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSize, getPreferredSize, installUI, uninstallUI
-
Constructor Details
-
SynthTabbedPaneUI
public SynthTabbedPaneUI()构造一个SynthTabbedPaneUI
。
-
-
Method Details
-
createUI
为给定组件创建一个新的UI对象。- 参数:
-
c
- 要为其创建UI对象的组件 - 返回:
- UI对象
-
getContext
返回指定组件的上下文。- 指定者:
-
getContext
在接口SynthUI
中 - 参数:
-
c
- 请求SynthContext的组件 - 返回:
- 描述组件的SynthContext
-
propertyChange
当绑定属性更改时调用此方法。- 指定者:
-
propertyChange
在接口PropertyChangeListener
中 - 参数:
-
e
- 描述事件源和已更改属性的PropertyChangeEvent对象
-
createMouseListener
创建一个鼠标监听器。重写以跟踪选定选项卡是否也被按下。- 覆盖:
-
createMouseListener
在类BasicTabbedPaneUI
中 - 返回:
- 一个鼠标监听器
-
update
通知此UI代理重新绘制指定的组件。此方法绘制组件背景,然后调用paint(SynthContext,Graphics)
方法。一般来说,子类不需要重写此方法。所有外观和感觉渲染代码应位于
paint
方法中。- 覆盖:
-
update
在类ComponentUI
中 - 参数:
-
g
- 用于绘制的Graphics
对象 -
c
- 正在绘制的组件 - 参见:
-
paintBorder
绘制边框。- 指定者:
-
paintBorder
在接口SynthUI
中 - 参数:
-
context
- 组件上下文 -
g
- 要绘制的Graphics
-
x
- X坐标 -
y
- Y坐标 -
w
- 边框的宽度 -
h
- 边框的高度
-
paint
根据外观和感觉绘制指定的组件。此方法不被Synth外观和感觉使用。绘制由
paint(SynthContext,Graphics)
方法处理。- 覆盖:
-
paint
在类ComponentUI
中 - 参数:
-
g
- 用于绘制的Graphics
对象 -
c
- 正在绘制的组件 - 参见:
-
paint
绘制指定的组件。- 参数:
-
context
- 正在绘制的组件的上下文 -
g
- 用于绘制的Graphics
对象 - 参见:
-
createLayoutManager
由installUI
调用以创建一个布局管理器对象来管理JTabbedPane
。重写以创建一个考虑到tabOverlap的TabbedPaneLayout子类。- 覆盖:
-
createLayoutManager
在类BasicTabbedPaneUI
中 - 返回:
- 一个布局管理器对象
- 参见:
-