Search in sources :

Example 1 with ListItem

use of com.vaadin.flow.component.html.ListItem in project layout-examples by vaadin.

the class PricingView method createFooter.

private void createFooter() {
    Div box;
    box = new Div();
    box.addClassName("copyright-box");
    Paragraph copyright = new Paragraph("© 2019");
    copyright.addClassName("copyright");
    box.add(new Icon(VaadinIcon.VAADIN_H), copyright);
    footer.add(box);
    box = new Div();
    box.add(new H2("Features"));
    box.add(new UnorderedList(new ListItem(new Anchor("#", "Cool stuff")), new ListItem(new Anchor("#", "Random feature")), new ListItem(new Anchor("#", "Team feature")), new ListItem(new Anchor("#", "Stuff for developers")), new ListItem(new Anchor("#", "Another one")), new ListItem(new Anchor("#", "Last time"))));
    footer.add(box);
    box = new Div();
    box.add(new H2("Resources"));
    box.add(new UnorderedList(new ListItem(new Anchor("#", "Resource")), new ListItem(new Anchor("#", "Resource name")), new ListItem(new Anchor("#", "Another resource")), new ListItem(new Anchor("#", "Final resource"))));
    footer.add(box);
    box = new Div();
    box.add(new H2("About"));
    box.add(new UnorderedList(new ListItem(new Anchor("#", "Team")), new ListItem(new Anchor("#", "Locations")), new ListItem(new Anchor("#", "Privacy")), new ListItem(new Anchor("#", "Terms"))));
    footer.add(box);
}
Also used : Div(com.vaadin.flow.component.html.Div) Anchor(com.vaadin.flow.component.html.Anchor) UnorderedList(com.vaadin.flow.component.html.UnorderedList) H2(com.vaadin.flow.component.html.H2) VaadinIcon(com.vaadin.flow.component.icon.VaadinIcon) Icon(com.vaadin.flow.component.icon.Icon) ListItem(com.vaadin.flow.component.html.ListItem) Paragraph(com.vaadin.flow.component.html.Paragraph)

Example 2 with ListItem

use of com.vaadin.flow.component.html.ListItem in project sapl-demos by heutelbeck.

the class ContentView method createRightUpperSideTab3.

private Div createRightUpperSideTab3() {
    this.tab3MockHelpText = new Tab("Mock Format");
    Div page3MockHelpText = new Div();
    page3MockHelpText.setVisible(false);
    page3MockHelpText.setId("mockInputHelpTextDiv");
    page3MockHelpText.add(new Paragraph("Expecting an array of JSON objects, each object consisting of the following properties:"));
    UnorderedList properties = new UnorderedList();
    ListItem item1 = new ListItem();
    Span item11 = new Span("\"" + MockingModel.KeyValue_Type + "\"");
    item11.setClassName(propertyNameClassName);
    item1.add(item11);
    Span item12 = new Span(" - (Required): Allowed values are \"ATTRIBUTE\" or \"FUNCTION\"");
    item12.setClassName(propertyDescriptionClassName);
    item1.add(item12);
    properties.add(item1);
    ListItem item2 = new ListItem();
    Span item21 = new Span("\"" + MockingModel.KeyValue_ImportName + "\"");
    item21.setClassName(propertyNameClassName);
    item2.add(item21);
    Span item22 = new Span(" - (Required): The name the function or attribute referenced in your policy (for example \"time.dayOfWeekFrom\").");
    item22.setClassName(propertyDescriptionClassName);
    item2.add(item22);
    properties.add(item2);
    ListItem item3 = new ListItem();
    Span item31 = new Span("\"" + MockingModel.KeyValue_AlwaysReturnValue + "\"");
    item31.setClassName(propertyNameClassName);
    item3.add(item31);
    Span item32 = new Span(" - (Optional): A JSON value to be returned by this attribute or to be returned by a function every time the function is called.");
    item32.setClassName(propertyDescriptionClassName);
    item3.add(item32);
    properties.add(item3);
    ListItem item4 = new ListItem();
    Span item41 = new Span("\"" + MockingModel.KeyValue_ReturnSequenceValues + "\"");
    item41.setClassName(propertyNameClassName);
    item4.add(item41);
    Span item42 = new Span(" - (Optional): An array of JSON values to be returned by the attribute or function.");
    item42.setClassName(propertyDescriptionClassName);
    item4.add(item42);
    properties.add(item4);
    page3MockHelpText.add(properties);
    page3MockHelpText.add(new Paragraph("Exactly one of \"always\" or \"sequence\" is required"));
    return page3MockHelpText;
}
Also used : Div(com.vaadin.flow.component.html.Div) Tab(com.vaadin.flow.component.tabs.Tab) UnorderedList(com.vaadin.flow.component.html.UnorderedList) ListItem(com.vaadin.flow.component.html.ListItem) Span(com.vaadin.flow.component.html.Span) Paragraph(com.vaadin.flow.component.html.Paragraph)

