Example usage for com.vaadin.ui PasswordField PasswordField

List of usage examples for com.vaadin.ui PasswordField PasswordField

Introduction

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

Prototype

public PasswordField() 

Source Link

Document

Constructs an empty PasswordField.

Usage

From source file:ar.com.zir.cipres.ui.login.LoginForm.java

@AutoGenerated
private AbsoluteLayout buildAbsoluteLayout_1() {
    // common part: create layout
    absoluteLayout_1 = new AbsoluteLayout();
    absoluteLayout_1.setImmediate(false);
    absoluteLayout_1.setWidth("100.0%");
    absoluteLayout_1.setHeight("100.0%");

    // pwdPassword
    pwdPassword = new PasswordField();
    pwdPassword.setCaption("Password");
    pwdPassword.setImmediate(true);/*from   w w  w .  ja  v a2s.  c om*/
    pwdPassword.setDescription("Contrasea del usuario");
    pwdPassword.setWidth("-1px");
    pwdPassword.setHeight("-1px");
    pwdPassword.setTabIndex(6);
    pwdPassword.setRequired(true);
    pwdPassword.setNullSettingAllowed(true);
    absoluteLayout_1.addComponent(pwdPassword, "top:99.0px;left:211.0px;");

    // txtUsuario
    txtUsuario = new TextField();
    txtUsuario.setCaption("Usuario");
    txtUsuario.setImmediate(true);
    txtUsuario.setDescription("Nombre de usuario");
    txtUsuario.setWidth("-1px");
    txtUsuario.setHeight("-1px");
    txtUsuario.setTabIndex(5);
    txtUsuario.setRequired(true);
    txtUsuario.setInputPrompt("Ingrese el usuario");
    txtUsuario.setMaxLength(10);
    absoluteLayout_1.addComponent(txtUsuario, "top:99.0px;left:18.0px;");

    // btnLogin
    btnLogin = new Button();
    btnLogin.setCaption("Login");
    btnLogin.setImmediate(true);
    btnLogin.setWidth("88px");
    btnLogin.setHeight("-1px");
    btnLogin.setTabIndex(7);
    absoluteLayout_1.addComponent(btnLogin, "top:99.0px;left:403.0px;");

    // embedded_1
    embedded_1 = new Embedded();
    embedded_1.setImmediate(false);
    embedded_1.setWidth("56px");
    embedded_1.setHeight("56px");
    embedded_1.setSource(new ThemeResource("security.png"));
    embedded_1.setType(1);
    embedded_1.setMimeType("image/png");
    absoluteLayout_1.addComponent(embedded_1, "top:18.0px;left:425.0px;");

    // label_1
    label_1 = new Label();
    label_1.setStyleName("login");
    label_1.setImmediate(false);
    label_1.setWidth("-1px");
    label_1.setHeight("-1px");
    label_1.setValue("<h2>Bienvenido a </h2>");
    label_1.setContentMode(ContentMode.HTML);
    absoluteLayout_1.addComponent(label_1, "top:18.0px;left:18.0px;");

    // embedded_2
    embedded_2 = new Embedded();
    embedded_2.setImmediate(false);
    embedded_2.setWidth("141px");
    embedded_2.setHeight("45px");
    embedded_2.setSource(new ThemeResource("cipres-header.png"));
    embedded_2.setType(1);
    embedded_2.setMimeType("image/png");
    absoluteLayout_1.addComponent(embedded_2, "top:25.0px;left:200.0px;");

    return absoluteLayout_1;
}

From source file:br.com.anteros.mobileserver.app.form.ApplicationForm.java

License:Apache License

