コード例 #1
0
  @UiHandler("emailTextBox")
  void emailTextBoxOnChange(KeyUpEvent event) {
    if (!usernameTextBox.getText().isEmpty()) {
      if (!isEmailValid()) {
        active.hide();
        emailError.setText("Enter a valid email address");
        emailTextBox.setStyleName(deployer.redBorder());
      } else {
        emailError.setText("");
        emailTextBox.setStyleName(deployer.greyBorder());
      }
    } else {

    }
  }
コード例 #2
0
  @UiHandler("passwordConfirmTextBox")
  void passwordConfirmTextBoxOnChange(KeyUpEvent event) {
    if (!usernameTextBox.getText().isEmpty()) {
      if (!isPasswordValid()) {
        active.hide();
        passwordError.setText("Passwords do not match");
        passwordTextBox.setStyleName(deployer.redBorder());
        passwordConfirmTextBox.setStyleName(deployer.redBorder());
      } else {
        passwordError.setText("");
        passwordTextBox.setStyleName(deployer.greyBorder());
        passwordConfirmTextBox.setStyleName(deployer.greyBorder());
      }
    } else {

    }
  }
コード例 #3
0
 /**
  * Set the text of a tooltip
  *
  * @param text the text to set
  */
 private void setTooltipText(String text) {
   active.hide();
   active.setText(text);
   active.show();
 }