/** * Constructs an empty VerticalLayout. */ public VerticalLayout() { super(); setSpacing(false); setMargin(false); }
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)); }
/** * {@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); }
@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; }
rootLayout.setSpacing(true);
@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; }
mainLayout.setSpacing(true); mainLayout.setMargin(true); mainLayout.addComponent(groupTable);
mainLayout.setSpacing(true); mainLayout.setMargin(true); mainLayout.addComponent(systemDefTable);
public MBeansContentPanel(final MBeansController controller) { this.controller = controller; this.attributesTable = new AttributesTable(controller, controller); emptyLayout = new VerticalLayout(); emptyLayout.setSpacing(true); emptyLayout.setMargin(true); emptyLayout.addComponent(new Label("No MBean or Composite selected. Please select one to modify data.")); nameEditForm = new NameEditForm(controller); captionLabel = new Label(); captionLabel.setContentMode(ContentMode.HTML); VerticalLayout attributeLayout = new VerticalLayout(); attributeLayout.addComponent(captionLabel); attributeLayout.addComponent(attributesTable); attributeLayout.setSizeFull(); attributeLayout.setExpandRatio(attributesTable, 1); contentLayout = new VerticalLayout(); contentLayout.setSpacing(true); contentLayout.setMargin(true); contentLayout.addComponent(nameEditForm); contentLayout.addComponent(attributeLayout); contentLayout.setSizeFull(); contentLayout.setExpandRatio(attributeLayout, 1); // by default we do not show details addComponent(emptyLayout); addComponent(contentLayout); setSizeFull(); // we have to listen for "selection" value changed events controller.registerSelectionValueChangedListener(nameEditForm); controller.registerSelectionValueChangedListener(attributesTable); }
mainLayout.setSpacing(true); mainLayout.setMargin(true); mainLayout.addComponent(resourceTypeTable);
VerticalLayout iconLayout = new VerticalLayout(); iconLayout.addStyleName("icon-selection-component"); iconLayout.setSpacing(true); iconLayout.setSizeFull(); iconLayout.addComponent(iconSelectionComponent); mainLayout.setSpacing(true); mainLayout.setMargin(true); mainLayout.setSizeFull();
globalTrendLayout.setSpacing(true); globalTrendLayout.addStyleName("summary"); globalTrendLayout.addStyleName("global");
public InvalidConfigurationWindow(NodeMapConfiguration nodeMapConfiguration) { setModal(true); setResizable(false); setWidth(500, Unit.PIXELS); setHeight(250, Unit.PIXELS); setCaption("Configuration Error"); final Button btnClose = new Button("OK", new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { close(); } }); final String errorMessage = getErrorLabel(nodeMapConfiguration); final Label label = new Label(errorMessage, ContentMode.HTML); VerticalLayout rootLayout = new VerticalLayout(); rootLayout.setSpacing(true); rootLayout.setMargin(true); rootLayout.addComponent(label); rootLayout.addComponent(btnClose); rootLayout.setExpandRatio(label, 1.0f); rootLayout.setComponentAlignment(btnClose, Alignment.BOTTOM_RIGHT); setContent(rootLayout); center(); }
public InfoDialog(String caption, String description) { setCaption(caption); setModal(true); setResizable(false); setClosable(false); setWidth(400, Unit.PIXELS); setHeight(200, Unit.PIXELS); okButton = UIHelper.createButton("ok", null, null, event -> InfoDialog.this.close()); okButton.setId("infoDialog.button.ok"); label.setValue(description); final HorizontalLayout buttonLayout = new HorizontalLayout(okButton); buttonLayout.setSpacing(true); layout.setSpacing(true); layout.setMargin(true); layout.setSizeFull(); layout.addComponent(label); layout.addComponent(buttonLayout); layout.setComponentAlignment(buttonLayout, Alignment.BOTTOM_RIGHT); setContent(layout); center(); }
layout.addComponent(cancelButton); layout.setComponentAlignment(cancelButton, Alignment.BOTTOM_RIGHT); layout.setSpacing(true); layout.setMargin(true);
public ConfirmationDialog(String caption, String description) { setCaption(caption); setModal(true); setResizable(false); setClosable(false); setWidth(400, Unit.PIXELS); setHeight(200, Unit.PIXELS); addCloseListener(this); okButton = UIHelper.createButton("ok", null, null, this); okButton.setId("confirmationDialog.button.ok"); cancelButton = UIHelper.createButton("cancel", "cancels the current action.", null, this); cancelButton.setId("confirmationDialog.button.cancel"); label.setDescription(description); final HorizontalLayout buttonLayout = new HorizontalLayout(okButton, cancelButton); buttonLayout.setSpacing(true); layout.setSpacing(true); layout.setMargin(true); layout.setSizeFull(); layout.addComponent(label); layout.addComponent(buttonLayout); layout.setComponentAlignment(buttonLayout, Alignment.BOTTOM_RIGHT); setContent(layout); center(); }
globalTrendLayout.setSpacing(true); globalTrendLayout.addStyleName("summary"); globalTrendLayout.addStyleName("global");
mainLayout.setSpacing(true); mainLayout.setMargin(true); mainLayout.addComponent(topToolbar);
rootLayout.setSpacing(true); rootLayout.setMargin(true); rootLayout.addComponent(pingForm);
mainLayout.setSpacing(true); mainLayout.setMargin(true); mainLayout.addComponent(toolbar);