slider.removePropertyChangeListener(this);
super.uninstallListeners(slider);
}
private void updateStyle(JSlider c) {
SeaGlassContext context = getContext(c, ENABLED);
SynthStyle oldStyle = style;
style = SeaGlassLookAndFeel.updateStyle(context, this);
if (style != oldStyle) {
thumbWidth = style.getInt(context, "Slider.thumbWidth", 30);
thumbHeight = style.getInt(context, "Slider.thumbHeight", 14);
trackHeightHack = style.getInt(context, "Slider.trackHeight", 5);
// handle scaling for sizeVarients for special case components. The
// key "JComponent.sizeVariant" scales for large/small/mini
// components are based on Apples LAF
String scaleKey = SeaGlassStyle.getSizeVariant(slider);
if (scaleKey != null) {
if (SeaGlassStyle.LARGE_KEY.equals(scaleKey)) {
thumbWidth *= 1.15;
thumbHeight *= 1.15;
trackHeightHack = 7;
} else if (SeaGlassStyle.SMALL_KEY.equals(scaleKey)) {
thumbWidth *= 0.857;
thumbHeight *= 0.857;
trackHeightHack = 3;
} else if (SeaGlassStyle.MINI_KEY.equals(scaleKey)) {
thumbWidth *= 0.784;
thumbHeight *= 0.784;
trackHeightHack = 3;
}
}
trackBorder = style.getInt(context, "Slider.trackBorder", 1);
trackHeight = thumbHeight + trackBorder * 2;
paintValue = style.getBoolean(context, "Slider.paintValue", true);
if (oldStyle != null) {
uninstallKeyboardActions(c);
installKeyboardActions(c);
}
}
context.dispose();
context = getContext(c, Region.SLIDER_TRACK, ENABLED);
sliderTrackStyle = SeaGlassLookAndFeel.updateStyle(context, this);
context.dispose();
context = getContext(c, Region.SLIDER_THUMB, ENABLED);
sliderThumbStyle = SeaGlassLookAndFeel.updateStyle(context, this);
context.dispose();
}