Search in sources :

Example 1 with Strong

use of io.bssw.psip.ui.util.Strong in project psip-automation by bssw-psip.

the class Assessment method createActivityLayout.

private void createActivityLayout(Activity activity) {
    mainLayout.removeAll();
    Anchor saveAnchor = new Anchor();
    saveAnchor.setText("save your current assessment.");
    saveAnchor.getElement().addEventListener("click", e -> {
        String url = generateSaveUrl(activity);
        displaySaveDialog(url);
    });
    Div div = new Div();
    div.add(new Paragraph(new Emphasis("The diagram below shows how your project is progressing in all practice areas. " + "You can come back to this page any time during the assessment to see your progress. ")));
    div.add(new Paragraph(new Emphasis(new Strong("We do not save your data in any way. If you refresh or close your browser, " + "your assessment will be lost. We suggest you regularly use this link to "), saveAnchor)));
    Anchor startAnchor = new Anchor();
    startAnchor.setText("Click here to start assessing your practices.");
    startAnchor.getElement().addEventListener("click", e -> MainLayout.navigate(Assessment.class, activity.getCategories().get(0).getPath()));
    Component summary = createActivitySummary(activity);
    mainLayout.add(div, startAnchor, summary);
    mainLayout.setHorizontalComponentAlignment(Alignment.CENTER, startAnchor);
}
Also used : Div(com.vaadin.flow.component.html.Div) Anchor(com.vaadin.flow.component.html.Anchor) Emphasis(com.vaadin.flow.component.html.Emphasis) Component(com.vaadin.flow.component.Component) Strong(io.bssw.psip.ui.util.Strong) Paragraph(com.vaadin.flow.component.html.Paragraph)

Aggregations

Component (com.vaadin.flow.component.Component)1 Anchor (com.vaadin.flow.component.html.Anchor)1 Div (com.vaadin.flow.component.html.Div)1 Emphasis (com.vaadin.flow.component.html.Emphasis)1 Paragraph (com.vaadin.flow.component.html.Paragraph)1 Strong (io.bssw.psip.ui.util.Strong)1