use of com.vaadin.flow.component.html.Emphasis 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);
}
use of com.vaadin.flow.component.html.Emphasis in project iesi by metadew.
the class LoginScreen method buildLoginInformation.
private Component buildLoginInformation() {
VerticalLayout loginInformation = new VerticalLayout();
loginInformation.setClassName("login-information");
H1 loginInfoHeader = new H1("IESI");
Emphasis visionText = new Emphasis("Automation for everyone: easy, driven by configuration and augmented with metadata");
loginInformation.add(loginInfoHeader);
loginInformation.add(visionText);
return loginInformation;
}
use of com.vaadin.flow.component.html.Emphasis in project psip-automation by bssw-psip.
the class Home method createContent.
private Component createContent() {
Div intro = new Div();
intro.add(new Image(UIUtils.IMG_PATH + "logos/ryp_logo.png", "Rate Your Project"));
intro.add(new H2("A self assessment tool for improving software practices"));
intro.add(new Paragraph("Software engineering is a systematic approach to the design, development, and maintenance of a software system. " + "Teams seldom have the time to stop development and focus solely on improving productivity or sustainability. However, " + "teams can incorporate improvements on the way to developing new science capabilities."));
intro.add(new Paragraph("The tools on this site will help you:"));
intro.add(new UnorderedList(new ListItem("Assess your current practices"), new ListItem("Create progress tracking cards"), new ListItem("Integrate tracking cards with your workflow")));
intro.add(new Paragraph("The self-assessment introduces software engineering practices that increase in maturity. " + "Check the practices that your project already uses to rate your project."));
intro.add(new Paragraph(new Emphasis("Click on the assessment to the left " + "tab to get started. You can also click the arrow icon on the assessment tab to view the practice categories.")));
intro.add(new Paragraph("Good luck!"));
Anchor documentation = new Anchor("https://bssw-psip.github.io/ptc-catalog/", UIUtils.createButton("Read the documentation", VaadinIcon.EXTERNAL_LINK));
FlexBoxLayout links = new FlexBoxLayout(documentation);
links.setFlexWrap(FlexWrap.WRAP);
links.setSpacing(Right.S);
FlexBoxLayout content = new FlexBoxLayout(intro, links);
content.setFlexDirection(FlexDirection.COLUMN);
content.setMargin(Horizontal.AUTO);
content.setMaxWidth("840px");
content.setPadding(Uniform.RESPONSIVE_L);
return content;
}
use of com.vaadin.flow.component.html.Emphasis in project psip-automation by bssw-psip.
the class Assessment method createCategoryLayout.
private void createCategoryLayout(Category category) {
mainLayout.removeAll();
FormLayout form = new FormLayout();
form.getElement().getStyle().set("padding", "30px");
for (Item item : category.getItems()) {
ScoreSlider slider = new ScoreSlider(item);
FormItem formItem = form.addFormItem(slider, item.getName());
// Set width of label otherwise it will wrap
formItem.getElement().getStyle().set("--vaadin-form-item-label-width", "15em");
formItem.getElement().getStyle().set("align-self", "flex-start");
formItem.getElement().getStyle().set("padding", "5px");
// FormLayout defaults to 2 columns so span both
form.setColspan(formItem, 2);
}
Div div = new Div();
div.add(new Paragraph(new Emphasis("The rows below show how well your team is doing for each practice. " + "As your practices improve, you can always return to this page to update them directly.")));
Anchor anchor = new Anchor();
anchor.setText("Click here to assess your individual practices.");
anchor.getElement().addEventListener("click", e -> MainLayout.navigate(Assessment.class, category.getPath() + "/" + category.getItems().get(0).getPath()));
mainLayout.add(div, anchor, form);
}
Aggregations