Search in sources :

Example 1 with TabItem

use of com.extjs.gxt.ui.client.widget.TabItem in project activityinfo by bedatadriven.

the class DataEntryPage method addCenter.

private void addCenter() {
    gridPanel = new SiteGridPanel(dispatcher, new DefaultColumnModelProvider(dispatcher));
    gridPanel.setTopComponent(createToolBar());
    LayoutContainer center = new LayoutContainer();
    center.setLayout(new BorderLayout());
    center.add(gridPanel, new BorderLayoutData(LayoutRegion.CENTER));
    gridPanel.addSelectionChangedListener(new SelectionChangedListener<SiteDTO>() {

        @Override
        public void selectionChanged(SelectionChangedEvent<SiteDTO> se) {
            onSiteSelected(se);
        }
    });
    detailTab = new DetailTab(dispatcher);
    monthlyPanel = new MonthlyReportsPanel(dispatcher);
    monthlyTab = new TabItem(I18N.CONSTANTS.monthlyReports());
    monthlyTab.setLayout(new FitLayout());
    monthlyTab.add(monthlyPanel);
    attachmentsTab = new AttachmentsTab(dispatcher, eventBus);
    siteHistoryTab = new SiteHistoryTab(dispatcher);
    tabPanel = new CollapsibleTabPanel();
    tabPanel.add(detailTab);
    tabPanel.add(monthlyTab);
    tabPanel.add(attachmentsTab);
    tabPanel.add(siteHistoryTab);
    tabPanel.setSelection(detailTab);
    center.add(tabPanel, tabPanel.getBorderLayoutData());
    add(center, new BorderLayoutData(LayoutRegion.CENTER));
}
Also used : BorderLayoutData(com.extjs.gxt.ui.client.widget.layout.BorderLayoutData) DefaultColumnModelProvider(org.activityinfo.client.page.entry.column.DefaultColumnModelProvider) TabItem(com.extjs.gxt.ui.client.widget.TabItem) SiteHistoryTab(org.activityinfo.client.page.entry.sitehistory.SiteHistoryTab) BorderLayout(com.extjs.gxt.ui.client.widget.layout.BorderLayout) LayoutContainer(com.extjs.gxt.ui.client.widget.LayoutContainer) SiteDTO(org.activityinfo.shared.dto.SiteDTO) CollapsibleTabPanel(org.activityinfo.client.widget.CollapsibleTabPanel) FitLayout(com.extjs.gxt.ui.client.widget.layout.FitLayout)

Aggregations

LayoutContainer (com.extjs.gxt.ui.client.widget.LayoutContainer)1 TabItem (com.extjs.gxt.ui.client.widget.TabItem)1 BorderLayout (com.extjs.gxt.ui.client.widget.layout.BorderLayout)1 BorderLayoutData (com.extjs.gxt.ui.client.widget.layout.BorderLayoutData)1 FitLayout (com.extjs.gxt.ui.client.widget.layout.FitLayout)1 DefaultColumnModelProvider (org.activityinfo.client.page.entry.column.DefaultColumnModelProvider)1 SiteHistoryTab (org.activityinfo.client.page.entry.sitehistory.SiteHistoryTab)1 CollapsibleTabPanel (org.activityinfo.client.widget.CollapsibleTabPanel)1 SiteDTO (org.activityinfo.shared.dto.SiteDTO)1