private void highlightMouseTarget(final MouseTarget mouseTarget) {
        setMoveCursor();
        if (mouseTarget == null) {
            hideMarker();

        } else if (mouseTarget.tabWidget != null) {
            final Element tabElement = mouseTarget.tabWidget.getElement();

            switch (mouseTarget.pos) {
                case TAB:
                    showMarker(ElementUtil.getClientLeft(tabElement),
                            ElementUtil.getClientTop(tabElement),
                            5,
                            tabElement.getOffsetHeight());
                    marker.getElement().addClassName("flexLayout-marker-tab");
                    break;
                case AFTER_TAB:
                    showMarker(ElementUtil.getClientLeft(tabElement) +
                                    ElementUtil.getSubPixelOffsetWidth(tabElement) +
                                    4,
                            ElementUtil.getClientTop(tabElement),
                            5,
                            tabElement.getOffsetHeight());
                    marker.getElement().addClassName("flexLayout-marker-tab");
                    break;
                default:
                    hideMarker();
                    break;
            }

        } else {
            final PositionAndSize positionAndSize = mouseTarget.positionAndSize;
            final double width = positionAndSize.getWidth();
            final double height = positionAndSize.getHeight();
            final double left = ElementUtil.getClientLeft(designSurfaceElement) + positionAndSize.getLeft();
            final double top = ElementUtil.getClientTop(designSurfaceElement) + positionAndSize.getTop();
            final double halfWidth = width / 2D;
            final double halfHeight = height / 2D;

            switch (mouseTarget.pos) {
                case CENTER:
                    showMarker(left, top, width, height);
                    break;
                case LEFT:
                    showMarker(left, top, halfWidth, height);
                    break;
                case RIGHT:
                    showMarker(left + halfWidth, top, halfWidth, height);
                    break;
                case TOP:
                    showMarker(left, top, width, halfHeight);
                    break;
                case BOTTOM:
                    showMarker(left, top + halfHeight, width, halfHeight);
                    break;
                default:
                    hideMarker();
                    break;
            }
        }
    }
Tests the supplied layout to see if it is the current mouse target and
returns mouse target if it is.

@param x               The mouse x coordinate.
@param y               The mouse y coordinate.
@param splitter        True if the layout is a splitter. Splitters are targeted
                       outside their rect.
@param layoutConfig    The layout data to test to see if it is a target.
@param positionAndSize The position and size of the layout being tested.
@return The mouse target if the tested layout is the target, else null.
stroom-core-client/src/main/java/stroom/dashboard/client/flexlayout/FlexLayout.java