public class MetalSliderUI extends BasicSliderUI
警告:序列化该类的对象与以后的Swing版本不兼容。当前的序列化支持适用于短期贮藏或RMI运行相同Swing版本的应用程序之间。为1.4,为所有JavaBeans™长期存储的支持已被添加到java.beans
包。请看XMLEncoder
。
Modifier and Type | Class and Description |
---|---|
protected class |
MetalSliderUI.MetalPropertyListener |
BasicSliderUI.ActionScroller, BasicSliderUI.ChangeHandler, BasicSliderUI.ComponentHandler, BasicSliderUI.FocusHandler, BasicSliderUI.PropertyChangeHandler, BasicSliderUI.ScrollListener, BasicSliderUI.TrackListener
Modifier and Type | Field and Description |
---|---|
protected static Color |
darkShadowColor |
protected boolean |
filledSlider |
protected static Color |
highlightColor |
protected static Icon |
horizThumbIcon
默认的水平
Icon 拇指。
|
protected String |
SLIDER_FILL |
protected static Color |
thumbColor |
protected int |
TICK_BUFFER |
protected static int |
tickLength |
protected static int |
trackWidth |
protected static Icon |
vertThumbIcon
默认
Icon 竖拇指。
|
changeListener, componentListener, contentRect, focusInsets, focusListener, focusRect, insetCache, labelRect, leftToRightCache, MAX_SCROLL, MIN_SCROLL, NEGATIVE_SCROLL, POSITIVE_SCROLL, propertyChangeListener, scrollListener, scrollTimer, slider, thumbRect, tickRect, trackBuffer, trackListener, trackRect
Constructor and Description |
---|
MetalSliderUI() |
Modifier and Type | Method and Description |
---|---|
protected PropertyChangeListener |
createPropertyChangeListener(JSlider slider) |
static ComponentUI |
createUI(JComponent c) |
protected int |
getThumbOverhang()
返回拇指经过滑杆的数量。
|
protected Dimension |
getThumbSize() |
int |
getTickLength()
获取水平滑块和垂直滑块的蜱区宽度的刻度区的高度。
|
protected int |
getTrackLength()
返回滑动条的更长的尺寸。
|
protected int |
getTrackWidth()
返回轨道的较短的尺寸。
|
void |
installUI(JComponent c)
配置指定的组件适当的外观和感觉。
|
void |
paintFocus(Graphics g) |
protected void |
paintMajorTickForHorizSlider(Graphics g, Rectangle tickBounds, int x) |
protected void |
paintMajorTickForVertSlider(Graphics g, Rectangle tickBounds, int y) |
protected void |
paintMinorTickForHorizSlider(Graphics g, Rectangle tickBounds, int x) |
protected void |
paintMinorTickForVertSlider(Graphics g, Rectangle tickBounds, int y) |
void |
paintThumb(Graphics g) |
void |
paintTrack(Graphics g) |
protected void |
scrollDueToClickInTrack(int dir)
这个函数被调用时,在跟踪mousePressed检测,不在拇指。
|
calculateContentRect, calculateFocusRect, calculateGeometry, calculateLabelRect, calculateThumbLocation, calculateThumbSize, calculateTickRect, calculateTrackBuffer, calculateTrackRect, createChangeListener, createComponentListener, createFocusListener, createScrollListener, createTrackListener, drawInverted, getBaseline, getBaselineResizeBehavior, getFocusColor, getHeightOfHighValueLabel, getHeightOfLowValueLabel, getHeightOfTallestLabel, getHighestValue, getHighestValueLabel, getHighlightColor, getLowestValue, getLowestValueLabel, getMaximumSize, getMinimumHorizontalSize, getMinimumSize, getMinimumVerticalSize, getPreferredHorizontalSize, getPreferredSize, getPreferredVerticalSize, getShadowColor, getWidthOfHighValueLabel, getWidthOfLowValueLabel, getWidthOfWidestLabel, installDefaults, installKeyboardActions, installListeners, isDragging, labelsHaveSameBaselines, paint, paintHorizontalLabel, paintLabels, paintTicks, paintVerticalLabel, recalculateIfInsetsChanged, recalculateIfOrientationChanged, scrollByBlock, scrollByUnit, setThumbLocation, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUI, valueForXPosition, valueForYPosition, xPositionForValue, yPositionForValue, yPositionForValue
contains, getAccessibleChild, getAccessibleChildrenCount, update
protected final int TICK_BUFFER
protected boolean filledSlider
protected static Color thumbColor
protected static Color highlightColor
protected static Color darkShadowColor
protected static int trackWidth
protected static int tickLength
protected static Icon horizThumbIcon
Icon
。这场可能无法使用。改变这代表用
Icon
直接设置使用
Slider.horizontalThumbIcon
”属性。
protected static Icon vertThumbIcon
Icon
。这场可能无法使用。改变这代表用
Icon
直接设置使用
Slider.verticalThumbIcon
”属性。
protected final String SLIDER_FILL
public static ComponentUI createUI(JComponent c)
public void installUI(JComponent c)
ComponentUI
ComponentUI
实例被安装在指定组件的UI代理。这种方法应该完全配置的组件外观和感觉,包括以下内容:
LayoutManager
组件上的必要。PropertyChangeListener
变化适当。installUI
方法重写,继承类
BasicSliderUI
c
-组件,UI代理被安装
ComponentUI.uninstallUI(javax.swing.JComponent)
,
JComponent.setUI(javax.swing.plaf.ComponentUI)
,
JComponent.updateUI()
protected PropertyChangeListener createPropertyChangeListener(JSlider slider)
createPropertyChangeListener
方法重写,继承类
BasicSliderUI
public void paintThumb(Graphics g)
paintThumb
方法重写,继承类
BasicSliderUI
public void paintTrack(Graphics g)
paintTrack
方法重写,继承类
BasicSliderUI
public void paintFocus(Graphics g)
paintFocus
方法重写,继承类
BasicSliderUI
protected Dimension getThumbSize()
getThumbSize
方法重写,继承类
BasicSliderUI
public int getTickLength()
getTickLength
方法重写,继承类
BasicSliderUI
protected int getTrackWidth()
protected int getTrackLength()
protected int getThumbOverhang()
protected void scrollDueToClickInTrack(int dir)
BasicSliderUI
scrollDueToClickInTrack
方法重写,继承类
BasicSliderUI
protected void paintMinorTickForHorizSlider(Graphics g, Rectangle tickBounds, int x)
paintMinorTickForHorizSlider
方法重写,继承类
BasicSliderUI
protected void paintMajorTickForHorizSlider(Graphics g, Rectangle tickBounds, int x)
paintMajorTickForHorizSlider
方法重写,继承类
BasicSliderUI
protected void paintMinorTickForVertSlider(Graphics g, Rectangle tickBounds, int y)
paintMinorTickForVertSlider
方法重写,继承类
BasicSliderUI
protected void paintMajorTickForVertSlider(Graphics g, Rectangle tickBounds, int y)
paintMajorTickForVertSlider
方法重写,继承类
BasicSliderUI
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.