List of usage examples for com.vaadin.ui BrowserFrame setHeight
@Override public void setHeight(String height)
From source file:org.geant.sat.ui.MainView.java
License:BSD License
/** {@inheritDocs}. */ @SuppressWarnings("rawtypes") @Override/* ww w . ja v a2s . c om*/ public void enter(ViewChangeEvent event) { if (MENU_ENTITIES.equals(event.getParameters())) { workPanel.setContent(new EntityListViewer((MainUI) getUI())); return; } if (MENU_SURVEYS.equals(event.getParameters())) { workPanel.setContent(new SurveyViewer((MainUI) getUI())); return; } if (MENU_USERS.equals(event.getParameters())) { workPanel.setContent(new UserListViewer((MainUI) getUI())); return; } if (MENU_PROFILE.equals(event.getParameters())) { workPanel.setContent(new ProfileViewer((MainUI) getUI(), ((MainUI) getUI()).getUser().getDetails())); return; } if (MENU_ABOUT.equals(event.getParameters())) { workPanel.setContent(new AboutViewer()); return; } if (MENU_LIMESURVEY.equals(event.getParameters())) { final String hostUrl = getBaseUrl(((MainUI) getUI()).getPage().getLocation()); log.debug("Using the following baseUrl: {}", hostUrl); final String limesurveyPath = ((MainUI) getUI()).getLimesurveyPath(); log.debug("The limesurvey path is {}", limesurveyPath); final BrowserFrame browserFrame = new BrowserFrame("Browser", new ExternalResource(hostUrl + limesurveyPath + "admin/")); browserFrame.setHeight("100%"); browserFrame.setWidth("100%"); workPanel.setContent(browserFrame); return; } workPanel.setContent(new AboutViewer()); return; }
From source file:org.opencms.ui.dialogs.permissions.CmsPrincipalSelect.java
License:Open Source License
/** * Opens the principal select dialog window.<p> *//*from w w w. jav a 2s .c om*/ void openPrincipalSelect() { String parameters = "?type=" + m_widgetType.name() + "&realonly=" + m_realOnly + "&flags=null&action=listindependentaction&useparent=true&listaction="; if ((m_widgetType.equals(WidgetType.principalwidget) && I_CmsPrincipal.PRINCIPAL_GROUP.equals(m_principalTypeSelect.getValue())) || m_widgetType.equals(WidgetType.groupwidget)) { parameters += "iag"; } else { parameters += "iau"; } BrowserFrame selectFrame = new BrowserFrame("Select principal", new ExternalResource(OpenCms.getLinkManager().substituteLinkForUnknownTarget(A_CmsUI.getCmsObject(), "/system/workplace/commons/principal_selection.jsp") + parameters)); selectFrame.setWidth("100%"); selectFrame.setHeight("500px"); CmsBasicDialog dialog = new CmsBasicDialog(); dialog.setContent(selectFrame); m_window = CmsBasicDialog.prepareWindow(); m_window.setCaption(CmsVaadinUtils.getMessageText( org.opencms.workplace.commons.Messages.GUI_PRINCIPALSELECTION_LIST_ACTION_SELECT_NAME_0)); m_window.setContent(dialog); A_CmsUI.get().addWindow(m_window); CmsPrincipalSelectExtension.getInstance().setCurrentSelect(this); }
From source file:org.opennms.features.pluginmgr.vaadin.config.karaf.SimpleIframeApplication.java
License:Apache License
@Override public void init(VaadinRequest request) { if (iframePageUrl == null) throw new RuntimeException("iframePageUrl must not be null"); m_request = request;//from ww w .j a v a2 s . c om m_rootLayout = new VerticalLayout(); m_rootLayout = new VerticalLayout(); m_rootLayout.setSizeFull(); m_rootLayout.addStyleName("root-layout"); setContent(m_rootLayout); // add header if provided if (headerComponent != null) m_rootLayout.addComponent(headerComponent); //add additional header page links if provided if (headerLinks != null) { // defining 2 horizontal layouts to force links to stay together HorizontalLayout horizontalLayout1 = new HorizontalLayout(); horizontalLayout1.setWidth("100%"); horizontalLayout1.setDefaultComponentAlignment(Alignment.TOP_RIGHT); HorizontalLayout horizontalLayout2 = new HorizontalLayout(); horizontalLayout1.addComponent(horizontalLayout2); for (String name : headerLinks.keySet()) { String urlStr = headerLinks.get(name); ExternalResource urlResource = new ExternalResource(urlStr); Link link = new Link(name, urlResource); Label label = new Label(" ", ContentMode.HTML); // adds space between links horizontalLayout2.addComponent(link); horizontalLayout2.addComponent(label); } m_rootLayout.addComponent(horizontalLayout1); } ExternalResource iframPageResource = new ExternalResource(iframePageUrl); BrowserFrame browser = new BrowserFrame("", iframPageResource); browser.setWidth("100%"); browser.setHeight("100%"); m_rootLayout.addComponent(browser); // this forces the UI panel to use up all the available space below the header m_rootLayout.setExpandRatio(browser, 1.0f); }
From source file:org.opennms.features.pluginmgr.vaadin.config.opennms.SimpleIframeInVaadinApplication.java
License:Open Source License
@Override public void init(VaadinRequest request) { if (iframePageUrl == null) throw new RuntimeException("iframePageUrl must not be null"); m_rootLayout = new VerticalLayout(); m_rootLayout.setSizeFull();//w w w .j av a 2 s .co m m_rootLayout.addStyleName("root-layout"); setContent(m_rootLayout); addHeader(request); //add diagnostic page links if (headerLinks != null) { // defining 2 horizontal layouts to force links to stay together HorizontalLayout horizontalLayout1 = new HorizontalLayout(); horizontalLayout1.setWidth("100%"); horizontalLayout1.setDefaultComponentAlignment(Alignment.TOP_RIGHT); HorizontalLayout horizontalLayout2 = new HorizontalLayout(); horizontalLayout1.addComponent(horizontalLayout2); for (String name : headerLinks.keySet()) { String urlStr = headerLinks.get(name); ExternalResource urlResource = new ExternalResource(urlStr); Link link = new Link(name, urlResource); Label label = new Label(" ", ContentMode.HTML); // adds space between links horizontalLayout2.addComponent(link); horizontalLayout2.addComponent(label); } m_rootLayout.addComponent(horizontalLayout1); } ExternalResource iframPageResource = new ExternalResource(iframePageUrl); BrowserFrame browser = new BrowserFrame("", iframPageResource); browser.setWidth("100%"); browser.setHeight("100%"); m_rootLayout.addComponent(browser); // this forces the UI panel to use up all the available space below the header m_rootLayout.setExpandRatio(browser, 1.0f); }