@Override
    protected boolean execute(Widget widget, MouseEvent event) {
        final Widget c = parent != null ? parent : widget;
        switch (event.getID()) {
            case MouseEvent.MOUSE_EXITED:
            case MouseEvent.MOUSE_RELEASED:
                pressedPoint = null;
                initialXOffset = 0;
                initialYOffset = 0;
                break;
            case MouseEvent.MOUSE_PRESSED:
                if (event.getButton() == MouseEvent.BUTTON3) {
                    pressedPoint = widget.isPressed() ? event.getPoint() : null;
                    initialXOffset = c.getXOffset();
                    initialYOffset = c.getYOffset();
                    event.consume();
                    return true;
                }
                return false;
            case MouseEvent.MOUSE_DRAGGED:
                if (pressedPoint == null) {
                    break;
                }
                c.setXOffset(initialXOffset + (event.getX() - pressedPoint.x));
                c.setYOffset(initialYOffset + (event.getY() - pressedPoint.y));
                event.consume();
                c.invalidate();
                return true;
        }
        return false;
    }