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
为
JSlider
提供Synth L&F UI代理。
- 自从:
- 1.7
-
Nested Class Summary
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
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
Fields declared in interface javax.swing.plaf.synth.SynthConstants
DEFAULT, DISABLED, ENABLED, FOCUSED, MOUSE_OVER, PRESSED, SELECTED
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ComponentUI
为给定的组件创建一个新的UI对象。返回指定组件的上下文。protected void
layout()
布局滑块。void
paint
(Graphics g, JComponent c) 根据外观和感觉绘制指定的组件。protected void
paint
(SynthContext context, Graphics g) 绘制指定的组件。void
paintBorder
(SynthContext context, Graphics g, int x, int y, int w, int h) 绘制边框。protected void
paintThumb
(SynthContext context, Graphics g, Rectangle thumbBounds) 绘制滑块拇指。protected void
paintTrack
(SynthContext context, Graphics g, Rectangle trackBounds) 绘制滑块轨道。void
当绑定属性更改时调用此方法。protected void
uninstallDefaults
(JSlider slider) 卸载默认设置。void
update
(Graphics g, JComponent c) 通知此UI代理重新绘制指定的组件。Methods declared in class 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
Methods declared in class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount
-
Constructor Details
-
SynthSliderUI
构造一个SynthSliderUI
。- 参数:
-
c
- 一个滑块
-
-
Method Details
-
createUI
为给定的组件创建一个新的UI对象。- 参数:
-
c
- 要为其创建UI对象的组件 - 返回:
- UI对象
-
uninstallDefaults
卸载默认设置。当卸载LookAndFeel
时调用此方法。- 覆盖:
-
uninstallDefaults
在类BasicSliderUI
- 参数:
-
slider
- 一个滑块
-
layout
protected void layout()布局滑块。 -
getContext
返回指定组件的上下文。- 指定者:
-
getContext
在接口SynthUI
- 参数:
-
c
- 请求SynthContext的组件 - 返回:
- 描述组件的SynthContext
-
update
通知此UI代理重新绘制指定的组件。此方法绘制组件背景,然后调用paint(SynthContext,Graphics)
方法。一般来说,子类不需要覆盖此方法。所有外观和感觉渲染代码应位于
paint
方法中。- 覆盖:
-
update
在类ComponentUI
- 参数:
-
g
- 用于绘制的Graphics
对象 -
c
- 正在绘制的组件 - 参见:
-
paint
根据外观和感觉绘制指定的组件。此方法不被Synth外观和感觉使用。绘制由
paint(SynthContext,Graphics)
方法处理。- 覆盖:
-
paint
在类ComponentUI
- 参数:
-
g
- 用于绘制的Graphics
对象 -
c
- 正在绘制的组件 - 参见:
-
paint
绘制指定的组件。- 参数:
-
context
- 正在绘制的组件的上下文 -
g
- 用于绘制的Graphics
对象 - 参见:
-
paintBorder
绘制边框。- 指定者:
-
paintBorder
在接口SynthUI
- 参数:
-
context
- 一个组件上下文 -
g
- 要绘制的Graphics
-
x
- X坐标 -
y
- Y坐标 -
w
- 边框的宽度 -
h
- 边框的高度
-
paintThumb
绘制滑块拇指。- 参数:
-
context
- 正在绘制的组件的上下文 -
g
- 用于绘制的Graphics
对象 -
thumbBounds
- 拇指的边界框
-
paintTrack
绘制滑块轨道。- 参数:
-
context
- 正在绘制的组件的上下文 -
g
- 用于绘制的Graphics
对象 -
trackBounds
- 轨道的边界框
-
propertyChange
当绑定属性更改时调用此方法。- 指定者:
-
propertyChange
在接口PropertyChangeListener
- 参数:
-
e
- 描述事件源和已更改属性的PropertyChangeEvent对象
-