private void createFields() {
    fldId = new TextField();
    fldId.setCaption("Id");
    fldId.setWidth("100px");
    fldId.setStyleName("small");

    fldName = new TextField();
    fldName.setCaption("Nome da aplicao");
    fldName.setWidth("200px");
    fldName.setRequired(true);/* w w  w  .  ja  v  a  2 s  . c  o  m*/
    fldName.setRequiredError("Informe o nome da aplicao.");
    fldName.setStyleName("small");

    fldDescription = new TextField();
    fldDescription.setCaption("Descrio da aplicao");
    fldDescription.setWidth("500px");
    fldDescription.setRequired(true);
    fldDescription.setRequiredError("Informe a descrio da aplicao.");
    fldDescription.setStyleName("small");

    cbDialect = new ComboBox();
    cbDialect.setImmediate(false);
    cbDialect.setWidth("-1px");
    cbDialect.setHeight("-1px");
    cbDialect.addItem(MobileServerContext.H2);
    cbDialect.addItem(MobileServerContext.ORACLE);
    cbDialect.addItem(MobileServerContext.MYSQL);
    cbDialect.addItem(MobileServerContext.FIREBIRD);
    cbDialect.addItem(MobileServerContext.POSTGRESQL);
    cbDialect.setRequired(true);
    cbDialect.setCaption("Dialeto");
    cbDialect.setRequiredError("Informe a dialeto da aplicao.");
    cbDialect.setStyleName("small");

    cbCharset = new ComboBox();
    cbCharset.setImmediate(false);
    cbCharset.setWidth("157px");
    cbCharset.setHeight("-1px");
    cbCharset.addItem(AnterosStandardsCharsets.ISO_8859_1.name());
    cbCharset.addItem(AnterosStandardsCharsets.US_ASCII.name());
    cbCharset.addItem(AnterosStandardsCharsets.UTF_16.name());
    cbCharset.addItem(AnterosStandardsCharsets.UTF_16BE.name());
    cbCharset.addItem(AnterosStandardsCharsets.UTF_16LE.name());
    cbCharset.addItem(AnterosStandardsCharsets.UTF_8.name());
    cbCharset.setRequired(true);
    cbCharset.setCaption("Charset");
    cbCharset.setRequiredError("Informe o charset da aplicao.");
    cbCharset.setStyleName("small");

    fldURL = new TextField();
    fldURL.setImmediate(false);
    fldURL.setWidth("458px");
    fldURL.setHeight("-1px");
    fldURL.setCaption("URL");
    fldURL.setRequired(true);
    fldURL.setRequiredError("Informe a URL de conexo com o banco de dados.");

    fldUser = new TextField();
    fldUser.setImmediate(false);
    fldUser.setWidth("157px");
    fldUser.setHeight("-1px");
    fldUser.setCaption("Usurio");
    fldUser.setRequired(true);
    fldUser.setRequiredError("Informe o usurio para conexo com o banco de dados.");

    fldPassword = new PasswordField();
    fldPassword.setImmediate(false);
    fldPassword.setWidth("157px");
    fldPassword.setHeight("-1px");
    fldPassword.setCaption("Senha");

    cbPoolType = new ComboBox();
    cbPoolType.setImmediate(false);
    cbPoolType.setWidth("-1px");
    cbPoolType.setHeight("-1px");
    cbPoolType.addItem(PoolDatasource.POOL_C3P0);
    cbPoolType.addItem(PoolDatasource.POOL_TOMCAT);
    cbPoolType.addItem(PoolDatasource.POOL_JNDI);
    cbPoolType.addItem(PoolDatasource.JDBC_WITHOUT_PO0L);
    cbPoolType.setRequired(true);
    cbPoolType.setCaption("Gerenciador conexes");
    cbPoolType.setRequiredError("Informe o gerenciador de conexes da aplicao.");
    cbPoolType.setStyleName("small");

    fldJNDI = new TextField();
    fldJNDI.setImmediate(false);
    fldJNDI.setWidth("250px");
    fldJNDI.setHeight("-1px");
    fldJNDI.setCaption("Recurso JNDI");
    fldJNDI.setRequired(false);
    fldJNDI.setRequiredError("Informe o nome do recurso JNDI.");

    fldInitPoolSize = new TextField();
    fldInitPoolSize.setImmediate(false);
    fldInitPoolSize.setWidth("157px");
    fldInitPoolSize.setHeight("-1px");
    fldInitPoolSize.setCaption("Tamanho Inicial do Pool");
    fldInitPoolSize.setRequired(true);
    fldInitPoolSize.setRequiredError("Informe o tamanho inicial para o pool de conexes da aplicao.");

    fldMinPoolSize = new TextField();
    fldMinPoolSize.setImmediate(false);
    fldMinPoolSize.setWidth("157px");
    fldMinPoolSize.setHeight("-1px");
    fldMinPoolSize.setCaption("Tamanho mnimo do Pool");
    fldMinPoolSize.setRequired(true);
    fldMinPoolSize.setRequiredError("Informe o tamanho mnimo para o pool de conexes da aplicao.");

    fldMaxPoolSize = new TextField();
    fldMaxPoolSize.setImmediate(false);
    fldMaxPoolSize.setWidth("157px");
    fldMaxPoolSize.setHeight("-1px");
    fldMaxPoolSize.setCaption("Tamanho mximo do Pool");
    fldMaxPoolSize.setRequired(true);
    fldMaxPoolSize.setRequiredError("Informe o tamanho mximo para o pool de conexes da aplicao.");

    fldAcquireIncrement = new TextField();
    fldAcquireIncrement.setImmediate(false);
    fldAcquireIncrement.setWidth("157px");
    fldAcquireIncrement.setHeight("-1px");
    fldAcquireIncrement.setCaption("Incremento do Pool");
    fldAcquireIncrement.setRequired(true);
    fldAcquireIncrement
            .setRequiredError("Informe o tamanho para incremento do pool de conexes da aplicao.");

    fldCatalog = new TextField();
    fldCatalog.setImmediate(false);
    fldCatalog.setWidth("157px");
    fldCatalog.setHeight("-1px");
    fldCatalog.setCaption("Catalog");

    fldSchema = new TextField();
    fldSchema.setImmediate(false);
    fldSchema.setWidth("157px");
    fldSchema.setHeight("-1px");
    fldSchema.setCaption("Schema");

    chActive = new CheckBox();
    chActive.setCaption("Ativa?");
    chActive.setImmediate(false);
    chActive.setWidth("-1px");
    chActive.setHeight("-1px");

    applicationForm.addField("fldId", fldId);
    applicationForm.addField("fldName", fldName);
    applicationForm.addField("fldDescription", fldDescription);
    applicationForm.addField("cbDialect", cbDialect);
    applicationForm.addField("cbPoolType", cbPoolType);
    applicationForm.addField("fldJNDI", fldJNDI);
    applicationForm.addField("fldURL", fldURL);
    applicationForm.addField("fldUser", fldUser);
    applicationForm.addField("fldPassword", fldPassword);
    applicationForm.addField("cbCharset", cbCharset);
    applicationForm.addField("fldInitPoolSize", fldInitPoolSize);
    applicationForm.addField("fldMinPoolSize", fldMinPoolSize);
    applicationForm.addField("fldMaxPoolSize", fldMaxPoolSize);
    applicationForm.addField("fldAcquireIncrement", fldAcquireIncrement);
    applicationForm.addField("fldCatalog", fldCatalog);
    applicationForm.addField("fldSchema", fldSchema);
    applicationForm.addField("chActive", chActive);
}

From source file:br.com.anteros.mobileserver.app.form.ConfigurationForm.java

License:Apache License

