Class ButtonlessScrollBarUI.ThumbPainter

java.lang.Object
com.intellij.util.ui.ButtonlessScrollBarUI.ThumbPainter
All Implemented Interfaces:
RegionPainter<Integer>
Enclosing class:
ButtonlessScrollBarUI

public static class ButtonlessScrollBarUI.ThumbPainter extends Object implements RegionPainter<Integer>
The default painter for non-Mac scroll bar.
  • Constructor Details

    • ThumbPainter

      public ThumbPainter(JScrollBar bar)
  • Method Details

    • paint

      public void paint(Graphics2D g, int x, int y, int width, int height, Integer value)
      Description copied from interface: RegionPainter
      Renders to the given Graphics2D object.
      Specified by:
      paint in interface RegionPainter<Integer>
      Parameters:
      g - the Graphics2D object to render to
      x - X position of the area to paint
      y - Y position of the area to paint
      width - width of the area to paint
      height - height of the area to paint
      value - an optional configuration parameter
    • paint

      protected void paint(Graphics2D g, int width, int height, Integer value)
    • isVertical

      protected boolean isVertical()
    • isLeftToRight

      protected boolean isLeftToRight()
    • getAlpha

      protected float getAlpha()
      Returns the constant alpha to be multiplied with the alpha of the source. The alpha must be a floating point number in the range [0.0, 1.0].
      Returns:
      the constant alpha
    • getColorOffset

      protected int getColorOffset(Integer value)
      Returns the offset for a color according to the specified value from animator.
      Parameters:
      value - the value from animator
      Returns:
      the offset for a color
    • getGradientStart

      protected Color getGradientStart(Integer value)
      Returns the start color for a gradient of a thumb's background according to the specified value from animator.
      Parameters:
      value - the value from animator
      Returns:
      the start color for a gradient
    • getGradientStop

      protected Color getGradientStop(Integer value)
      Returns the stop color for a gradient of a thumb's background according to the specified value from animator.
      Parameters:
      value - the value from animator
      Returns:
      the stop color for a gradient
    • getBorderColor

      protected Color getBorderColor()
      Returns the color for thumb's border.
      Returns:
      the border color
    • getBorderOffset

      protected int getBorderOffset()
      Returns:
      additional offset corresponding to the default track border