List of usage examples for com.vaadin.ui CustomLayout CustomLayout
public CustomLayout(String template)
From source file:org.opennms.features.vaadin.nodemaps.internal.NodeMapsApplication.java
License:Open Source License
private void addHeader() { if (m_headerProvider != null) { try {/* w w w . ja v a2s . c om*/ URL pageUrl = Page.getCurrent().getLocation().toURL(); setHeaderHtml(m_headerProvider.getHeaderHtml(new HttpServletRequestVaadinImpl(m_request, pageUrl))); } catch (final Exception e) { LOG.error("failed to get header HTML for request " + m_request.getPathInfo(), e.getCause()); } } if (m_headerHtml != null) { InputStream is = null; try { is = new ByteArrayInputStream(m_headerHtml.getBytes()); final CustomLayout headerLayout = new CustomLayout(is); headerLayout.setWidth("100%"); headerLayout.addStyleName("onmsheader"); m_rootLayout.addComponent(headerLayout); } catch (final IOException e) { closeQuietly(is); LOG.debug("failed to get header layout data", e); } } }