use of bisq.desktop.util.validation.PasswordValidator in project bisq-desktop by bisq-network.
the class WalletPasswordWindow method addInputFields.
private void addInputFields() {
Label label = new AutoTooltipLabel(Res.get("password.enterPassword"));
label.setWrapText(true);
GridPane.setMargin(label, new Insets(3, 0, 0, 0));
GridPane.setRowIndex(label, ++rowIndex);
passwordTextField = new PasswordTextField();
GridPane.setMargin(passwordTextField, new Insets(3, 0, 0, 0));
GridPane.setRowIndex(passwordTextField, rowIndex);
GridPane.setColumnIndex(passwordTextField, 1);
PasswordValidator passwordValidator = new PasswordValidator();
changeListener = (observable, oldValue, newValue) -> unlockButton.setDisable(!passwordValidator.validate(newValue).isValid);
passwordTextField.textProperty().addListener(changeListener);
gridPane.getChildren().addAll(label, passwordTextField);
}
Aggregations