package sgwtlayouttest.client;

import com.smartgwt.client.types.Overflow;
import com.smartgwt.client.types.VisibilityMode;
import com.smartgwt.client.widgets.layout.SectionStack;
import com.smartgwt.client.widgets.layout.SectionStackSection;
import com.smartgwt.client.widgets.layout.VStack;

public class SummaryPanel extends VStack {

    public SummaryPanel() {
        this.setWidth100();
        this.setMargin(0);
        this.setMembersMargin(7);
        
        final SectionStack sectionStack = new SectionStack();
        sectionStack.setVisibilityMode(VisibilityMode.MULTIPLE);
        sectionStack.setWidth("100%");
        
        sectionStack.setCanReorderSections(true);  
        sectionStack.setCanResizeSections(false); 
        
        sectionStack.setOverflow(Overflow.VISIBLE);  
        this.addMember(sectionStack);

        for (int i = 0; i < 6; i++) {
            SummaryGrid grid = new SummaryGrid();
            
            SectionStackSection section1 = new SectionStackSection("Section " + i);
            section1.setExpanded(true);
            section1.addItem(grid);
            sectionStack.addSection(section1);
        }
    }


}
