Example usage for com.vaadin.server FontAwesome GITHUB

List of usage examples for com.vaadin.server FontAwesome GITHUB

Introduction

In this page you can find the example usage for com.vaadin.server FontAwesome GITHUB.

Prototype

FontAwesome GITHUB

To view the source code for com.vaadin.server FontAwesome GITHUB.

Click Source Link

Usage

From source file:com.javalego.store.environment.BaseEnvironment.java

@Override
public synchronized Collection<RepositoryIcons<Icon>> getRepositoriesIcons() throws LocalizedException {

    if (repositories != null) {
        return repositories;
    }/* ww  w.ja  va  2s.co  m*/

    repositories = new ArrayList<RepositoryIcons<Icon>>();

    // Iconos de redes sociales usando FonAwesome icons.
    FontAwesomeIcons fa = FontAwesomeIcons.getCurrent();
    fa.addIcon(MenuIcons2.BOOK, FontAwesome.BOOK);
    fa.addIcon(MenuIcons2.MONITOR, FontAwesome.DESKTOP);
    fa.addIcon(MenuIcons2.SOURCECODE, FontAwesome.CODE);
    fa.addIcon(MenuIcons2.GITHUB, FontAwesome.GITHUB);
    fa.addIcon(MenuIcons2.METRICS, FontAwesome.BAR_CHART_O);
    fa.addIcon(MenuIcons2.WEB, FontAwesome.GLOBE);
    fa.addIcon(MenuIcons2.TWITTER, FontAwesome.TWITTER);
    fa.addIcon(MenuIcons2.FORUM, FontAwesome.USERS);
    fa.addIcon(MenuIcons2.BLOG, FontAwesome.WORDPRESS);
    fa.addIcon(MenuIcons2.LINKEDIN, FontAwesome.LINKEDIN);
    fa.addIcon(MenuIcons2.FACEBOOK, FontAwesome.FACEBOOK);
    fa.addIcon(MenuIcons2.GOOGLEPLUS, FontAwesome.GOOGLE_PLUS);
    fa.addIcon(MenuIcons2.EMAIL, FontAwesome.ENVELOPE);
    fa.addIcon(MenuIcons2.TOOLS, FontAwesome.COGS);
    fa.addIcon(MenuIcons2.LICENSE, FontAwesome.FILE);

    // Resto de iconos
    ResourceIconsVaadin rep = ResourceIconsVaadin.getCurrent();
    //rep.setLocale(Locale.US);
    rep.load(MenuIcons.class, "/menu_icons");
    rep.load(MenuIcons2.class, "/menu_icons2");
    rep.load(ProviderIcons.class, "/provider_icons");
    rep.load(IconEditor.class, "/icons_editor");

    repositories.add(fa);
    repositories.add(rep);

    return repositories;
}