Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Swing 1.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## javax.swing.plaf.metal
Class MetalSliderUI

    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

A Java L&F implementation of SliderUI.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

Inner Class Summary
`protected class` | `MetalSliderUI.MetalPropertyListener`

Inner classes inherited from class javax.swing.plaf.basic.BasicSliderUI
`BasicSliderUI.ActionScroller, BasicSliderUI.ChangeHandler, BasicSliderUI.ComponentHandler, BasicSliderUI.FocusHandler, BasicSliderUI.PropertyChangeHandler, BasicSliderUI.ScrollListener, BasicSliderUI.TrackListener`

Field Summary
`protected static java.awt.Color` | `darkShadowColor`
`protected boolean` | `filledSlider`
`protected static java.awt.Color` | `highlightColor`
`protected static Icon` | `horizThumbIcon`
`protected java.lang.String` | `SLIDER_FILL`
`protected static java.awt.Color` | `thumbColor`
`protected int` | `TICK_BUFFER`
`protected static int` | `tickLength`
`protected static int` | `trackWidth`
`protected static Icon` | `vertThumbIcon`

Fields inherited from class javax.swing.plaf.basic.BasicSliderUI
`changeListener, componentListener, contentRect, focusInsets, focusListener, focusRect, insetCache, labelRect, MAX_SCROLL, MIN_SCROLL, NEGATIVE_SCROLL, POSITIVE_SCROLL, propertyChangeListener, scrollListener, scrollTimer, slider, thumbRect, tickRect, trackBuffer, trackListener, trackRect`

Constructor Summary
`MetalSliderUI()`

Method Summary
`protected java.beans.PropertyChangeListener` | `createPropertyChangeListener(JSlider slider)`
`static ComponentUI` | `createUI(JComponent c)`
`protected int` | `getThumbOverhang()` Returns the amount that the thumb goes past the slide bar.
`protected java.awt.Dimension` | `getThumbSize()`
`int` | `getTickLength()` Gets the height of the tick area for horizontal sliders and the width of the tick area for vertical sliders.
`protected int` | `getTrackLength()` Returns the longer dimension of the slide bar.
`protected int` | `getTrackWidth()` Returns the shorter dimension of the track.
`void` | `installUI(JComponent c)`
`void` | `paintFocus(java.awt.Graphics g)`
`protected void` | `paintMajorTickForHorizSlider(java.awt.Graphics g, java.awt.Rectangle tickBounds, int x)`
`protected void` | `paintMajorTickForVertSlider(java.awt.Graphics g, java.awt.Rectangle tickBounds, int y)`
`protected void` | `paintMinorTickForHorizSlider(java.awt.Graphics g, java.awt.Rectangle tickBounds, int x)`
`protected void` | `paintMinorTickForVertSlider(java.awt.Graphics g, java.awt.Rectangle tickBounds, int y)`
`void` | `paintThumb(java.awt.Graphics g)`
`void` | `paintTrack(java.awt.Graphics g)`
`protected void` | `scrollDueToClickInTrack(int dir)`

Methods inherited from class javax.swing.plaf.basic.BasicSliderUI
`calculateContentRect, calculateFocusRect, calculateGeometry, calculateLabelRect, calculateThumbLocation, calculateThumbSize, calculateTickRect, calculateTrackBuffer, calculateTrackRect, createChangeListener, createComponentListener, createFocusListener, createScrollListener, createTrackListener, getFocusColor, getHeightOfHighValueLabel, getHeightOfLowValueLabel, getHeightOfTallestLabel, getHighestValueLabel, getHighlightColor, getLowestValueLabel, getMaximumSize, getMinimumHorizontalSize, getMinimumSize, getMinimumVerticalSize, getPreferredHorizontalSize, getPreferredSize, getPreferredVerticalSize, getShadowColor, getWidthOfHighValueLabel, getWidthOfLowValueLabel, getWidthOfWidestLabel, installDefaults, installKeyboardActions, installListeners, paint, paintHorizontalLabel, paintLabels, paintTicks, paintVerticalLabel, recalculateIfInsetsChanged, scrollByBlock, scrollByUnit, setThumbLocation, uninstallKeyboardActions, uninstallListeners, uninstallUI, valueForXPosition, valueForYPosition, xPositionForValue, yPositionForValue`

