Package com.dodo.blog.ui.component.composite

Source Code of com.dodo.blog.ui.component.composite.TwoColumnLayout

package com.dodo.blog.ui.component.composite;

import com.dodo.blog.ui.component.container.Aside;
import com.dodo.blog.ui.component.container.Panel;
import com.dodo.blog.ui.component.meta.Script;
import com.dodo.blog.ui.component.simple.Clearer;

/**
* @author <a href="mailto:pohorelec@comvai.com">Jozef Pohorelec</a>
*/
public class TwoColumnLayout
        extends AbstractLayout
{
    private static final long serialVersionUID = 1L;

    private Aside aside = new Aside();

    private AsideContentPanel asideContent = new AsideContentPanel();

    public TwoColumnLayout()
    {
        // header
        add( head );
        head.add( getStyle() );
        for ( Script script : getHeaderScripts() )
        {
            head.add( script );
        }

        // body
        add( body );
        body.add( header );

        Panel headerContent = new Panel();
        headerContent.setClassName( "header-content" );
        header.add( headerContent );

        headerContent.add( new UserInfoPanel() );
        headerContent.add( new Clearer() );
        headerContent.add( nav );
        headerContent.add( new Clearer() );
        headerContent.add( h1 );

        Panel navPhantom = new Panel();
        navPhantom.setClassName( "aside-phantom" );
        headerContent.add( navPhantom );

        Panel content = new Panel();
        content.setClassName( "content" );
        content.add( section );

        aside.add( asideContent );
        content.add( aside );

        body.add( content );

        footer.add( footerContent );
        body.add( footer );
        for ( Script script : getBodyScripts() )
        {
            body.add( script );
        }
    }

    public Panel getAside()
    {
        return asideContent;
    }
}
TOP

Related Classes of com.dodo.blog.ui.component.composite.TwoColumnLayout

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.