* Composite to apply before painting the track.
* @return Horizontal track image.
*/
private static BufferedImage getTrackHorizontal(JScrollBar scrollBar,
int width, int height) {
SubstanceButtonShaper shaper = SubstanceCoreUtilities
.getButtonShaper(scrollBar);
SubstanceColorScheme mainScheme = SubstanceColorSchemeUtilities
.getColorScheme(scrollBar,
scrollBar.isEnabled() ? ComponentState.ENABLED
: ComponentState.DISABLED_UNSELECTED);
SubstanceColorScheme mainBorderScheme = SubstanceColorSchemeUtilities
.getColorScheme(scrollBar, ColorSchemeAssociationKind.BORDER,
scrollBar.isEnabled() ? ComponentState.ENABLED
: ComponentState.DISABLED_UNSELECTED);
HashMapKey key = SubstanceCoreUtilities.getHashKey(mainScheme
.getDisplayName(), mainBorderScheme.getDisplayName(), width,
height, shaper.getDisplayName());
float radius = height / 2;
if (shaper instanceof ClassicButtonShaper)
radius = SubstanceSizeUtils
.getClassicButtonCornerRadius(SubstanceSizeUtils
.getComponentFontSize(scrollBar));