List of usage examples for com.vaadin.server FontAwesome AMBULANCE
FontAwesome AMBULANCE
To view the source code for com.vaadin.server FontAwesome AMBULANCE.
Click Source Link
From source file:fr.univlorraine.mondossierweb.views.AssistanceView.java
License:Apache License
/** * Initialise la vue// w w w . j a v a2s . c om */ @PostConstruct public void init() { //On vrifie le droit d'accder la vue if (userController.isEnseignant()) { // Style setMargin(true); setSpacing(true); // Rcupration de la configuration pour cette vue String docUrl = configController.getAssistanceDocUrl(); String helpdeskUrl = configController.getAssistanceHelpdeskUrl(); String mailContact = configController.getAssistanceContactMail(); // Titre Label title = new Label(applicationContext.getMessage(NAME + ".title", null, getLocale())); title.addStyleName(ValoTheme.LABEL_H1); addComponent(title); // Texte if (StringUtils.hasText(applicationContext.getMessage(NAME + ".text", null, getLocale()))) { addComponent(new Label(applicationContext.getMessage(NAME + ".text", null, getLocale()), ContentMode.HTML)); } // Afficher la pop-up de dmarrage Button popupBtn = new Button(applicationContext.getMessage(NAME + ".btnPopUp", null, getLocale()), FontAwesome.INFO); popupBtn.addStyleName(ValoTheme.BUTTON_LINK); popupBtn.addClickListener(e -> MainUI.getCurrent().afficherMessageIntroEnseignants(true, false)); addComponent(popupBtn); // Accs la documentation if (StringUtils.hasText(docUrl)) { Button docBtn = new Button(applicationContext.getMessage(NAME + ".btnDoc", null, getLocale()), FontAwesome.FILE_TEXT); docBtn.addStyleName(ValoTheme.BUTTON_LINK); BrowserWindowOpener docBwo = new BrowserWindowOpener(docUrl); docBwo.extend(docBtn); addComponent(docBtn); } // Envoyer un ticket if (StringUtils.hasText(helpdeskUrl)) { Button helpDeskBtn = new Button( applicationContext.getMessage(NAME + ".btnHelpdesk", null, getLocale()), FontAwesome.AMBULANCE); helpDeskBtn.addStyleName(ValoTheme.BUTTON_LINK); BrowserWindowOpener helpDeskBwo = new BrowserWindowOpener(helpdeskUrl); helpDeskBwo.extend(helpDeskBtn); addComponent(helpDeskBtn); } // Envoyer un mail if (StringUtils.hasText(mailContact)) { Button contactBtn = new Button(applicationContext.getMessage(NAME + ".btnContact", new Object[] { mailContact }, getLocale()), FontAwesome.ENVELOPE); contactBtn.addStyleName(ValoTheme.BUTTON_LINK); BrowserWindowOpener contactBwo = new BrowserWindowOpener("mailto:" + mailContact); contactBwo.extend(contactBtn); addComponent(contactBtn); } /* Deconnexion */ //Voir si on peut accder l'appli hors ENT, le dtecter, et afficher le bouton dconnexion if (configController.isLogoutCasPropose()) { Button decoBtn = new Button("Dconnexion", FontAwesome.SIGN_OUT); decoBtn.addStyleName(ValoTheme.BUTTON_LINK); decoBtn.addClickListener(e -> { getUI().getPage().setLocation("j_spring_security_logout"); }); addComponent(decoBtn); } } }
From source file:org.opencms.ui.apps.AppConfiguration.java
License:Open Source License
public Resource getIcon() { return FontAwesome.AMBULANCE; }