Methods inherited from class javax.swing.plaf.ComponentUI
`contains, getAccessibleChild, getAccessibleChildrenCount, update`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### TICK_BUFFER

    protected final int TICK_BUFFER

### filledSlider

    protected boolean filledSlider

### thumbColor

    protected static java.awt.Color thumbColor

### highlightColor

    protected static java.awt.Color highlightColor

### darkShadowColor

    protected static java.awt.Color darkShadowColor

### trackWidth

    protected static int trackWidth

### tickLength

    protected static int tickLength

### horizThumbIcon

    protected static Icon horizThumbIcon

### vertThumbIcon

    protected static Icon vertThumbIcon

### SLIDER_FILL

    protected final java.lang.String SLIDER_FILL

Constructor Detail

### MetalSliderUI

    public MetalSliderUI()

Method Detail

### createUI

    public static ComponentUI createUI(JComponent c)

### installUI

    public void installUI(JComponent c)

  Overrides:
    installUI in class BasicSliderUI

### createPropertyChangeListener

    protected java.beans.PropertyChangeListener createPropertyChangeListener(JSlider slider)

  Overrides:
    createPropertyChangeListener in class BasicSliderUI

### paintThumb

    public void paintThumb(java.awt.Graphics g)

  Overrides:
    paintThumb in class BasicSliderUI

### paintTrack

    public void paintTrack(java.awt.Graphics g)

  Overrides:
    paintTrack in class BasicSliderUI

### paintFocus

    public void paintFocus(java.awt.Graphics g)

  Overrides:
    paintFocus in class BasicSliderUI

### getThumbSize

    protected java.awt.Dimension getThumbSize()

  Overrides:
    getThumbSize in class BasicSliderUI

### getTickLength

    public int getTickLength()

  Gets the height of the tick area for horizontal sliders and the width of the tick area for vertical sliders. BasicSliderUI uses the returned value to determine the tick area rectangle.
  Overrides:
    getTickLength in class BasicSliderUI

### getTrackWidth

    protected int getTrackWidth()

  Returns the shorter dimension of the track.

### getTrackLength

    protected int getTrackLength()

  Returns the longer dimension of the slide bar. (The slide bar is only the part that runs directly under the thumb)

### getThumbOverhang

    protected int getThumbOverhang()

  Returns the amount that the thumb goes past the slide bar.

### scrollDueToClickInTrack

    protected void scrollDueToClickInTrack(int dir)

  Overrides:
    scrollDueToClickInTrack in class BasicSliderUI

### paintMinorTickForHorizSlider

    protected void paintMinorTickForHorizSlider(java.awt.Graphics g,
                                                java.awt.Rectangle tickBounds,
                                                int x)

  Overrides:
    paintMinorTickForHorizSlider in class BasicSliderUI

### paintMajorTickForHorizSlider

    protected void paintMajorTickForHorizSlider(java.awt.Graphics g,
                                                java.awt.Rectangle tickBounds,
                                                int x)

  Overrides:
    paintMajorTickForHorizSlider in class BasicSliderUI

### paintMinorTickForVertSlider

    protected void paintMinorTickForVertSlider(java.awt.Graphics g,
                                               java.awt.Rectangle tickBounds,
                                               int y)

  Overrides:
    paintMinorTickForVertSlider in class BasicSliderUI

### paintMajorTickForVertSlider

    protected void paintMajorTickForVertSlider(java.awt.Graphics g,
                                               java.awt.Rectangle tickBounds,
                                               int y)

  Overrides:
    paintMajorTickForVertSlider in class BasicSliderUI

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Swing 1.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Submit a bug or feature
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.