Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jvnet.substance
Class SubstanceSliderUI

    java.lang.Object
      javax.swing.plaf.ComponentUI
          javax.swing.plaf.SliderUI
              javax.swing.plaf.basic.BasicSliderUI
                  org.jvnet.substance.SubstanceSliderUI

All Implemented Interfaces:
  Trackable

    public class SubstanceSliderUI

extends javax.swing.plaf.basic.BasicSliderUI
implements Trackable

UI for sliders in Substance look and feel.

Author:
  Kirill Grouchnikov

Nested Class Summary

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

Field Summary
`protected javax.swing.Icon` | `horizontalIcon` Icon for horizontal sliders.
`protected javax.swing.Icon` | `roundIcon` Icon for sliders without labels and ticks.
`protected org.jvnet.lafwidget.animation.FadeStateListener` | `substanceFadeStateListener` Listener for fade animations.
`protected static LazyResettableHashMap<java.awt.image.BufferedImage>` | `trackCache` Cache of track images.
`protected javax.swing.Icon` | `verticalIcon` Icon for vertical sliders.

Fields inherited from 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`

Constructor Summary
`SubstanceSliderUI(javax.swing.JSlider slider)` Simple constructor.

Method Summary
`protected void` | `calculateLabelRect()`
`protected void` | `calculateThumbLocation()`
`protected void` | `calculateTickRect()`
`protected void` | `calculateTrackRect()`
`static javax.swing.plaf.ComponentUI` | `createUI(javax.swing.JComponent comp)`
`javax.swing.ButtonModel` | `getButtonModel()` Returns the button model for tracking the thumb transitions.
`protected javax.swing.Icon` | `getIcon()` Returns the thumb icon for the associated slider.
`java.awt.Dimension` | `getPreferredHorizontalSize()`
`java.awt.Dimension` | `getPreferredSize(javax.swing.JComponent c)`
`java.awt.Dimension` | `getPreferredVerticalSize()`
`protected int` | `getThumbOverhang()` Returns the amount that the thumb goes past the slide bar.
`protected java.awt.Dimension` | `getThumbSize()`
`protected int` | `getTickLength()`
`protected int` | `getTrackWidth()` Returns the shorter dimension of the track.
`protected void` | `installDefaults(javax.swing.JSlider slider)`
`protected void` | `installListeners(javax.swing.JSlider slider)`
`boolean` | `isInside(java.awt.event.MouseEvent me)` Checks whether the mouse position of the specified event lies inside the area of the component designated for transition effects.
`void` | `paint(java.awt.Graphics g, javax.swing.JComponent c)`
`void` | `paintFocus(java.awt.Graphics g)`
`void` | `paintThumb(java.awt.Graphics g)`
`void` | `paintTicks(java.awt.Graphics g)`
`void` | `paintTrack(java.awt.Graphics g)`
`void` | `setThumbLocation(int x, int y)`
`protected void` | `uninstallListeners(javax.swing.JSlider slider)`

Methods inherited from class javax.swing.plaf.basic.BasicSliderUI
`calculateContentRect, calculateFocusRect, calculateGeometry, calculateThumbSize, calculateTrackBuffer, createChangeListener, createComponentListener, createFocusListener, createPropertyChangeListener, createScrollListener, createTrackListener, drawInverted, getBaseline, getBaselineResizeBehavior, getFocusColor, getHeightOfHighValueLabel, getHeightOfLowValueLabel, getHeightOfTallestLabel, getHighestValue, getHighestValueLabel, getHighlightColor, getLowestValue, getLowestValueLabel, getMaximumSize, getMinimumHorizontalSize, getMinimumSize, getMinimumVerticalSize, getShadowColor, getWidthOfHighValueLabel, getWidthOfLowValueLabel, getWidthOfWidestLabel, installKeyboardActions, installUI, isDragging, labelsHaveSameBaselines, paintHorizontalLabel, paintLabels, paintMajorTickForHorizSlider, paintMajorTickForVertSlider, paintMinorTickForHorizSlider, paintMinorTickForVertSlider, paintVerticalLabel, recalculateIfInsetsChanged, recalculateIfOrientationChanged, scrollByBlock, scrollByUnit, scrollDueToClickInTrack, uninstallKeyboardActions, uninstallUI, valueForXPosition, valueForYPosition, xPositionForValue, yPositionForValue, 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

### substanceFadeStateListener

    protected org.jvnet.lafwidget.animation.FadeStateListener substanceFadeStateListener

  Listener for fade animations.

### horizontalIcon

    protected javax.swing.Icon horizontalIcon

  Icon for horizontal sliders.

### roundIcon

    protected javax.swing.Icon roundIcon

  Icon for sliders without labels and ticks.

