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