Sharemedia
Smooth Scrolling for the Nebula Gallery widget

This week end, I added Smooth Scrolling for the Gallery view of ShareMedia. This is implemented using a simple class which captures the mouse wheel event and replace the standard behavior by a nice smooth movement (duration can be changed easily).

(Planeteclipse readers : video is not displayed there, just click on the title of the post to go to my blog)


ScrollingSmoother s = new ScrollingSmoother();
s.smoothControl( anyScrollableControl );

Currently, this only works on the Nebula Gallery Widget (maybe others), because fake events which are generated do not include all data required by standard SWT controls. The next step is to handle any scrollable control, and smooth scrolling even if scrollbars are used.

This class can be found here.
This is only a POC, the code is horrible but will be cleaned up soon.

UPDATE : this class currently work with the following widgets :
Shell
Canvas
StyledText

NOT working :
Tree
Table
Text

BTW : ShareMedia 0.3.1 is finally released, download it on sourceforge