private AbsoluteLayout buildMainLayout() {
    // common part: create layout
    mainLayout = new AbsoluteLayout();
    mainLayout.setImmediate(false);//from   w  w  w .  ja  va  2s . c om
    mainLayout.setWidth("100%");
    mainLayout.setHeight("100%");
    mainLayout.setMargin(false);

    // top-level component properties
    setWidth("100%");
    setHeight("100%");

    // cbDialect
    cbDialect = new ComboBox();
    cbDialect.setImmediate(false);
    cbDialect.setWidth("-1px");
    cbDialect.setHeight("-1px");
    cbDialect.addItem(MobileServerContext.H2);
    cbDialect.addItem(MobileServerContext.ORACLE);
    cbDialect.addItem(MobileServerContext.MYSQL);
    cbDialect.addItem(MobileServerContext.FIREBIRD);
    cbDialect.addItem(MobileServerContext.POSTGRESQL);

    // lblDialect
    lblDialect = new Label();
    lblDialect.setImmediate(false);
    lblDialect.setWidth("-1px");
    lblDialect.setHeight("-1px");
    lblDialect.setValue("Dialeto");

    // cbCharset
    cbCharset = new ComboBox();
    cbCharset.setImmediate(false);
    cbCharset.setWidth("-1px");
    cbCharset.setHeight("-1px");
    cbCharset.addItem(AnterosStandardsCharsets.ISO_8859_1.name());
    cbCharset.addItem(AnterosStandardsCharsets.US_ASCII.name());
    cbCharset.addItem(AnterosStandardsCharsets.UTF_16.name());
    cbCharset.addItem(AnterosStandardsCharsets.UTF_16BE.name());
    cbCharset.addItem(AnterosStandardsCharsets.UTF_16LE.name());
    cbCharset.addItem(AnterosStandardsCharsets.UTF_8.name());

    // lblCharset
    lblCharset = new Label();
    lblCharset.setImmediate(false);
    lblCharset.setWidth("-1px");
    lblCharset.setHeight("-1px");
    lblCharset.setValue("Charset");

    // fldURL
    fldURL = new TextField();
    fldURL.setImmediate(false);
    fldURL.setWidth("458px");
    fldURL.setHeight("-1px");

    // lblURL
    lblURL = new Label();
    lblURL.setImmediate(false);
    lblURL.setWidth("-1px");
    lblURL.setHeight("-1px");
    lblURL.setValue("Url conexo");

    // fldUser
    fldUser = new TextField();
    fldUser.setImmediate(false);
    fldUser.setWidth("157px");
    fldUser.setHeight("-1px");

    // lblUser
    lblUser = new Label();
    lblUser.setImmediate(false);
    lblUser.setWidth("-1px");
    lblUser.setHeight("-1px");
    lblUser.setValue("Usurio");

    // fldPassword
    fldPassword = new PasswordField();
    fldPassword.setImmediate(false);
    fldPassword.setWidth("157px");
    fldPassword.setHeight("-1px");

    // lblPassword
    lblPassword = new Label();
    lblPassword.setImmediate(false);
    lblPassword.setWidth("-1px");
    lblPassword.setHeight("-1px");
    lblPassword.setValue("Senha");

    // fldCatalog
    fldCatalog = new TextField();
    fldCatalog.setImmediate(false);
    fldCatalog.setWidth("157px");
    fldCatalog.setHeight("-1px");

    // lblCatalog
    lblCatalog = new Label();
    lblCatalog.setImmediate(false);
    lblCatalog.setWidth("-1px");
    lblCatalog.setHeight("-1px");
    lblCatalog.setValue("Catalog");

    // fldSchema
    fldSchema = new TextField();
    fldSchema.setImmediate(false);
    fldSchema.setWidth("157px");
    fldSchema.setHeight("-1px");

    // lblSchema
    lblSchema = new Label();
    lblSchema.setImmediate(false);
    lblSchema.setWidth("-1px");
    lblSchema.setHeight("-1px");
    lblSchema.setValue("Schema");

    // imgAnteros
    imgAnteros = new Embedded();
    imgAnteros.setImmediate(false);
    imgAnteros.setWidth("165px");
    imgAnteros.setHeight("45px");
    imgAnteros.setSource(new ThemeResource("images/anteros_mobile_server45.png"));
    imgAnteros.setType(1);
    imgAnteros.setMimeType("image/png");

    // fldInitPoolSize
    fldInitPoolSize = new TextField();
    fldInitPoolSize.setImmediate(false);
    fldInitPoolSize.setWidth("157px");
    fldInitPoolSize.setHeight("-1px");

    // lblPool
    lblPool = new Label();
    lblPool.setImmediate(false);
    lblPool.setWidth("-1px");
    lblPool.setHeight("-1px");
    lblPool.setValue("<b>Pool de conexes</b>");
    lblPool.setContentMode(3);

    // label_2
    label_2 = new Label();
    label_2.setImmediate(false);
    label_2.setWidth("-1px");
    label_2.setHeight("-1px");
    label_2.setValue("<b>Pool de conexes</b>");
    label_2.setContentMode(3);

    // lblInitialPoolSize
    lblInitialPoolSize = new Label();
    lblInitialPoolSize.setImmediate(false);
    lblInitialPoolSize.setWidth("-1px");
    lblInitialPoolSize.setHeight("-1px");
    lblInitialPoolSize.setValue("Tamanho inicial");

    // fldMinPoolSize
    fldMinPoolSize = new TextField();
    fldMinPoolSize.setImmediate(false);
    fldMinPoolSize.setWidth("157px");
    fldMinPoolSize.setHeight("-1px");

    // lblMinPoolSize
    lblMinPoolSize = new Label();
    lblMinPoolSize.setImmediate(false);
    lblMinPoolSize.setWidth("-1px");
    lblMinPoolSize.setHeight("-1px");
    lblMinPoolSize.setValue("Tamanho Mnimo");

    // lblMaxPoolSize
    lblMaxPoolSize = new Label();
    lblMaxPoolSize.setImmediate(false);
    lblMaxPoolSize.setWidth("-1px");
    lblMaxPoolSize.setHeight("-1px");
    lblMaxPoolSize.setValue("Tamanho Mximo");

    // fldMaxPoolSize
    fldMaxPoolSize = new TextField();
    fldMaxPoolSize.setImmediate(false);
    fldMaxPoolSize.setWidth("157px");
    fldMaxPoolSize.setHeight("-1px");

    // fldAcquireIncrement
    fldAcquireIncrement = new TextField();
    fldAcquireIncrement.setImmediate(false);
    fldAcquireIncrement.setWidth("157px");
    fldAcquireIncrement.setHeight("-1px");

    // lblAcquireIncrement
    lblAcquireIncrement = new Label();
    lblAcquireIncrement.setImmediate(false);
    lblAcquireIncrement.setWidth("-1px");
    lblAcquireIncrement.setHeight("-1px");
    lblAcquireIncrement.setValue("Incremento");

    // chShowSql
    chShowSql = new CheckBox();
    chShowSql.setCaption("Mostrar SQL's no log");
    chShowSql.setImmediate(false);
    chShowSql.setWidth("-1px");
    chShowSql.setHeight("-1px");

    // chFormatSql
    chFormatSql = new CheckBox();
    chFormatSql.setCaption("Formatar SQL's ");
    chFormatSql.setImmediate(false);
    chFormatSql.setWidth("-1px");
    chFormatSql.setHeight("-1px");

    // btnOk
    btnOk = new Button();
    btnOk.setCaption("Ok");
    btnOk.setIcon(new ThemeResource("icons/16/ok.png"));
    btnOk.setImmediate(true);
    btnOk.setWidth("-1px");
    btnOk.setHeight("-1px");

    // btnCancel
    btnCancel = new Button();
    btnCancel.setCaption("Cancela");
    btnCancel.setIcon(new ThemeResource("icons/16/cancel.png"));
    btnCancel.setImmediate(true);
    btnCancel.setWidth("-1px");
    btnCancel.setHeight("-1px");

    // imgConfiguration
    imgConfiguration = new Embedded();
    imgConfiguration.setImmediate(false);
    imgConfiguration.setWidth("48px");
    imgConfiguration.setHeight("48px");
    imgConfiguration.setSource(new ThemeResource("images/configuration.png"));
    imgConfiguration.setType(1);
    imgConfiguration.setMimeType("image/png");

    // lblAccessControl
    lblAccessControl = new Label();
    lblAccessControl.setImmediate(false);
    lblAccessControl.setWidth("-1px");
    lblAccessControl.setHeight("-1px");
    lblAccessControl.setValue("<b>Controle de acesso</b>");
    lblAccessControl.setContentMode(3);

    // lblAccessUser
    lblAccessUser = new Label();
    lblAccessUser.setImmediate(false);
    lblAccessUser.setWidth("-1px");
    lblAccessUser.setHeight("-1px");
    lblAccessUser.setValue("Usurio");

    // fldAccessUser
    fldAccessUser = new TextField();
    fldAccessUser.setImmediate(false);
    fldAccessUser.setWidth("157px");
    fldAccessUser.setHeight("-1px");

    // lblAccessPassword
    lblAccessPassword = new Label();
    lblAccessPassword.setImmediate(false);
    lblAccessPassword.setWidth("-1px");
    lblAccessPassword.setHeight("-1px");
    lblAccessPassword.setValue("Senha");

    // fldAccessPassword
    fldAccessPassword = new PasswordField();
    fldAccessPassword.setImmediate(false);
    fldAccessPassword.setWidth("157px");
    fldAccessPassword.setHeight("-1px");

    // cbTipoPool
    cbTipoPool = new ComboBox();
    cbTipoPool.setImmediate(false);
    cbTipoPool.setWidth("100.0%");
    cbTipoPool.setHeight("-1px");
    cbTipoPool.addItem(PoolDatasource.POOL_C3P0);
    cbTipoPool.addItem(PoolDatasource.POOL_TOMCAT);
    cbTipoPool.addItem(PoolDatasource.POOL_JNDI);
    cbTipoPool.addItem(PoolDatasource.JDBC_WITHOUT_PO0L);

    // lblTipoPool
    lblTipoPool = new Label();
    lblTipoPool.setImmediate(false);
    lblTipoPool.setWidth("103px");
    lblTipoPool.setHeight("-1px");
    lblTipoPool.setValue("Gerenciador pool");

    // fldJNDI
    fldJNDI = new TextField();
    fldJNDI.setImmediate(false);
    fldJNDI.setWidth("300px");
    fldJNDI.setHeight("-1");

    // lblJNDI
    lblJNDI = new Label();
    lblJNDI.setImmediate(false);
    lblJNDI.setWidth("-1px");
    lblJNDI.setHeight("-1px");
    lblJNDI.setValue("Recurso JNDI");

    // lblQueryTimeout
    lblQueryTimeout = new Label();
    lblQueryTimeout.setImmediate(false);
    lblQueryTimeout.setWidth("-1px");
    lblQueryTimeout.setHeight("-1px");
    lblQueryTimeout.setValue("Timeout query");

    // fldMaxPoolSize
    fldQueryTimeout = new TextField();
    fldQueryTimeout.setImmediate(false);
    fldQueryTimeout.setWidth("100px");
    fldQueryTimeout.setHeight("-1px");

    // lblQueryTimeoutSeconds
    lblQueryTimeoutSeconds = new Label();
    lblQueryTimeoutSeconds.setImmediate(false);
    lblQueryTimeoutSeconds.setWidth("-1px");
    lblQueryTimeoutSeconds.setHeight("-1px");
    lblQueryTimeoutSeconds.setValue("segundos");

    mainLayout.addComponent(cbDialect, "top:20.0px;left:269.0px;");
    mainLayout.addComponent(lblDialect, "top:17.0px;left:223.0px;");
    mainLayout.addComponent(cbCharset, "top:20.0px;left:569.0px;");
    mainLayout.addComponent(lblCharset, "top:17.0px;left:519.0px;");
    mainLayout.addComponent(fldURL, "top:44.0px;left:269.0px;");
    mainLayout.addComponent(lblURL, "top:41.0px;left:195.0px;");
    mainLayout.addComponent(fldUser, "top:69.0px;left:269.0px;");
    mainLayout.addComponent(lblUser, "top:69.0px;left:218.0px;");
    mainLayout.addComponent(fldPassword, "top:69.0px;left:571.0px;");
    mainLayout.addComponent(lblPassword, "top:69.0px;left:529.0px;");
    mainLayout.addComponent(fldCatalog, "top:94.0px;left:269.0px;");
    mainLayout.addComponent(lblCatalog, "top:94.0px;left:216.0px;");
    mainLayout.addComponent(fldSchema, "top:94.0px;left:571.0px;");
    mainLayout.addComponent(lblSchema, "top:93.0px;left:519.0px;");
    mainLayout.addComponent(imgAnteros, "top:5.0px;left:5.0px;");
    mainLayout.addComponent(cbTipoPool, "top:159.0px;right:230.0px;left:269.0px;");
    mainLayout.addComponent(lblTipoPool, "top:156.0px;left:165.0px;");
    mainLayout.addComponent(lblJNDI, "top:197.0px;left:184.0px;");
    mainLayout.addComponent(fldJNDI, "top:197.0px;left:269.0px;");
    mainLayout.addComponent(fldInitPoolSize, "top:221.0px;left:269.0px;");
    mainLayout.addComponent(lblPool, "top:130.0px;left:269.0px;");
    mainLayout.addComponent(label_2, "top:130.0px;left:269.0px;");
    mainLayout.addComponent(lblInitialPoolSize, "top:221.0px;left:172.0px;");
    mainLayout.addComponent(fldMinPoolSize, "top:246.0px;left:269.0px;");
    mainLayout.addComponent(lblMinPoolSize, "top:247.0px;left:164.0px;");
    mainLayout.addComponent(lblMaxPoolSize, "top:273.0px;left:162.0px;");
    mainLayout.addComponent(fldMaxPoolSize, "top:272.0px;left:269.0px;");
    mainLayout.addComponent(fldAcquireIncrement, "top:297.0px;left:269.0px;");
    mainLayout.addComponent(lblAcquireIncrement, "top:298.0px;left:200.0px;");
    mainLayout.addComponent(chShowSql, "top:234.0px;left:571.0px;");
    mainLayout.addComponent(chFormatSql, "top:250.0px;left:571.0px;");
    mainLayout.addComponent(lblQueryTimeout, "top:297.0px;left:480.0px;");
    mainLayout.addComponent(fldQueryTimeout, "top:298.0px;left:571.0px;");
    mainLayout.addComponent(lblQueryTimeoutSeconds, "top:297.0px;left:675.0px;");
    mainLayout.addComponent(imgConfiguration, "top:153.0px;left:30.0px;");
    mainLayout.addComponent(lblAccessControl, "top:328.0px;left:180.0px;");
    mainLayout.addComponent(lblAccessUser, "top:350.0px;left:220.0px;");
    mainLayout.addComponent(fldAccessUser, "top:350.0px;left:269.0px;");
    mainLayout.addComponent(lblAccessPassword, "top:349.0px;left:529.0px;");
    mainLayout.addComponent(fldAccessPassword, "top:348.0px;left:571.0px;");
    mainLayout.addComponent(btnOk, "top:394.0px;left:580.0px;");
    mainLayout.addComponent(btnCancel, "top:394.0px;left:648.0px;");

    return mainLayout;
}

