Example usage for com.vaadin.server FontAwesome USER

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

Introduction

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

Prototype

FontAwesome USER

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

Click Source Link

Usage

From source file:com.etest.view.systemadministration.SemestralTeam.AddSemestralTeamMembersWindow.java

FormLayout buildForms() {
    FormLayout form = new FormLayout();
    form.setWidth("100%");
    form.setSpacing(true);/*from w w w.  j  ava2  s. c  o m*/

    faculty = CommonComboBox.getAllFacultyExceptTeamLeader("Add Team Member.. ", getFacultyId());
    faculty.setWidth("60%");
    faculty.setIcon(FontAwesome.USER);
    form.addComponent(faculty);

    addMemberBtn.setWidth("60%");
    addMemberBtn.setIcon(FontAwesome.SAVE);
    addMemberBtn.addStyleName(ValoTheme.BUTTON_PRIMARY);
    addMemberBtn.addStyleName(ValoTheme.BUTTON_SMALL);
    addMemberBtn.addClickListener(buttonClickListener);
    form.addComponent(addMemberBtn);

    populateDataTable();
    form.addComponent(table);

    return form;
}

From source file:com.etest.view.systemadministration.SemestralTeam.AddSemestralTeamMembersWindow.java

Window editTeamMemberPositionWindow(int facultyRowId) {
    Window sub = new Window();
    sub.setCaption("REMOVE TEAM MEMBER");
    sub.setWidth("250px");
    sub.setModal(true);/* w  w  w .  java2s  .c om*/
    sub.center();

    VerticalLayout vlayout = new VerticalLayout();
    vlayout.setSizeFull();
    vlayout.setSpacing(true);
    vlayout.setMargin(true);

    String name = fs.getFacultyNameById(facultyRowId);
    vlayout.addComponent(new Label("Set " + name.toUpperCase() + " as Team Leader."));

    Button updateBtn = new Button("UPDATE");
    updateBtn.setWidth("100%");
    updateBtn.setIcon(FontAwesome.USER);
    updateBtn.addStyleName(ValoTheme.BUTTON_PRIMARY);
    updateBtn.addStyleName(ValoTheme.BUTTON_SMALL);
    updateBtn.addClickListener((Button.ClickEvent event) -> {
        int userId = us.getUserIdByFacultyId(facultyRowId);
        boolean result = tts.updateTeamTeach(getTeamTeachId(), userId);
        if (result) {
            sub.close();
            populateDataTable();
            close();
        }
    });
    vlayout.addComponent(updateBtn);

    sub.setContent(vlayout);
    sub.getContent().setHeightUndefined();

    return sub;
}

From source file:com.etest.view.systemadministration.SemestralTeamUI.java

FormLayout buildForms() {
    FormLayout form = new FormLayout();
    form.setWidth("400px");
    form.setSpacing(true);/*from w w  w .j av  a 2s.c  o  m*/

    subjects = CommonComboBox.getSubjectFromCurriculum("Subject..");
    subjects.setCaption("Curriculum: ");
    subjects.setIcon(FontAwesome.SEARCH);
    form.addComponent(subjects);

    schoolYear = CommonComboBox.getSchoolYear("School Year..");
    schoolYear.setCaption("School Year: ");
    schoolYear.setIcon(FontAwesome.SEARCH);
    form.addComponent(schoolYear);

    semester = CommonComboBox.getNormCourseOfferingComboBox("Semester..");
    semester.setCaption("Semester: ");
    semester.setIcon(FontAwesome.SEARCH);
    form.addComponent(semester);

    faculty = CommonComboBox.getAllFaculty("Select Faculty..");
    faculty.setCaption("Team Leader: ");
    faculty.setIcon(FontAwesome.USER);
    form.addComponent(faculty);

    Button saveBtn = new Button("Enroll Semestral Team");
    saveBtn.setWidth("100%");
    saveBtn.setIcon(FontAwesome.SAVE);
    saveBtn.addStyleName(ValoTheme.BUTTON_PRIMARY);
    saveBtn.addStyleName(ValoTheme.BUTTON_SMALL);
    saveBtn.addClickListener(saveBtnClickListener);
    saveBtn.setImmediate(true);
    form.addComponent(saveBtn);

    return form;
}

From source file:com.etest.view.systemadministration.SemestralTeamUI.java

