private void continueDragging(final MouseMoveEvent event) {
        if (dragging) {
            final int x = event.getClientX();
            final int y = event.getClientY();
            double dx = x - dragStartX;
            double dy = y - dragStartY;

            double left = dragStartWindow.getLeft() + dx;
            double top = dragStartWindow.getTop() + dy;

            // Add some constraints to stop the dialog being moved off screen.
            //            left = Math.max(0, Math.min(Window.getClientWidth() - getOffsetWidth(), left));
            //            top = Math.max(0, Math.min(Window.getClientHeight() - getOffsetHeight(), top));
            left = Math.max(0, Math.min(Window.getClientWidth() - 22, left));
            top = Math.max(0, Math.min(Window.getClientHeight() - 22, top));

            setPopupPosition((int) left, (int) top);
        }
    }
Called on mouse move in the caption area, continues dragging if it was
started by {@link #beginDragging}.

@param event the mouse move event that continues dragging
@see #beginDragging
@see #endDragging
stroom-core-client-widget/src/main/java/stroom/widget/popup/client/view/Dialog.java