From source file:br.com.anteros.mobileserver.app.form.UserLoginForm.java

License:Apache License

private AbsoluteLayout buildAbsoluteLayout() {
    absoluteLayout = new AbsoluteLayout();
    absoluteLayout.setImmediate(false);/*w w  w  .java2 s.  c o  m*/
    absoluteLayout.setWidth("100.0%");
    absoluteLayout.setHeight("100.0%");
    absoluteLayout.setMargin(false);

    lblPassword = new Label();
    lblPassword.setImmediate(false);
    lblPassword.setWidth("-1px");
    lblPassword.setHeight("-1px");
    lblPassword.setValue("Usurio");
    absoluteLayout.addComponent(lblPassword, "top:20.0px;left:16.0px;");

    lblUserName = new Label();
    lblUserName.setImmediate(false);
    lblUserName.setWidth("-1px");
    lblUserName.setHeight("-1px");
    lblUserName.setValue("Senha");
    absoluteLayout.addComponent(lblUserName, "top:54.0px;left:24.0px;");

    fldUserName = new TextField();
    fldUserName.setImmediate(false);
    fldUserName.setWidth("217px");
    fldUserName.setHeight("-1px");
    fldUserName.setSecret(false);
    absoluteLayout.addComponent(fldUserName, "top:20.0px;left:83.0px;");

    fldPassword = new PasswordField();
    fldPassword.setImmediate(false);
    fldPassword.setWidth("217px");
    fldPassword.setHeight("-1px");
    absoluteLayout.addComponent(fldPassword, "top:54.0px;left:83.0px;");

    btnLogin = new Button();
    btnLogin.setCaption("Login");
    btnLogin.setImmediate(true);
    btnLogin.setWidth("100px");
    btnLogin.setHeight("-1px");
    absoluteLayout.addComponent(btnLogin, "top:100.0px;left:200.0px;");

    return absoluteLayout;
}

