private void layout() {
        for (final Entry<Object, PositionAndSize> entry : positionAndSizeMap.entrySet()) {
            final Object key = entry.getKey();
            if (key instanceof TabLayoutConfig) {
                final TabLayoutConfig tabLayoutConfig = (TabLayoutConfig) key;
                TabLayout tabLayout = layoutToWidgetMap.get(tabLayoutConfig);
                if (tabLayout == null) {
                    tabLayout = new TabLayout(eventBus, this, tabManager, tabLayoutConfig, changeHandler);
                    if (tabLayoutConfig.getAllTabCount() > 0) {
                        for (final TabConfig tabConfig : tabLayoutConfig.getTabs()) {
                            if (tabConfig.visible()) {
                                final Component component = components.get(tabConfig.getId());
                                if (component != null) {
                                    tabLayout.addTab(tabConfig, component);
                                }
                            }
                        }

                        // Ensure the tab layout data has a valid tab selection.
                        Integer selectedTab = tabLayoutConfig.getSelected();
                        if (tabLayout.getTabBar().getTabs() == null ||
                                tabLayout.getTabBar().getTabs().size() == 0) {
                            selectedTab = null;
                        } else if (selectedTab == null || selectedTab < 0
                                || selectedTab >= tabLayout.getTabBar().getTabs().size()) {
                            selectedTab = 0;
                        }

                        // Set the selected tab.
                        if (selectedTab != null) {
                            tabLayout.selectTab(selectedTab);
                        }
                        tabLayoutConfig.setSelected(selectedTab);
                    }

                    layoutToWidgetMap.put(tabLayoutConfig, tabLayout);
                }
                setPositionAndSize(tabLayout.getElement(), entry.getValue());
                tabLayout.onResize();

            } else if (key instanceof SplitInfo) {
                final SplitInfo splitInfo = (SplitInfo) key;
                final Splitter splitter = splitToWidgetMap.computeIfAbsent(splitInfo, Splitter::new);
                setPositionAndSize(splitter.getElement(), entry.getValue());
            }
        }
    }
Layout widgets using the positions and sizes stored in the map. Create
new tab layout and split widgets if they have not been created already.
stroom-core-client/src/main/java/stroom/dashboard/client/flexlayout/FlexLayout.java