use of com.vaadin.flow.component.html.H2 in project flow-components by vaadin.
the class GridMultiSelectionColumnPage method createBasicGridFromSingleToMultiBeforeAttached.
private void createBasicGridFromSingleToMultiBeforeAttached() {
Grid<String> grid = new Grid<>();
grid.setItems(IntStream.range(0, ITEM_COUNT).mapToObj(Integer::toString));
setUp(grid);
grid.setId("in-testing-multi-selection-mode-grid");
add(new H2("in-testing-multi-selection-mode-grid"), grid);
grid.setSelectionMode(Grid.SelectionMode.SINGLE);
grid.setSelectionMode(Grid.SelectionMode.MULTI);
add(grid);
}
use of com.vaadin.flow.component.html.H2 in project flow-components by vaadin.
the class ContextMenuView method createTargetComponent.
private Component createTargetComponent() {
H2 header = new H2("Right click this component");
Paragraph paragraph = new Paragraph("(or long touch on mobile)");
Div div = new Div(header, paragraph);
div.getStyle().set("border", "1px solid black").set("textAlign", "center");
return div;
}
use of com.vaadin.flow.component.html.H2 in project flow-components by vaadin.
the class FormLayoutView method addCard.
private void addCard(String title, Component... components) {
VerticalLayout layout = new VerticalLayout();
layout.setMargin(true);
layout.add(new H2(title));
layout.add(components);
add(layout);
}
use of com.vaadin.flow.component.html.H2 in project flow-components by vaadin.
the class ButtonView method addCard.
private void addCard(String title, Component... components) {
VerticalLayout layout = new VerticalLayout();
layout.setMargin(true);
layout.add(new H2(title));
layout.add(components);
add(layout);
}
use of com.vaadin.flow.component.html.H2 in project flow-components by vaadin.
the class ListBoxViewDemoPage method addCard.
private Component addCard(String title, String description, Component... components) {
if (description != null) {
title = title + ": " + description;
}
VerticalLayout layout = new VerticalLayout();
layout.setMargin(true);
layout.add(new H2(title));
layout.add(components);
add(layout);
return layout;
}
Aggregations