所有类


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 实现。


嵌套类摘要
 class BasicSliderUI.ActionScroller
          从 Java 2 平台 v1.3 开始,不再使用这种以前没有记录的类。
 class BasicSliderUI.ChangeHandler
          数据模型侦听器。
 class BasicSliderUI.ComponentHandler
          调整事件大小的侦听器。
 class BasicSliderUI.FocusHandler
          焦点更改侦听器。
 class BasicSliderUI.PropertyChangeHandler
           
 class BasicSliderUI.ScrollListener
          滚动事件侦听器。
 class BasicSliderUI.TrackListener
          跟踪鼠标移动。
 
字段摘要
protected  ChangeListener changeListener
           
protected  ComponentListener componentListener
           
protected  Rectangle contentRect
           
protected  Insets focusInsets
           
protected  FocusListener focusListener
           
protected  Rectangle focusRect
           
protected  Insets insetCache
           
protected  Rectangle labelRect
           
protected  boolean leftToRightCache
           
static int MAX_SCROLL
           
static int MIN_SCROLL
           
static int NEGATIVE_SCROLL
           
static int POSITIVE_SCROLL
           
protected  PropertyChangeListener propertyChangeListener
           
protected  BasicSliderUI.ScrollListener scrollListener
           
protected  Timer scrollTimer
           
protected  JSlider slider
           
protected  Rectangle thumbRect
           
protected  Rectangle tickRect
           
protected  int trackBuffer
           
protected  BasicSliderUI.TrackListener trackListener
           
protected  Rectangle trackRect
           
 
构造方法摘要
BasicSliderUI(JSlider b)
           
 
方法摘要
protected  void calculateContentRect()
           
protected  void calculateFocusRect()
           
protected  void calculateGeometry()
           
protected  void calculateLabelRect()
           
protected  void calculateThumbLocation()
           
protected  void calculateThumbSize()
           
protected  void calculateTickRect()
           
protected  void calculateTrackBuffer()
           
protected  void calculateTrackRect()
           
protected  ChangeListener createChangeListener(JSlider slider)
           
protected  ComponentListener createComponentListener(JSlider slider)
           
protected  FocusListener createFocusListener(JSlider slider)
           
protected  PropertyChangeListener createPropertyChangeListener(JSlider slider)
           
protected  BasicSliderUI.ScrollListener createScrollListener(JSlider slider)
           
protected  BasicSliderUI.TrackListener createTrackListener(JSlider slider)
           
static ComponentUI createUI(JComponent b)
           
protected  boolean drawInverted()
           
protected  Color getFocusColor()
           
protected  int getHeightOfHighValueLabel()
           
protected  int getHeightOfLowValueLabel()
           
protected  int getHeightOfTallestLabel()
           
protected  Component getHighestValueLabel()
          返回与标签表中的最低滑块值相对应的标签。
protected  Color getHighlightColor()
           
protected  Component getLowestValueLabel()
          返回与标签表中的最高滑块值相对应的标签。
 Dimension getMaximumSize(JComponent c)
          返回指定组件的适合外观的最大大小。
 Dimension getMinimumHorizontalSize()
           
 Dimension getMinimumSize(JComponent c)
          返回指定组件的适合外观的最小大小。
 Dimension getMinimumVerticalSize()
           
 Dimension getPreferredHorizontalSize()
           
 Dimension getPreferredSize(JComponent c)
          返回指定组件的适合外观的首选大小。
 Dimension getPreferredVerticalSize()
           
protected  Color getShadowColor()
           
protected  Dimension getThumbSize()
           
protected  int getTickLength()
          获取水平滑块的刻度区域的高度和垂直滑块的刻度区域的宽度。
protected  int getWidthOfHighValueLabel()
           
protected  int getWidthOfLowValueLabel()
           
protected  int getWidthOfWidestLabel()
           
protected  void installDefaults(JSlider slider)
           
protected  void installKeyboardActions(JSlider slider)
           
protected  void installListeners(JSlider slider)
           
 void installUI(JComponent c)
          配置指定组件,使其适合外观。
protected  boolean isDragging()
          如果用户在拖动滑块,则返回 true。
 void paint(Graphics g, JComponent c)
          绘制指定组件,使其适合外观。
 void paintFocus(Graphics g)
           
protected  void paintHorizontalLabel(Graphics g, int value, Component label)
          为标签表中的每个标签调用此方法。
 void paintLabels(Graphics g)
           
protected  void paintMajorTickForHorizSlider(Graphics g, Rectangle tickBounds, int x)
           
protected  void paintMajorTickForVertSlider(Graphics g, Rectangle tickBounds, int y)
           
protected  void paintMinorTickForHorizSlider(Graphics g, Rectangle tickBounds, int x)
           
protected  void paintMinorTickForVertSlider(Graphics g, Rectangle tickBounds, int y)
           
 void paintThumb(Graphics g)
           
 void paintTicks(Graphics g)
           
 void paintTrack(Graphics g)
           
protected  void paintVerticalLabel(Graphics g, int value, Component label)
          为标签表中的每个标签调用此方法。
protected  void recalculateIfInsetsChanged()
           
protected  void recalculateIfOrientationChanged()
           
 void scrollByBlock(int direction)
           
 void scrollByUnit(int direction)
           
protected  void scrollDueToClickInTrack(int dir)
          在滑道(而非 thumb)中检测到 mousePressed 时调用此方法。
 void setThumbLocation(int x, int y)
           
protected  void uninstallKeyboardActions(JSlider slider)
           
protected  void uninstallListeners(JSlider slider)
           
 void uninstallUI(JComponent c)
          在 installUI 期间,在指定组件上反向执行的配置操作。
 int valueForXPosition(int xPos)
          返回给出 x 位置的值。
 int valueForYPosition(int yPos)
          返回给出 y 位置的值。
protected  int xPositionForValue(int value)
           
protected  int yPositionForValue(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

微信小程序

微信扫一扫体验

微信公众账号

微信扫一扫加关注

发表
评论
返回
顶部