@Override
    public List<? extends LaidOutComponent> layout(TerminalSize layoutArea) {
        int availableHorizontalSpace = layoutArea.getColumns();
        int availableVerticalSpace = layoutArea.getRows();
        List<LaidOutComponent> finalLayout = new ArrayList<LaidOutComponent>();
        
        synchronized(components) {
            //We'll need this later on
            int topComponentHeight = 0;
            int leftComponentWidth = 0;
            
            //First allocate the top
            if(components.containsKey(TOP)) {
                Component topComponent = components.get(TOP);
                topComponentHeight = Math.min(topComponent.getPreferredSize().getRows(), availableVerticalSpace);
                finalLayout.add(
                        new DefaultLaidOutComponent(
                            topComponent, 
                            new TerminalSize(
                                availableHorizontalSpace, 
                                topComponentHeight),
                            new TerminalPosition(0, 0)));
                availableVerticalSpace -= topComponentHeight;
            }
            
            //Next allocate the bottom
            if(components.containsKey(BOTTOM)) {
                Component bottomComponent = components.get(BOTTOM);
                int bottomComponentHeight = Math.min(bottomComponent.getPreferredSize().getRows(), availableVerticalSpace);
                finalLayout.add(
                        new DefaultLaidOutComponent(
                            bottomComponent, 
                            new TerminalSize(
                                availableHorizontalSpace, 
                                bottomComponentHeight),
                            new TerminalPosition(0, layoutArea.getRows() - bottomComponentHeight)));
                availableVerticalSpace -= bottomComponentHeight;
            }
            
            //Now divide the remaining space between LEFT, CENTER and RIGHT
            if(components.containsKey(LEFT)) {
                Component leftComponent = components.get(LEFT);
                leftComponentWidth = Math.min(leftComponent.getPreferredSize().getColumns(), availableHorizontalSpace);
                finalLayout.add(
                        new DefaultLaidOutComponent(
                            leftComponent, 
                            new TerminalSize(
                                leftComponentWidth, 
                                availableVerticalSpace),
                            new TerminalPosition(0, topComponentHeight)));
                availableHorizontalSpace -= leftComponentWidth;
            }
            if(components.containsKey(RIGHT)) {
                Component rightComponent = components.get(RIGHT);
                int rightComponentWidth = Math.min(rightComponent.getPreferredSize().getColumns(), availableHorizontalSpace);
                finalLayout.add(
                        new DefaultLaidOutComponent(
                            rightComponent, 
                            new TerminalSize(
                                rightComponentWidth, 
                                availableVerticalSpace),
                            new TerminalPosition(layoutArea.getColumns() - rightComponentWidth, topComponentHeight)));
                availableHorizontalSpace -= rightComponentWidth;
            }
            if(components.containsKey(CENTER)) {
                Component centerComponent = components.get(CENTER);
                finalLayout.add(
                        new DefaultLaidOutComponent(
                            centerComponent, 
                            new TerminalSize(
                                availableHorizontalSpace, 
                                availableVerticalSpace),
                            new TerminalPosition(leftComponentWidth, topComponentHeight)));
            }
        }         
        return finalLayout;
    }