use of org.activityinfo.client.widget.CollapsibleTabPanel 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));
}
Aggregations