/** * Creates a new empty panel with the given caption and content. * * @param caption * the caption of the panel (HTML). * @param content * the content used in the panel. */ public Panel(String caption, Component content) { this(content); setCaption(caption); }
/** * Adds a child category panel.<p> * * @param label the label * @param child the child widget */ public void addChild(String label, CmsAppHierarchyPanel child) { Panel panel = new Panel(); panel.setCaption(label); panel.setContent(child); addComponent(panel); }
public static Panel panel(String title, com.vaadin.ui.Component... components) { Panel p = new Panel(); p.setWidth(100, Sizeable.UNITS_PERCENTAGE); p.setCaption(title); for (com.vaadin.ui.Component c : components) { p.addComponent(c); } return p; }
public void doUpdateCaptions() { table.setCaption(getTableName()); detailsPanel.setCaption(getDetailsName()); }
public void doUpdateCaptions() { table.setCaption(getTableName()); detailsPanel.setCaption(getDetailsName()); }
private Panel createPanel(Component content, String caption) { Panel panel = new Panel(); panel.setSizeFull(); panel.setCaption(caption); panel.setContent(content); panel.addStyleName("novscroll"); return panel; } }
private Panel bulkIssuePanel() { TextField number = new TextField("Number"); TextField amount = new TextField("Amount"); Button submit = new Button("Submit"); Panel panel = new Panel("Bulk issue cards"); submit.addClickListener(evt -> { submit.setEnabled(false); new BulkIssuer(commandGateway, Integer.parseInt(number.getValue()), Integer.parseInt(amount.getValue()), bulkIssuer -> { access(() -> { if(bulkIssuer.getRemaining().get() == 0) { submit.setEnabled(true); panel.setCaption("Bulk issue cards"); Notification.show("Bulk issue card completed", Notification.Type.HUMANIZED_MESSAGE) .addCloseListener(e -> cardSummaryDataProvider.refreshAll()); } else { panel.setCaption(String.format("Progress: %d suc, %d fail, %d rem", bulkIssuer.getSuccess().get(), bulkIssuer.getError().get(), bulkIssuer.getRemaining().get())); cardSummaryDataProvider.refreshAll(); } }); }); }); FormLayout form = new FormLayout(); form.addComponents(number, amount, submit); form.setMargin(true); panel.setContent(form); return panel; }
panel.setCaption(caption);
@Override public void createRow(final UiVaadin c) { //String name = c.getName(); Component editor = c.createEditor(); DataSource ds = getForm().getDataSource(); String caption = c.getCaption(ds); layout.setCaption(caption); if (editor instanceof Layout) { layout.setContent(editor); } else { VerticalLayout container = new VerticalLayout(editor); layout.setContent(container); c.setComponentEditor(editor); c.setListeners(); } editor.setWidth("100%"); content = c; }
panel.setCaption("Preview");
panel.setCaption("Preview");
window.setModal(true); Panel panel = new Panel(); panel.setCaption(title); panel.setWidth("500px"); VerticalLayout layout = new VerticalLayout();
namePanel.setCaption("Filter by Name"); namePanel.setContent(nameLayout); attributePanel.setCaption("Filter by Attribute"); attributePanel.setContent(attributeLayout); severityPanel.setCaption("Filter by Severity"); severityPanel.setContent(severityLayout); limitPanel.setCaption("Results"); limitPanel.setContent(limitLayout);
panel.setCaption("Graph"); panel.setSizeFull();
panel.setCaption("Graph"); panel.setSizeFull();