List of usage examples for com.vaadin.ui Window Window
public Window()
From source file:org.opencms.workplace.tools.git.ui.CmsGitToolOptionsPanel.java
License:Open Source License
/** * Opens a modal window with the given component as content.<p> * * @param component the window content//w w w . j a va 2 s . c o m * * @return the window which is opened */ public Window addAsWindow(Component component) { // Have to use an array because Vaadin declarative tries to bind the field otherwise if (m_currentWindow[0] != null) { m_currentWindow[0].close(); m_currentWindow[0] = null; } Window window = new Window(); window.setContent(component); window.setCaption(CmsVaadinUtils.getMessageText(Messages.GUI_GIT_SCRIPT_RESULTS_0)); window.setWidth("1000px"); window.setModal(true); window.setResizable(false); A_CmsUI.get().addWindow(window); m_currentWindow[0] = window; return window; }
From source file:org.opennms.features.topology.app.internal.operations.HistoryOperation.java
License:Open Source License
@Override public Undoer execute(List<VertexRef> targets, OperationContext operationContext) { UI mainWindow = operationContext.getMainWindow(); CommandManager commandManager = m_commandManager; Window window = new Window(); window.setModal(true);/* w ww . j av a 2 s. c om*/ VerticalLayout layout = new VerticalLayout(); for (Command command : commandManager.getHistoryList()) { layout.addComponent(new Label(command.toString())); } window.setContent(layout); mainWindow.addWindow(window); return null; }
From source file:org.opennms.features.topology.app.internal.TopologyUI.java
License:Open Source License
@Override public void menuBarUpdated(CommandManager commandManager) { if (m_menuBar != null) { m_rootLayout.removeComponent(m_menuBar); }// w w w . ja va 2 s .c o m if (m_contextMenu != null) { m_contextMenu.detach(); } m_menuBar = commandManager.getMenuBar(m_graphContainer, this); m_menuBar.setWidth(100, Unit.PERCENTAGE); // Set expand ratio so that extra space is not allocated to this vertical component if (m_showHeader) { m_rootLayout.addComponent(m_menuBar, 1); } else { m_rootLayout.addComponent(m_menuBar, 0); } m_contextMenu = commandManager .getContextMenu(new DefaultOperationContext(this, m_graphContainer, DisplayLocation.CONTEXTMENU)); m_contextMenu.setAsContextMenuOf(this); // Add Menu Item to share the View with others m_menuBar.addItem("Share", FontAwesome.SHARE, new MenuBar.Command() { @Override public void menuSelected(MenuItem selectedItem) { // create the share link String fragment = getPage().getLocation().getFragment(); String url = getPage().getLocation().toString().replace("#" + getPage().getLocation().getFragment(), ""); String shareLink = String.format("%s?%s=%s", url, TopologyUIRequestHandler.PARAMETER_HISTORY_FRAGMENT, fragment); // Create the Window Window shareWindow = new Window(); shareWindow.setCaption("Share Link"); shareWindow.setModal(true); shareWindow.setClosable(true); shareWindow.setResizable(false); shareWindow.setWidth(400, Unit.PIXELS); TextArea shareLinkField = new TextArea(); shareLinkField.setValue(shareLink); shareLinkField.setReadOnly(true); shareLinkField.setRows(3); shareLinkField.setWidth(100, Unit.PERCENTAGE); // Close Button Button close = new Button("Close"); close.setClickShortcut(ShortcutAction.KeyCode.ESCAPE, null); close.addClickListener(event -> shareWindow.close()); // Layout for Buttons HorizontalLayout buttonLayout = new HorizontalLayout(); buttonLayout.setMargin(true); buttonLayout.setSpacing(true); buttonLayout.setWidth("100%"); buttonLayout.addComponent(close); buttonLayout.setComponentAlignment(close, Alignment.BOTTOM_RIGHT); // Content Layout VerticalLayout verticalLayout = new VerticalLayout(); verticalLayout.setMargin(true); verticalLayout.setSpacing(true); verticalLayout.addComponent( new Label("Please use the following link to share the current view with others.")); verticalLayout.addComponent(shareLinkField); verticalLayout.addComponent(buttonLayout); shareWindow.setContent(verticalLayout); getUI().addWindow(shareWindow); } }); updateMenuItems(); }
From source file:org.opennms.features.topology.app.internal.ui.ToolbarPanel.java
License:Open Source License
public ToolbarPanel(final ToolbarPanelController controller) { addStyleName(Styles.TOOLBAR);// w w w . j a va2 s .c o m this.layoutManager = controller.getLayoutManager(); final Property<Double> scale = controller.getScaleProperty(); final Boolean[] eyeClosed = new Boolean[] { false }; final Button showFocusVerticesBtn = new Button(); showFocusVerticesBtn.setIcon(FontAwesome.EYE); showFocusVerticesBtn.setDescription("Toggle Highlight Focus Nodes"); showFocusVerticesBtn.addClickListener(new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { if (eyeClosed[0]) { showFocusVerticesBtn.setIcon(FontAwesome.EYE); } else { showFocusVerticesBtn.setIcon(FontAwesome.EYE_SLASH); } eyeClosed[0] = !eyeClosed[0]; // toggle controller.toggleHighlightFocus(); } }); final Button magnifyBtn = new Button(); magnifyBtn.setIcon(FontAwesome.PLUS); magnifyBtn.setDescription("Magnify"); magnifyBtn.addClickListener( (Button.ClickListener) event -> scale.setValue(Math.min(1, scale.getValue() + 0.25))); final Button demagnifyBtn = new Button(); demagnifyBtn.setIcon(FontAwesome.MINUS); demagnifyBtn.setDescription("Demagnify"); demagnifyBtn.addClickListener( (Button.ClickListener) event -> scale.setValue(Math.max(0, scale.getValue() - 0.25))); m_szlOutBtn = new Button(); m_szlOutBtn.setId("szlOutBtn"); m_szlOutBtn.setIcon(FontAwesome.ANGLE_DOWN); m_szlOutBtn.setDescription("Decrease Semantic Zoom Level"); m_szlOutBtn.setEnabled(controller.getSemanticZoomLevel() > 0); m_szlOutBtn.addClickListener(new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { int szl = controller.getSemanticZoomLevel(); if (szl > 0) { setSemanticZoomLevel(controller, szl - 1); controller.saveHistory(); } } }); final Button szlInBtn = new Button(); szlInBtn.setId("szlInBtn"); szlInBtn.setIcon(FontAwesome.ANGLE_UP); szlInBtn.setDescription("Increase Semantic Zoom Level"); szlInBtn.addClickListener(new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { setSemanticZoomLevel(controller, controller.getSemanticZoomLevel() + 1); controller.saveHistory(); } }); m_zoomLevelLabel.setId("szlInputLabel"); m_panBtn = new Button(); m_panBtn.setIcon(FontAwesome.ARROWS); m_panBtn.setDescription("Pan Tool"); m_panBtn.addStyleName(Styles.SELECTED); m_selectBtn = new Button(); m_selectBtn.setIcon(IonicIcons.ANDROID_EXPAND); m_selectBtn.setDescription("Selection Tool"); m_selectBtn.setStyleName("toolbar-button"); m_selectBtn.addClickListener(new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { m_selectBtn.addStyleName(Styles.SELECTED); m_panBtn.removeStyleName(Styles.SELECTED); controller.setActiveTool(ActiveTool.select); } }); m_panBtn.addClickListener(new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { m_panBtn.addStyleName(Styles.SELECTED); m_selectBtn.removeStyleName(Styles.SELECTED); controller.setActiveTool(ActiveTool.pan); } }); Button showAllMapBtn = new Button(); showAllMapBtn.setId("showEntireMapBtn"); showAllMapBtn.setIcon(FontAwesome.GLOBE); showAllMapBtn.setDescription("Show Entire Map"); showAllMapBtn.addClickListener((Button.ClickListener) event -> controller.showAllMap()); Button centerSelectionBtn = new Button(); centerSelectionBtn.setIcon(FontAwesome.LOCATION_ARROW); centerSelectionBtn.setDescription("Center On Selection"); centerSelectionBtn.addClickListener((Button.ClickListener) event -> controller.centerMapOnSelection()); Button shareButton = new Button("", FontAwesome.SHARE_SQUARE_O); shareButton.setDescription("Share"); shareButton.addClickListener((x) -> { // Create the share link String fragment = getUI().getPage().getLocation().getFragment(); String url = getUI().getPage().getLocation().toString().replace("#" + fragment, ""); String shareLink = String.format("%s?%s=%s", url, PARAMETER_HISTORY_FRAGMENT, fragment); // Create the Window Window shareWindow = new Window(); shareWindow.setCaption("Share Link"); shareWindow.setModal(true); shareWindow.setClosable(true); shareWindow.setResizable(false); shareWindow.setWidth(400, Sizeable.Unit.PIXELS); TextArea shareLinkField = new TextArea(); shareLinkField.setValue(shareLink); shareLinkField.setReadOnly(true); shareLinkField.setRows(3); shareLinkField.setWidth(100, Sizeable.Unit.PERCENTAGE); // Close Button Button close = new Button("Close"); close.setClickShortcut(ShortcutAction.KeyCode.ESCAPE, null); close.addClickListener(event -> shareWindow.close()); // Layout for Buttons HorizontalLayout buttonLayout = new HorizontalLayout(); buttonLayout.setMargin(true); buttonLayout.setSpacing(true); buttonLayout.setWidth("100%"); buttonLayout.addComponent(close); buttonLayout.setComponentAlignment(close, Alignment.BOTTOM_RIGHT); // Content Layout VerticalLayout verticalLayout = new VerticalLayout(); verticalLayout.setMargin(true); verticalLayout.setSpacing(true); verticalLayout.addComponent( new Label("Please use the following link to share the current view with others.")); verticalLayout.addComponent(shareLinkField); verticalLayout.addComponent(buttonLayout); shareWindow.setContent(verticalLayout); getUI().addWindow(shareWindow); }); // Refresh Button Button refreshButton = new Button(); refreshButton.setId("refreshNow"); refreshButton.setIcon(FontAwesome.REFRESH); refreshButton.setDescription("Refresh Now"); refreshButton.addClickListener((event) -> controller.refreshUI()); // Layer Layout layerLayout = new VerticalLayout(); layerLayout.setId("layerComponent"); layerLayout.setSpacing(true); layerLayout.setMargin(true); // Layer Button layerButton = new Button(); layerButton.setId("layerToggleButton"); layerButton.setIcon(FontAwesome.BARS); layerButton.setDescription("Layers"); layerButton.addClickListener((event) -> { boolean isCollapsed = layerButton.getStyleName().contains(Styles.EXPANDED); setLayerLayoutVisible(!isCollapsed); }); // Save button layerSaveButton = new Button(); layerSaveButton.setId("saveLayerButton"); layerSaveButton.setIcon(FontAwesome.FLOPPY_O); layerSaveButton.addClickListener((event) -> controller.saveLayout()); // Actual Layout for the Toolbar CssLayout contentLayout = new CssLayout(); contentLayout.addStyleName("toolbar-component"); contentLayout.addComponent(createGroup(szlInBtn, m_zoomLevelLabel, m_szlOutBtn)); contentLayout.addComponent( createGroup(refreshButton, centerSelectionBtn, showAllMapBtn, layerButton, showFocusVerticesBtn)); contentLayout.addComponent(createGroup(m_panBtn, m_selectBtn)); contentLayout.addComponent(createGroup(magnifyBtn, demagnifyBtn)); contentLayout.addComponent(createGroup(shareButton)); contentLayout.addComponent(createGroup(layerSaveButton)); // Toolbar addComponent(contentLayout); }
From source file:org.opennms.features.vaadin.app.TopologyWidgetTestApplication.java
License:Open Source License
protected void showHistoryList(List<Command> historyList) { Window window = new Window(); window.setModal(true);/* www . ja va 2 s .c o m*/ for (Command command : historyList) { window.addComponent(new Label(command.toString())); } getMainWindow().addWindow(window); }
From source file:org.semanticsoft.vaaclipse.presentation.renderers.WorkbenchWindowRenderer.java
License:Open Source License
@Override public void createWidget(MUIElement element, MElementContainer<MUIElement> parent) { if (element instanceof MWindow) { final MWindow mWindow = (MWindow) element; Component currentMainWindow = vaadinUI.getContent(); if (element.getTags().contains(Tags.MAIN_WINDOW)) { Panel window = new Panel(); window.setContent(new TrimmedWindowContent()); vaadinUI.getPage().setTitle(mWindow.getLocalizedLabel()); element.setWidget(window);//from w ww. java 2 s . c o m ((MWindow) element).getContext().set(Panel.class, window); window.setSizeFull(); vaadinUI.setContent(window); app.setSelectedElement(mWindow); mWindow.getContext().activate(); } else {// case child windows if (currentMainWindow != null) { Window window = new Window(); window.setContent(new TrimmedWindowContent()); window.setImmediate(true); window.setPositionX(mWindow.getX()); window.setPositionY(mWindow.getY()); window.setWidth(mWindow.getWidth(), Unit.PIXELS); window.setHeight(mWindow.getHeight(), Unit.PIXELS); window.setCaption(mWindow.getLocalizedLabel()); element.setWidget(window); ((MWindow) element).getContext().set(Panel.class, window); vaadinUI.addWindow(window); } else { throw new IllegalStateException( "Can not add child window because application has not main window"); } } IEclipseContext localContext = getContext(element); localContext.set(ISaveHandler.class, new ISaveHandler() { public Save promptToSave(MPart dirtyPart) { // Object[] elements = // promptForSave(Collections.singleton(dirtyPart)); // if (elements == null) { // return Save.CANCEL; // } // return elements.length == 0 ? Save.NO : Save.YES; if (saveCandidate == null) { saveCandidate = dirtyPart; PartRenderer partRenderer = (PartRenderer) saveCandidate.getRenderer(); SavePromptSetup setup = partRenderer.getSavePromptSetup(saveCandidate); String caption = setup.getCaption() != null ? setup.getCaption() : "Save"; String msg = setup.getMessage() != null ? setup.getMessage() : String.format("%s has been modified. Save changes?", saveCandidate instanceof MInputPart ? ((MInputPart) saveCandidate).getInputURI() : "Data"); OptionDialog.show(vaadinUI, caption, msg, new String[] { "Yes", "No", "Cancel" }, 400, 80, Component.UNITS_PIXELS, new OptionDialog.OptionListener() { @Override public void optionSelected(OptionDialog dlg, int optionId) { switch (optionId) { case 0: s = Save.YES; break; case 1: s = Save.NO; break; case 2: s = Save.CANCEL; break; default: s = null; } if (partService.savePart(saveCandidate, true)) { partService.hidePart(saveCandidate); } saveCandidate = null; dlg.close(); } }); return Save.CANCEL; } else { return s; } } public Save[] promptToSave(Collection<MPart> dirtyParts) { // List<MPart> parts = new ArrayList<MPart>(dirtyParts); // // Save[] response = new Save[dirtyParts.size()]; // Object[] elements = promptForSave(parts); // if (elements == null) { // Arrays.fill(response, Save.CANCEL); // } else { // Arrays.fill(response, Save.NO); // for (int i = 0; i < elements.length; i++) { // response[parts.indexOf(elements[i])] = Save.YES; // } // } // return response; throw new RuntimeException("Multiple saving is not implemented yet"); } }); } }
From source file:probe.com.view.body.quantdatasetsoverview.diseasegroupsfilters.DiseaseGroupsListFilter.java
/** * * @param Quant_Central_Manager// w w w .j a v a2 s.c o m */ public DiseaseGroupsListFilter(final QuantCentralManager Quant_Central_Manager) { this.Quant_Central_Manager = Quant_Central_Manager; this.setWidth("450px"); // this.Quant_Central_Manager.registerFilterListener(DiseaseGroupsListFilter.this); // this.updatePatientGroups(Quant_Central_Manager.getFilteredDatasetsList()); // String[] pgArr = merge(patGr1, patGr2); this.patientGroupIFilter = new ListSelectDatasetExplorerFilter(1, "Disease Group I", Quant_Central_Manager.getSelectedHeatMapRows()); initGroupsIFilter(); this.patientGroupIIFilter = new ListSelectDatasetExplorerFilter(2, "Disease Group II", Quant_Central_Manager.getSelectedHeatMapColumns()); initGroupsIIFilter(); diseaseGroupsSet = new LinkedHashSet<String>(); diseaseGroupsSet.addAll(Quant_Central_Manager.getSelectedHeatMapRows()); this.addComponent(patientGroupIIFilter); diseaseGroupsFilterBtn = new Button("Disease Groups"); diseaseGroupsFilterBtn.setStyleName(Reindeer.BUTTON_LINK); diseaseGroupsFilterBtn.addClickListener(DiseaseGroupsListFilter.this); VerticalLayout popupBody = new VerticalLayout(); VerticalLayout filtersConatinerLayout = new VerticalLayout(); filtersConatinerLayout.setSpacing(true); filtersConatinerLayout.setWidth("500px"); filtersConatinerLayout.setHeightUndefined(); popupBody.addComponent(filtersConatinerLayout); HorizontalLayout btnLayout = new HorizontalLayout(); popupBody.addComponent(btnLayout); btnLayout.setSpacing(true); btnLayout.setMargin(new MarginInfo(false, false, true, true)); Button applyFilters = new Button("Apply"); applyFilters.setDescription("Apply the selected filters"); applyFilters.setPrimaryStyleName("resetbtn"); applyFilters.setWidth("50px"); applyFilters.setHeight("24px"); btnLayout.addComponent(applyFilters); applyFilters.addClickListener(new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { popupWindow.close(); } }); Button resetFiltersBtn = new Button("Reset"); resetFiltersBtn.setPrimaryStyleName("resetbtn"); btnLayout.addComponent(resetFiltersBtn); resetFiltersBtn.setWidth("50px"); resetFiltersBtn.setHeight("24px"); resetFiltersBtn.setDescription("Reset all applied filters"); resetFiltersBtn.addClickListener(new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { Quant_Central_Manager.resetFiltersListener(); } }); popupWindow = new Window() { @Override public void close() { if (updateManager) { updateSelectionManager(studiesIndexes); } popupWindow.setVisible(false); } }; popupWindow.setContent(popupBody); popupWindow.setWindowMode(WindowMode.NORMAL); popupWindow.setWidth((540) + "px"); popupWindow.setHeight((500) + "px"); popupWindow.setVisible(false); popupWindow.setResizable(false); popupWindow.setClosable(false); popupWindow.setStyleName(Reindeer.WINDOW_LIGHT); popupWindow.setModal(true); popupWindow.setDraggable(false); popupWindow.center(); popupWindow.setCaption( "<font color='gray' style='font-weight: bold;!important'> Disease Groups Comparisons</font>"); UI.getCurrent().addWindow(popupWindow); popupWindow.center(); popupWindow.setCaptionAsHtml(true); popupWindow.setClosable(true); this.setHeightUndefined(); filtersConatinerLayout.addComponent(DiseaseGroupsListFilter.this); filtersConatinerLayout.setComponentAlignment(DiseaseGroupsListFilter.this, Alignment.BOTTOM_CENTER); // Quant_Central_Manager.setSelectedHeatMapRows(selectedRows); // Quant_Central_Manager.setSelectedHeatMapColumns(selectedColumns); }
From source file:probe.com.view.body.quantdatasetsoverview.diseasegroupsfilters.GroupSwichBtn.java
public GroupSwichBtn(final QuantCentralManager Quant_Central_Manager, List<QuantProtein> searchQuantificationProtList) { this.Quant_Central_Manager = Quant_Central_Manager; this.searchQuantificationProtList = searchQuantificationProtList; updatedComparisonList = new ArrayList<QuantDiseaseGroupsComparison>(); this.setWidth("24px"); this.setHeight("24px"); this.setDescription("Switch protein groups"); this.addLayoutClickListener(new LayoutEvents.LayoutClickListener() { @Override/*w ww . j a v a 2s .co m*/ public void layoutClick(LayoutEvents.LayoutClickEvent event) { updateSelectionList(); popupWindow.setVisible(true); } }); this.setStyleName("switchicon"); popupBody = new VerticalLayout(); popupBody.setHeightUndefined(); popupBody.setStyleName(Reindeer.LAYOUT_WHITE); popupWindow = new Window() { @Override public void close() { popupWindow.setVisible(false); Quant_Central_Manager.setDiseaseGroupsComparisonSelection( new LinkedHashSet<QuantDiseaseGroupsComparison>(updatedComparisonList)); } }; popupWindow.setCaption( "<font color='gray' style='font-weight: bold;!important'> Switch disease groups</font>"); popupWindow.setContent(popupBody); popupWindow.setWindowMode(WindowMode.NORMAL); popupWindow.setVisible(false); popupWindow.setResizable(false); popupWindow.setStyleName(Reindeer.WINDOW_LIGHT); popupWindow.setModal(true); popupWindow.setDraggable(true); UI.getCurrent().addWindow(popupWindow); // popupWindow.center(); // popupWindow.setPositionX(popupWindow.getPositionX()); popupWindow.setPositionY(100); popupWindow.setCaptionAsHtml(true); popupWindow.setClosable(true); popupBody.setMargin(true); popupBody.setSpacing(true); //init table table = new GridLayout(); table.setStyleName("switchtable"); table.setWidth("100%"); table.setSpacing(true); table.setColumns(3); table.setRows(1000); table.setHeightUndefined(); table.setHideEmptyRowsAndColumns(true); table.setMargin(new MarginInfo(false, false, true, false)); headerI = new Label("<center><b>Numerator</b></center>"); headerI.setWidth("100%"); headerI.setContentMode(ContentMode.HTML); headerII = new Label("<center><b>Denominator</b></center>"); headerII.setContentMode(ContentMode.HTML); headerII.setWidth("100%"); // comparisonList = new OptionGroup(null); // // comparisonList.setMultiSelect(true); // comparisonList.setNullSelectionAllowed(true); // comparisonList.setHtmlContentAllowed(true); // comparisonList.setImmediate(true); // comparisonList.setWidth("80%"); // comparisonList.setHeight("80%"); popupBody.addComponent(table); Button applyFilters = new Button("Apply"); applyFilters.setDescription("Apply the selected filters"); applyFilters.setPrimaryStyleName("resetbtn"); applyFilters.setWidth("76px"); applyFilters.setHeight("24px"); // popupBody.addComponent(applyFilters); // popupBody.setComponentAlignment(applyFilters, Alignment.TOP_RIGHT); applyFilters.addClickListener(new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { popupWindow.close(); } }); btnWrapper = new HorizontalLayout(); btnWrapper.setWidth("100%"); btnWrapper.setHeight("50px"); btnWrapper.addComponent(applyFilters); btnWrapper.setComponentAlignment(applyFilters, Alignment.BOTTOM_CENTER); table.addLayoutClickListener(GroupSwichBtn.this); }
From source file:probe.com.view.body.quantdatasetsoverview.diseasegroupsfilters.PopupInteractiveDSFiltersLayout.java
/** * * @param interactivePieChartFiltersContainerLayout */// ww w. jav a 2 s . c o m public PopupInteractiveDSFiltersLayout( final StudiesPieChartFiltersContainerLayout interactivePieChartFiltersContainerLayout) { VerticalLayout datasetExplorerFiltersIcon = new VerticalLayout(); // datasetExplorerFiltersIcon.setWidth("45px"); // datasetExplorerFiltersIcon.setHeight("24px"); // Label btnTitle = new Label("Studies"); // datasetExplorerFiltersIcon.addComponent(btnTitle); datasetExplorerFiltersIcon.setStyleName("studyexplorer"); datasetExplorerFiltersIcon.setDescription("Dataset expolorer filter"); this.addComponent(datasetExplorerFiltersIcon); this.setComponentAlignment(datasetExplorerFiltersIcon, Alignment.BOTTOM_LEFT); datasetExplorerFiltersIcon.addLayoutClickListener(PopupInteractiveDSFiltersLayout.this); this.setHeightUndefined(); int height = Page.getCurrent().getBrowserWindowHeight() - 100; int width = Page.getCurrent().getBrowserWindowWidth() - 100; VerticalLayout popupBody = new VerticalLayout(); popupBody.setWidth((width) + "px"); popupBody.setHeightUndefined(); popupBody.setStyleName(Reindeer.LAYOUT_WHITE); this.interactivePieChartFiltersContainerLayout = interactivePieChartFiltersContainerLayout; popupWindow = new Window() { @Override public void close() { interactivePieChartFiltersContainerLayout.updateSelectionManager(true); popupWindow.setVisible(false); } }; popupWindow.setContent(popupBody); popupWindow.setWindowMode(WindowMode.NORMAL); popupWindow.setWidth((width + 40) + "px"); popupWindow.setHeight((height) + "px"); popupWindow.setVisible(false); popupWindow.setResizable(false); popupWindow.setClosable(false); popupWindow.setStyleName(Reindeer.WINDOW_LIGHT); popupWindow.setModal(true); popupWindow.setDraggable(false); popupWindow.center(); popupWindow.setCaption( "<font color='gray' style='font-weight: bold;!important'> Dataset Explorer Filters</font>"); UI.getCurrent().addWindow(popupWindow); popupWindow.setPositionX(30); popupWindow.setPositionY(40); popupWindow.setCaptionAsHtml(true); popupWindow.setClosable(true); popupBody.setMargin(true); popupBody.setSpacing(true); popupBody.addComponent(interactivePieChartFiltersContainerLayout); }
From source file:probe.com.view.body.quantdatasetsoverview.diseasegroupsfilters.PopupRecombineDiseaseGroups.java
public PopupRecombineDiseaseGroups(QuantCentralManager Quant_Central_Manager) { // super(" "); this.diseaseStyleMap = Quant_Central_Manager.getDiseaseStyleMap(); default_DiseaseCat_DiseaseGroupMap = new LinkedHashMap<String, Map<String, String>>( Quant_Central_Manager.getDefault_DiseaseCat_DiseaseGroupMap()); this.setStyleName("merge"); this.setDescription("Recombine disease groups"); this.Quant_Central_Manager = Quant_Central_Manager; captionAstrMap = new HashMap<String, Integer>(); this.addLayoutClickListener(PopupRecombineDiseaseGroups.this); this.popupBodyLayout = new VerticalLayout(); VerticalLayout windowLayout = new VerticalLayout(); popupWindow = new Window() { @Override/* w ww . j a v a 2 s. c o m*/ public void close() { popupWindow.setVisible(false); } }; popupWindow.setContent(windowLayout); windowLayout.addComponent(popupBodyLayout); windowLayout.setComponentAlignment(popupBodyLayout, Alignment.MIDDLE_CENTER); popupWindow.setVisible(false); popupWindow.setResizable(false); popupWindow.setClosable(true); popupWindow.setStyleName(Reindeer.WINDOW_LIGHT); popupWindow.setModal(true); popupWindow.setDraggable(false); popupWindow.setCaption( "<font color='gray' style='font-weight: bold;!important'> Recombine Disease Groups</font>"); popupWindow.setCaptionAsHtml(true); popupBodyLayout.setStyleName(Reindeer.LAYOUT_WHITE); popupBodyLayout.setHeightUndefined();//(h - 50) + "px"); popupWindow.setWindowMode(WindowMode.NORMAL); diseaseTypeSelectionList = new NativeSelect(); this.initPopupLayout(); UI.getCurrent().addWindow(popupWindow); popupWindow.center(); }