Example 3 with ListItem

use of com.vaadin.flow.component.html.ListItem in project sapl-demos by heutelbeck.

the class MainLayout method createNavigation.

private Nav createNavigation() {
    Nav nav = new Nav();
    nav.addClassNames("border-b", "border-contrast-10", "flex-grow", "overflow-auto");
    nav.getElement().setAttribute("aria-labelledby", "views");
    H3 views = new H3("Views");
    views.addClassNames("flex", "h-m", "items-center", "mx-m", "my-0", "text-s", "text-tertiary");
    views.setId("views");
    // Wrap the links in a list; improves accessibility
    UnorderedList list = new UnorderedList();
    list.addClassNames("list-none", "m-0", "p-0");
    nav.add(list);
    for (RouterLink link : createLinks()) {
        ListItem item = new ListItem(link);
        list.add(item);
    }
    return nav;
}
Also used : RouterLink(com.vaadin.flow.router.RouterLink) Nav(com.vaadin.flow.component.html.Nav) UnorderedList(com.vaadin.flow.component.html.UnorderedList) H3(com.vaadin.flow.component.html.H3) ListItem(com.vaadin.flow.component.html.ListItem)

Example 4 with ListItem

use of com.vaadin.flow.component.html.ListItem in project Akros-Marketplace by AkrosAG.

the class MainLayout method createHeaderContent.

private Component createHeaderContent() {
    Header header = new Header();
    header.addClassNames("bg-base", "border-b", "border-contrast-10", "box-border", "flex", "flex-col", "w-full");
    Div layout = new Div();
    layout.addClassNames("flex", "h-xl", "items-center", "px-l");
    H1 appName = new H1("Akros Marketplace Administration");
    appName.addClassNames("my-0", "me-auto", "text-xl");
    layout.add(appName);
    Nav nav = new Nav();
    nav.addClassNames("flex", "gap-s", "overflow-auto", "px-m");
    // Wrap the links in a list; improves accessibility
    UnorderedList list = new UnorderedList();
    list.addClassNames("flex", "list-none", "m-0", "p-0");
    nav.add(list);
    for (RouterLink link : createLinks()) {
        ListItem item = new ListItem(link);
        list.add(item);
    }
    header.add(layout, nav);
    return header;
}
Also used : Div(com.vaadin.flow.component.html.Div) RouterLink(com.vaadin.flow.router.RouterLink) Nav(com.vaadin.flow.component.html.Nav) Header(com.vaadin.flow.component.html.Header) H1(com.vaadin.flow.component.html.H1) UnorderedList(com.vaadin.flow.component.html.UnorderedList) ListItem(com.vaadin.flow.component.html.ListItem)

Example 5 with ListItem

use of com.vaadin.flow.component.html.ListItem in project flow-components by vaadin.

the class ServerSideEvents method logEvent.

private void logEvent(ComponentEvent<Chart> event) {
    String name = event.getClass().getSimpleName();
    String details = createEventString(event);
    Span eventTypeSpan = new Span(name);
    eventTypeSpan.setId("event-type");
    Span eventDetailsSpan = new Span(details);
    eventDetailsSpan.setId("event-details");
    ListItem listItem = new ListItem(eventTypeSpan, eventDetailsSpan);
    historyLayout.add(listItem);
}
Also used : ListItem(com.vaadin.flow.component.html.ListItem) Span(com.vaadin.flow.component.html.Span)

Aggregations

ListItem (com.vaadin.flow.component.html.ListItem)6 UnorderedList (com.vaadin.flow.component.html.UnorderedList)5 Div (com.vaadin.flow.component.html.Div)4 Paragraph (com.vaadin.flow.component.html.Paragraph)3 Anchor (com.vaadin.flow.component.html.Anchor)2 H2 (com.vaadin.flow.component.html.H2)2 Nav (com.vaadin.flow.component.html.Nav)2 Span (com.vaadin.flow.component.html.Span)2 RouterLink (com.vaadin.flow.router.RouterLink)2 Emphasis (com.vaadin.flow.component.html.Emphasis)1 H1 (com.vaadin.flow.component.html.H1)1 H3 (com.vaadin.flow.component.html.H3)1 Header (com.vaadin.flow.component.html.Header)1 Image (com.vaadin.flow.component.html.Image)1 Icon (com.vaadin.flow.component.icon.Icon)1 VaadinIcon (com.vaadin.flow.component.icon.VaadinIcon)1 Tab (com.vaadin.flow.component.tabs.Tab)1 FlexBoxLayout (io.bssw.psip.ui.components.FlexBoxLayout)1