@Override public Component initContent() { VerticalLayout layout = new VerticalLayout(); layout.addComponent(step); layout.addComponent(table); layout.addComponent(toolbar); layout.setComponentAlignment(toolbar, Alignment.MIDDLE_RIGHT); return layout; }
@Override public Component initContent() { VerticalLayout layout = new VerticalLayout(); layout.addComponent(combo); layout.addComponent(table); layout.addComponent(toolbar); layout.setComponentAlignment(toolbar, Alignment.MIDDLE_RIGHT); return layout; }
@Override public Component initContent() { VerticalLayout layout = new VerticalLayout(); layout.addComponent(table); layout.addComponent(toolbar); layout.setComponentAlignment(toolbar, Alignment.MIDDLE_RIGHT); return layout; }
@Override public Component initContent() { VerticalLayout layout = new VerticalLayout(); layout.addComponent(table); layout.addComponent(toolbar); layout.setComponentAlignment(toolbar, Alignment.MIDDLE_RIGHT); return layout; }
@Override public Component initContent() { VerticalLayout layout = new VerticalLayout(); layout.addComponent(table); layout.addComponent(toolbar); layout.setComponentAlignment(toolbar, Alignment.MIDDLE_RIGHT); return layout; }
@Override public Component initContent() { final VerticalLayout layout = new VerticalLayout(); layout.addComponent(table); layout.addComponent(toolbar); layout.setComponentAlignment(toolbar, Alignment.MIDDLE_RIGHT); return layout; }
@Override public Component initContent() { VerticalLayout layout = new VerticalLayout(); layout.addComponent(table); layout.addComponent(toolbar); layout.setComponentAlignment(toolbar, Alignment.MIDDLE_RIGHT); return layout; }
/** * Creates the main window and adds the header, main and button panels to * it. */ private void initMainLayout() { VerticalLayout layout = new VerticalLayout(); layout.addComponent(headerPanel); layout.addComponent(contentPanel); layout.setSizeFull(); // content Panel should use most of the space layout.setExpandRatio(contentPanel, 1); setContent(layout); }
private void addHeader() { if (m_headerHtml != null && m_showHeader) { 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) { try { is.close(); } catch (final IOException closeE) { LOG.debug("failed to close HTML input stream", closeE); } LOG.debug("failed to get header layout data", e); } } }
private Layout createContent(final String description) { VerticalLayout content = new VerticalLayout(); content.setWidth(100, Unit.PERCENTAGE); Layout footer = createFooter(); Layout mainArea = createMainArea(description); content.addComponent(mainArea); content.addComponent(footer); content.setExpandRatio(mainArea, 1); return content; }
private void replaceGraph(String graphName, String resourceId) { m_graphLayout.removeAllComponents(); if (graphName != null && resourceId != null) { final GraphContainer graph = new GraphContainer(graphName, resourceId); // Span the last hour final Calendar calendar = new GregorianCalendar(); graph.setEnd(calendar.getTime()); calendar.add(Calendar.HOUR_OF_DAY, -1); graph.setStart(calendar.getTime()); // Use all of the available width graph.setWidthRatio(1.0d); // Use a smaller height ratio graph.setHeightRatio(0.2d); m_graphLayout.addComponent(graph); } }
/** * Log Message. * * @param level the level * @param message the message */ private void logMsg(String level, String message) { String msg = timeformatService.format(Instant.now(), UserTimeZoneExtractor.extractUserTimeZoneIdOrNull(getUI())) + level + message; Label error = new Label(msg, ContentMode.HTML); logContent.addComponent(error); scrollIntoView(); LOG.info(message); }
public HelpContent(UiState uiState) { Objects.requireNonNull(uiState); if (!uiState.hasUi()) { throw new IllegalArgumentException("The provided uiState " + uiState + " does not have a ui."); } String content = UIHelper.loadContentFromFile(getClass(), String.format("/help/%s.html", uiState.name())); content = content.replaceAll("%title%", uiState.getDescription()); layout = new VerticalLayout(); layout.setMargin(true); layout.setWidth(400, Sizeable.Unit.PIXELS); layout.setSpacing(true); layout.addComponent(new Label(content, ContentMode.HTML)); }
private void addContentLayout() { m_layout = new VerticalLayout(); m_layout.setSizeFull(); m_rootLayout.addComponent(m_layout); m_rootLayout.setExpandRatio(m_layout, 1); updateWidgetView(); }
private void updateWidgetView() { final VerticalSplitPanel bottomLayoutBar = new VerticalSplitPanel(); bottomLayoutBar.setFirstComponent(m_nodeMapComponent); // Split the screen 70% top, 30% bottom bottomLayoutBar.setSplitPosition(70, Unit.PERCENTAGE); bottomLayoutBar.setSizeFull(); bottomLayoutBar.setSecondComponent(getTabSheet()); m_layout.addComponent(bottomLayoutBar); m_layout.markAsDirty(); }
public StubView(String iconId) { layout.addStyleName("app-stub-view"); layout.setSizeFull(); final Label icon = new Label(); icon.addStyleName("icon"); icon.setSizeUndefined(); icon.addStyleName(iconId); layout.addComponent(icon); layout.setComponentAlignment(icon, Alignment.MIDDLE_CENTER); }
/** * {@inheritDoc} */ @Override protected void init(VaadinRequest request) { /** * Force the reload of the configuration */ SurveillanceViewProvider.getInstance().load(); /** * Create the basic layout */ VerticalLayout rootLayout = new VerticalLayout(); rootLayout.setSizeFull(); rootLayout.setSpacing(true); rootLayout.addComponent(new SurveillanceViewsConfigList(m_surveillanceViewService)); setContent(rootLayout); }
public InfoWindow(final URL embeddedURL, LabelCreator labelCreator) { infoBrowser = new Embedded("", new ExternalResource(embeddedURL)); String label = labelCreator == null ? "" : labelCreator.getLabel(); setCaption(label); setResizable(false); setModal(true); /*Adds the browser to the main layout*/ VerticalLayout layout = new VerticalLayout(); layout.addComponent(infoBrowser); setContent(layout); }
@Override protected Component initContent() { setImmediate(true); rootLayout.setSizeFull(); rootLayout.setSpacing(true); runButton.addStyleName("commit"); runButton.setCaption(simpleTranslator.translate("rssAggregator.manual.rss.import.all.run")); runButton.addClickListener(createButtonClickListener()); rootLayout.addComponent(runButton); rootLayout.setExpandRatio(runButton, 0); rootLayout.setComponentAlignment(runButton, Alignment.MIDDLE_CENTER); return rootLayout; }
@Override protected Component initContent() { setImmediate(true); rootLayout.setSizeFull(); rootLayout.setSpacing(true); runButton.addStyleName("commit"); runButton.setCaption(simpleTranslator.translate("rssAggregator.manual.rss.import.run")); runButton.addClickListener(createButtonClickListener()); rootLayout.addComponent(runButton); rootLayout.setExpandRatio(runButton, 0); rootLayout.setComponentAlignment(runButton, Alignment.MIDDLE_CENTER); return rootLayout; }