Package com.intellij.util.ui
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.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.intellij.util.ui.RegionPainter
RegionPainter.Alpha, RegionPainter.Image -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected floatgetAlpha()Returns the constant alpha to be multiplied with the alpha of the source.protected ColorReturns the color for thumb's border.protected intprotected intgetColorOffset(Integer value) Returns the offset for a color according to the specified value from animator.protected ColorgetGradientStart(Integer value) Returns the start color for a gradient of a thumb's background according to the specified value from animator.protected ColorgetGradientStop(Integer value) Returns the stop color for a gradient of a thumb's background according to the specified value from animator.protected booleanprotected booleanvoidpaint(Graphics2D g, int x, int y, int width, int height, Integer value) Renders to the givenGraphics2Dobject.protected voidpaint(Graphics2D g, int width, int height, Integer value)
-
Constructor Details
-
ThumbPainter
-
-
Method Details
-
paint
Description copied from interface:RegionPainterRenders to the givenGraphics2Dobject.- Specified by:
paintin interfaceRegionPainter<Integer>- Parameters:
g- theGraphics2Dobject to render tox- X position of the area to painty- Y position of the area to paintwidth- width of the area to paintheight- height of the area to paintvalue- an optional configuration parameter
-
paint
-
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
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
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
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
Returns the color for thumb's border.- Returns:
- the border color
-
getBorderOffset
protected int getBorderOffset()- Returns:
- additional offset corresponding to the default track border
-