所有类


javax.swing.plaf.basic
类 BasicSliderUI

java.lang.Object
  继承者 javax.swing.plaf.ComponentUI
      继承者 javax.swing.plaf.SliderUI
          继承者 javax.swing.plaf.basic.BasicSliderUI
直接已知子类:
MetalSliderUI

public class BasicSliderUI
   
   
   
   
extends SliderUI

SliderUI 的基本 L&F 实现。


嵌套类摘要
 classBasicSliderUI.ActionScroller
          从 Java 2 平台 v1.3 开始,不再使用这种以前没有记录的类。
 classBasicSliderUI.ChangeHandler
          数据模型侦听器。
 classBasicSliderUI.ComponentHandler
          调整事件大小的侦听器。
 classBasicSliderUI.FocusHandler
          焦点更改侦听器。
 classBasicSliderUI.PropertyChangeHandler
           
 classBasicSliderUI.ScrollListener
          滚动事件侦听器。
 classBasicSliderUI.TrackListener
          跟踪鼠标移动。
 
字段摘要
protected  ChangeListenerchangeListener
           
protected  ComponentListenercomponentListener
           
protected  RectanglecontentRect
           
protected  InsetsfocusInsets
           
protected  FocusListenerfocusListener
           
protected  RectanglefocusRect
           
protected  InsetsinsetCache
           
protected  RectanglelabelRect
           
protected  booleanleftToRightCache
           
static intMAX_SCROLL
           
static intMIN_SCROLL
           
static intNEGATIVE_SCROLL
           
static intPOSITIVE_SCROLL
           
protected  PropertyChangeListenerpropertyChangeListener
           
protected  BasicSliderUI.ScrollListenerscrollListener
           
protected  TimerscrollTimer
           
protected  JSliderslider
           
protected  RectanglethumbRect
           
protected  RectangletickRect
           
protected  inttrackBuffer
           
protected  BasicSliderUI.TrackListenertrackListener
           
protected  RectangletrackRect
           
 
构造方法摘要
BasicSliderUI(JSlider b)
           
 
方法摘要
protected  voidcalculateContentRect()
           
protected  voidcalculateFocusRect()
           
protected  voidcalculateGeometry()
           
protected  voidcalculateLabelRect()
           
protected  voidcalculateThumbLocation()
           
protected  voidcalculateThumbSize()
           
protected  voidcalculateTickRect()
           
protected  voidcalculateTrackBuffer()
           
protected  voidcalculateTrackRect()
           
protected  ChangeListenercreateChangeListener(JSlider slider)
           
protected  ComponentListenercreateComponentListener(JSlider slider)
           
protected  FocusListenercreateFocusListener(JSlider slider)
           
protected  PropertyChangeListenercreatePropertyChangeListener(JSlider slider)
           
protected  BasicSliderUI.ScrollListenercreateScrollListener(JSlider slider)
           
protected  BasicSliderUI.TrackListenercreateTrackListener(JSlider slider)
           
static ComponentUIcreateUI(JComponent b)
           
protected  booleandrawInverted()
           
protected  ColorgetFocusColor()
           
protected  intgetHeightOfHighValueLabel()
           
protected  intgetHeightOfLowValueLabel()
           
protected  intgetHeightOfTallestLabel()
           
protected  ComponentgetHighestValueLabel()
          返回与标签表中的最低滑块值相对应的标签。
protected  ColorgetHighlightColor()
           
protected  ComponentgetLowestValueLabel()
          返回与标签表中的最高滑块值相对应的标签。
 DimensiongetMaximumSize(JComponent c)
          返回指定组件的适合外观的最大大小。
 DimensiongetMinimumHorizontalSize()
           
 DimensiongetMinimumSize(JComponent c)
          返回指定组件的适合外观的最小大小。
 DimensiongetMinimumVerticalSize()
           
 DimensiongetPreferredHorizontalSize()
           
 DimensiongetPreferredSize(JComponent c)
          返回指定组件的适合外观的首选大小。
 DimensiongetPreferredVerticalSize()
           
protected  ColorgetShadowColor()
           
protected  DimensiongetThumbSize()
           
protected  intgetTickLength()
          获取水平滑块的刻度区域的高度和垂直滑块的刻度区域的宽度。
protected  intgetWidthOfHighValueLabel()
           
protected  intgetWidthOfLowValueLabel()
           
protected  intgetWidthOfWidestLabel()
           
protected  voidinstallDefaults(JSlider slider)
           
protected  voidinstallKeyboardActions(JSlider slider)
           
protected  voidinstallListeners(JSlider slider)
           
 voidinstallUI(JComponent c)
          配置指定组件,使其适合外观。
protected  booleanisDragging()
          如果用户在拖动滑块,则返回 true。
 voidpaint(Graphics g, JComponent c)
          绘制指定组件,使其适合外观。
 voidpaintFocus(Graphics g)
           
protected  voidpaintHorizontalLabel(Graphics g, int value, Component label)
          为标签表中的每个标签调用此方法。
 voidpaintLabels(Graphics g)
           
protected  voidpaintMajorTickForHorizSlider(Graphics g, Rectangle tickBounds, int x)
           
protected  voidpaintMajorTickForVertSlider(Graphics g, Rectangle tickBounds, int y)
           
protected  voidpaintMinorTickForHorizSlider(Graphics g, Rectangle tickBounds, int x)
           
protected  voidpaintMinorTickForVertSlider(Graphics g, Rectangle tickBounds, int y)
           
 voidpaintThumb(Graphics g)
           
 voidpaintTicks(Graphics g)
           
 voidpaintTrack(Graphics g)
           
protected  voidpaintVerticalLabel(Graphics g, int value, Component label)
          为标签表中的每个标签调用此方法。
protected  voidrecalculateIfInsetsChanged()
           
protected  voidrecalculateIfOrientationChanged()
           
 voidscrollByBlock(int direction)
           
 voidscrollByUnit(int direction)
           
protected  voidscrollDueToClickInTrack(int dir)
          在滑道(而非 thumb)中检测到 mousePressed 时调用此方法。
 voidsetThumbLocation(int x, int y)
           
protected  voiduninstallKeyboardActions(JSlider slider)
           
protected  voiduninstallListeners(JSlider slider)
           
 voiduninstallUI(JComponent c)
          在 installUI 期间,在指定组件上反向执行的配置操作。
 intvalueForXPosition(int xPos)
          返回给出 x 位置的值。
 intvalueForYPosition(int yPos)
          返回给出 y 位置的值。
protected  intxPositionForValue(int value)
           
protected  intyPositionForValue(int value)
           
 
从类 javax.swing.plaf.ComponentUI 继承的方法
contains, getAccessibleChild, getAccessibleChildrenCount, update
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

POSITIVE_SCROLL

public static final int POSITIVE_SCROLL
另请参见:
常量字段值

NEGATIVE_SCROLL

public static final int NEGATIVE_SCROLL
另请参见:
常量字段值

MIN_SCROLL

public static final int MIN_SCROLL
另请参见:
常量字段值

MAX_SCROLL

public static final int MAX_SCROLL
另请参见:
常量字段值

scrollTimer

protected Timer scrollTimer

slider

protected JSlider slider

focusInsets

protected Insets focusInsets