private void setupMouseListener( final IMouseListener mouseListener ) {
        addMouseMotionListener( new MouseMotionAdapter() {
            public void mouseDragged( MouseEvent e ) {
                Point p = e.getPoint();

                onFakeMove( p );
            }

            public void mouseMoved( MouseEvent e ) {
                Point p = e.getPoint();

                mouseListener.onMove( p.x, p.y );
            }

            public void onFakeMove( Point p ) {
                mouseListener.onMove( p.x, p.y );
            }
        } );

        addMouseListener( new MouseAdapter() {
            public void mousePressed( MouseEvent e ) {
                if ( e.getButton() == 1 ) {
                    mouseListener.onLeftDown( e.getPoint().x, e.getPoint().y );
                }
                else if ( e.getButton() == 2 ) {
                    mouseListener.onMiddleDown( e.getPoint().x, e.getPoint().y );
                }
                else if ( e.getButton() == 3 ) {
                    mouseListener.onRightDown( e.getPoint().x, e.getPoint().y );
                }
            }

            public void mouseReleased( MouseEvent e ) {
                if ( e.getButton() == 1 ) {
                    mouseListener.onLeftUp( e.getPoint().x, e.getPoint().y );
                }
                else if ( e.getButton() == 2 ) {
                    mouseListener.onMiddleUp( e.getPoint().x, e.getPoint().y );
                }
                else if ( e.getButton() == 3 ) {
                    mouseListener.onRightUp( e.getPoint().x, e.getPoint().y );
                }
            }
        } );

        addMouseWheelListener( new MouseWheelListener() {
            public void mouseWheelMoved( MouseWheelEvent e ) {
                if ( e.getWheelRotation() > 0 ) {
                    // scroll down
                    mouseListener.onScrollDown( e.getPoint().x, e.getPoint().y );
                }
                else {
                    mouseListener.onScrollUp( e.getPoint().x, e.getPoint().y );
                }
            }
        } );
    }