From source file:br.gov.frameworkdemoiselle.vaadin.util.FieldFactory.java

License:Open Source License

public static Field createPasswordField(String prompt, String caption) {
    PasswordField field = new PasswordField();
    field.setCaption(resolveProperties(caption));
    field.setInputPrompt(resolveProperties(prompt));
    return field;
}

From source file:com.cms.ui.ChangPasswordUI.java

public ChangPasswordUI() {
    mainLayout.setImmediate(true);/* w  w w .  j  a  v a  2s .  co m*/
    mainLayout.setCaption(BundleUtils.getString("title.changPassword"));
    mainLayout.setWidth("100%");
    mainLayout.setHeight("-1px");
    mainLayout.setMargin(true);
    mainLayout.setSpacing(true);
    mainLayout.setStyleName("main-popup");
    setWidth("30.0%");
    setHeight("-1px");
    setModal(true);

    txtUserName = new TextField();
    txtUserName.setWidth("100%");
    txtUserName.setHeight("-1px");
    txtUserName.setRequired(true);
    txtUserName.setCaption(BundleUtils.getString("userName"));
    txtUserName.setImmediate(false);
    mainLayout.addComponent(txtUserName);

    txtPasswordOld = new PasswordField();
    txtPasswordOld.setWidth("100%");
    txtPasswordOld.setHeight("-1px");
    txtPasswordOld.setRequired(true);
    txtPasswordOld.setCaption(BundleUtils.getString("passwordOld"));
    txtPasswordOld.setImmediate(false);
    mainLayout.addComponent(txtPasswordOld);

    txtPasswordNew = new PasswordField();
    txtPasswordNew.setWidth("100%");
    txtPasswordNew.setHeight("-1px");
    txtPasswordNew.setRequired(true);
    txtPasswordNew.setCaption(BundleUtils.getString("passwordNew"));
    txtPasswordNew.setImmediate(false);
    mainLayout.addComponent(txtPasswordNew);

    txtConfirmPasswordNew = new PasswordField();
    txtConfirmPasswordNew.setWidth("100%");
    txtConfirmPasswordNew.setHeight("-1px");
    txtConfirmPasswordNew.setRequired(true);
    txtConfirmPasswordNew.setCaption(BundleUtils.getString("passwordConfirm"));
    txtConfirmPasswordNew.setImmediate(false);
    mainLayout.addComponent(txtConfirmPasswordNew);

    //        captcha = new ReCaptcha("6Lfv5OoSAAAAAPEbWhNB0ERopfQpRxr8_5yncOmg", "6Lfv5OoSAAAAAHa4zmExf6w2ja3vm-8ABKgyepq-",
    //                new ReCaptchaOptions() {
    //            {
    //                theme = "white";
    //            }
    //        });
    //        mainLayout.addComponent(captcha);
    GridManyButton gridButton = new GridManyButton(new String[] { BundleUtils.getString("btn.changePassword"),
            BundleUtils.getString("common.button.cancel") });
    btnChange = gridButton.getBtnCommon().get(0);
    //        btnChange.setWidth("100%");
    //        btnChange.setHeight("-1px");
    //        btnChange.setCaption(BundleUtils.getString("btn.changePassword"));
    btnChange.addClickListener(new Button.ClickListener() {

        @Override
        public void buttonClick(Button.ClickEvent event) {
            String userName = txtUserName.getValue();
            if (userName == null || userName.equals("")) {
                Notification.show("Bn cha nhp tn ti khon", Notification.Type.ERROR_MESSAGE);
                return;
            }
            String passwordOld = txtPasswordOld.getValue();
            if (passwordOld == null || passwordOld.equals("")) {
                Notification.show("Bn cha nhp mt khu c", Notification.Type.ERROR_MESSAGE);
                return;
            }
            String passwordNew = txtPasswordNew.getValue();
            if (passwordNew == null || passwordNew.equals("")) {
                Notification.show("Bn cha nhp mt khu mi", Notification.Type.ERROR_MESSAGE);
                return;
            }
            String confirmPassword = txtConfirmPasswordNew.getValue();
            if (confirmPassword == null || confirmPassword.equals("")) {
                Notification.show("Bn cha xc nhn mt khu mi",
                        Notification.Type.ERROR_MESSAGE);
                return;
            }
            if (!passwordNew.equals(confirmPassword)) {
                Notification.show("Xc nhn cha chnh xc", Notification.Type.ERROR_MESSAGE);
                return;
            }
            Boolean check = checkLogIn(userName, passwordOld);
            if (!check) {
                Notification.show("Mt khu c cha chnh xc", Notification.Type.ERROR_MESSAGE);
                return;
            }

            StaffDTO staff = lstStaffDTO.get(0);
            staff.setPassword(DataUtil.md5(passwordNew));
            String message = WSStaff.updateStaff(staff);
            if (!message.equals("SUCCESS")) {
                Notification.show("Thay i khng thnh cng", Notification.Type.ERROR_MESSAGE);
                return;
            } else {
                Notification.show("Thay i thnh cng");
                close();
                DashboardEventBus.post(new DashboardEvent.UserLoggedOutEvent());
            }

        }
    });
    btnChange.setImmediate(false);

    //        buttonLayout.addComponent(btnChange);
    btnClose = gridButton.getBtnCommon().get(1);
    //        btnChange.setWidth("100%");
    //        btnClose.setHeight("-1px");
    //        btnClose.setCaption(BundleUtils.getString("btn.close"));
    btnClose.addClickListener(new Button.ClickListener() {

        @Override
        public void buttonClick(Button.ClickEvent event) {
            close();
        }
    });
    //        buttonLayout.addComponent(btnClose);
    mainLayout.addComponent(gridButton);
    mainLayout.setComponentAlignment(gridButton, Alignment.MIDDLE_CENTER);
    setContent(mainLayout);

}

