List of usage examples for com.vaadin.server FontAwesome USER
FontAwesome USER
To view the source code for com.vaadin.server FontAwesome USER.
Click Source Link
From source file:com.terralcode.gestion.frontend.view.widgets.incomingAppointments.IncomingAppointments.java
public AppointmentPreview(Appointment app) { this.appointment = app; this.addStyleName(ValoTheme.WINDOW_BOTTOM_TOOLBAR); HorizontalLayout hl = new HorizontalLayout(); hl.setSpacing(false);/*from ww w. j a va 2s .c o m*/ SimpleDateFormat sdf = new SimpleDateFormat("HH:mm"); String scheduleText = sdf.format(app.getProgramDateStart().getTime()); if (app.getTimeLapse() != null) { scheduleText += " (" + app.getTimeLapse().toString() + ")"; } schedule = new Button(scheduleText); schedule.addClickListener(new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { onAppointmentClicked(appointment); } }); schedule.addStyleName(ValoTheme.BUTTON_LINK); schedule.setWidth("100%"); hl.addComponent(schedule); //type = new Label(); if (app.getAppointmentType().getCode().equals("VIS")) { schedule.setIcon(FontAwesome.HOME); } if (app.getAppointmentType().getCode().equals("COM")) { schedule.setIcon(FontAwesome.PHONE); } if (app.getAppointmentType().getCode().equals("CON")) { schedule.setIcon(FontAwesome.USER); } //hl.addComponent(type); //hl.setComponentAlignment(type, Alignment.MIDDLE_RIGHT); hl.setExpandRatio(schedule, 1); this.addComponent(hl); if (app.getAppointmentType().getCode().equals("VIS") || app.getAppointmentType().getCode().equals("COM")) { customer = new Label(app.getCustomer().toString()); //customer.addStyleName(ValoTheme.LABEL_H3); customer.setWidth("100%"); this.addComponent(customer); } if ("VIS".equals(app.getAppointmentType().getCode())) { address = new Label(Objects.toString(app.getAddress(), "Direccin no disponible")); //address.addStyleName(ValoTheme.LABEL_H3); address.setWidth("100%"); this.addComponent(address); } if ("CON".equals(app.getAppointmentType().getCode())) { contact = new Label(app.getContactNotes()); //address.addStyleName(ValoTheme.LABEL_H3); contact.setWidth("100%"); this.addComponent(contact); } }
From source file:com.toptal.ui.view.LoginView.java
License:Open Source License
/** * Generates content.//from w w w . j a v a2 s. com * @return Content. */ private Component content() { final HorizontalLayout content = new HorizontalLayout(); content.setSpacing(true); this.username = new TextField("Username"); this.username.setIcon(FontAwesome.USER); this.username.addStyleName(ValoTheme.TEXTFIELD_INLINE_ICON); this.password = new PasswordField("Password"); this.password.setIcon(FontAwesome.LOCK); this.password.addStyleName(ValoTheme.TEXTFIELD_INLINE_ICON); final Button login = new Button("Log In"); login.addStyleName(ValoTheme.BUTTON_FRIENDLY); login.setClickShortcut(KeyCode.ENTER); login.focus(); login.addClickListener(e -> this.login(this.username.getValue(), this.password.getValue())); final Button signup = new Button("Sign Up"); signup.addStyleName(ValoTheme.BUTTON_PRIMARY); signup.addClickListener(e -> this.signup(this.username.getValue(), this.password.getValue())); content.addComponents(this.username, this.password, login, signup); content.setComponentAlignment(login, Alignment.BOTTOM_LEFT); content.setComponentAlignment(signup, Alignment.BOTTOM_LEFT); return content; }
From source file:com.trender.user.component.Header.java
public Component intitIngexPageComponent() { init();//w w w.j a va 2 s . c o m singInOrSingOutButton = new Button(); singInOrSingOutButton.setIcon(FontAwesome.USER); singInOrSingOutButton.setCaption(""); singInOrSingOutButton.setStyleName("v-button-header-login"); singUpButton = new Button(); singUpButton.setCaption("???"); singUpButton.addStyleName("v-button-header-reg"); singUpButton.addStyleName("v-button-primary"); addComponent(singInOrSingOutButton); addComponent(singUpButton); addComponent(menuBar); singInOrSingOutButton.addClickListener(new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { initWindowModal(400, "", true); } }); singUpButton.addClickListener(new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { initWindowModal(500, "??", false); } }); return this; }
From source file:com.vphakala.Toolbar.java
public Toolbar(String windowName, Button read, Button create, Button update, Button delete) { setSpacing(true);/*w ww . java 2s . c om*/ create.setIcon(FontAwesome.USER_PLUS); create.setDescription("Create a new " + windowName + "."); read.setIcon(FontAwesome.USER); read.setDescription("Read the " + windowName + ". Insert NAME."); update.setIcon(FontAwesome.SAVE); update.setDescription("Store the " + windowName + " data."); delete.setIcon(FontAwesome.TRASH); delete.setDescription("Remove the " + windowName); addComponents(read, create, update, delete); }
From source file:com.wintindustries.pfserver.interfaces.view.dashboard.LoginView.java
private Component buildFields() { HorizontalLayout fields = new HorizontalLayout(); fields.setSpacing(true);//from w w w . j a v a 2s. c o m fields.addStyleName("fields"); final TextField username = new TextField("Username"); username.setIcon(FontAwesome.USER); username.addStyleName(ValoTheme.TEXTFIELD_INLINE_ICON); final PasswordField password = new PasswordField("Password"); password.setIcon(FontAwesome.LOCK); password.addStyleName(ValoTheme.TEXTFIELD_INLINE_ICON); final Button signin = new Button("Sign In"); signin.addStyleName(ValoTheme.BUTTON_PRIMARY); signin.setClickShortcut(KeyCode.ENTER); signin.focus(); fields.addComponents(username, password, signin); fields.setComponentAlignment(signin, Alignment.BOTTOM_LEFT); signin.addClickListener(new ClickListener() { @Override public void buttonClick(final ClickEvent event) { System.out.println("TRIGGER LOGIN"); DashboardEventBus.post(new UserLoginRequestedEvent(username.getValue(), password.getValue())); } }); return fields; }
From source file:de.metas.procurement.webui.ui.view.LoginView.java
License:Open Source License
public LoginView() { super();//from w w w . j a va 2 s .c o m Application.autowire(this); addStyleName(STYLE); // // Content { final VerticalComponentGroup content = new VerticalComponentGroup(); final Resource logoResource = getLogoResource(); final Image logo = new Image(null, logoResource); logo.addStyleName(STYLE_Logo); content.addComponent(logo); this.email = new EmailField(i18n.get("LoginView.fields.email")); email.addStyleName(STYLE_LoginEmail); email.setIcon(FontAwesome.USER); content.addComponent(email); this.password = new PasswordField(i18n.get("LoginView.fields.password")); password.addStyleName(STYLE_LoginPassword); password.setIcon(FontAwesome.LOCK); content.addComponent(password); final Button loginButton = new Button(i18n.get("LoginView.fields.loginButton")); loginButton.addStyleName(STYLE_LoginButton); loginButton.setClickShortcut(KeyCode.ENTER); loginButton.addClickListener(new Button.ClickListener() { @Override public void buttonClick(final ClickEvent event) { onUserLogin(email.getValue(), password.getValue()); } }); final Button forgotPasswordButton = new Button(i18n.get("LoginView.fields.forgotPasswordButton")); forgotPasswordButton.setStyleName(STYLE_ForgotPasswordButton); forgotPasswordButton.addClickListener(new Button.ClickListener() { @Override public void buttonClick(ClickEvent event) { onForgotPassword(email.getValue()); } }); final CssLayout contentWrapper = new CssLayout(content, loginButton, forgotPasswordButton); contentWrapper.addStyleName(STYLE_LoginFormWrapper); setContent(contentWrapper); } // // Bottom: { // // Powered-by logo resource // Use the configured one if any; fallback to default embedded powered-by logo final Resource poweredByLogoResource; if (poweredByLogoUrl != null && !poweredByLogoUrl.trim().isEmpty()) { poweredByLogoResource = new ExternalResource(poweredByLogoUrl.trim()); } else { poweredByLogoResource = Constants.RESOURCE_PoweredBy; } // // Powered-by component: final Component poweredByComponent; if (poweredByLinkUrl != null && !poweredByLinkUrl.trim().isEmpty()) { final Link link = new Link(); link.setIcon(poweredByLogoResource); link.setResource(new ExternalResource(poweredByLinkUrl.trim())); link.setTargetName("_blank"); poweredByComponent = link; } else { final Image image = new Image(null, poweredByLogoResource); poweredByComponent = image; } // poweredByComponent.addStyleName(STYLE_PoweredBy); setToolbar(poweredByComponent); } }
From source file:fr.univlorraine.mondossierweb.MainUI.java
License:Apache License
/** * Ajout de l'onglet principal "dossier" contenant le dossier de l'tudiant *///w ww .j a v a 2 s.c o m private void addTabDossierEtudiant() { //Ajout de l'onglet "Dossier" tabDossierEtu = tabSheetGlobal.addTab(layoutDossierEtudiant, applicationContext.getMessage("mainUI.dossier.title", null, getLocale()), FontAwesome.USER); tabSheetGlobal.setTabPosition(tabDossierEtu, rangTabDossierEtudiant); //On cache l'onglet par dfaut tabSheetGlobal.getTab(rangTabDossierEtudiant).setVisible(false); //L'onglet possible une croix pour tre ferm tabSheetGlobal.getTab(rangTabDossierEtudiant).setClosable(true); }
From source file:fr.univlorraine.mondossierweb.MainUI.java
License:Apache License
/** * Construction du menu tudiant/*w w w .j av a 2 s. com*/ */ private void buildMainMenuEtudiant() { //Si l'tudiant dont on affiche le dossier est renseign if (etudiant != null) { //Ajout du style au menu mainMenu.setPrimaryStyleName(ValoTheme.MENU_PART); //On fixe la largeur du menu mainMenu.setWidth("233px"); //Si on a une url pour la photo de l'tudiant if (etudiant.getPhoto() != null) { //Layout contenant la photo HorizontalLayout photoLayout = new HorizontalLayout(); //Ajout du style au layout photoLayout.addStyleName(ValoTheme.MENU_SUBTITLE); //On fixe la largeur du layout photoLayout.setWidth(213, Unit.PIXELS); //La layout a des marges photoLayout.setMargin(true); //Bouton qui indique, en fonction de l'icone, si l'tudiant est inscrit pour l'anne en cours. Par dfaut, icone indiquant que l'tudiant est inscrit Button etuInscritBtn = new Button("", FontAwesome.CHECK_CIRCLE); //Ajout du style au bouton etuInscritBtn.setPrimaryStyleName(ValoTheme.BUTTON_BORDERLESS); //Si l'tudiant est inscrit pour l'anne en cours if (etudiant.isInscritPourAnneeEnCours()) { //On fixe la description du bouton etuInscritBtn.setDescription("Inscrit pour l'anne universitaire " + Utils.getAnneeUniversitaireEnCours(etudiantController.getAnneeUnivEnCours(this))); } else { //On change l'icone du bouton pour indiquer que l'tudiant n'est pas inscrit etuInscritBtn.setIcon(FontAwesome.EXCLAMATION_CIRCLE); //On fixe la description du bouton etuInscritBtn.setDescription("Non Inscrit pour l'anne universitaire " + Utils.getAnneeUniversitaireEnCours(etudiantController.getAnneeUnivEnCours(this))); } //Ajout d'un lment vide dans le layout photoLayout.addComponent(new HorizontalLayout()); //Cration de l'image contenant la photo Image fotoEtudiant = new Image(null, new ExternalResource(etudiant.getPhoto())); fotoEtudiant.setWidth("120px"); //Ajout de la photo au layout photoLayout.addComponent(fotoEtudiant); //Alignement de la photo photoLayout.setComponentAlignment(fotoEtudiant, Alignment.MIDDLE_CENTER); //La photo prend toute la place disponible dans son layout photoLayout.setExpandRatio(fotoEtudiant, 1); //Ajout au layout du bouton, qui indique, en fonction de l'icone, si l'tudiant est inscrit pour l'anne en cours photoLayout.addComponent(etuInscritBtn); //Ajout du layout de la photo au menu mainMenu.addComponent(photoLayout); } //Ajout du Prnom/Nom et codetu de l'tudiant dans le menu Label usernameLabel = new Label(etudiant.getNom() + "<br />" + etudiant.getCod_etu(), ContentMode.HTML); usernameLabel.addStyleName(ValoTheme.MENU_SUBTITLE); usernameLabel.addStyleName("retourALaLigneAutomatique"); usernameLabel.setSizeUndefined(); mainMenu.addComponent(usernameLabel); /* Etat Civil */ addItemMenu("Etat-civil", EtatCivilView.NAME, FontAwesome.USER); //info annuelles visibles que si tudiant inscrit pour l'anne en cours if (etudiant.isInscritPourAnneeEnCours()) { addItemMenu("Informations annuelles", InformationsAnnuellesView.NAME, FontAwesome.INFO_CIRCLE); } /* Adresses */ addItemMenu(applicationContext.getMessage(AdressesView.NAME + ".title", null, getLocale()), AdressesView.NAME, FontAwesome.HOME); /* Inscriptions */ addItemMenu("Inscriptions", InscriptionsView.NAME, FontAwesome.FILE_TEXT); /* Calendrier */ addItemMenu("Calendrier des preuves", CalendrierView.NAME, FontAwesome.CALENDAR); /* Notes et Rsultats */ addItemMenu(applicationContext.getMessage(NotesView.NAME + ".title", null, getLocale()), NotesView.NAME, FontAwesome.LIST); /* Sparation avant Bouton "Aide" */ CssLayout bottomMainMenu1 = new CssLayout(); bottomMainMenu1.setStyleName(ValoTheme.MENU_SUBTITLE); bottomMainMenu1.setSizeUndefined(); mainMenu.addComponent(bottomMainMenu1); /* Aide */ Button helpBtn = new Button(applicationContext.getMessage("helpWindow.defaultTitle", null, getLocale()), FontAwesome.SUPPORT); helpBtn.setPrimaryStyleName(ValoTheme.MENU_ITEM); helpBtn.addClickListener(e -> { UI.getCurrent() .addWindow(new HelpBasicWindow( applicationContext.getMessage("helpWindow.text.etudiant", null, getLocale()), applicationContext.getMessage("helpWindow.defaultTitle", null, getLocale()), true)); }); mainMenu.addComponent(helpBtn); /* Deconnexion */ //Voir si on peut accder l'appli hors ENT, le dtecter, et afficher le bouton dconnexion if (configController.isLogoutCasPropose() && userController.isEtudiant()) { Button decoBtn = new Button("Dconnexion", FontAwesome.SIGN_OUT); decoBtn.setPrimaryStyleName(ValoTheme.MENU_ITEM); decoBtn.addClickListener(e -> { getUI().getPage().setLocation("j_spring_security_logout"); }); mainMenu.addComponent(decoBtn); } /* Sparation */ CssLayout bottomMainMenu = new CssLayout(); bottomMainMenu.setStyleName(ValoTheme.MENU_SUBTITLE); bottomMainMenu.setSizeUndefined(); mainMenu.addComponent(bottomMainMenu); } }
From source file:local.ikram.assesment.web.SimpleFormComponent.java
private void initForm() { employeeId = new TextField("Employee Id: "); employeeId.setIcon(FontAwesome.FILE_PICTURE_O); employeeId.setRequired(true);// w w w . jav a 2s .c o m employeeId.addValidator(new StringLengthValidator("Must be btw 7 and 9 characters", 7, 9, false)); firstName = new TextField("First Name: "); firstName.setIcon(FontAwesome.USER); firstName.setRequired(true); firstName.addValidator(new NullValidator("Cannot be empty", false)); lastName = new TextField("Last Name: "); lastName.setIcon(FontAwesome.USER); lastName.setRequired(true); lastName.addValidator(new NullValidator("Cannot be empty", false)); phoneNumber = new TextField("Phone Number: "); phoneNumber.setIcon(FontAwesome.PHONE_SQUARE); phoneNumber.setRequired(true); phoneNumber.addValidator(new NullValidator("Cannot be empty", false)); department = new TextField("Department: "); department.setIcon(FontAwesome.DESKTOP); department.setRequired(true); department.addValidator(new NullValidator("Cannot be empty", false)); saveBtn = new Button("Save", FontAwesome.SAVE); saveBtn.addStyleName("save-btn"); saveBtn.addClickListener((Button.ClickEvent e) -> { try { employeeId.validate(); firstName.validate(); lastName.validate(); phoneNumber.validate(); department.validate(); update(getEmployee()); } catch (Validator.InvalidValueException ex) { Logger.getLogger(SimpleFormComponent.class.getName()).log(Level.SEVERE, ex.getLocalizedMessage(), ex); } }); deleteBtn = new Button("Delete", FontAwesome.RECYCLE); deleteBtn.addStyleName("delete-btn"); deleteBtn.addClickListener((Button.ClickEvent e) -> { delete(getEmployee()); }); addBtn = new Button("Add Employee", FontAwesome.PLUS_SQUARE); addBtn.addStyleName("add-btn"); addBtn.addClickListener((Button.ClickEvent e) -> { clear(); }); final HorizontalLayout buttonLayout = new HorizontalLayout(saveBtn, deleteBtn); buttonLayout.setSpacing(true); final FormLayout formLayout = new FormLayout(); formLayout.setSizeUndefined(); formLayout.setMargin(true); formLayout.setData(this); formLayout.addComponents(employeeId, firstName, lastName, phoneNumber, department, buttonLayout); setCompositionRoot(formLayout); setEmployee(new Employee()); BeanFieldGroup.bindFieldsUnbuffered(employee, this); }
From source file:me.uni.emuseo.view.login.LoginLayout.java
License:Open Source License
public LoginLayout() { loginField.setWidth(306, Unit.PIXELS); loginField.setIcon(FontAwesome.USER); loginField.addStyleName("inline-icon"); passField.setWidth(306, Unit.PIXELS); passField.setIcon(FontAwesome.LOCK); passField.addStyleName("inline-icon"); addComponent(loginField);// w w w. ja v a2s .c om addComponent(passField); addComponent(logButton); setComponentAlignment(loginField, Alignment.MIDDLE_CENTER); setComponentAlignment(passField, Alignment.MIDDLE_CENTER); setComponentAlignment(logButton, Alignment.BOTTOM_RIGHT); buildStyles(); final AuthManager authManager = EMuseoUtil.getAppContext().getBean(AuthManager.class); logButton.addClickListener(new Button.ClickListener() { private static final long serialVersionUID = 1324235262L; @Override public void buttonClick(ClickEvent event) { try { authManager.login(loginField.getValue(), passField.getValue()); } catch (AuthenticationException e) { Notification.show("Niepoprawny login lub haso"); } } }); logButton.setClickShortcut(KeyCode.ENTER); }