01: /*
02: * @(#)Office2003RangeSliderUI.java 12/7/2005
03: *
04: * Copyright 2002 - 2005 JIDE Software Inc. All rights reserved.
05: */
06: package com.jidesoft.plaf.office2003;
07:
08: import com.jidesoft.plaf.UIDefaultsLookup;
09: import com.jidesoft.plaf.basic.BasicRangeSliderUI;
10:
11: import javax.swing.*;
12: import javax.swing.plaf.ComponentUI;
13:
14: public class Office2003RangeSliderUI extends BasicRangeSliderUI {
15:
16: public Office2003RangeSliderUI(JSlider slider) {
17: super (slider);
18: }
19:
20: // ********************************
21: // Create PLAF
22: // ********************************
23: public static ComponentUI createUI(JComponent slider) {
24: return new Office2003RangeSliderUI((JSlider) slider);
25: }
26:
27: @Override
28: protected void setMouseRollover(int handle) {
29: resetAllIcons();
30: switch (handle) {
31: case MOUSE_HANDLE_MIN:
32: _lowerIcon = UIDefaultsLookup
33: .getIcon("RangeSlider.lowerRIcon");
34: _lowerIconV = UIDefaultsLookup
35: .getIcon("RangeSlider.lowerVRIcon");
36: break;
37: case MOUSE_HANDLE_MAX:
38: _upperIcon = UIDefaultsLookup
39: .getIcon("RangeSlider.upperRIcon");
40: _upperIconV = UIDefaultsLookup
41: .getIcon("RangeSlider.upperVRIcon");
42: break;
43: case MOUSE_HANDLE_MIDDLE:
44: _middleIcon = UIDefaultsLookup
45: .getIcon("RangeSlider.middleRIcon");
46: _middleIconV = UIDefaultsLookup
47: .getIcon("RangeSlider.middleVRIcon");
48: break;
49: case MOUSE_HANDLE_NONE:
50: break;
51: }
52: slider.repaint();
53: }
54: }
|