From source file:com.esofthead.mycollab.mobile.module.crm.view.CrmLoginViewImpl.java

License:Open Source License

private void initUI() {
    this.setStyleName("login-view");
    this.setSizeFull();

    VerticalLayout contentLayout = new VerticalLayout();
    contentLayout.setStyleName("content-wrapper");
    contentLayout.setDefaultComponentAlignment(Alignment.TOP_CENTER);
    contentLayout.setMargin(true);// ww  w .j a  v a 2 s  .c  o  m
    contentLayout.setSpacing(true);
    contentLayout.setWidth("320px");

    Image mainLogo = new Image(null, new ThemeResource("icons/logo_m.png"));
    contentLayout.addComponent(mainLogo);

    Label introText = new Label(
            "MyCollab helps you do all your office jobs on the computers, phones and tablets you use");
    introText.setStyleName("intro-text");
    contentLayout.addComponent(introText);

    CssLayout welcomeTextWrapper = new CssLayout();
    welcomeTextWrapper.setStyleName("welcometext-wrapper");
    welcomeTextWrapper.setWidth("100%");
    Label welcomeText = new Label("Login to CRM");
    welcomeText.setWidth("150px");
    welcomeTextWrapper.addComponent(welcomeText);
    contentLayout.addComponent(welcomeTextWrapper);

    final EmailField emailField = new EmailField();
    emailField.setWidth("100%");
    emailField.setInputPrompt("E-mail Address");
    emailField.setStyleName("email-input");
    contentLayout.addComponent(emailField);

    final PasswordField pwdField = new PasswordField();
    pwdField.setWidth("100%");
    pwdField.setInputPrompt("Password");
    pwdField.setStyleName("password-input");
    contentLayout.addComponent(pwdField);

    final CheckBox rememberPassword = new CheckBox();
    rememberPassword.setWidth("100%");
    rememberPassword.setCaption("Remember password");
    rememberPassword.setValue(true);
    contentLayout.addComponent(rememberPassword);

    Button signInBtn = new Button("Sign In");
    signInBtn.setWidth("100%");
    signInBtn.addStyleName(UIConstants.BUTTON_BIG);
    signInBtn.addStyleName(UIConstants.COLOR_BLUE);
    signInBtn.addClickListener(new Button.ClickListener() {
        private static final long serialVersionUID = 1L;

        @Override
        public void buttonClick(Button.ClickEvent event) {
            EventBusFactory.getInstance().post(new CrmEvent.PlainLogin(this, new String[] {
                    emailField.getValue(), pwdField.getValue(), String.valueOf(rememberPassword.getValue()) }));
        }
    });
    contentLayout.addComponent(signInBtn);

    Button createAccountBtn = new Button("Create Account");
    createAccountBtn.setWidth("100%");
    createAccountBtn.addStyleName(UIConstants.BUTTON_BIG);
    createAccountBtn.addStyleName(UIConstants.COLOR_GRAY);
    contentLayout.addComponent(createAccountBtn);

    this.addComponent(contentLayout);
}

