public class MetalScrollBarUI extends BasicScrollBarUI
BasicScrollBarUI.ArrowButtonListener, BasicScrollBarUI.ModelListener, BasicScrollBarUI.PropertyChangeHandler, BasicScrollBarUI.ScrollListener, BasicScrollBarUI.TrackListener| Modifier and Type | Field and Description |
|---|---|
protected javax.swing.plaf.metal.MetalBumps |
bumps |
protected MetalScrollButton |
decreaseButton |
static String |
FREE_STANDING_PROP |
protected MetalScrollButton |
increaseButton |
protected boolean |
isFreeStanding |
protected int |
scrollBarWidth |
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, trackRectBOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST| Constructor and Description |
|---|
MetalScrollBarUI() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
configureScrollBarColors() |
protected JButton |
createDecreaseButton(int orientation)
返回表示减少视图的视图。
|
protected JButton |
createIncreaseButton(int orientation)
返回表示增加视图的视图。
|
protected PropertyChangeListener |
createPropertyChangeListener() |
static ComponentUI |
createUI(JComponent c) |
protected Dimension |
getMinimumThumbSize()
返回拇指的最小可接受尺寸。
|
Dimension |
getPreferredSize(JComponent c)
垂直滚动条的首选宽度是(非
null )增量/减量按钮的最大宽度和拇指的最小宽度的最大值。
|
protected void |
installDefaults() |
protected void |
installListeners() |
protected void |
paintThumb(Graphics g, JComponent c, Rectangle thumbBounds) |
protected void |
paintTrack(Graphics g, JComponent c, Rectangle trackBounds) |
protected void |
setThumbBounds(int x, int y, int width, int height)
这被覆盖只是为了增加无效区域。
|
addLayoutComponent, createArrowButtonListener, createModelListener, createScrollListener, createTrackListener, getMaximumSize, getMaximumThumbSize, getSupportsAbsolutePositioning, getThumbBounds, getTrackBounds, installComponents, installKeyboardActions, installUI, isThumbRollover, layoutContainer, layoutHScrollbar, layoutVScrollbar, minimumLayoutSize, paint, paintDecreaseHighlight, paintIncreaseHighlight, preferredLayoutSize, removeLayoutComponent, scrollByBlock, scrollByUnit, setThumbRollover, uninstallComponents, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUIcontains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMinimumSize, updateprotected javax.swing.plaf.metal.MetalBumps bumps
protected MetalScrollButton increaseButton
protected MetalScrollButton decreaseButton
protected int scrollBarWidth
public static final String FREE_STANDING_PROP
protected boolean isFreeStanding
public static ComponentUI createUI(JComponent c)
protected void installDefaults()
protected void installListeners()
protected PropertyChangeListener createPropertyChangeListener()
protected void configureScrollBarColors()
public Dimension getPreferredSize(JComponent c)
BasicScrollBarUI
null )增量/减量按钮的最大宽度和拇指的最小宽度的最大值。
优选的高度是相同部件的优选高度的总和。
水平滚动条的首选尺寸的基础是相似的。
preferredSize只计算一次,对此方法的后续调用只返回缓存的大小。
getPreferredSize在
BasicScrollBarUI
c -在
JScrollBar多数民众赞成委托这种方法给我们
BasicScrollBarUI.getMaximumSize(javax.swing.JComponent) ,
ComponentUI.getMinimumSize(javax.swing.JComponent)
protected JButton createDecreaseButton(int orientation)
protected JButton createIncreaseButton(int orientation)
protected void paintTrack(Graphics g, JComponent c, Rectangle trackBounds)
protected void paintThumb(Graphics g, JComponent c, Rectangle thumbBounds)
paintThumb在
BasicScrollBarUI类
protected Dimension getMinimumThumbSize()
BasicScrollBarUI
警告 :此方法返回的值不应该被修改,它是一个共享静态常量。
getMinimumThumbSize在
BasicScrollBarUI
BasicScrollBarUI.getMaximumThumbSize()
protected void setThumbBounds(int x,
int y,
int width,
int height)
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.