java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.SliderUI
javax.swing.plaf.basic.BasicSliderUI
javax.swing.plaf.metal.MetalSliderUI
SliderUI的Java L&F实现。
警告:此类的序列化对象将不兼容未来的Swing版本。当前的序列化支持适用于短期存储或在运行相同Swing版本的应用程序之间的RMI。从1.4开始,已将所有JavaBeans的长期存储支持添加到java.beans
包中。请参阅XMLEncoder
。
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected class
JSlider.isFilled
的PropertyListener
。Nested classes/interfaces declared in class javax.swing.plaf.basic.BasicSliderUI
BasicSliderUI.ActionScroller, BasicSliderUI.ChangeHandler, BasicSliderUI.ComponentHandler, BasicSliderUI.FocusHandler, BasicSliderUI.PropertyChangeHandler, BasicSliderUI.ScrollListener, BasicSliderUI.TrackListener
-
Field Summary
Modifier and TypeFieldDescriptionprotected static Color
暗阴影的颜色。protected boolean
JSlider.isFilled
属性的值。protected static Color
高亮颜色。protected static Icon
默认水平拇指Icon
。protected final String
JSlider.isFilled
的属性。protected static Color
拇指的颜色。protected final int
刻度的缓冲区。protected static int
刻度的长度。protected static int
轨道的宽度。protected static Icon
默认垂直拇指Icon
。Fields declared in class javax.swing.plaf.basic.BasicSliderUI
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected PropertyChangeListener
createPropertyChangeListener
(JSlider slider) 构造MetalPropertyListener
。static ComponentUI
构造一个MetalSliderUI
实例。protected int
返回拇指超出滑动条的量。int
获取水平滑块的刻度区域高度和垂直滑块的刻度区域宽度。protected int
返回滑动条的较长维度。protected int
返回轨道的较短维度。Methods declared in class javax.swing.plaf.basic.BasicSliderUI
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, getThumbSize, getWidthOfHighValueLabel, getWidthOfLowValueLabel, getWidthOfWidestLabel, installDefaults, installKeyboardActions, installListeners, installUI, isDragging, labelsHaveSameBaselines, paintFocus, paintHorizontalLabel, paintLabels, paintMajorTickForHorizSlider, paintMajorTickForVertSlider, paintMinorTickForHorizSlider, paintMinorTickForVertSlider, paintThumb, paintTicks, paintTrack, paintVerticalLabel, recalculateIfInsetsChanged, recalculateIfOrientationChanged, scrollByBlock, scrollByUnit, scrollDueToClickInTrack, setThumbLocation, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUI, valueForXPosition, valueForYPosition, xPositionForValue, yPositionForValue, yPositionForValue
Methods declared in class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, paint, update
-
Field Details
-
TICK_BUFFER
protected final int TICK_BUFFER刻度的缓冲区。- 参见:
-
filledSlider
protected boolean filledSliderJSlider.isFilled
的属性值。默认情况下,如果未设置属性,则为false
,Ocean主题为true
。 -
thumbColor
拇指的颜色。 -
highlightColor
高亮颜色。 -
darkShadowColor
暗阴影的颜色。 -
trackWidth
protected static int trackWidth轨道的宽度。 -
tickLength
protected static int tickLength刻度的长度。 -
horizThumbIcon
默认水平拇指Icon
。此字段可能不会被使用。要直接设置此委托使用的Icon
,请使用Slider.horizontalThumbIcon
UIManager属性。 -
vertThumbIcon
默认垂直拇指Icon
。此字段可能不会被使用。要直接设置此委托使用的Icon
,请使用Slider.verticalThumbIcon
UIManager属性。 -
SLIDER_FILL
JSlider.isFilled
的属性。- 参见:
-
-
Constructor Details
-
MetalSliderUI
public MetalSliderUI()构造一个MetalSliderUI
实例。
-
-
Method Details
-
createUI
构造一个MetalSliderUI
实例。- 参数:
-
c
- 一个组件 - 返回:
-
一个
MetalSliderUI
实例
-
createPropertyChangeListener
构造MetalPropertyListener
。- 覆盖:
-
createPropertyChangeListener
在类BasicSliderUI
- 参数:
-
slider
- 一个JSlider
- 返回:
-
MetalPropertyListener
-
getTickLength
public int getTickLength()获取水平滑块的刻度区域高度和垂直滑块的刻度区域宽度。BasicSliderUI使用返回的值来确定刻度区域矩形。- 覆盖:
-
getTickLength
在类BasicSliderUI
- 返回:
- 一个整数,表示水平滑块的刻度区域高度,以及垂直滑块的刻度区域宽度
-
getTrackWidth
protected int getTrackWidth()返回轨道的较短维度。- 返回:
- 轨道的较短维度
-
getTrackLength
protected int getTrackLength()返回滑动条的较长维度。(滑动条仅是直接位于拇指下方的部分)- 返回:
- 滑动条的较长维度
-
getThumbOverhang
protected int getThumbOverhang()返回拇指超出滑动条的量。- 返回:
- 拇指超出滑动条的量
-