88 Scrollbar sb = (Scrollbar)target; |
88 Scrollbar sb = (Scrollbar)target; |
89 return (sb.getOrientation() == Scrollbar.VERTICAL) |
89 return (sb.getOrientation() == Scrollbar.VERTICAL) |
90 ? new Dimension(getDefaultDimension(), DEFAULT_LENGTH) |
90 ? new Dimension(getDefaultDimension(), DEFAULT_LENGTH) |
91 : new Dimension(DEFAULT_LENGTH, getDefaultDimension()); |
91 : new Dimension(DEFAULT_LENGTH, getDefaultDimension()); |
92 } |
92 } |
93 |
|
94 public void repaint() { |
|
95 Graphics g = getGraphics(); |
|
96 if (g != null) paint(g); |
|
97 } |
|
98 |
|
99 /** |
93 /** |
100 * Paint the scrollbar. |
94 * Paint the scrollbar. |
101 */ |
95 */ |
102 public void paint(Graphics g) { |
96 @Override |
103 Scrollbar sb = (Scrollbar)target; |
97 void paintPeer(final Graphics g) { |
104 Color colors[] = getGUIcolors(); |
98 final Color[] colors = getGUIcolors(); |
105 g.setColor(colors[BACKGROUND_COLOR]); |
99 g.setColor(colors[BACKGROUND_COLOR]); |
106 tsb.paint(g, colors, true); |
100 tsb.paint(g, colors, true); |
107 // paint the whole scrollbar |
101 // paint the whole scrollbar |
108 } |
102 } |
109 |
103 |