This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 38139 - Mousewheel scrolls editor 3x as fast as system default setting
Summary: Mousewheel scrolls editor 3x as fast as system default setting
Alias: None
Product: platform
Classification: Unclassified
Component: Text (show other bugs)
Version: 3.x
Hardware: PC Windows XP
: P4 blocker (vote)
Assignee: Petr Nejedly
Depends on:
Reported: 2003-12-16 02:56 UTC by univerz
Modified: 2008-12-22 20:40 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:

patch for mouse wheel scroll in the editor (2.72 KB, patch)
2005-09-24 11:43 UTC, ndario
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description univerz 2003-12-16 02:56:43 UTC
Scroll mouse in the editor,It sroll 3 times fast
as the system default setting.

e.g:If the OS setting is scroll 2 lines every
time, the editor will scroll 6 lines every time,
there should be a configuration for this, or to
set as the system setting.
Comment 1 Miloslav Metelka 2004-01-23 17:02:32 UTC
We should be able to resolve this into 3.6. Assigning to Dusan for
Comment 2 Martin Roskanin 2004-01-23 17:18:01 UTC
The scrolling is dependant on viewport height. If you enlarge editor
window to different heights, you get different scrolling steps after
mouse wheel scroll events or after clicking on the arrow of vertical
scroll bar
Comment 3 Dusan Balek 2004-02-09 10:19:51 UTC
Scroll increments are determined by the
Scollable.getScrollableUnitIncrement(...) method.

The default implementation of this method (implemented in
JTextComponent) is to simply return 10% of the visible area.
However, subclasses can provide much more reasonable values.

It is probably question to UI whether our QuietEditorPane should
override this method to return something else (e.g. a row height
similarly to JTextArea, etc.)
Comment 4 Dusan Balek 2004-02-09 10:24:17 UTC
Reassigning to openide/editor maintaining QuietEditorPane.
Comment 5 Petr Nejedly 2004-02-10 13:11:33 UTC
Not that important for 3.6. Sorry.
Comment 6 Petr Nejedly 2005-09-20 10:07:52 UTC
The solution is known and quite simple. Let's fix this for 5.0
Comment 7 ndario 2005-09-24 11:43:20 UTC
Created attachment 25140 [details]
patch for mouse wheel scroll in the editor
Comment 8 ndario 2005-09-24 11:46:08 UTC
there is patch attched which fixes this issue.
it overrides getScrollableUnitIncrement(...) method and returns row height for
horizontal, and char width for verical scrolls (like it is implemented in JTextArea)
it also caches scroll values thus avoids calculating scroll units each time
mouse wheel is moved.
construcor adds listener which reacts to font changes and adjust scroll untis.
Comment 9 Petr Nejedly 2005-10-04 14:45:33 UTC
Implemented (slightly different patch):