- java.lang.Object
-
- javax.swing.plaf.ComponentUI
-
- javax.swing.plaf.SliderUI
-
- javax.swing.plaf.basic.BasicSliderUI
-
- javax.swing.plaf.metal.MetalSliderUI
-
public class MetalSliderUI extends BasicSliderUI
SliderUI的Java L&F实现。警告:此类的序列化对象与以后的Swing版本不兼容。 当前的序列化支持适用于运行相同版本Swing的应用程序之间的短期存储或RMI。 从1.4开始,
java.beans软件包中添加了对所有JavaBeansjava.beans长期存储的支持。 请参阅XMLEncoder。
-
-
嵌套类汇总
嵌套类 变量和类型 类 描述 protected classMetalSliderUI.MetalPropertyListenerPropertyListenerforJSlider.isFilled。
-
字段汇总
字段 变量和类型 字段 描述 protected static ColordarkShadowColor暗影的颜色。protected booleanfilledSlider物业的价值JSlider.isFilled。protected static ColorhighlightColor突出显示的颜色。protected static IconhorizThumbIcon默认水平拇指Icon。protected StringSLIDER_FILLJSlider.isFilled。protected static ColorthumbColor拇指的颜色protected intTICK_BUFFER刻度线的缓冲区。protected static inttickLength刻度的长度。protected static inttrackWidth轨道的宽度。protected static IconvertThumbIcon默认垂直拇指Icon。-
声明的属性在类 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
-
-
构造方法摘要
构造方法 构造器 描述 MetalSliderUI()构造一个MetalSliderUI实例。
-
方法摘要
所有方法 静态方法 实例方法 具体的方法 变量和类型 方法 描述 protected PropertyChangeListenercreatePropertyChangeListener(JSlider slider)构造MetalPropertyListener。static ComponentUIcreateUI(JComponent c)构造一个MetalSliderUI实例。protected intgetThumbOverhang()返回拇指经过滑动条的数量。intgetTickLength()获取水平滑块的刻度区域的高度和垂直滑块的刻度区域的宽度。protected intgetTrackLength()返回滑块的较长尺寸。protected intgetTrackWidth()返回轨道的较短尺寸。-
声明方法的类 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
-
声明方法的类 javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, paint, update
-
-
-
-
字段详细信息
-
TICK_BUFFER
protected final int TICK_BUFFER
刻度线的缓冲区。- 另请参见:
- 常数字段值
-
filledSlider
protected boolean filledSlider
物业的价值JSlider.isFilled。 默认情况下,false如果未设置属性,true为Ocean主题。
-
thumbColor
protected static Color thumbColor
拇指的颜色
-
highlightColor
protected static Color highlightColor
突出显示的颜色。
-
darkShadowColor
protected static Color darkShadowColor
暗影的颜色。
-
trackWidth
protected static int trackWidth
轨道的宽度。
-
tickLength
protected static int tickLength
刻度的长度。
-
horizThumbIcon
protected static Icon horizThumbIcon
默认水平拇指Icon。 可能未使用此字段。 要改变Icon通过该委托使用使用直接设置它Slider.horizontalThumbIconUIManager的财产。
-
vertThumbIcon
protected static Icon vertThumbIcon
默认垂直拇指Icon。 可能未使用此字段。 要改变Icon通过该委托使用使用直接设置它Slider.verticalThumbIconUIManager的财产。
-
-
方法详细信息
-
createUI
public static ComponentUI createUI(JComponent c)
构造一个MetalSliderUI实例。- 参数
-
c- 一个组件 - 结果
-
一个
MetalSliderUI实例
-
createPropertyChangeListener
protected PropertyChangeListener createPropertyChangeListener(JSlider slider)
构造MetalPropertyListener。- 重写:
-
createPropertyChangeListener在BasicSliderUI类 - 参数
-
slider- aJSlider - 结果
-
MetalPropertyListener
-
getTickLength
public int getTickLength()
获取水平滑块的刻度区域的高度和垂直滑块的刻度区域的宽度。 BasicSliderUI使用返回的值来确定刻度区矩形。- 重写:
-
getTickLength在课堂上BasicSliderUI - 结果
- 表示水平滑块的刻度区域高度的整数,以及垂直滑块的刻度区域的宽度
-
getTrackWidth
protected int getTrackWidth()
返回轨道的较短尺寸。- 结果
- 轨道的较短尺寸
-
getTrackLength
protected int getTrackLength()
返回滑块的较长尺寸。 (滑动条只是直接在拇指下方运行的部分)- 结果
- 滑杆的长度较长
-
getThumbOverhang
protected int getThumbOverhang()
返回拇指经过滑动条的数量。- 结果
- 拇指越过滑动条的数量
-
-