Example usage for com.vaadin.server FontAwesome SIGN_IN

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

Introduction

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

Prototype

FontAwesome SIGN_IN

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

Click Source Link

Usage

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

License:Apache License

/**
 * Inits the application menu bar./*  ww  w.  java  2  s.  c  o  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.pagelinks.impl.PageLinkFactoryImpl.java

License:Apache License

@Override
public Link createLoginPageLink() {
    final Link pageLink = new Link("Login", new ExternalResource(
            LINK_SEPARATOR + CommonsViews.MAIN_VIEW_NAME + PAGE_SEPARATOR + ApplicationPageMode.LOGIN));
    pageLink.setId(ViewAction.VISIT_LOGIN.name());
    pageLink.setIcon(FontAwesome.SIGN_IN);
    return pageLink;
}

From source file:com.hack23.cia.web.impl.ui.application.views.common.pagemode.MainViewLoginPageModContentFactoryImpl.java

License:Apache License

@Secured({ "ROLE_ANONYMOUS" })
@Override/*w  w  w  .  ja  va 2s . c  o m*/
public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) {
    final VerticalLayout content = createPanelContent();
    final String pageId = getPageId(parameters);

    panel.setCaption(CITIZEN_INTELLIGENCE_AGENCY_MAIN);

    getMenuItemFactory().createMainPageMenuBar(menuBar);

    final DefaultVerticalLoginForm loginForm = new EmailPasswordLoginForm();
    final LoginRequest loginRequest = new LoginRequest();
    loginRequest.setOtpCode("");
    loginForm.addLoginListener(new ApplicationLoginListener(getApplicationManager(), loginRequest));
    loginForm.setId(ApplicationAction.LOGIN.toString());
    loginForm.setIcon(FontAwesome.SIGN_IN);

    final BeanFieldGroup<LoginRequest> fieldGroup = new BeanFieldGroup<>(LoginRequest.class);
    fieldGroup.setItemDataSource(new BeanItem<>(loginRequest));
    fieldGroup.setReadOnly(true);
    fieldGroup.setBuffered(false);
    final Field<?> buildAndBind = fieldGroup.buildAndBind("otpCode");
    buildAndBind.setReadOnly(false);
    content.addComponent(buildAndBind);

    content.addComponent(loginForm);

    panel.setCaption(CITIZEN_INTELLIGENCE_AGENCY_MAIN);
    getPageActionEventHelper().createPageEvent(ViewAction.VISIT_MAIN_VIEW, ApplicationEventGroup.USER,
            CommonsViews.MAIN_VIEW_NAME, parameters, pageId);

    return content;

}

From source file:com.mycompany.exodious.login.java

public login() {
    this.setId("loginPanel");
    this.setSpacing(true);
    Image logo = new Image();
    logo.setId("logo");
    logo.setSource(slikaLogo);/* w w  w . j  a va 2s  .  co m*/
    logo.setHeight("18em");
    logo.setWidth("30em");
    Label welcome = new Label("Welcome, please login");
    welcome.setId("welcome");
    TextField username = new TextField("Your ID");
    PasswordField password = new PasswordField("Password");
    Button submit = new Button("Login");
    submit.setIcon(FontAwesome.SIGN_IN);
    submit.addStyleName(ValoTheme.BUTTON_PRIMARY);

    submit.addClickListener(new Button.ClickListener() {
        @Override
        public void buttonClick(Button.ClickEvent event) {

        }
    });

    addComponents(logo, welcome, username, password, submit);
    setComponentAlignment(logo, Alignment.MIDDLE_CENTER);
    setComponentAlignment(welcome, Alignment.MIDDLE_CENTER);
    setComponentAlignment(username, Alignment.MIDDLE_CENTER);
    setComponentAlignment(password, Alignment.MIDDLE_CENTER);
    setComponentAlignment(submit, Alignment.MIDDLE_CENTER);
}

From source file:com.mycompany.perfectphone.start.java

public start() {

    Label title = new Label("Find Your Perfect Smartphone");
    title.setId("title");
    Label welcome = new Label("Welcome to DaX's Perfect Smartphone Finder");
    welcome.setId("welcome");
    Button start = new Button("Start");

    start.setIcon(FontAwesome.SIGN_IN);

    start.addStyleName(ValoTheme.BUTTON_PRIMARY);

    Label question1 = new Label("Do you like big screen?");
    OptionGroup answer1 = new OptionGroup();
    Button next = new Button("Continue");

    addComponents(title, question1, answer1, next);

    setComponentAlignment(question1, Alignment.TOP_CENTER);

    setComponentAlignment(answer1, Alignment.TOP_CENTER);

    setComponentAlignment(next, Alignment.TOP_CENTER);
}