use of com.vaadin.flow.component.html.H2 in project karnak by OsiriX-Foundation.
the class PseudonymMappingView method addComponentsView.
/**
* Add components in the view
*/
private void addComponentsView() {
setSizeFull();
// Layout
mappingLayout = new VerticalLayout();
VerticalLayout inputLayout = new VerticalLayout();
// Titles
mappingLayout.add(new H2("Pseudonym Mapping"));
// Input
inputLayout.add(mappingInputComponent);
inputLayout.getElement().getStyle().set("margin-left", "22%");
mappingLayout.add(inputLayout);
// Layout
add(mappingLayout);
}
use of com.vaadin.flow.component.html.H2 in project layout-examples by vaadin.
the class MarketingView method createCard.
private Component createCard(String cardHeader, String cardContent) {
VerticalLayout layout = new VerticalLayout();
layout.setWidth("30%");
layout.setMinWidth("250px");
H2 header = new H2(cardHeader);
Div content = new Div();
content.setText(cardContent);
Button button = new Button("View details", new Icon(VaadinIcon.ANGLE_DOUBLE_RIGHT));
button.addThemeVariants(ButtonVariant.LUMO_SMALL);
layout.getElement().getStyle().set("flex-grow", "1");
layout.add(header, content, button);
return layout;
}
use of com.vaadin.flow.component.html.H2 in project furms by unity-idm.
the class DefaultErrorViewsGenerator method generate.
static Element generate(String title, String message) {
VerticalLayout error = new VerticalLayout();
Button backButton = new Button(getTranslation("view.error-page.error.back-button"), ARROW_LEFT.create(), e -> UI.getCurrent().navigate(LandingPageView.class));
backButton.addThemeVariants(LUMO_TERTIARY);
error.add(backButton);
VerticalLayout messageLayout = new VerticalLayout(new H2(title), new Text(message));
messageLayout.setAlignItems(FlexComponent.Alignment.CENTER);
messageLayout.setDefaultHorizontalComponentAlignment(FlexComponent.Alignment.CENTER);
messageLayout.setSizeFull();
error.add(messageLayout);
return error.getElement();
}
use of com.vaadin.flow.component.html.H2 in project flow-components by vaadin.
the class ServerSideEvents method initDemo.
@Override
public void initDemo() {
historyLayout = new OrderedList();
historyLayout.setId("history");
chart = new Chart();
chart.setId("chart");
final Configuration configuration = chart.getConfiguration();
configuration.getChart().setWidth(500);
configuration.getChart().setType(ChartType.SCATTER);
configuration.getTitle().setText("Test server side events.");
configuration.getSubTitle().setText("When an event occurs, the details are shown below the chart");
configuration.setExporting(true);
configuration.getChart().setAnimation(false);
configuration.getChart().setZoomType(Dimension.XY);
configuration.getAccessibility().setEnabled(false);
XAxis xAxis = configuration.getxAxis();
xAxis.setMinPadding(0.2);
xAxis.setMaxPadding(0.2);
YAxis yAxis = configuration.getyAxis();
yAxis.setTitle(new AxisTitle("Value"));
PlotLine plotline = new PlotLine();
plotline.setValue(0);
plotline.setWidth(1);
plotline.setColor(new SolidColor("#808080"));
yAxis.setPlotLines(plotline);
yAxis.setMinPadding(0.2);
yAxis.setMaxPadding(0.2);
YAxis yAxis1 = new YAxis();
yAxis1.setTitle("Another axis");
yAxis1.setOpposite(true);
configuration.addyAxis(yAxis1);
PlotOptionsSeries opt = new PlotOptionsSeries();
opt.setShowCheckbox(true);
opt.setAllowPointSelect(true);
configuration.setPlotOptions(opt);
configuration.setTooltip(new Tooltip(false));
final DataSeries series1 = createDataSeries(0);
final DataSeries series2 = createDataSeries(20);
DataSeries series3 = createDataSeries(100);
series3.get(0).setY(105);
series3.get(3).setY(95);
series3.setName("Another axis");
series3.setyAxis(1);
DataSeriesItem firstDataPoint = series1.get(0);
firstDataPoint.setSelected(true);
configuration.setSeries(series1, series2, series3);
chart.addChartClickListener(this::logEvent);
chart.addPointClickListener(this::logEvent);
chart.addCheckBoxClickListener(this::logEvent);
chart.addSeriesLegendItemClickListener(this::logEvent);
chart.addSeriesHideListener(this::logEvent);
chart.addSeriesShowListener(this::logEvent);
chart.addPointSelectListener(this::logEvent);
chart.addPointUnselectListener(this::logEvent);
chart.addYAxesExtremesSetListener(this::logEvent);
chart.drawChart();
chart.setVisibilityTogglingDisabled(false);
VerticalLayout layout = new VerticalLayout();
layout.setId("master");
layout.add(createControls());
layout.add(new H2("Event History"), historyLayout);
add(chart, layout);
}
use of com.vaadin.flow.component.html.H2 in project flow-components by vaadin.
the class ComboBoxView method addCard.
private void 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);
}
Aggregations