JIDE: RangeSlider: support specifying width of thumb borders (fixes compile error in commit dd806144)

This commit is contained in:
Karl Tauber
2021-10-30 20:37:12 +02:00
parent d48b98f582
commit 3e198ecd28

View File

@@ -48,6 +48,7 @@ public class FlatRangeSliderUI
protected int trackWidth; protected int trackWidth;
protected Dimension thumbSize; protected Dimension thumbSize;
protected int focusWidth; protected int focusWidth;
/** @since 2 */ protected float thumbBorderWidth;
protected Color trackValueColor; protected Color trackValueColor;
protected Color trackColor; protected Color trackColor;
@@ -120,6 +121,7 @@ public class FlatRangeSliderUI
trackWidth = UIManager.getInt( "Slider.trackWidth" ); trackWidth = UIManager.getInt( "Slider.trackWidth" );
thumbSize = UIManager.getDimension( "Slider.thumbSize" ); thumbSize = UIManager.getDimension( "Slider.thumbSize" );
focusWidth = FlatUIUtils.getUIInt( "Slider.focusWidth", 4 ); focusWidth = FlatUIUtils.getUIInt( "Slider.focusWidth", 4 );
thumbBorderWidth = FlatUIUtils.getUIFloat( "Slider.thumbBorderWidth", 1 );
trackValueColor = FlatUIUtils.getUIColor( "Slider.trackValueColor", "Slider.thumbColor" ); trackValueColor = FlatUIUtils.getUIColor( "Slider.trackValueColor", "Slider.thumbColor" );
trackColor = UIManager.getColor( "Slider.trackColor" ); trackColor = UIManager.getColor( "Slider.trackColor" );
@@ -324,7 +326,7 @@ debug*/
Color focusedColor = FlatUIUtils.deriveColor( this.focusedColor, Color focusedColor = FlatUIUtils.deriveColor( this.focusedColor,
(foreground != defaultForeground) ? foreground : focusBaseColor ); (foreground != defaultForeground) ? foreground : focusBaseColor );
FlatSliderUI.paintThumb( g, slider, thumbRect, isRoundThumb(), color, borderColor, focusedColor, focusWidth ); FlatSliderUI.paintThumb( g, slider, thumbRect, isRoundThumb(), color, borderColor, focusedColor, thumbBorderWidth, focusWidth );
} }
protected Color getTrackValueColor() { protected Color getTrackValueColor() {