use of org.activityinfo.ui.client.page.entry.column.DefaultColumnModelProvider 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(createNewInterfaceLink(), new BorderLayoutData(LayoutRegion.NORTH, 30));
center.add(gridPanel, new BorderLayoutData(LayoutRegion.CENTER));
gridPanel.addSelectionChangedListener(new SelectionChangedListener<SiteDTO>() {
@Override
public void selectionChanged(SelectionChangedEvent<SiteDTO> se) {
onSiteSelected(se);
}
});
gridPanel.addRowDoubleClickListener(new SelectionChangedListener<SiteDTO>() {
@Override
public void selectionChanged(SelectionChangedEvent<SiteDTO> se) {
editSite(se.getSelectedItem());
}
});
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(resourceLocator);
tabPanel = new CollapsibleTabPanel();
tabPanel.add(detailTab);
tabPanel.add(monthlyTab);
tabPanel.add(attachmentsTab);
tabPanel.add(siteHistoryTab);
tabPanel.setSelection(detailTab);
center.add(tabPanel, tabPanel.getBorderLayoutData());
onNoSelection();
add(center, new BorderLayoutData(LayoutRegion.CENTER));
}
Aggregations