Search in sources :

Example 1 with VerticalFlexLayout

use of de.catma.ui.layout.VerticalFlexLayout in project catma by forTEXT.

the class ProjectView method initComponents.

/* build the GUI */
private void initComponents() {
    progressBar = new ProgressBar();
    progressBar.setIndeterminate(false);
    progressBar.setVisible(false);
    addComponent(progressBar);
    setComponentAlignment(progressBar, Alignment.TOP_CENTER);
    HorizontalFlexLayout mainPanel = new HorizontalFlexLayout();
    mainPanel.setFlexWrap(FlexWrap.WRAP);
    mainPanel.addStyleName("project-view-main-panel");
    VerticalFlexLayout resourcePanel = new VerticalFlexLayout();
    // don't set width 100%
    resourcePanel.setSizeUndefined();
    resourcePanel.addComponent(new Label("Resources"));
    mainPanel.addComponent(resourcePanel);
    addComponent(mainPanel);
    setExpandRatio(mainPanel, 1.f);
    resourcePanel.addComponent(initResourceContent());
    teamPanel = new VerticalFlexLayout();
    // don't set width 100%
    teamPanel.setSizeUndefined();
    teamPanel.setVisible(false);
    teamPanel.addComponent(new Label("Team"));
    mainPanel.addComponent(teamPanel);
    teamPanel.addComponent(initTeamContent());
    btSynchBell = new IconButton(VaadinIcons.BELL);
    btSynchBell.addStyleName("project-view-synch-bell");
    getHugeCardBar().addComponentBeforeMoreOptions(btSynchBell);
    btSynchBell.setVisible(false);
}
Also used : VerticalFlexLayout(de.catma.ui.layout.VerticalFlexLayout) IconButton(de.catma.ui.component.IconButton) Label(com.vaadin.ui.Label) HorizontalFlexLayout(de.catma.ui.layout.HorizontalFlexLayout) ProgressBar(com.vaadin.ui.ProgressBar)

Example 2 with VerticalFlexLayout

use of de.catma.ui.layout.VerticalFlexLayout in project catma by forTEXT.

the class NotLoggedInMainView method initComponents.

