Class ScrollThumbImagePainter

java.lang.Object
com.explodingpixels.widgets.plaf.ScrollThumbImagePainter
All Implemented Interfaces:
MacWidgetsPainter<Component>

public class ScrollThumbImagePainter extends Object implements MacWidgetsPainter<Component>
An implementation of MacWidgetsPainter that paints a scroll thumb using images.
  • Method Details

    • createVerticalScrollThumbImagePainter

      public static ScrollThumbImagePainter createVerticalScrollThumbImagePainter(Image disabledLowerBound, Image disabledMiddle, Image disabledUpperBound, Image inactiveLowerBound, Image inactiveMiddle, Image inactiveUpperBound, Image activeLowerBound, Image activeMiddle, 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(Image disabledLowerBound, Image disabledMiddle, Image disabledUpperBound, Image inactiveLowerBound, Image inactiveMiddle, Image inactiveUpperBound, Image activeLowerBound, Image activeMiddle, 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(Graphics2D graphics, 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<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.