java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.ScrollBarUI
javax.swing.plaf.basic.BasicScrollBarUI
javax.swing.plaf.metal.MetalScrollBarUI
- 所有已实现的接口:
-
LayoutManager
,SwingConstants
Metal外观和感觉的ScrollBarUI实现
-
Nested Class Summary
Nested classes/interfaces declared in class javax.swing.plaf.basic.BasicScrollBarUI
BasicScrollBarUI.ArrowButtonListener, BasicScrollBarUI.ModelListener, BasicScrollBarUI.PropertyChangeHandler, BasicScrollBarUI.ScrollListener, BasicScrollBarUI.TrackListener
-
Field Summary
Modifier and TypeFieldDescriptionprotected MetalScrollButton
减少按钮。static final String
属性JScrollBar.isFreeStanding
。protected MetalScrollButton
增加按钮。protected boolean
属性JScrollBar.isFreeStanding
的值。protected int
滚动条的宽度。Fields declared in class javax.swing.plaf.basic.BasicScrollBarUI
buttonListener, decrButton, DECREASE_HIGHLIGHT, decrGap, incrButton, INCREASE_HIGHLIGHT, incrGap, isDragging, maximumThumbSize, minimumThumbSize, modelListener, NO_HIGHLIGHT, propertyChangeListener, scrollbar, scrollListener, scrollTimer, thumbDarkShadowColor, thumbLightShadowColor, thumbRect, trackColor, trackHighlight, trackHighlightColor, trackListener, trackRect
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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected JButton
createDecreaseButton
(int orientation) 返回表示减少视图的视图。protected JButton
createIncreaseButton
(int orientation) 返回表示增加视图的视图。static ComponentUI
构造一个新的MetalScrollBarUI
实例。protected void
setThumbBounds
(int x, int y, int width, int height) 仅覆盖以增加无效区域。Methods declared in class javax.swing.plaf.basic.BasicScrollBarUI
addLayoutComponent, configureScrollBarColors, createArrowButtonListener, createModelListener, createPropertyChangeListener, createScrollListener, createTrackListener, getMaximumSize, getMaximumThumbSize, getMinimumThumbSize, getPreferredSize, getSupportsAbsolutePositioning, getThumbBounds, getTrackBounds, installComponents, installDefaults, installKeyboardActions, installListeners, installUI, isThumbRollover, layoutContainer, layoutHScrollbar, layoutVScrollbar, minimumLayoutSize, paintDecreaseHighlight, paintIncreaseHighlight, paintThumb, paintTrack, preferredLayoutSize, removeLayoutComponent, scrollByBlock, scrollByUnit, setThumbRollover, uninstallComponents, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUI
Methods declared in class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMinimumSize, paint, update
-
Field Details
-
increaseButton
增加按钮。 -
decreaseButton
减少按钮。 -
scrollBarWidth
protected int scrollBarWidth滚动条的宽度。 -
FREE_STANDING_PROP
属性JScrollBar.isFreeStanding
的值。- 参见:
-
isFreeStanding
protected boolean isFreeStanding属性JScrollBar.isFreeStanding
的值。
-
-
Constructor Details
-
MetalScrollBarUI
public MetalScrollBarUI()构造一个MetalScrollBarUI
。
-
-
Method Details
-
createUI
构造一个新的MetalScrollBarUI
实例。- 参数:
-
c
- 一个组件 - 返回:
-
一个新的
MetalScrollBarUI
实例
-
createDecreaseButton
返回表示减少视图的视图。- 覆盖:
-
createDecreaseButton
在类BasicScrollBarUI
- 参数:
-
orientation
- 方向 - 返回:
- 一个减少按钮
-
createIncreaseButton
返回表示增加视图的视图。- 覆盖:
-
createIncreaseButton
在类BasicScrollBarUI
- 参数:
-
orientation
- 方向 - 返回:
- 一个增加按钮
-
setThumbBounds
protected void setThumbBounds(int x, int y, int width, int height) 仅覆盖以增加无效区域。 确保"拇指"下方的"阴影"无效- 覆盖:
-
setThumbBounds
在类BasicScrollBarUI
- 参数:
-
x
- 设置拇指的x位置 -
y
- 设置拇指的y位置 -
width
- 设置拇指的宽度 -
height
- 设置拇指的高度 - 参见:
-