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);
}
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;
}
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;
}
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;
}
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);
}
Aggregations