Package com.vaadin.ui

Examples of com.vaadin.ui.PasswordField


        final TextField username = new TextField("Username");
        username.focus();
        fields.addComponent(username);
       
        final PasswordField password = new PasswordField("Password");
        fields.addComponent(password);
        //TODO: Borrar
        password.setValue("root");
        username.setValue("admin@tesis.com");
       
        final Button signin = new Button("Sign In");
        signin.addStyleName("default");
        fields.addComponent(signin);
        fields.setComponentAlignment(signin, Alignment.BOTTOM_LEFT);

        final ShortcutListener enter = new ShortcutListener("Sign In",
                KeyCode.ENTER, null) {
            /**
           *
           */
          private static final long serialVersionUID = -2425923923914266067L;

      @Override
            public void handleAction(Object sender, Object target) {
                signin.click();
            }
        };

        signin.addClickListener(new ClickListener() {
            /**
       *
       */
      private static final long serialVersionUID = 8646342267124075364L;
     

      @Override
            public void buttonClick(ClickEvent event) {
        if (username.getValue() != null
            && password.getValue() != null
            )
          idUsuario = Usuario.Login(username.getValue(),password.getValue());
        if (idUsuario != null){
          signin.removeShortcutListener(enter);
          buildMainView();

        } else {
View Full Code Here

TOP

Related Classes of com.vaadin.ui.PasswordField

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.