233 |
{ |
{ |
234 |
if (block) |
if (block) |
235 |
{ |
{ |
236 |
// Only need to check it if it's block scrolling |
// Only need to check it if it's block scrolling |
237 |
// We only block scroll if the click occurs |
// We only block scroll if the click occurs |
238 |
// in the track. |
// in the track. |
239 |
if (! trackListener.shouldScroll(direction)) |
if (!trackListener.shouldScroll(direction)) |
240 |
{ |
{ |
241 |
trackHighlight = NO_HIGHLIGHT; |
trackHighlight = NO_HIGHLIGHT; |
242 |
scrollbar.repaint(); |
scrollbar.repaint(); |
243 |
return; |
return; |
244 |
} |
} |
245 |
scrollByBlock(direction); |
scrollByBlock(direction); |
246 |
} |
} |
247 |
else |
else |
248 |
scrollByUnit(direction); |
scrollByUnit(direction); |
249 |
} |
} |
250 |
} |
} |
251 |
|
|
873 |
trackRect = new Rectangle(); |
trackRect = new Rectangle(); |
874 |
thumbRect = new Rectangle(); |
thumbRect = new Rectangle(); |
875 |
|
|
876 |
scrollTimer = new Timer(200, null); |
scrollTimer = new Timer(50, null); |
877 |
scrollTimer.setRepeats(true); |
scrollTimer.setRepeats(true); |
878 |
|
|
879 |
installComponents(); |
installComponents(); |