### verticalIcon

    protected javax.swing.Icon verticalIcon

  Icon for vertical sliders.

### trackCache

    protected static final LazyResettableHashMap<java.awt.image.BufferedImage> trackCache

  Cache of track images.

Constructor Detail

### SubstanceSliderUI

    public SubstanceSliderUI(javax.swing.JSlider slider)

  Simple constructor.

  Parameters:
    `slider` - Slider.

Method Detail

### createUI

    public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent comp)

### calculateTrackRect

    protected void calculateTrackRect()

  Overrides:
    `calculateTrackRect` in class `javax.swing.plaf.basic.BasicSliderUI`

### paintTrack

    public void paintTrack(java.awt.Graphics g)

  Overrides:
    `paintTrack` in class `javax.swing.plaf.basic.BasicSliderUI`

### getThumbSize

    protected java.awt.Dimension getThumbSize()

  Overrides:
    `getThumbSize` in class `javax.swing.plaf.basic.BasicSliderUI`

### getIcon

    protected javax.swing.Icon getIcon()

  Returns the thumb icon for the associated slider.

  Returns:
    The thumb icon for the associated slider.

### paintThumb

    public void paintThumb(java.awt.Graphics g)

  Overrides:
    `paintThumb` in class `javax.swing.plaf.basic.BasicSliderUI`

### paint

    public void paint(java.awt.Graphics g,
                      javax.swing.JComponent c)

  Overrides:
    `paint` in class `javax.swing.plaf.basic.BasicSliderUI`

### getButtonModel

    public javax.swing.ButtonModel getButtonModel()

  Returns the button model for tracking the thumb transitions.

  Returns:
    Button model for tracking the thumb transitions.

### isInside

    public boolean isInside(java.awt.event.MouseEvent me)

  Description copied from interface: `Trackable`
  Checks whether the mouse position of the specified event lies inside the area of the component designated for transition effects.

  Specified by:
    `isInside` in interface `Trackable`
  Parameters:
    `me` - Mouse event.
  Returns:
    `true` if the mouse position of the specified event lies inside the area of the component designated for transition effects, `false` otherwise.

### installDefaults

    protected void installDefaults(javax.swing.JSlider slider)

  Overrides:
    `installDefaults` in class `javax.swing.plaf.basic.BasicSliderUI`

### installListeners

    protected void installListeners(javax.swing.JSlider slider)

  Overrides:
    `installListeners` in class `javax.swing.plaf.basic.BasicSliderUI`

### uninstallListeners

    protected void uninstallListeners(javax.swing.JSlider slider)

  Overrides:
    `uninstallListeners` in class `javax.swing.plaf.basic.BasicSliderUI`

### paintFocus

    public void paintFocus(java.awt.Graphics g)

  Overrides:
    `paintFocus` in class `javax.swing.plaf.basic.BasicSliderUI`

### getThumbOverhang

    protected int getThumbOverhang()

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

  Returns:
    Amount that the thumb goes past the slide bar.

### getTrackWidth

    protected int getTrackWidth()

  Returns the shorter dimension of the track.

  Returns:
    Shorter dimension of the track.

### getTickLength

    protected int getTickLength()

  Overrides:
    `getTickLength` in class `javax.swing.plaf.basic.BasicSliderUI`

### paintTicks

    public void paintTicks(java.awt.Graphics g)

  Overrides:
    `paintTicks` in class `javax.swing.plaf.basic.BasicSliderUI`

### calculateTickRect

    protected void calculateTickRect()

  Overrides:
    `calculateTickRect` in class `javax.swing.plaf.basic.BasicSliderUI`

### calculateLabelRect

    protected void calculateLabelRect()

  Overrides:
    `calculateLabelRect` in class `javax.swing.plaf.basic.BasicSliderUI`

### calculateThumbLocation

    protected void calculateThumbLocation()

  Overrides:
    `calculateThumbLocation` in class `javax.swing.plaf.basic.BasicSliderUI`

### getPreferredSize

    public java.awt.Dimension getPreferredSize(javax.swing.JComponent c)

  Overrides:
    `getPreferredSize` in class `javax.swing.plaf.basic.BasicSliderUI`

### setThumbLocation

    public void setThumbLocation(int x,
                                 int y)

  Overrides:
    `setThumbLocation` in class `javax.swing.plaf.basic.BasicSliderUI`

### getPreferredHorizontalSize

    public java.awt.Dimension getPreferredHorizontalSize()

  Overrides:
    `getPreferredHorizontalSize` in class `javax.swing.plaf.basic.BasicSliderUI`

### getPreferredVerticalSize

    public java.awt.Dimension getPreferredVerticalSize()

  Overrides:
    `getPreferredVerticalSize` in class `javax.swing.plaf.basic.BasicSliderUI`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD