Examples of PasswordField


Examples of com.vaadin.ui.PasswordField

        m_usernameTextField = new TextField();
        m_usernameTextField.setEnabled(false);
        m_usernameTextField.setCaption("Username");

        m_passwordTextField = new PasswordField();
        m_passwordTextField.setCaption("Password");
        m_passwordTextField.setImmediate(true);
        m_passwordTextField.addListener(new ValueChangeListener() {
            @Override
            public void valueChange(ValueChangeEvent event) {
View Full Code Here

Examples of com.vaadin.ui.PasswordField

        final TextField nameField = new TextField("Name", "");
        nameField.addListener(changeListener);
        nameField.setImmediate(true);
        nameField.setWidth("100%");

        final PasswordField passwordField = new PasswordField("Password", "");
        passwordField.addListener(changeListener);
        passwordField.setImmediate(true);
        passwordField.setWidth("100%");

        Button loginButton = new Button("Login");
        loginButton.setImmediate(true);
        // Allow enter to be used to login directly...
        loginButton.setClickShortcut(KeyCode.ENTER);
        // Highlight this button as the default one...
        loginButton.addStyleName(Reindeer.BUTTON_DEFAULT);

        loginButton.addListener(new Button.ClickListener() {
            public void buttonClick(ClickEvent event) {
                Button button = event.getButton();
                button.setEnabled(false);

                try {
                    String username = (String) nameField.getValue();
                    String password = (String) passwordField.getValue();

                    if (m_loginFunction.login(username, password)) {
                        m_log.log(LogService.LOG_INFO, "Apache Ace WebUI succesfull login by user: " + username);

                        closeWindow();
View Full Code Here

Examples of com.vaadin.ui.PasswordField

         */
        private static final long serialVersionUID = -3646155806867417299L;

        public void buttonClick(ClickEvent event) {
          final Window editWindow = new Window("Edit");
          final PasswordField oldField = new PasswordField("Old Password");
         
          final PasswordField newField = new PasswordField("New Password");
          editWindow.addComponent(oldField);
          editWindow.addComponent(newField);
          Button saveButton = new Button("save");
          editWindow.setImmediate(true);
          saveButton.setImmediate(true);
          saveButton.addListener(new ClickListener() {

            /**
             *
             */
            private static final long serialVersionUID = -4933483940137908277L;

            public void buttonClick(ClickEvent event) {
              String val1 = (String) oldField.getValue();
              String val2 = (String) newField.getValue();
              if (Arrays.equals(Hash.hashString(val1), user.getPassword())) {
                currentPage.user.setPassword(Hash.hashString(val2));
              } else {
                currentPage.me.getApplication().getMainWindow().showNotification("Old password doesn't match");
                return;
View Full Code Here

Examples of com.vaadin.ui.PasswordField

                setSpacing(true);
                setMargin(true);
                setClosable(false);
                setSizeFull();
                m_name = new TextField("Name", "");
                m_password = new PasswordField("Password", "");
                m_loginButton = new Button("Login");
                addComponent(m_name);
                addComponent(m_password);
                addComponent(m_loginButton);
                setComponentAlignment(m_loginButton, Alignment.BOTTOM_CENTER);
View Full Code Here

Examples of com.vaadin.ui.PasswordField

    layout.addComponent(inputGrid);
    layout.setComponentAlignment(inputGrid, Alignment.MIDDLE_CENTER);
   
    Label newPasswordLabel = new Label(i18nManager.getMessage(Messages.PROFILE_NEW_PASSWORD));
    inputGrid.addComponent(newPasswordLabel);
    passwordField1 = new PasswordField();
    passwordField1.setWidth(150, UNITS_PIXELS);
    inputGrid.addComponent(passwordField1);
    passwordField1.focus();

    Label confirmPasswordLabel = new Label(i18nManager.getMessage(Messages.PROFILE_CONFIRM_PASSWORD));
    inputGrid.addComponent(confirmPasswordLabel);
    passwordField2 = new PasswordField();
    passwordField2.setWidth(150, UNITS_PIXELS);
    inputGrid.addComponent(passwordField2);
  }
View Full Code Here

Examples of com.vaadin.ui.PasswordField

    });
   
    final TextField imapUserName = new TextField(i18nManager.getMessage(Messages.IMAP_USERNAME));
    imapForm.getLayout().addComponent(imapUserName);
   
    final PasswordField imapPassword = new PasswordField(i18nManager.getMessage(Messages.IMAP_PASSWORD));
    imapForm.getLayout().addComponent(imapPassword);
   
    // Matching listener
    imapClickListener = new ClickListener() {
      public void buttonClick(ClickEvent event) {
        Map<String, Object> accountDetails = createAccountDetails(
                "imap",
                imapUserName.getValue().toString(),
                imapPassword.getValue().toString(),
                "server", imapServer.getValue().toString(),
                "port", imapPort.getValue().toString(),
                "ssl", imapPort.getValue().toString()
                );
        fireEvent(new SubmitEvent(AccountSelectionPopup.this, SubmitEvent.SUBMITTED, accountDetails));
View Full Code Here

Examples of com.vaadin.ui.PasswordField

    alfrescoForm.getLayout().addComponent(alfrescoServer);
   
    final TextField alfrescoUserName = new TextField(i18nManager.getMessage(Messages.ALFRESCO_USERNAME));
    alfrescoForm.getLayout().addComponent(alfrescoUserName);
   
    final PasswordField alfrescoPassword = new PasswordField(i18nManager.getMessage(Messages.ALFRESCO_PASSWORD));
    alfrescoForm.getLayout().addComponent(alfrescoPassword);
   
    // Matching listener
    alfrescoClickListener = new ClickListener() {
      public void buttonClick(ClickEvent event) {
        Map<String, Object> accountDetails = createAccountDetails(
                "alfresco",
                alfrescoUserName.getValue().toString(),
                alfrescoPassword.getValue().toString(),
                "server", alfrescoServer.getValue().toString()
                );
        fireEvent(new SubmitEvent(AccountSelectionPopup.this, SubmitEvent.SUBMITTED, accountDetails));
      }
    };
View Full Code Here

Examples of com.vaadin.ui.PasswordField

    setCaption("Login");

    final TextField username = new TextField("Username");
    addComponent(username);

    final PasswordField password = new PasswordField("Password");
    addComponent(password);

    final CheckBox rememberMe = new CheckBox("Remember Me");
    addComponent(rememberMe);

    username.focus();
   
    // TODO: Remove these two lines before production release
    username.setValue("admin");
    password.setValue("admin");
   
    if (ApplicationSecurity.isRemembered())
    {
      username.setValue(ApplicationSecurity.whoIsRemembered());
      rememberMe.setValue(ApplicationSecurity.isRemembered());
      password.focus();
    }

    @SuppressWarnings("serial")
    final Button login = new Button("Login", new Button.ClickListener()
    {
      public void buttonClick(ClickEvent event)
      {
        final Navigator navigator = UI.getCurrent().getNavigator();
        if (ApplicationSecurity.login(username.getValue(), password.getValue(), rememberMe.getValue()))
        {
          final String location = (fragmentAndParameters == null)
              ? ApplicationView.NAME
              : fragmentAndParameters;
         
View Full Code Here

Examples of javafx.scene.control.PasswordField

    if (type == Type.PASSWORD) {
      textField = null;
      textArea = null;
      numericStepperDigits = null;
      listView = null;
      passwordField = new PasswordField();
      passwordField.setPromptText(labelText);
      if (width != null) {
        passwordField.setPrefWidth(width.doubleValue());
      }
      if (height != null) {
View Full Code Here

Examples of javafx.scene.control.PasswordField

      sl.setSnapToTicks(true);
      // POJO binding magic...
      personPA.bindBidirectional(path, sl.valueProperty());
      ctrl = sl;
    } else if (controlType == PasswordField.class) {
      final PasswordField tf = new PasswordField() {
        @Override
        public void replaceText(int start, int end, String text) {
          if (matchTest(text)) {
            super.replaceText(start, end, text);
          }
        }

        @Override
        public void replaceSelection(String text) {
          if (matchTest(text)) {
            super.replaceSelection(text);
          }
        }

        private boolean matchTest(String text) {
          return text.isEmpty()
              || (text.matches(restictTo) && (getText() == null || getText()
                  .length() < maxChars));
        }
      };
      // POJO binding magic...
      personPA.bindBidirectional(path, tf.textProperty());
      ctrl = tf;
    } else {
      final TextField tf = controlType == PasswordField.class ? new PasswordField() {
        @Override
        public void replaceText(int start, int end, String text) {
          if (matchTest(text)) {
            super.replaceText(start, end, text);
          }
        }

        @Override
        public void replaceSelection(String text) {
          if (matchTest(text)) {
            super.replaceSelection(text);
          }
        }

        private boolean matchTest(String text) {
          return text.isEmpty()
              || (text.matches(restictTo) && (getText() == null || getText()
                  .length() < maxChars));
        }
      }
          : new TextField() {
            @Override
            public void replaceText(int start, int end, String text) {
              if (matchTest(text)) {
                super.replaceText(start, end, text);
              }
            }

            @Override
            public void replaceSelection(String text) {
              if (matchTest(text)) {
                super.replaceSelection(text);
              }
            }

            private boolean matchTest(String text) {
              return text.isEmpty()
                  || (text.matches(restictTo) && (getText() == null || getText()
                      .length() < maxChars));
            }
          };
      // POJO binding magic...
      personPA.bindBidirectional(path, tf.textProperty());
      ctrl = tf;
    }
    box.getChildren()
        .addAll(new Label(
            path
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.