48 |
import javax.swing.JButton; |
import javax.swing.JButton; |
49 |
import javax.swing.JComponent; |
import javax.swing.JComponent; |
50 |
import javax.swing.JScrollBar; |
import javax.swing.JScrollBar; |
|
import javax.swing.UIDefaults; |
|
51 |
import javax.swing.UIManager; |
import javax.swing.UIManager; |
52 |
import javax.swing.plaf.ComponentUI; |
import javax.swing.plaf.ComponentUI; |
53 |
import javax.swing.plaf.basic.BasicScrollBarUI; |
import javax.swing.plaf.basic.BasicScrollBarUI; |
194 |
*/ |
*/ |
195 |
protected JButton createDecreaseButton(int orientation) |
protected JButton createDecreaseButton(int orientation) |
196 |
{ |
{ |
197 |
UIDefaults defaults = UIManager.getLookAndFeelDefaults(); |
scrollBarWidth = UIManager.getInt("ScrollBar.width"); |
|
scrollBarWidth = defaults.getInt("ScrollBar.width"); |
|
198 |
decreaseButton = new MetalScrollButton(orientation, scrollBarWidth, |
decreaseButton = new MetalScrollButton(orientation, scrollBarWidth, |
199 |
isFreeStanding); |
isFreeStanding); |
200 |
return decreaseButton; |
return decreaseButton; |
211 |
*/ |
*/ |
212 |
protected JButton createIncreaseButton(int orientation) |
protected JButton createIncreaseButton(int orientation) |
213 |
{ |
{ |
214 |
UIDefaults defaults = UIManager.getLookAndFeelDefaults(); |
scrollBarWidth = UIManager.getInt("ScrollBar.width"); |
|
scrollBarWidth = defaults.getInt("ScrollBar.width"); |
|
215 |
increaseButton = new MetalScrollButton(orientation, scrollBarWidth, |
increaseButton = new MetalScrollButton(orientation, scrollBarWidth, |
216 |
isFreeStanding); |
isFreeStanding); |
217 |
return increaseButton; |
return increaseButton; |
400 |
} |
} |
401 |
|
|
402 |
// draw the shadow line |
// draw the shadow line |
403 |
UIDefaults def = UIManager.getLookAndFeelDefaults(); |
g.setColor(UIManager.getColor("ScrollBar.shadow")); |
|
g.setColor(def.getColor("ScrollBar.shadow")); |
|
404 |
g.drawLine(x + w, y + 1, x + w, y + h - 1); |
g.drawLine(x + w, y + 1, x + w, y + h - 1); |
405 |
|
|
406 |
} |
} |
452 |
} |
} |
453 |
|
|
454 |
// draw the shadow line |
// draw the shadow line |
455 |
UIDefaults def = UIManager.getLookAndFeelDefaults(); |
g.setColor(UIManager.getColor("ScrollBar.shadow")); |
|
g.setColor(def.getColor("ScrollBar.shadow")); |
|
456 |
g.drawLine(x + 1, y + h, x + w - 2, y + h); |
g.drawLine(x + 1, y + h, x + w - 2, y + h); |
457 |
} |
} |
458 |
|
|