From source file:com.esofthead.mycollab.mobile.module.project.view.ProjectLoginViewImpl.java

License:Open Source License

private void initUI() {
    this.setStyleName("login-view");
    this.setSizeFull();

    VerticalLayout contentLayout = new VerticalLayout();
    contentLayout.setStyleName("content-wrapper");
    contentLayout.setDefaultComponentAlignment(Alignment.TOP_CENTER);
    contentLayout.setMargin(true);//from ww  w  .  j av a 2 s. c o  m
    contentLayout.setSpacing(true);
    contentLayout.setWidth("320px");

    Image mainLogo = new Image(null, new ThemeResource("icons/logo_m.png"));
    contentLayout.addComponent(mainLogo);

    Label introText = new Label(
            "MyCollab helps you do all your office jobs on the computers, phones and tablets you use");
    introText.setStyleName("intro-text");
    contentLayout.addComponent(introText);

    CssLayout welcomeTextWrapper = new CssLayout();
    welcomeTextWrapper.setStyleName("welcometext-wrapper");
    welcomeTextWrapper.setWidth("100%");
    Label welcomeText = new Label("Login to Projects");
    welcomeText.setWidth("150px");
    welcomeTextWrapper.addComponent(welcomeText);
    contentLayout.addComponent(welcomeTextWrapper);

    final EmailField emailField = new EmailField();
    emailField.setWidth("100%");
    emailField.setInputPrompt("E-mail Address");
    emailField.setStyleName("email-input");
    contentLayout.addComponent(emailField);

    final PasswordField pwdField = new PasswordField();
    pwdField.setWidth("100%");
    pwdField.setInputPrompt("Password");
    pwdField.setStyleName("password-input");
    contentLayout.addComponent(pwdField);

    final CheckBox rememberPassword = new CheckBox();
    rememberPassword.setWidth("100%");
    rememberPassword.setCaption("Remember password");
    rememberPassword.setValue(true);
    contentLayout.addComponent(rememberPassword);

    Button signInBtn = new Button("Sign In");
    signInBtn.setWidth("100%");
    signInBtn.addStyleName(UIConstants.BUTTON_BIG);
    signInBtn.addStyleName(UIConstants.COLOR_BLUE);
    signInBtn.addClickListener(new Button.ClickListener() {
        private static final long serialVersionUID = 1L;

        @Override
        public void buttonClick(Button.ClickEvent event) {
            EventBusFactory.getInstance().post(new ProjectEvent.PlainLogin(this, new String[] {
                    emailField.getValue(), pwdField.getValue(), String.valueOf(rememberPassword.getValue()) }));
        }
    });
    contentLayout.addComponent(signInBtn);

    Button createAccountBtn = new Button("Create Account");
    createAccountBtn.setWidth("100%");
    createAccountBtn.addStyleName(UIConstants.BUTTON_BIG);
    createAccountBtn.addStyleName(UIConstants.COLOR_GRAY);
    contentLayout.addComponent(createAccountBtn);

    this.addComponent(contentLayout);
}

