On Mon, 2006-03-20 at 10:20 +0100, Roman Kennke wrote: > The units must stay the same (like one row for a JTable, one > line of text in JTextComponent and so on). This is because a single > click on a scollbar button scrolls the thing for exactly one unit. Only > the MouseWheelListener should multiply the unit by 3 to provide the > wheel scrolling behaviour of 3 lines per wheel move.
I looked a bit around how other toolkits do this. And 3 seems to be some magic number. But no really good explanations of why. The best discussion I could find for determining scroll increments was in gnome bugzilla: http://bugzilla.gnome.org/show_bug.cgi?id=89259 The bug report is actually about making the step amount configurable which it currently isn't in gtk+. If it was then we could add that to the MouseWheelEvent which currently has a hardcoded value of 1 for the scrollAmount property and we could derive a scroll amount for various components from that for different user settings. Cheers, Mark
signature.asc
Description: This is a digitally signed message part
