List of usage examples for com.vaadin.ui VerticalLayout VerticalLayout
public VerticalLayout()
From source file:com.esofthead.mycollab.mobile.module.project.view.milestone.MilestoneFormLayoutFactory.java
License:Open Source License
@Override public ComponentContainer getLayout() { final VerticalLayout layout = new VerticalLayout(); layout.setMargin(false);// w w w.ja v a2s. com Label header = new Label(AppContext.getMessage(MilestoneI18nEnum.M_FORM_READ_TITLE)); header.setStyleName("h2"); layout.addComponent(header); this.informationLayout = new GridFormLayoutHelper(1, 8, "100%", "150px", Alignment.TOP_LEFT); this.informationLayout.getLayout().setWidth("100%"); this.informationLayout.getLayout().addStyleName("colored-gridlayout"); this.informationLayout.getLayout().setMargin(false); layout.addComponent(this.informationLayout.getLayout()); layout.setComponentAlignment(this.informationLayout.getLayout(), Alignment.BOTTOM_CENTER); return layout; }
From source file:com.esofthead.mycollab.mobile.module.project.view.ProjectDashboardViewImpl.java
License:Open Source License
@Override public void displayDashboard() { mainLayout.removeAllComponents();/*from www . j av a2 s .co m*/ SimpleProject currentProject = CurrentProjectVariables.getProject(); VerticalLayout projectInfo = new VerticalLayout(); projectInfo.setStyleName("project-info-layout"); projectInfo.setWidth("100%"); projectInfo.setDefaultComponentAlignment(Alignment.TOP_CENTER); Label projectIcon = new Label("<span aria-hidden=\"true\" data-icon=\"\"></span>"); projectIcon.setStyleName("project-icon"); projectIcon.setContentMode(ContentMode.HTML); projectIcon.setWidthUndefined(); projectInfo.addComponent(projectIcon); Label projectName = new Label(StringUtils.trim(currentProject.getName(), 50, true)); projectName.setWidth("100%"); projectName.setStyleName("project-name"); projectInfo.addComponent(projectName); GridLayout projectModulesList = new GridLayout(2, 3); projectModulesList.setStyleName("project-modules-layout"); projectModulesList.setWidth("100%"); projectModulesList.setSpacing(true); projectModulesList.setDefaultComponentAlignment(Alignment.TOP_CENTER); projectModulesList.addComponent( new ProjectModuleButton(AppContext.getMessage(ProjectCommonI18nEnum.VIEW_MESSAGE), "")); projectModulesList.addComponent( new ProjectModuleButton(AppContext.getMessage(ProjectCommonI18nEnum.VIEW_MILESTONE), "")); projectModulesList.addComponent( new ProjectModuleButton(AppContext.getMessage(ProjectCommonI18nEnum.VIEW_TASK), "")); projectModulesList.addComponent( new ProjectModuleButton(AppContext.getMessage(ProjectCommonI18nEnum.VIEW_BUG), "")); // projectModulesList.addComponent(new ProjectModuleButton(AppContext // .getMessage(ProjectCommonI18nEnum.VIEW_FILE), "")); // // projectModulesList.addComponent(new ProjectModuleButton(AppContext // .getMessage(ProjectCommonI18nEnum.VIEW_RISK), "")); // // projectModulesList.addComponent(new ProjectModuleButton(AppContext // .getMessage(ProjectCommonI18nEnum.VIEW_PROBLEM), "")); // // projectModulesList.addComponent(new ProjectModuleButton(AppContext // .getMessage(ProjectCommonI18nEnum.VIEW_TIME), "")); // // projectModulesList.addComponent(new ProjectModuleButton(AppContext // .getMessage(ProjectCommonI18nEnum.VIEW_STANDAUP), "")); projectModulesList.addComponent( new ProjectModuleButton(AppContext.getMessage(ProjectCommonI18nEnum.VIEW_USERS), ""), 0, 2, 1, 2); mainLayout.addComponent(projectInfo); mainLayout.addComponent(projectModulesList); }
From source file:com.esofthead.mycollab.mobile.module.project.view.ProjectLoginViewImpl.java
License:Open Source License
private void initUI() { this.setStyleName("login-view"); this.setSizeFull(); VerticalLayout contentLayout = new VerticalLayout(); contentLayout.setStyleName("content-wrapper"); contentLayout.setDefaultComponentAlignment(Alignment.TOP_CENTER); contentLayout.setMargin(true);/*from www. j a va 2s . c om*/ contentLayout.setSpacing(true); contentLayout.setWidth("320px"); Image mainLogo = new Image(null, new ThemeResource("icons/logo_m.png")); contentLayout.addComponent(mainLogo); Label introText = new Label( "MyCollab helps you do all your office jobs on the computers, phones and tablets you use"); introText.setStyleName("intro-text"); contentLayout.addComponent(introText); CssLayout welcomeTextWrapper = new CssLayout(); welcomeTextWrapper.setStyleName("welcometext-wrapper"); welcomeTextWrapper.setWidth("100%"); Label welcomeText = new Label("Login to Projects"); welcomeText.setWidth("150px"); welcomeTextWrapper.addComponent(welcomeText); contentLayout.addComponent(welcomeTextWrapper); final EmailField emailField = new EmailField(); emailField.setWidth("100%"); emailField.setInputPrompt("E-mail Address"); emailField.setStyleName("email-input"); contentLayout.addComponent(emailField); final PasswordField pwdField = new PasswordField(); pwdField.setWidth("100%"); pwdField.setInputPrompt("Password"); pwdField.setStyleName("password-input"); contentLayout.addComponent(pwdField); final CheckBox rememberPassword = new CheckBox(); rememberPassword.setWidth("100%"); rememberPassword.setCaption("Remember password"); rememberPassword.setValue(true); contentLayout.addComponent(rememberPassword); Button signInBtn = new Button("Sign In"); signInBtn.setWidth("100%"); signInBtn.addStyleName(UIConstants.BUTTON_BIG); signInBtn.addStyleName(UIConstants.COLOR_BLUE); signInBtn.addClickListener(new Button.ClickListener() { private static final long serialVersionUID = 1L; @Override public void buttonClick(Button.ClickEvent event) { EventBusFactory.getInstance().post(new ProjectEvent.PlainLogin(this, new String[] { emailField.getValue(), pwdField.getValue(), String.valueOf(rememberPassword.getValue()) })); } }); contentLayout.addComponent(signInBtn); Button createAccountBtn = new Button("Create Account"); createAccountBtn.setWidth("100%"); createAccountBtn.addStyleName(UIConstants.BUTTON_BIG); createAccountBtn.addStyleName(UIConstants.COLOR_GRAY); contentLayout.addComponent(createAccountBtn); this.addComponent(contentLayout); }
From source file:com.esofthead.mycollab.mobile.module.project.view.settings.ProjectMemberFormLayoutFactory.java
License:Open Source License
@Override public ComponentContainer getLayout() { final VerticalLayout layout = new VerticalLayout(); layout.setMargin(false);// ww w .jav a 2s. c o m Label header = new Label(AppContext.getMessage(ProjectMemberI18nEnum.FORM_INFORMATION_SECTION)); header.setStyleName("h2"); layout.addComponent(header); this.informationLayout = new GridFormLayoutHelper(1, 3, "100%", "150px", Alignment.TOP_LEFT); this.informationLayout.getLayout().setWidth("100%"); this.informationLayout.getLayout().addStyleName("colored-gridlayout"); this.informationLayout.getLayout().setMargin(false); layout.addComponent(this.informationLayout.getLayout()); layout.setComponentAlignment(this.informationLayout.getLayout(), Alignment.BOTTOM_CENTER); return layout; }
From source file:com.esofthead.mycollab.mobile.module.project.view.settings.ProjectMemberInviteViewImpl.java
License:Open Source License
private void constructUI() { this.roleComboBox = new ProjectRoleComboBox(); this.roleComboBox.addValueChangeListener(new ValueChangeListener() { private static final long serialVersionUID = 1L; @Override//ww w. j av a 2s. com public void valueChange(ValueChangeEvent event) { Integer roleId = (Integer) roleComboBox.getValue(); displayRolePermission(roleId); } }); roleComboBox.setCaption(AppContext.getMessage(ProjectMemberI18nEnum.FORM_ROLE)); final VerticalLayout mainLayout = new VerticalLayout(); mainLayout.setStyleName("main-layout"); mainLayout.addStyleName("editview-layout"); mainLayout.setWidth("100%"); inviteFormLayout = new VerticalComponentGroup(); inviteFormLayout.setWidth("100%"); inviteEmailField = new EmailField(); inviteEmailField.setCaption(AppContext.getMessage(ProjectMemberI18nEnum.M_FORM_EMAIL)); inviteFormLayout.addComponent(inviteEmailField); messageArea = new TextArea(); messageArea.setValue(AppContext.getMessage(ProjectMemberI18nEnum.MSG_DEFAULT_INVITATION_COMMENT)); messageArea.setCaption(AppContext.getMessage(ProjectMemberI18nEnum.FORM_MESSAGE)); inviteFormLayout.addComponent(messageArea); inviteFormLayout.addComponent(roleComboBox); mainLayout.addComponent(inviteFormLayout); Label permissionSectionHdr = new Label(AppContext.getMessage(ProjectRoleI18nEnum.SECTION_PERMISSIONS)); permissionSectionHdr.setStyleName("h2"); mainLayout.addComponent(permissionSectionHdr); permissionsPanel = new VerticalComponentGroup(); mainLayout.addComponent(permissionsPanel); Button inviteBtn = new Button(AppContext.getMessage(ProjectMemberI18nEnum.BUTTON_NEW_INVITEE), new Button.ClickListener() { private static final long serialVersionUID = 1L; @Override public void buttonClick(ClickEvent event) { if (inviteEmailField.getValue() == "") { return; } ProjectMemberInviteViewImpl.this.roleId = (Integer) roleComboBox.getValue(); ProjectMemberInviteViewImpl.this .fireEvent(new ViewEvent<ProjectMemberEvent.InviteProjectMembers>( ProjectMemberInviteViewImpl.this, new ProjectMemberEvent.InviteProjectMembers( Arrays.asList(inviteEmailField.getValue()), ProjectMemberInviteViewImpl.this.roleId, messageArea.getValue()))); } }); inviteBtn.addStyleName("save-btn"); this.setRightComponent(inviteBtn); this.setContent(mainLayout); }
From source file:com.esofthead.mycollab.mobile.module.project.view.task.TaskFormLayoutFactory.java
License:Open Source License
@Override public ComponentContainer getLayout() { final VerticalLayout layout = new VerticalLayout(); layout.setMargin(false);/* www. j a v a 2 s . c om*/ Label header = new Label(AppContext.getMessage(TaskI18nEnum.M_FORM_READ_TITLE)); header.setStyleName("h2"); layout.addComponent(header); this.informationLayout = new GridFormLayoutHelper(1, 11, "100%", "150px", Alignment.TOP_LEFT); this.informationLayout.getLayout().setMargin(false); this.informationLayout.getLayout().setWidth("100%"); this.informationLayout.getLayout().addStyleName("colored-gridlayout"); layout.addComponent(this.informationLayout.getLayout()); layout.setComponentAlignment(this.informationLayout.getLayout(), Alignment.BOTTOM_CENTER); return layout; }
From source file:com.esofthead.mycollab.mobile.module.project.view.task.TaskGroupFormLayoutFactory.java
License:Open Source License
@Override public ComponentContainer getLayout() { final VerticalLayout layout = new VerticalLayout(); Label header = new Label(AppContext.getMessage(TaskGroupI18nEnum.M_FORM_READ_TITLE)); header.setStyleName("h2"); layout.addComponent(header);/*from w w w . ja v a 2 s. c o m*/ this.informationLayout = new GridFormLayoutHelper(1, 6, "100%", "150px", Alignment.TOP_LEFT); this.informationLayout.getLayout().addStyleName("colored-gridlayout"); this.informationLayout.getLayout().setMargin(false); this.informationLayout.getLayout().setWidth("100%"); layout.addComponent(this.informationLayout.getLayout()); layout.setComponentAlignment(this.informationLayout.getLayout(), Alignment.BOTTOM_CENTER); return layout; }
From source file:com.esofthead.mycollab.mobile.module.user.view.LoginViewImpl.java
License:Open Source License
private void initUI() { this.setStyleName("login-view"); this.setSizeFull(); VerticalLayout contentLayout = new VerticalLayout(); contentLayout.setStyleName("content-wrapper"); contentLayout.setDefaultComponentAlignment(Alignment.TOP_CENTER); contentLayout.setMargin(true);//from ww w. ja v a 2 s. c om contentLayout.setSpacing(true); contentLayout.setWidth("320px"); Image mainLogo = new Image(null, new ThemeResource("icons/logo_m.png")); contentLayout.addComponent(mainLogo); Label introText = new Label( "MyCollab helps you do all your office jobs on the computers, phones and tablets you use"); introText.setStyleName("intro-text"); contentLayout.addComponent(introText); CssLayout welcomeTextWrapper = new CssLayout(); welcomeTextWrapper.setStyleName("welcometext-wrapper"); welcomeTextWrapper.setWidth("100%"); welcomeTextWrapper.setHeight("15px"); Label welcomeText = new Label("Welcome Back!"); welcomeText.setWidth("150px"); welcomeTextWrapper.addComponent(welcomeText); contentLayout.addComponent(welcomeTextWrapper); final EmailField emailField = new EmailField(); emailField.setWidth("100%"); emailField.setInputPrompt("E-mail Address"); emailField.setStyleName("email-input"); contentLayout.addComponent(emailField); final PasswordField pwdField = new PasswordField(); pwdField.setWidth("100%"); pwdField.setInputPrompt("Password"); pwdField.setStyleName("password-input"); contentLayout.addComponent(pwdField); final CheckBox rememberPassword = new CheckBox(); rememberPassword.setWidth("100%"); rememberPassword.setCaption("Remember password"); rememberPassword.setValue(true); contentLayout.addComponent(rememberPassword); Button signInBtn = new Button("Sign In"); signInBtn.setWidth("100%"); signInBtn.addStyleName(UIConstants.BUTTON_BIG); signInBtn.addStyleName(UIConstants.COLOR_BLUE); signInBtn.addClickListener(new Button.ClickListener() { private static final long serialVersionUID = 1L; @Override public void buttonClick(Button.ClickEvent event) { ShellController.doLogin(emailField.getValue(), pwdField.getValue(), rememberPassword.getValue()); } }); contentLayout.addComponent(signInBtn); Button createAccountBtn = new Button("Create Account"); createAccountBtn.setWidth("100%"); createAccountBtn.addStyleName(UIConstants.BUTTON_BIG); createAccountBtn.addStyleName(UIConstants.COLOR_GRAY); contentLayout.addComponent(createAccountBtn); this.addComponent(contentLayout); }
From source file:com.esofthead.mycollab.mobile.shell.ui.MainView.java
License:Open Source License
private void initUI() { this.setStyleName("main-view"); this.setSizeFull(); VerticalLayout contentLayout = new VerticalLayout(); contentLayout.setStyleName("content-wrapper"); contentLayout.setDefaultComponentAlignment(Alignment.TOP_CENTER); contentLayout.setMargin(true);/*www . j av a 2s . c o m*/ contentLayout.setSpacing(true); contentLayout.setWidth("320px"); Image mainLogo = new Image(null, new ThemeResource("icons/logo_m.png")); contentLayout.addComponent(mainLogo); Label introText = new Label( "MyCollab helps you do all your office jobs on the computers, phones and tablets you use"); introText.setStyleName("intro-text"); contentLayout.addComponent(introText); CssLayout welcomeTextWrapper = new CssLayout(); welcomeTextWrapper.setStyleName("welcometext-wrapper"); welcomeTextWrapper.setWidth("100%"); welcomeTextWrapper.setHeight("15px"); contentLayout.addComponent(welcomeTextWrapper); ModuleButton crmButton = new ModuleButton(AppContext.getMessage(GenericI18Enum.MODULE_CRM)); crmButton.setWidth("100%"); crmButton.addStyleName("crm"); crmButton.addClickListener(new Button.ClickListener() { private static final long serialVersionUID = -1218427186205574547L; @Override public void buttonClick(ClickEvent event) { EventBusFactory.getInstance().post(new ShellEvent.GotoCrmModule(this, null)); } }); contentLayout.addComponent(crmButton); ModuleButton pmButton = new ModuleButton(AppContext.getMessage(GenericI18Enum.MODULE_PROJECT)); pmButton.setWidth("100%"); pmButton.addStyleName("project"); pmButton.addClickListener(new Button.ClickListener() { private static final long serialVersionUID = -5323408319082242586L; @Override public void buttonClick(ClickEvent event) { EventBusFactory.getInstance().post(new ShellEvent.GotoProjectModule(this, null)); } }); contentLayout.addComponent(pmButton); ModuleButton fileButton = new ModuleButton(AppContext.getMessage(GenericI18Enum.MODULE_DOCUMENT)); fileButton.setWidth("100%"); fileButton.addStyleName("document"); contentLayout.addComponent(fileButton); this.addComponent(contentLayout); }
From source file:com.esofthead.mycollab.mobile.ui.ConfirmDialog.java
License:Open Source License
private void constructUI(final String message, final String okCaption, final String cancelCaption) { VerticalLayout layout = new VerticalLayout(); layout.setWidth("100%"); layout.setHeightUndefined();//from w ww. j a v a 2 s . c o m layout.setDefaultComponentAlignment(Alignment.MIDDLE_CENTER); VerticalLayout messageWrapper = new VerticalLayout(); messageWrapper.setStyleName("message-wrapper"); messageWrapper.setWidth("100%"); messageWrapper.setMargin(true); final Label messageDisplay = new Label(message); messageDisplay.setWidth("100%"); messageWrapper.addComponent(messageDisplay); layout.addComponent(messageWrapper); HorizontalLayout controlBtn = new HorizontalLayout(); controlBtn.setWidth("100%"); final Button okBtn = new Button(okCaption); okBtn.setWidth("100%"); okBtn.setHeight("35px"); final Button cancelBtn = new Button(cancelCaption); cancelBtn.setWidth("100%"); cancelBtn.setHeight("35px"); Button.ClickListener listener = new Button.ClickListener() { private static final long serialVersionUID = -8306231710367659086L; @Override public void buttonClick(ClickEvent event) { ConfirmDialog.this.setConfirmed(event.getButton() == okBtn); if (ConfirmDialog.this.getListener() != null) { ConfirmDialog.this.getListener().onClose(ConfirmDialog.this); } ConfirmDialog.this.close(); } }; okBtn.addClickListener(listener); cancelBtn.addClickListener(listener); controlBtn.addComponent(cancelBtn); controlBtn.addComponent(okBtn); layout.addComponent(controlBtn); this.setContent(layout); }