private void initComponents() {
    setSizeFull();
    setAlignItems(AlignItems.CENTER);
    addStyleName("home");
    HorizontalFlexLayout menuLayout = new HorizontalFlexLayout();
    menuLayout.setWidth("100%");
    menuLayout.setJustifyContent(JustifyContent.FLEX_END);
    menuLayout.setAlignItems(AlignItems.CENTER);
    menuLayout.addStyleName("home__menu");
    // $NON-NLS-1$
    menuLayout.setWidth("100%");
    addComponent(menuLayout);
    Link aboutLink = new Link("About", new ExternalResource(CATMAPropertyKey.AboutURL.getValue(CATMAPropertyKey.AboutURL.getDefaultValue())));
    // $NON-NLS-1$
    aboutLink.setTargetName("_blank");
    menuLayout.addComponent(aboutLink);
    Link imprintLink = new Link("Imprint", new ExternalResource(CATMAPropertyKey.ImprintURL.getValue(CATMAPropertyKey.ImprintURL.getDefaultValue())));
    imprintLink.setTargetName("_blank");
    menuLayout.addComponent(imprintLink);
    Link termsOfUseLink = new Link("Terms of Use", new ExternalResource(CATMAPropertyKey.TermsOfUseURL.getValue(CATMAPropertyKey.TermsOfUseURL.getDefaultValue())));
    // $NON-NLS-1$
    termsOfUseLink.setTargetName("_blank");
    menuLayout.addComponent(termsOfUseLink);
    Link privacyLink = new Link("Privacy Policy", new ExternalResource(CATMAPropertyKey.PrivacyPolicyURL.getValue(CATMAPropertyKey.PrivacyPolicyURL.getDefaultValue())));
    privacyLink.setTargetName("_blank");
    menuLayout.addComponent(privacyLink);
    statusLink = new Link("Status", new ExternalResource(CATMAPropertyKey.StatusURL.getValue(CATMAPropertyKey.StatusURL.getDefaultValue())));
    statusLink.setTargetName("_blank");
    menuLayout.addComponent(statusLink);
    IconButton btHelp = new IconButton(VaadinIcons.QUESTION_CIRCLE, click -> {
        if (uiHelpWindow.getParent() == null) {
            UI.getCurrent().addWindow(uiHelpWindow);
        } else {
            UI.getCurrent().removeWindow(uiHelpWindow);
        }
    });
    menuLayout.addComponent(btHelp);
    VerticalFlexLayout contentPanel = new VerticalFlexLayout();
    // $NON-NLS-1$
    contentPanel.setHeight("100%");
    // $NON-NLS-1$
    contentPanel.addStyleName("home__content");
    // $NON-NLS-1$
    ThemeResource logoResource = new ThemeResource("catma-tailright-final-cmyk.svg");
    Image logoImage = new Image(null, logoResource);
    logoImage.setStyleName("not-logged-in-main-view-logo");
    contentPanel.addComponent(logoImage);
    noticePanelVerticalLayout = new VerticalLayout();
    noticePanelVerticalLayout.addStyleName("vlayout");
    HorizontalFlexLayout noticePanel = new HorizontalFlexLayout(noticePanelVerticalLayout);
    noticePanel.addStyleName("not-logged-in-main-view-noticepanel");
    noticePanel.setJustifyContent(JustifyContent.CENTER);
    contentPanel.addComponent(noticePanel);
    renderNotices();
    LabelButton btn_signup = new LabelButton("Sign up", event -> new SignUpDialog("Sign Up").show());
    LabelButton btn_login = new LabelButton("Sign in", event -> new AuthenticationDialog("Sign In", CATMAPropertyKey.BaseURL.getValue(CATMAPropertyKey.BaseURL.getDefaultValue()), loginService, initService, hazelCastService, sqliteService, eventBus).show());
    Link newsLetterLink = new Link("Newsletter", new ExternalResource("https://catma.de/newsletter/"));
    newsLetterLink.setTargetName("_blank");
    newsLetterLink.addStyleName("button__label");
    HorizontalFlexLayout buttonPanel = new HorizontalFlexLayout(btn_signup, btn_login, newsLetterLink);
    buttonPanel.addStyleName("home__content__btns");
    buttonPanel.setJustifyContent(JustifyContent.CENTER);
    contentPanel.addComponent(buttonPanel);
    addComponent(contentPanel);
    HorizontalFlexLayout bottomPanel = new HorizontalFlexLayout();
    bottomPanel.addStyleName("not-logged-in-main-view-fortext-bottom-panel");
    addComponent(bottomPanel);
    Link fortextButton = new Link("", new ExternalResource("https://fortext.net"));
    fortextButton.setIcon(new ThemeResource("fortext_logo.png"));
    fortextButton.setTargetName("_blank");
    fortextButton.addStyleName("not-logged-in-main-view-fortext-button");
    Label fortextLabel = new Label("developed and maintained</br>in cooperation with");
    fortextLabel.setContentMode(ContentMode.HTML);
    fortextLabel.addStyleName("not-logged-in-main-view-fortext-label");
    bottomPanel.addComponent(fortextLabel);
    bottomPanel.addComponent(fortextButton);
}
Also used : VerticalFlexLayout(de.catma.ui.layout.VerticalFlexLayout) IconButton(de.catma.ui.component.IconButton) SignUpDialog(de.catma.ui.module.main.signup.SignUpDialog) AuthenticationDialog(de.catma.ui.module.main.login.AuthenticationDialog) Label(com.vaadin.ui.Label) ThemeResource(com.vaadin.server.ThemeResource) VerticalLayout(com.vaadin.ui.VerticalLayout) HorizontalFlexLayout(de.catma.ui.layout.HorizontalFlexLayout) Image(com.vaadin.ui.Image) LabelButton(de.catma.ui.component.LabelButton) ExternalResource(com.vaadin.server.ExternalResource) Link(com.vaadin.ui.Link)

Aggregations

Label (com.vaadin.ui.Label)2 IconButton (de.catma.ui.component.IconButton)2 HorizontalFlexLayout (de.catma.ui.layout.HorizontalFlexLayout)2 VerticalFlexLayout (de.catma.ui.layout.VerticalFlexLayout)2 ExternalResource (com.vaadin.server.ExternalResource)1 ThemeResource (com.vaadin.server.ThemeResource)1 Image (com.vaadin.ui.Image)1 Link (com.vaadin.ui.Link)1 ProgressBar (com.vaadin.ui.ProgressBar)1 VerticalLayout (com.vaadin.ui.VerticalLayout)1 LabelButton (de.catma.ui.component.LabelButton)1 AuthenticationDialog (de.catma.ui.module.main.login.AuthenticationDialog)1 SignUpDialog (de.catma.ui.module.main.signup.SignUpDialog)1