private void adjustSplitSizes() {
        boolean doLayout = false;
        int hSplitterIndex = 0;
        int vSplitterIndex = 0;

        final int offsetWidth = getOffsetWidth();
        final int offsetHeight = getOffsetHeight();

        if (offsetWidth > 0 && offsetHeight > 0) {
            for (int i = 0; i < getWidgetCount(); i++) {
                final Widget widget = getWidget(i);
                if (widget != null && !(widget instanceof Splitter)) {
                    final LayoutData layout = (LayoutData) widget.getLayoutData();
                    double size = layout.size;

                    final double min = 0;
                    double max = size;

                    switch (layout.direction) {
                        case WEST:
                            if (hSplits != null && hSplits.length > hSplitterIndex) {
                                size = (hSplits[hSplitterIndex++] * offsetWidth) - 2;
                                max = getOffsetWidth() - SPLITTER_SIZE;
                            }
                            break;

                        case EAST:
                            if (hSplits != null && hSplits.length > hSplitterIndex) {
                                size = (hSplits[hSplitterIndex++] * offsetWidth) + 2;
                                max = getOffsetWidth() - SPLITTER_SIZE;
                            }
                            break;

                        case NORTH:
                            if (vSplits != null && vSplits.length > vSplitterIndex) {
                                size = (vSplits[vSplitterIndex++] * offsetHeight) - 2;
                                max = getOffsetHeight() - SPLITTER_SIZE;
                            }
                            break;

                        case SOUTH:
                            if (vSplits != null && vSplits.length > vSplitterIndex) {
                                size = (vSplits[vSplitterIndex++] * offsetHeight) + 2;
                                max = getOffsetHeight() - SPLITTER_SIZE;
                            }
                            break;
                    }

                    if (size < min) {
                        size = min;
                    } else if (size > max) {
                        size = max;
                    }

                    // Prevent unnecessary resizing.
                    if (Double.compare(size, layout.size) != 0) {
                        layout.size = size;
                        doLayout = true;
                    }
                }
            }

            // Defer actually updating the layout, so that if we receive many mouse events before
            // layout/paint occurs, we'll only update once.
            if (doLayout) {
                isResizing = true;
                forceLayout();
                isResizing = false;
            }
        }
    }
The element that masks the screen so we can catch mouse events over
iframes.
stroom-core-client-widget/src/main/java/com/google/gwt/user/client/ui/ThinSplitLayoutPanel.java