Search in sources :

Example 16 with H2

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);
}
Also used : Grid(com.vaadin.flow.component.grid.Grid) H2(com.vaadin.flow.component.html.H2)

Example 17 with H2

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;
}
Also used : Div(com.vaadin.flow.component.html.Div) H2(com.vaadin.flow.component.html.H2) Paragraph(com.vaadin.flow.component.html.Paragraph)

Example 18 with H2

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);
}
Also used : VerticalLayout(com.vaadin.flow.component.orderedlayout.VerticalLayout) H2(com.vaadin.flow.component.html.H2)

Example 19 with H2

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);
}
Also used : VerticalLayout(com.vaadin.flow.component.orderedlayout.VerticalLayout) H2(com.vaadin.flow.component.html.H2)

Example 20 with H2

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;
}
Also used : VerticalLayout(com.vaadin.flow.component.orderedlayout.VerticalLayout) H2(com.vaadin.flow.component.html.H2)

Aggregations

H2 (com.vaadin.flow.component.html.H2)68 VerticalLayout (com.vaadin.flow.component.orderedlayout.VerticalLayout)29 Div (com.vaadin.flow.component.html.Div)25 Grid (com.vaadin.flow.component.grid.Grid)11 ComboBox (com.vaadin.flow.component.combobox.ComboBox)10 Button (com.vaadin.flow.component.button.Button)8 Paragraph (com.vaadin.flow.component.html.Paragraph)7 HorizontalLayout (com.vaadin.flow.component.orderedlayout.HorizontalLayout)7 Route (com.vaadin.flow.router.Route)6 List (java.util.List)6 IntStream (java.util.stream.IntStream)6 NativeButton (com.vaadin.flow.component.html.NativeButton)5 ArrayList (java.util.ArrayList)5 Html (com.vaadin.flow.component.Html)4 TextField (com.vaadin.flow.component.textfield.TextField)4 Faker (com.github.javafaker.Faker)3 ItemFilter (com.vaadin.flow.component.combobox.ComboBox.ItemFilter)3 Label (com.vaadin.flow.component.html.Label)3 CallbackDataProvider (com.vaadin.flow.data.provider.CallbackDataProvider)3 ComponentRenderer (com.vaadin.flow.data.renderer.ComponentRenderer)3