From source file:com.esofthead.mycollab.mobile.module.user.view.LoginViewImpl.java

License:Open Source License

private void initUI() {
    this.setStyleName("login-view");
    this.setSizeFull();

    VerticalLayout contentLayout = new VerticalLayout();
    contentLayout.setStyleName("content-wrapper");
    contentLayout.setDefaultComponentAlignment(Alignment.TOP_CENTER);
    contentLayout.setMargin(true);/*from   w  w w.  j a v a 2s  . c o  m*/
    contentLayout.setSpacing(true);
    contentLayout.setWidth("320px");

    Image mainLogo = new Image(null, new ThemeResource("icons/logo_m.png"));
    contentLayout.addComponent(mainLogo);

    Label introText = new Label(
            "MyCollab helps you do all your office jobs on the computers, phones and tablets you use");
    introText.setStyleName("intro-text");
    contentLayout.addComponent(introText);

    CssLayout welcomeTextWrapper = new CssLayout();
    welcomeTextWrapper.setStyleName("welcometext-wrapper");
    welcomeTextWrapper.setWidth("100%");
    welcomeTextWrapper.setHeight("15px");
    Label welcomeText = new Label("Welcome Back!");
    welcomeText.setWidth("150px");
    welcomeTextWrapper.addComponent(welcomeText);
    contentLayout.addComponent(welcomeTextWrapper);

    final EmailField emailField = new EmailField();
    emailField.setWidth("100%");
    emailField.setInputPrompt("E-mail Address");
    emailField.setStyleName("email-input");
    contentLayout.addComponent(emailField);

    final PasswordField pwdField = new PasswordField();
    pwdField.setWidth("100%");
    pwdField.setInputPrompt("Password");
    pwdField.setStyleName("password-input");
    contentLayout.addComponent(pwdField);

    final CheckBox rememberPassword = new CheckBox();
    rememberPassword.setWidth("100%");
    rememberPassword.setCaption("Remember password");
    rememberPassword.setValue(true);
    contentLayout.addComponent(rememberPassword);

    Button signInBtn = new Button("Sign In");
    signInBtn.setWidth("100%");
    signInBtn.addStyleName(UIConstants.BUTTON_BIG);
    signInBtn.addStyleName(UIConstants.COLOR_BLUE);
    signInBtn.addClickListener(new Button.ClickListener() {
        private static final long serialVersionUID = 1L;

        @Override
        public void buttonClick(Button.ClickEvent event) {
            ShellController.doLogin(emailField.getValue(), pwdField.getValue(), rememberPassword.getValue());
        }
    });
    contentLayout.addComponent(signInBtn);

    Button createAccountBtn = new Button("Create Account");
    createAccountBtn.setWidth("100%");
    createAccountBtn.addStyleName(UIConstants.BUTTON_BIG);
    createAccountBtn.addStyleName(UIConstants.COLOR_GRAY);
    contentLayout.addComponent(createAccountBtn);

    this.addComponent(contentLayout);
}

From source file:com.esofthead.mycollab.module.user.accountsettings.profile.view.PasswordChangeWindow.java

License:Open Source License

private void initUI() {
    final MVerticalLayout mainLayout = new MVerticalLayout().withWidth("100%");

    final Label lbInstruct1 = new Label(AppContext.getMessage(UserI18nEnum.MSG_PASSWORD_INSTRUCT_LABEL_1));
    mainLayout.addComponent(lbInstruct1);
    mainLayout.setComponentAlignment(lbInstruct1, Alignment.MIDDLE_LEFT);

    final Label lbInstruct2 = new Label(AppContext.getMessage(UserI18nEnum.MSG_PASSWORD_INSTRUCT_LABEL_2));
    mainLayout.addComponent(lbInstruct2);
    mainLayout.setComponentAlignment(lbInstruct2, Alignment.MIDDLE_LEFT);

    final GridFormLayoutHelper passInfo = new GridFormLayoutHelper(1, 3, "300px", "180px");

    txtNewPassword = new PasswordField();
    passInfo.addComponent(txtNewPassword, "New Password", 0, 0);

    txtConfirmPassword = new PasswordField();
    passInfo.addComponent(txtConfirmPassword, "Confirmed New Password", 0, 1);

    passInfo.getLayout().setSpacing(true);
    mainLayout.addComponent(passInfo.getLayout());
    mainLayout.setComponentAlignment(passInfo.getLayout(), Alignment.MIDDLE_CENTER);

    final MHorizontalLayout hlayoutControls = new MHorizontalLayout().withMargin(true);

    final Button cancelBtn = new Button(AppContext.getMessage(GenericI18Enum.BUTTON_CANCEL),
            new Button.ClickListener() {
                private static final long serialVersionUID = 1L;

                @Override//w w w.  ja  va2  s . c o  m
                public void buttonClick(final ClickEvent event) {
                    PasswordChangeWindow.this.close();
                }
            });
    cancelBtn.setStyleName(UIConstants.THEME_GRAY_LINK);

    final Button saveBtn = new Button(AppContext.getMessage(GenericI18Enum.BUTTON_SAVE),
            new Button.ClickListener() {
                private static final long serialVersionUID = 1L;

                @Override
                public void buttonClick(final ClickEvent event) {
                    PasswordChangeWindow.this.changePassword();
                }
            });
    saveBtn.setStyleName(UIConstants.THEME_GREEN_LINK);
    saveBtn.setIcon(FontAwesome.SAVE);

    hlayoutControls.with(saveBtn, cancelBtn).alignAll(Alignment.MIDDLE_CENTER);

    mainLayout.with(hlayoutControls).withAlign(hlayoutControls, Alignment.MIDDLE_RIGHT);

    this.setModal(true);
    this.setContent(mainLayout);
}