Search in sources :

Example 1 with Emphasis

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

Example 2 with Emphasis

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;
}
Also used : Emphasis(com.vaadin.flow.component.html.Emphasis) VerticalLayout(com.vaadin.flow.component.orderedlayout.VerticalLayout) H1(com.vaadin.flow.component.html.H1)

Example 3 with Emphasis

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;
}
Also used : Div(com.vaadin.flow.component.html.Div) Emphasis(com.vaadin.flow.component.html.Emphasis) Anchor(com.vaadin.flow.component.html.Anchor) FlexBoxLayout(io.bssw.psip.ui.components.FlexBoxLayout) UnorderedList(com.vaadin.flow.component.html.UnorderedList) H2(com.vaadin.flow.component.html.H2) ListItem(com.vaadin.flow.component.html.ListItem) Image(com.vaadin.flow.component.html.Image) Paragraph(com.vaadin.flow.component.html.Paragraph)

Example 4 with Emphasis

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);
}
Also used : FormLayout(com.vaadin.flow.component.formlayout.FormLayout) Div(com.vaadin.flow.component.html.Div) ScoreItem(io.bssw.psip.ui.components.ScoreItem) FormItem(com.vaadin.flow.component.formlayout.FormLayout.FormItem) Item(io.bssw.psip.backend.data.Item) Emphasis(com.vaadin.flow.component.html.Emphasis) Anchor(com.vaadin.flow.component.html.Anchor) FormItem(com.vaadin.flow.component.formlayout.FormLayout.FormItem) ScoreSlider(io.bssw.psip.ui.components.ScoreSlider) Paragraph(com.vaadin.flow.component.html.Paragraph)

Aggregations

Emphasis (com.vaadin.flow.component.html.Emphasis)4 Anchor (com.vaadin.flow.component.html.Anchor)3 Div (com.vaadin.flow.component.html.Div)3 Paragraph (com.vaadin.flow.component.html.Paragraph)3 Component (com.vaadin.flow.component.Component)1 FormLayout (com.vaadin.flow.component.formlayout.FormLayout)1 FormItem (com.vaadin.flow.component.formlayout.FormLayout.FormItem)1 H1 (com.vaadin.flow.component.html.H1)1 H2 (com.vaadin.flow.component.html.H2)1 Image (com.vaadin.flow.component.html.Image)1 ListItem (com.vaadin.flow.component.html.ListItem)1 UnorderedList (com.vaadin.flow.component.html.UnorderedList)1 VerticalLayout (com.vaadin.flow.component.orderedlayout.VerticalLayout)1 Item (io.bssw.psip.backend.data.Item)1 FlexBoxLayout (io.bssw.psip.ui.components.FlexBoxLayout)1 ScoreItem (io.bssw.psip.ui.components.ScoreItem)1 ScoreSlider (io.bssw.psip.ui.components.ScoreSlider)1 Strong (io.bssw.psip.ui.util.Strong)1