package sgwtlayouttest.client;

import com.google.gwt.core.client.EntryPoint;
import com.smartgwt.client.types.Side;
import com.smartgwt.client.widgets.layout.VLayout;
import com.smartgwt.client.widgets.tab.Tab;
import com.smartgwt.client.widgets.tab.TabSet;

/**
 * Entry point classes define <code>onModuleLoad()</code>.
 */
public class SmartGWTLayoutTest implements EntryPoint {

    VLayout mainLayout;
    TabSet mainTabSet;
    
    /**
     * This is the entry point method.
     */
    public void onModuleLoad() {
        mainLayout = new VLayout();
        mainLayout.setWidth100();
        mainLayout.setHeight100();

        mainTabSet = new TabSet();
        mainTabSet.setWidth100();
        mainTabSet.setHeight("*");
        mainTabSet.setTabBarPosition(Side.TOP);

        for (int i = 0; i < 2; i++) {
            Tab summaryTab = new Tab("Tab " + i);
            SummaryPanel summaryPanel = new SummaryPanel();
            summaryTab.setPane(summaryPanel);
            mainTabSet.addTab(summaryTab);
        }
        
        mainLayout.addMember(mainTabSet);

        mainLayout.draw();
        
    }
}
