List of usage examples for com.vaadin.ui.themes ValoTheme FORMLAYOUT_LIGHT
String FORMLAYOUT_LIGHT
To view the source code for com.vaadin.ui.themes ValoTheme FORMLAYOUT_LIGHT.
Click Source Link
From source file:com.adonis.ui.vehicles.VehiclesCrudView.java
public VehiclesCrudView(VehicleService vehicleService, FotoAlbumService fotoAlbumService) { setSizeFull();//from w w w.j ava2 s.co m setStyleName(ValoTheme.FORMLAYOUT_LIGHT); addStyleName("backImage"); setVehiclesCrudProperties(vehicleService, fotoAlbumService); addComponent(vehiclesCrud); objects = vehicleService.findAll(); objects.forEach(vehicle -> { container.addBean(vehicle); }); setComponentAlignment(vehiclesCrud, Alignment.MIDDLE_CENTER); }
From source file:com.naoset.framework.frontend.component.profile.CustomerPanelView.java
private Component builtData() { FormLayout details = new FormLayout(); details.addStyleName(ValoTheme.FORMLAYOUT_LIGHT); code = new TextField("First Name"); details.addComponent(code);//from w w w .jav a2s .co m name = new TextField("Last Name"); details.addComponent(name); sexField = new OptionGroup("Sex"); sexField.addItem(Boolean.FALSE); sexField.setItemCaption(Boolean.FALSE, "Female"); sexField.addItem(Boolean.TRUE); sexField.setItemCaption(Boolean.TRUE, "Male"); sexField.addStyleName("horizontal"); details.addComponent(sexField); // Label section = new Label("Contact Info"); // section.addStyleName(ValoTheme.LABEL_H4); // section.addStyleName(ValoTheme.LABEL_COLORED); // details.addComponent(section); emailField = new TextField("Email"); emailField.setWidth("100%"); emailField.setRequired(true); emailField.setNullRepresentation(""); details.addComponent(emailField); locationField = new TextField("Direccin"); locationField.setWidth("100%"); locationField.setNullRepresentation(""); locationField.setComponentError(new UserError("This address doesn't exist")); details.addComponent(locationField); phoneField = new TextField("Telefono"); phoneField.setWidth("100%"); phoneField.setNullRepresentation(""); details.addComponent(phoneField); details.addComponent(buildSpecies()); return details; }
From source file:com.terralcode.frontend.vista.widgets.alumno.AlumnoVista.java
private FormLayout buildLayout() { mainLayout = new FormLayout(); mainLayout.addStyleName(ValoTheme.FORMLAYOUT_LIGHT); mainLayout.setMargin(new MarginInfo(true, false, false, false)); buildDatosAlumno();/*from w ww. j av a 2 s . c om*/ tabDatos = new TabSheet(); mainLayout.addComponent(tabDatos); buildDatosAlumnoExtras(); buildEmpresaTab(); buildDireccion(); buildEstudiosTab(); buildAyudasTab(); return mainLayout; }
From source file:com.terralcode.frontend.vista.widgets.alumno.DireccionVista.java
private FormLayout buildLayout() { mainLayout = new FormLayout(); mainLayout.addStyleName(ValoTheme.FORMLAYOUT_LIGHT); mainLayout.setMargin(new MarginInfo(true, false, false, false)); buildDireccion();//from ww w .j av a 2 s. c o m return mainLayout; }
From source file:com.terralcode.frontend.vista.widgets.empresa.EmpresaVista.java
private FormLayout buildLayout() { mainLayout = new FormLayout(); mainLayout.addStyleName(ValoTheme.FORMLAYOUT_LIGHT); mainLayout.setMargin(new MarginInfo(true, false, false, false)); // buildAlumnoHeader(); // buildCustomerSpecies(); // buildCustomerAddresses(); // buildCustomerContacts(); // buildSales(); // buildAppointments(); return mainLayout; }
From source file:com.terralcode.gestion.frontend.view.widgets.appointment.AppointmentView.java
private FormLayout buildAppointmentLayout() { rootLayout = new FormLayout(); rootLayout.addStyleName(ValoTheme.FORMLAYOUT_LIGHT); rootLayout.setMargin(new MarginInfo(true, false, false, false)); buildAppointmentHeader();// w w w . j a va2 s. c o m buildAppointmentContent(); buildAppointmentStatus(); return rootLayout; }
From source file:com.terralcode.gestion.frontend.view.widgets.customer.CustomerView.java
private FormLayout buildLayout() { mainLayout = new FormLayout(); mainLayout.addStyleName(ValoTheme.FORMLAYOUT_LIGHT); mainLayout.setMargin(new MarginInfo(true, false, false, false)); buildCustomerHeader();/*from w ww . ja va 2s . c o m*/ buildCustomerSpecies(); buildCustomerAddresses(); buildCustomerContacts(); buildSales(); buildAppointments(); return mainLayout; }
From source file:de.fatalix.bookery.view.admin.AppUserCard.java
License:Open Source License
private FormLayout createContent() { usernameField = new TextField("Username", "some.user"); passwordField = new PasswordField("Password", "password"); fullnameField = new TextField("Fullname", "Some User"); eMailField = new TextField("EMail", "user@some.de"); roles = new TextField("Roles", "user"); FormLayout userCardContent = new FormLayout(usernameField, passwordField, fullnameField, eMailField, roles); userCardContent.addStyleName(ValoTheme.FORMLAYOUT_LIGHT); userCardContent.setMargin(true);//from www . j a v a 2s . c o m return userCardContent; }
From source file:de.fatalix.bookery.view.admin.BatchJobCard.java
private FormLayout createContent() { batchJobTypeCombo = new ComboBox("Batch Type"); for (BatchJobType type : BatchJobType.values()) { batchJobTypeCombo.addItem(type); }/*from ww w. ja v a 2 s .c o m*/ batchJobTypeCombo.addValueChangeListener(new Property.ValueChangeListener() { @Override public void valueChange(Property.ValueChangeEvent event) { if (!noUpdate) { BatchJobType newType = ((BatchJobType) batchJobTypeCombo.getValue()); batchJobConfiguration.setValue(newType.getDefaultConfig()); updateBean(); setFields(); } } }); description = new Label("description"); nextRuntime = new Label("---"); batchJobActive = new CheckBox("active", false); cronjobExpression = new TextField("Cronjob", "*******"); status = new TextField("Status", "-"); batchJobConfiguration = new TextArea("Configuration"); Button updateButton = new Button("update", new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { updateBean(); jobConfig = presenter.updateBatchJob(jobConfig); setFields(); logger.debug("Updated Batch Job..."); } }); updateButton.addStyleName(ValoTheme.BUTTON_FRIENDLY); FormLayout batchJobCardContent = new FormLayout(batchJobTypeCombo, description, cronjobExpression, batchJobActive, batchJobConfiguration, nextRuntime, status, updateButton); batchJobCardContent.addStyleName(ValoTheme.FORMLAYOUT_LIGHT); batchJobCardContent.setMargin(true); return batchJobCardContent; }
From source file:dhbw.clippinggorilla.userinterface.windows.PreferencesWindow.java
private Component buildUserTab(User user) { HorizontalLayout root = new HorizontalLayout(); root.setCaption(Language.get(Word.PROFILE)); root.setIcon(VaadinIcons.USER);//from w w w.j a va2 s . c o m root.setWidth("100%"); root.setSpacing(true); root.setMargin(true); FormLayout details = new FormLayout(); details.addStyleName(ValoTheme.FORMLAYOUT_LIGHT); root.addComponent(details); firstNameField = new TextField(Language.get(Word.FIRST_NAME)); firstNameField.setValue(user.getFirstName()); firstNameField.setMaxLength(20); firstNameField.addValueChangeListener(event -> { String firstNameError = UserUtils.checkName(event.getValue()); if (!firstNameError.isEmpty()) { firstNameField.setComponentError(new UserError(firstNameError, AbstractErrorMessage.ContentMode.HTML, ErrorMessage.ErrorLevel.INFORMATION)); VaadinUtils.infoNotification(firstNameError); saveButton.setEnabled(setError(firstNameField, true)); } else { firstNameField.setComponentError(null); boolean enabled = setError(firstNameField, false); saveButton.setEnabled(enabled); } }); setError(firstNameField, false); lastNameField = new TextField(Language.get(Word.LAST_NAME)); lastNameField.setValue(user.getLastName()); lastNameField.setMaxLength(20); lastNameField.addValueChangeListener(event -> { String lastNameError = UserUtils.checkName(event.getValue()); if (!lastNameError.isEmpty()) { lastNameField.setComponentError(new UserError(lastNameError, AbstractErrorMessage.ContentMode.HTML, ErrorMessage.ErrorLevel.INFORMATION)); VaadinUtils.infoNotification(lastNameError); saveButton.setEnabled(setError(lastNameField, true)); } else { lastNameField.setComponentError(null); saveButton.setEnabled(setError(lastNameField, false)); } }); setError(lastNameField, false); usernameField = new TextField(Language.get(Word.USERNAME)); usernameField.setValue(user.getUsername()); usernameField.setMaxLength(20); usernameField.addValueChangeListener(event -> { if (!event.getValue().equals(user.getUsername())) { String userNameError = UserUtils.checkUsername(event.getValue()); if (!userNameError.isEmpty()) { usernameField.setComponentError(new UserError(userNameError, AbstractErrorMessage.ContentMode.HTML, ErrorMessage.ErrorLevel.INFORMATION)); VaadinUtils.infoNotification(userNameError); saveButton.setEnabled(setError(usernameField, true)); } else { usernameField.setComponentError(null); saveButton.setEnabled(setError(usernameField, false)); } } else { usernameField.setComponentError(null); saveButton.setEnabled(setError(usernameField, false)); } }); setError(usernameField, false); emailField = new TextField(Language.get(Word.EMAIL)); emailField.setValue(user.getEmail()); emailField.setMaxLength(256); emailField.addValueChangeListener(event -> { if (!event.getValue().equals(user.getEmail())) { String email1Error = UserUtils.checkEmail(event.getValue().toLowerCase()); if (!email1Error.isEmpty()) { emailField.setComponentError(new UserError(email1Error, AbstractErrorMessage.ContentMode.HTML, ErrorMessage.ErrorLevel.INFORMATION)); VaadinUtils.infoNotification(email1Error); saveButton.setEnabled(setError(emailField, true)); } else { emailField.setComponentError(null); saveButton.setEnabled(setError(emailField, false)); } } else { emailField.setComponentError(null); saveButton.setEnabled(setError(emailField, false)); } }); setError(emailField, false); oldPasswordField = new PasswordField(Language.get(Word.OLD_PASSWORD)); oldPasswordField.setValue(""); oldPasswordField.setMaxLength(51); oldPasswordField.addValueChangeListener(event -> { if (!event.getValue().isEmpty()) { String password1Error = UserUtils.checkPassword(event.getValue()); if (!password1Error.isEmpty()) { oldPasswordField.setComponentError(new UserError(password1Error, AbstractErrorMessage.ContentMode.HTML, ErrorMessage.ErrorLevel.INFORMATION)); VaadinUtils.infoNotification(password1Error); saveButton.setEnabled(setError(oldPasswordField, true)); } else { oldPasswordField.setComponentError(null); saveButton.setEnabled(setError(oldPasswordField, false)); } } else { oldPasswordField.setComponentError(null); saveButton.setEnabled(setError(oldPasswordField, false)); } }); setError(oldPasswordField, false); ProgressBar strength = new ProgressBar(); password1Field = new PasswordField(Language.get(Word.PASSWORD)); password1Field.setValue(""); password1Field.setMaxLength(51); password1Field.addValueChangeListener(event -> { if (!event.getValue().isEmpty()) { String password1Error = UserUtils.checkPassword(event.getValue()); strength.setValue(UserUtils.calculatePasswordStrength(event.getValue())); if (!password1Error.isEmpty()) { password1Field.setComponentError(new UserError(password1Error, AbstractErrorMessage.ContentMode.HTML, ErrorMessage.ErrorLevel.INFORMATION)); VaadinUtils.infoNotification(password1Error); saveButton.setEnabled(setError(password1Field, true)); } else { password1Field.setComponentError(null); saveButton.setEnabled(setError(password1Field, false)); } } else { password1Field.setComponentError(null); saveButton.setEnabled(setError(password1Field, false)); } }); setError(password1Field, false); strength.setWidth("184px"); strength.setHeight("1px"); password2Field = new PasswordField(Language.get(Word.PASSWORD_AGAIN)); password2Field.setValue(""); password2Field.setMaxLength(51); password2Field.addValueChangeListener(event -> { if (!event.getValue().isEmpty()) { String password2Error = UserUtils.checkPassword(event.getValue()) + UserUtils.checkSecondPassword(password1Field.getValue(), event.getValue()); if (!password2Error.isEmpty()) { password2Field.setComponentError(new UserError(password2Error, AbstractErrorMessage.ContentMode.HTML, ErrorMessage.ErrorLevel.INFORMATION)); VaadinUtils.infoNotification(password2Error); saveButton.setEnabled(setError(password2Field, true)); } else { password2Field.setComponentError(null); saveButton.setEnabled(setError(password2Field, false)); } } else { password2Field.setComponentError(null); saveButton.setEnabled(setError(password2Field, false)); } }); setError(password2Field, false); details.addComponents(firstNameField, lastNameField, usernameField, emailField, oldPasswordField, password1Field, strength, password2Field); return root; }