Example usage for com.vaadin.ui LoginForm setLoginButtonCaption

List of usage examples for com.vaadin.ui LoginForm setLoginButtonCaption

Introduction

In this page you can find the example usage for com.vaadin.ui LoginForm setLoginButtonCaption.

Prototype

public void setLoginButtonCaption(String loginButtonCaption) 

Source Link

Document

Sets the caption of the login button.

Usage

From source file:com.expressui.sample.view.LoginPage.java

License:Open Source License

@PostConstruct
@Override/* w  w w.  j a  v  a2  s.c  om*/
public void postConstruct() {
    super.postConstruct();

    setSizeFull();

    LoginForm loginForm = new LoginForm();
    loginForm.addStyleName("border");
    loginForm.setSizeUndefined();
    loginForm.setLoginButtonCaption(uiMessageSource.getMessage("loginPage.button"));
    loginForm.setUsernameCaption(uiMessageSource.getMessage("loginPage.username"));
    loginForm.setPasswordCaption(uiMessageSource.getMessage("loginPage.password"));
    loginForm.addListener(new LoginHandler());

    Panel panel = new Panel();
    panel.addStyleName("loginPage");
    panel.addStyleName("border");
    panel.setSizeUndefined();
    panel.setCaption(uiMessageSource.getMessage("loginPage.caption"));
    panel.addComponent(loginForm);
    panel.addComponent(new Label(uiMessageSource.getMessage("loginPage.tip")));

    addComponent(panel);
    setComponentAlignment(panel, Alignment.MIDDLE_CENTER);
}

From source file:sweforce.vaadin.security.activitiesandplaces.login.LoginViewImpl.java

License:Apache License

public LoginViewImpl() {
    mainLayout.setSizeFull();/*from  w  ww  . ja  va 2  s . c om*/
    loginPanel = new Panel("Login");
    mainLayout.addComponent(loginPanel);
    mainLayout.setComponentAlignment(loginPanel, Alignment.MIDDLE_CENTER);
    loginPanel.setSizeUndefined();

    LoginForm loginForm;
    loginForm = new LoginForm();
    loginPanel.setContent(loginForm);
    loginForm.setPasswordCaption("Password"); //i18n?
    loginForm.setUsernameCaption("User");
    loginForm.setLoginButtonCaption("Login");
    //        loginForm.setHeight("100px");
    loginForm.addListener(this);
}