use of com.google.gwt.user.client.ui.PasswordTextBox in project gwt-test-utils by gwt-test-utils.
the class PasswordTextBoxTest method name.
@Test
public void name() {
// Given
PasswordTextBox ptb = new PasswordTextBox();
// Preconditions
assertThat(ptb.getName()).isEqualTo("");
// When
ptb.setName("name");
// Then
assertThat(ptb.getName()).isEqualTo("name");
}
use of com.google.gwt.user.client.ui.PasswordTextBox in project gwt-test-utils by gwt-test-utils.
the class PasswordTextBoxTest method title.
@Test
public void title() {
// Given
PasswordTextBox ptb = new PasswordTextBox();
// Preconditions
assertThat(ptb.getTitle()).isEqualTo("");
// When
ptb.setTitle("title");
// Then
assertThat(ptb.getTitle()).isEqualTo("title");
}
use of com.google.gwt.user.client.ui.PasswordTextBox in project gwt-test-utils by gwt-test-utils.
the class PasswordTextBoxTest method text.
@Test
public void text() {
// Given
PasswordTextBox ptb = new PasswordTextBox();
// Preconditions
assertThat(ptb.getText()).isEqualTo("");
// When
ptb.setText("text");
// Then
assertThat(ptb.getText()).isEqualTo("text");
}
use of com.google.gwt.user.client.ui.PasswordTextBox in project gwt-test-utils by gwt-test-utils.
the class PasswordTextBoxTest method visible.
@Test
public void visible() {
// Given
PasswordTextBox ptb = new PasswordTextBox();
// Preconditions
assertThat(ptb.isVisible()).isEqualTo(true);
// When
ptb.setVisible(false);
// Then
assertThat(ptb.isVisible()).isEqualTo(false);
}
use of com.google.gwt.user.client.ui.PasswordTextBox in project rstudio by rstudio.
the class CreateKeyDialog method createMainWidget.
@Override
protected Widget createMainWidget() {
Styles styles = RESOURCES.styles();
VerticalPanel panel = new VerticalPanel();
panel.addStyleName(styles.mainWidget());
VerticalPanel namePanel = new VerticalPanel();
namePanel.setWidth("100%");
// path
CaptionWithHelp pathCaption = new CaptionWithHelp("The RSA key will be created at:", "SSH/RSA key management", "rsa_key_help");
pathCaption.setIncludeVersionInfo(false);
pathCaption.setWidth("100%");
namePanel.add(pathCaption);
TextBox txtKeyPath = new TextBox();
txtKeyPath.addStyleName(styles.keyPathTextBox());
txtKeyPath.setReadOnly(true);
txtKeyPath.setText(rsaSshKeyPath_.getPath());
txtKeyPath.setWidth("100%");
namePanel.add(txtKeyPath);
panel.add(namePanel);
HorizontalPanel passphrasePanel = new HorizontalPanel();
passphrasePanel.addStyleName(styles.newSection());
VerticalPanel passphrasePanel1 = new VerticalPanel();
Label passphraseLabel1 = new Label("Passphrase (optional):");
passphraseLabel1.addStyleName(styles.entryLabel());
passphrasePanel1.add(passphraseLabel1);
txtPassphrase_ = new PasswordTextBox();
txtPassphrase_.addStyleName(styles.passphrase());
passphrasePanel1.add(txtPassphrase_);
passphrasePanel.add(passphrasePanel1);
VerticalPanel passphrasePanel2 = new VerticalPanel();
passphrasePanel2.addStyleName(styles.lastSection());
Label passphraseLabel2 = new Label("Confirm:");
passphraseLabel2.addStyleName(styles.entryLabel());
passphrasePanel2.add(passphraseLabel2);
txtConfirmPassphrase_ = new PasswordTextBox();
txtConfirmPassphrase_.addStyleName(styles.passphraseConfirm());
passphrasePanel2.add(txtConfirmPassphrase_);
passphrasePanel.add(passphrasePanel2);
panel.add(passphrasePanel);
return panel;
}
Aggregations