Search in sources :

Example 1 with PasswordTextBox

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");
}
Also used : PasswordTextBox(com.google.gwt.user.client.ui.PasswordTextBox) Test(org.junit.Test)

Example 2 with PasswordTextBox

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");
}
Also used : PasswordTextBox(com.google.gwt.user.client.ui.PasswordTextBox) Test(org.junit.Test)

Example 3 with PasswordTextBox

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");
}
Also used : PasswordTextBox(com.google.gwt.user.client.ui.PasswordTextBox) Test(org.junit.Test)

Example 4 with PasswordTextBox

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);
}
Also used : PasswordTextBox(com.google.gwt.user.client.ui.PasswordTextBox) Test(org.junit.Test)

Example 5 with PasswordTextBox

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;
}
Also used : VerticalPanel(com.google.gwt.user.client.ui.VerticalPanel) HorizontalPanel(com.google.gwt.user.client.ui.HorizontalPanel) Label(com.google.gwt.user.client.ui.Label) CaptionWithHelp(org.rstudio.core.client.widget.CaptionWithHelp) TextBox(com.google.gwt.user.client.ui.TextBox) PasswordTextBox(com.google.gwt.user.client.ui.PasswordTextBox) PasswordTextBox(com.google.gwt.user.client.ui.PasswordTextBox)

Aggregations

PasswordTextBox (com.google.gwt.user.client.ui.PasswordTextBox)5 Test (org.junit.Test)4 HorizontalPanel (com.google.gwt.user.client.ui.HorizontalPanel)1 Label (com.google.gwt.user.client.ui.Label)1 TextBox (com.google.gwt.user.client.ui.TextBox)1 VerticalPanel (com.google.gwt.user.client.ui.VerticalPanel)1 CaptionWithHelp (org.rstudio.core.client.widget.CaptionWithHelp)1