void populateDataTable() {
    table.removeAllItems();//from   w ww.j a v a  2 s .  co m
    int i = 0;
    for (TeamTeach tt : tts.getAllSemestralTeamTeach()) {
        HorizontalLayout hlayout = new HorizontalLayout();
        hlayout.setWidth("100%");

        Button membersBtn = new Button();
        membersBtn.setWidth("100%");
        membersBtn.setData(tt.getTeamTeachId());
        if (tts.countTeamMembers(tt.getTeamTeachId()) < 2) {
            membersBtn.setCaption("add");
            membersBtn.setIcon(FontAwesome.USER);
        } else {
            membersBtn.setCaption("view");
            membersBtn.setIcon(FontAwesome.USERS);
        }

        Button removeTLBtn = new Button("del");
        removeTLBtn.setWidth("100%");
        removeTLBtn.setIcon(FontAwesome.TRASH_O);
        removeTLBtn.setData(tt.getTeamTeachId());

        hlayout.addComponent(membersBtn);
        hlayout.addComponent(removeTLBtn);

        table.addItem(new Object[] { tt.getSchoolYear(),
                CommonVariableMap.getNormCourseOffering(tt.getNormCourseOffering()),
                CommonVariableMap.getYearLevel(tt.getYearLevel()), tt.getSubject(), tt.getTeamLeader(),
                hlayout }, i);
        i++;

        membersBtn.addStyleName(ValoTheme.BUTTON_LINK);
        membersBtn.addStyleName(ValoTheme.BUTTON_TINY);
        membersBtn.addClickListener(modifyBtnListener);

        removeTLBtn.addStyleName(ValoTheme.BUTTON_LINK);
        removeTLBtn.addStyleName(ValoTheme.BUTTON_TINY);
        removeTLBtn.addClickListener(modifyBtnListener);
    }
    table.setPageLength(table.size());
}

From source file:com.github.djabry.platform.vaadin.view.LoginView.java

License:Open Source License

private Component buildFields() {
    HorizontalLayout fields = new HorizontalLayout();
    fields.setSpacing(true);//  ww w.  jav  a2s. co  m

    userField = new TextField("Username");

    userField.setIcon(FontAwesome.USER);
    userField.addStyleName(ValoTheme.TEXTFIELD_INLINE_ICON);
    //username.addStyleName(ValoTheme.TEXTFIELD_TINY);

    passwordField = new PasswordField("Password");
    passwordField.setIcon(FontAwesome.LOCK);
    passwordField.addStyleName(ValoTheme.TEXTFIELD_INLINE_ICON);
    //password.addStyleName(ValoTheme.TEXTFIELD_TINY);

    final Button signin = new Button("Sign In");
    signin.addStyleName(ValoTheme.BUTTON_PRIMARY);
    signin.setClickShortcut(ShortcutAction.KeyCode.ENTER);
    //signin.addStyleName(ValoTheme.BUTTON_TINY);
    signin.focus();

    fields.addComponents(userField, passwordField, signin);
    fields.setComponentAlignment(signin, Alignment.BOTTOM_LEFT);

    signin.addClickListener(new Button.ClickListener() {
        @Override
        public void buttonClick(final Button.ClickEvent event) {
            loginAction.login(userField.getValue(), passwordField.getValue());
        }
    });
    return fields;
}

From source file:com.hack23.cia.web.impl.ui.application.views.common.menufactory.impl.AbstractMenuItemFactoryImpl.java

License:Apache License

/**
 * Inits the application menu bar.// w  w w .ja  va  2s . co  m
 *
 * @param menuBar
 *            the menu bar
 */
protected final void initApplicationMenuBar(final MenuBar menuBar) {
    menuBar.removeItems();
    menuBar.setWidth("80%");
    menuBar.setStyleName("Header");
    final MenuItem mainViewItem = menuBar.addItem("Application", FontAwesome.SERVER, null);

    mainViewItem.addItem(START_TEXT, FontAwesome.STAR, COMMAND);

    final MenuItem mainItem = mainViewItem.addItem("Main", FontAwesome.STAR, null);

    mainItem.addItem(PAGE_VISIT_HISTORY_TEXT, FontAwesome.AREA_CHART, COMMAND18);

    if (UserContextUtil.allowRoleInSecurityContext(ROLE_ADMIN)
            || UserContextUtil.allowRoleInSecurityContext(ROLE_USER)) {
        mainViewItem.addItem(USERHOME, FontAwesome.USER, COMMAND2);
        createAdminMenu(mainViewItem);
        mainViewItem.addItem("Logout", FontAwesome.SIGN_OUT, COMMAND3);
    } else {
        mainViewItem.addItem("Login", FontAwesome.SIGN_IN, COMMAND4);
        mainViewItem.addItem("Register", FontAwesome.USER_PLUS, COMMAND5);
    }

}

From source file:com.hack23.cia.web.impl.ui.application.views.common.menufactory.impl.ApplicationMenuItemFactoryImpl.java

License:Apache License

