Package com.explodingpixels.widgets.plaf

## Class ScrollThumbImagePainter

- java.lang.Object
- - com.explodingpixels.widgets.plaf.ScrollThumbImagePainter

All Implemented Interfaces:
  `MacWidgetsPainter<java.awt.Component>`

    public class ScrollThumbImagePainter
    extends java.lang.Object
    implements MacWidgetsPainter<java.awt.Component>

An implementation of `MacWidgetsPainter` that paints a scroll thumb using images.

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods

`static ScrollThumbImagePainter`

`createHorizontalScrollThumbImagePainter​(java.awt.Image disabledLowerBound, java.awt.Image disabledMiddle, java.awt.Image disabledUpperBound, java.awt.Image inactiveLowerBound, java.awt.Image inactiveMiddle, java.awt.Image inactiveUpperBound, java.awt.Image activeLowerBound, java.awt.Image activeMiddle, java.awt.Image activeUpperBound)`

Creates an image-based horizontal scroll thumb painter using the given images.

`static ScrollThumbImagePainter`

`createVerticalScrollThumbImagePainter​(java.awt.Image disabledLowerBound, java.awt.Image disabledMiddle, java.awt.Image disabledUpperBound, java.awt.Image inactiveLowerBound, java.awt.Image inactiveMiddle, java.awt.Image inactiveUpperBound, java.awt.Image activeLowerBound, java.awt.Image activeMiddle, java.awt.Image activeUpperBound)`

Creates an image-based vertical scroll thumb painter using the given images.

`void` `paint​(java.awt.Graphics2D graphics, java.awt.Component objectToPaint, int width, int height)` Renders to the given `Graphics2D`.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Method Detail

#### createVerticalScrollThumbImagePainter

    public static ScrollThumbImagePainter createVerticalScrollThumbImagePainter​(java.awt.Image disabledLowerBound,
                                                                                java.awt.Image disabledMiddle,
                                                                                java.awt.Image disabledUpperBound,
                                                                                java.awt.Image inactiveLowerBound,
                                                                                java.awt.Image inactiveMiddle,
                                                                                java.awt.Image inactiveUpperBound,
                                                                                java.awt.Image activeLowerBound,
                                                                                java.awt.Image activeMiddle,
                                                                                java.awt.Image activeUpperBound)

Creates an image-based vertical scroll thumb painter using the given images. Lower bound refers to the area closest to the minimum value (top or left). Upper bound refers to the area closest to the maximum value (bottom or right).

Parameters:
  `disabledLowerBound` - the lower bound disabled image.
  `disabledMiddle` - the middle disabled image.
  `disabledUpperBound` - the upper bound disabled image.
  `inactiveLowerBound` - the lower bound inactiveimage
  `inactiveMiddle` - the middle inactive image
  `inactiveUpperBound` - the upper bound inactive image.
  `activeLowerBound` - the lower bound active image.
  `activeMiddle` - the middle active image.
  `activeUpperBound` - the upper bound active image.
Returns:
  a state based (disabled or inactive or active) scroll thumb painter.

#### createHorizontalScrollThumbImagePainter

    public static ScrollThumbImagePainter createHorizontalScrollThumbImagePainter​(java.awt.Image disabledLowerBound,
                                                                                  java.awt.Image disabledMiddle,
                                                                                  java.awt.Image disabledUpperBound,
                                                                                  java.awt.Image inactiveLowerBound,
                                                                                  java.awt.Image inactiveMiddle,
                                                                                  java.awt.Image inactiveUpperBound,
                                                                                  java.awt.Image activeLowerBound,
                                                                                  java.awt.Image activeMiddle,
                                                                                  java.awt.Image activeUpperBound)

Creates an image-based horizontal scroll thumb painter using the given images. Lower bound refers to the area closest to the minimum value (top or left). Upper bound refers to the area closest to the maximum value (bottom or right).

Parameters:
  `disabledLowerBound` - the lower bound disabled image.
  `disabledMiddle` - the middle disabled image.
  `disabledUpperBound` - the upper bound disabled image.
  `inactiveLowerBound` - the lower bound inactiveimage
  `inactiveMiddle` - the middle inactive image
  `inactiveUpperBound` - the upper bound inactive image.
  `activeLowerBound` - the lower bound active image.
  `activeMiddle` - the middle active image.
  `activeUpperBound` - the upper bound active image.
Returns:
  a state based (disabled or inactive or active) scroll thumb painter.

#### paint

    public void paint​(java.awt.Graphics2D graphics,
                      java.awt.Component objectToPaint,
                      int width,
                      int height)

Description copied from interface: `MacWidgetsPainter`
Renders to the given `Graphics2D`. The supplied graphics context may be modified - it's state need not be restored upon completion of painting.

Specified by:
  `paint` in interface `MacWidgetsPainter<java.awt.Component>`
Parameters:
  `graphics` - the graphics context to paint into. It's state need not be restored. Will not be null.
  `objectToPaint` - the object to be painted.
  `width` - the width within the object to paint.
  `height` - the height within the object to paint.