about my opensource eclipse java applications recently i'm studying GWT and Android

Monday, August 08, 2005

Scroll ScrollPane by MouseWheel [Draw2D]

Create class implement SelectionListener and write that.

public class WheelMove implements SelectionListener{

public void widgetSelected(SelectionEvent arg0) {
ScrollBar bar=scrollpane.getHorizontalScrollBar();
int direction=1;//16777218

public void widgetDefaultSelected(SelectionEvent arg0) {

and get Real ScrollBar of FigureCanvas and add a addSelectionListener.

FigureCanvas canvas = new FigureCanvas(shell);
canvas.getVerticalBar().addSelectionListener(new WheelMove());


Change isOpaque() of ScrollPane [Draw2D]

Finaly,I upload sample codes to cvs.
see here

I'm sorry,I don't have any way to know other platform results.
So I guess sometime on non-windows platrom it's didn't work correctly.

isOpaque methods of Scrollpane return always true.
but if you don't like it,overwrite it.

public class NoOpaqueScrollPane extends ScrollPane{
public boolean isOpaque(){
return false;