@Override
public void addRankingMenu(final MenuBar menuBar) {

    final MenuItem rankingsMenuItem = menuBar.addItem(RANKING_TEXT, FontAwesome.AREA_CHART, null);

    final MenuItem countryMenuItem = rankingsMenuItem.addItem(COUNTRY_RANKING_LINK_TEXT, FontAwesome.FLAG,
            COMMAND7);//  w w w . j  a va  2s. c  o m

    countryMenuItemFactory.createCountryTopicMenu(countryMenuItem);

    final MenuItem parliamentMenuItem = rankingsMenuItem.addItem(PARLIAMENT_RANKING_LINK_TEXT,
            FontAwesome.INSTITUTION, COMMAND5);

    parliamentMenuItemFactory.createParliamentTopicMenu(parliamentMenuItem);

    final MenuItem politicianMenuItem = rankingsMenuItem.addItem(POLITICIAN_RANKING_LINK_TEXT, FontAwesome.USER,
            COMMAND);

    politicianRankingMenuItemFactory.createPoliticianRankingTopics(politicianMenuItem);

    final MenuItem partynMenuItem = rankingsMenuItem.addItem(PARTY_RANKING_LINK_TEXT, FontAwesome.GROUP,
            COMMAND2);

    partyRankingMenuItemFactory.createPartyRankingTopics(partynMenuItem);

    final MenuItem committeeMenuItem = rankingsMenuItem.addItem(COMMITTEE_RANKING_LINK_TEXT, FontAwesome.GROUP,
            COMMAND3);

    committeeRankingMenuItemFactory.createCommitteeRankingTopics(committeeMenuItem);

    final MenuItem ministryMenuItem = rankingsMenuItem.addItem(MINISTRY_RANKING_LINK_TEXT, FontAwesome.GROUP,
            COMMAND4);

    ministryRankingMenuItemFactory.createMinistryRankingTopics(ministryMenuItem);

}

From source file:com.hack23.cia.web.impl.ui.application.views.common.menufactory.impl.ApplicationMenuItemFactoryImpl.java

License:Apache License

@Override
public void createOverviewPage(final VerticalLayout panelContent) {
    final GridLayout grid = createGridLayout(panelContent);

    createButtonLink(grid, COUNTRY_RANKING_LINK_TEXT, FontAwesome.FLAG, COMMAND7, "Description");

    createButtonLink(grid, PARLIAMENT_RANKING_LINK_TEXT, FontAwesome.INSTITUTION, COMMAND5, "Description");

    createButtonLink(grid, POLITICIAN_RANKING_LINK_TEXT, FontAwesome.USER, COMMAND, "Description");

    createButtonLink(grid, PARTY_RANKING_LINK_TEXT, FontAwesome.GROUP, COMMAND2, "Description");

    createButtonLink(grid, COMMITTEE_RANKING_LINK_TEXT, FontAwesome.GROUP, COMMAND3, "Description");

    createButtonLink(grid, MINISTRY_RANKING_LINK_TEXT, FontAwesome.GROUP, COMMAND4, "Description");

}

From source file:com.hack23.cia.web.impl.ui.application.views.common.menufactory.impl.UserHomeMenuItemFactoryImpl.java

License:Apache License

@Override
public void createUserHomeMenuBar(final MenuBar menuBar, final String pageId) {
    initApplicationMenuBar(menuBar);/*from w ww.j av  a 2  s . com*/

    menuBar.addItem(OVERVIEW_TEXT, FontAwesome.USER,
            new PageModeMenuCommand(UserViews.USERHOME_VIEW_NAME, PageMode.OVERVIEW, pageId));

    menuBar.addItem(SECURITY_SETTING_TEXT, FontAwesome.USER, new PageModeMenuCommand(
            UserViews.USERHOME_VIEW_NAME, UserHomePageMode.SECURITY_SETTINGS.toString(), pageId));

    menuBar.addItem(PAGE_VISIT_HISTORY_TEXT, FontAwesome.LINE_CHART,
            new PageModeMenuCommand(UserViews.USERHOME_VIEW_NAME, PageMode.PAGEVISITHISTORY, pageId));

}

From source file:com.hack23.cia.web.impl.ui.application.views.common.pagelinks.impl.PageLinkFactoryImpl.java

License:Apache License

@Override
public Link createUserHomeViewPageLink() {
    final Link pageLink = new Link("User account:" + UserContextUtil.getUserNameFromSecurityContext(),
            new ExternalResource(PAGE_PREFIX + UserViews.USERHOME_VIEW_NAME));
    pageLink.setId(ViewAction.VISIT_USER_HOME_VIEW.name());
    pageLink.setIcon(FontAwesome.USER);
    return pageLink;
}