- java.lang.Object
-
- javax.swing.plaf.ComponentUI
-
- javax.swing.plaf.SliderUI
-
- javax.swing.plaf.basic.BasicSliderUI
-
- javax.swing.plaf.synth.SynthSliderUI
-
- 实现的所有接口
-
PropertyChangeListener
,EventListener
,SynthConstants
,SynthUI
public class SynthSliderUI extends BasicSliderUI implements PropertyChangeListener, SynthUI
为JSlider
提供Synth L&F UI代表。- 从以下版本开始:
- 1.7
-
-
字段汇总
-
声明的属性在类 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
-
Fields declared in interface javax.swing.plaf.synth.SynthConstants
DEFAULT, DISABLED, ENABLED, FOCUSED, MOUSE_OVER, PRESSED, SELECTED
-
-
构造方法摘要
构造方法 变量 构造器 描述 protected
SynthSliderUI(JSlider c)
构造一个SynthSliderUI
。
-
方法摘要
所有方法 静态方法 实例方法 具体的方法 变量和类型 方法 描述 static ComponentUI
createUI(JComponent c)
为给定组件创建新的UI对象。protected void
layout()
布置滑块。void
paint(Graphics g, JComponent c)
根据外观和感觉绘制指定的组件。protected void
paint(SynthContext context, Graphics g)
绘制指定的组件。protected void
paintThumb(SynthContext context, Graphics g, Rectangle thumbBounds)
画滑块拇指。protected void
paintTrack(SynthContext context, Graphics g, Rectangle trackBounds)
绘制滑块轨道。protected void
uninstallDefaults(JSlider slider)
卸载默认设置。void
update(Graphics g, JComponent c)
通知此UI委托重新绘制指定的组件。-
声明方法的类 javax.swing.plaf.basic.BasicSliderUI
calculateContentRect, calculateFocusRect, calculateGeometry, calculateLabelRect, calculateThumbLocation, calculateThumbSize, calculateTickRect, calculateTrackBuffer, calculateTrackRect, createChangeListener, createComponentListener, createFocusListener, createPropertyChangeListener, createScrollListener, createTrackListener, drawInverted, getBaseline, getBaselineResizeBehavior, getFocusColor, getHeightOfHighValueLabel, getHeightOfLowValueLabel, getHeightOfTallestLabel, getHighestValue, getHighestValueLabel, getHighlightColor, getLowestValue, getLowestValueLabel, getMaximumSize, getMinimumHorizontalSize, getMinimumSize, getMinimumVerticalSize, getPreferredHorizontalSize, getPreferredSize, getPreferredVerticalSize, getShadowColor, getThumbSize, getTickLength, 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, uninstallKeyboardActions, uninstallListeners, uninstallUI, valueForXPosition, valueForYPosition, xPositionForValue, yPositionForValue, yPositionForValue
-
声明方法的类 javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount
-
声明方法的类 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
声明方法的接口 java.beans.PropertyChangeListener
propertyChange
-
声明方法的接口 javax.swing.plaf.synth.SynthUI
getContext, paintBorder
-
-
-
-
构造方法详细信息
-
SynthSliderUI
protected SynthSliderUI(JSlider c)
构造一个SynthSliderUI
。- 参数
-
c
- 一个滑块
-
-
方法详细信息
-
createUI
public static ComponentUI createUI(JComponent c)
为给定组件创建新的UI对象。- 参数
-
c
- 为其创建UI对象的组件 - 结果
- UI对象
-
uninstallDefaults
protected void uninstallDefaults(JSlider slider)
卸载默认设置。 卸载LookAndFeel
时会调用此方法。- 重写:
-
uninstallDefaults
课程BasicSliderUI
- 参数
-
slider
- 一个滑块
-
layout
protected void layout()
布置滑块。
-
update
public void update(Graphics g, JComponent c)
通知此UI委托重新绘制指定的组件。 此方法绘制组件背景,然后调用paint(SynthContext,Graphics)
方法。通常,此方法不需要被子类覆盖。 所有外观和感觉渲染代码应驻留在
paint
方法中。- 重写:
-
update
在类ComponentUI
- 参数
-
g
- 用于绘画的Graphics
对象 -
c
- 正在绘制的组件 - 另请参见:
-
paint(SynthContext,Graphics)
-
paint
public void paint(Graphics g, JComponent c)
根据外观和感觉绘制指定的组件。Synth Look and Feel不使用此方法。 绘画由
paint(SynthContext,Graphics)
方法处理。- 重写:
-
paint
在类ComponentUI
- 参数
-
g
- 用于绘画的Graphics
对象 -
c
- 正在绘制的组件 - 另请参见:
-
paint(SynthContext,Graphics)
-
paint
protected void paint(SynthContext context, Graphics g)
绘制指定的组件。- 参数
-
context
- 正在绘制的组件的上下文 -
g
- 用于绘画的Graphics
对象 - 另请参见:
-
update(Graphics,JComponent)
-
paintThumb
protected void paintThumb(SynthContext context, Graphics g, Rectangle thumbBounds)
画滑块拇指。- 参数
-
context
- 正在绘制的组件的上下文 -
g
-Graphics
用于绘画的对象 -
thumbBounds
- 拇指的边界框
-
paintTrack
protected void paintTrack(SynthContext context, Graphics g, Rectangle trackBounds)
绘制滑块轨道。- 参数
-
context
- 正在绘制的组件的上下文 -
g
-Graphics
用于绘画的对象 -
trackBounds
- bounding box for the track
-
-