private void createViewDSInfoPanel() { BorderLayoutData data = new BorderLayoutData(Style.LayoutRegion.EAST, 475, 100, 750); data.setMargins(new Margins(1, 1, 1, 5)); data.setCollapsible(true); viewDsInfoPanel = new ContentPanel(); viewDsInfoPanel.setLayout(new CenterLayout()); viewDsInfoPanel.setLayoutOnChange(true); // filterPanel.setAnimCollapse(true); viewDsInfoPanel.setId("eastPanel"); viewDsInfoPanel.setBodyBorder(false); viewDsInfoPanel.setIcon(HarvesterUI.ICONS.view_info_icon()); viewDsInfoPanel.setHeading(HarvesterUI.CONSTANTS.viewDataSetInformation()); LabelToolItem noDsSelectedLabel = new LabelToolItem(HarvesterUI.CONSTANTS.noDataSetSelected()); noDsSelectedLabel.setStyleName("noDataSetSelected"); viewDsInfoPanel.add(noDsSelectedLabel); mainBorderLayout.addListener( Events.Expand, new Listener<BorderLayoutEvent>() { @Override public void handleEvent(BorderLayoutEvent be) { if (be.getRegion().equals(Style.LayoutRegion.EAST)) setOnExpandDataSet(); } }); mainGridPanel.add(viewDsInfoPanel, data); }
@Inject public ProjectIndicatorsContainer( ProjectSiteGridPanel siteEditor, SiteMap siteMap, final DesignPanel designPanel, Dispatcher service, EventBus eventBus) { this.siteEditor = siteEditor; this.siteMap = siteMap; this.designPanel = designPanel; this.service = service; this.eventBus = eventBus; BorderLayout borderLayout = new BorderLayout(); borderLayout.setContainerStyle("x-border-layout-ct main-background"); setLayout(borderLayout); ContentPanel mainPanel = new ContentPanel(); mainPanel.setIcon(null); mainPanel.setLayout(new FitLayout()); mainPanel.setSize(600, 300); // setIcon(IconImageBundle.ICONS.design()); // map tab panel tabPanel = new TabPanel(); tabPanel.setPlain(true); // map tab item mapTabItem = new TabItem("map"); mapTabItem.setLayout(new FitLayout()); mapTabItem.setEnabled(false); mapTabItem.setAutoHeight(true); mapTabItem.setEnabled(true); mapTabItem.add(siteMap); tabPanel.add(mapTabItem); // sites tab item sitesTabItem = new TabItem("sites"); sitesTabItem.setLayout(new FitLayout()); sitesTabItem.setEnabled(false); sitesTabItem.setAutoHeight(true); sitesTabItem.setEnabled(true); sitesTabItem.add(siteEditor); tabPanel.add(sitesTabItem); // buttons for indicator view newIndicatorButton = new Button("new indicator"); newGroupButton = new Button("new group"); reloadButton = new Button("reload button"); mainPanel.add(newIndicatorButton); mainPanel.add(newGroupButton); mainPanel.add(reloadButton); BorderLayoutData centerLayout = new BorderLayoutData(Style.LayoutRegion.CENTER); centerLayout.setMargins(new Margins(0, 0, 0, 0)); centerLayout.setSplit(true); centerLayout.setCollapsible(true); BorderLayoutData layout = new BorderLayoutData(Style.LayoutRegion.EAST); layout.setSplit(true); layout.setCollapsible(true); layout.setSize(375); layout.setMargins(new Margins(0, 0, 0, 5)); add(designPanel, centerLayout); designPanel .getMappedIndicator() .addValueChangeHandler( new ValueChangeHandler<IndicatorDTO>() { @Override public void onValueChange(ValueChangeEvent<IndicatorDTO> event) { onMappedIndicatorChanged(event.getValue()); } }); add(tabPanel, layout); // setHeading(I18N.CONSTANTS.design() + " - " ); siteEditor.addActionListener( new Listener<ComponentEvent>() { @Override public void handleEvent(ComponentEvent be) { if (UIActions.add.equals(be.getComponent().getItemId())) { addSite(); } } }); }