Search in sources :

Example 16 with JTextComponentFixture

use of org.fest.swing.fixture.JTextComponentFixture in project android by JetBrains.

the class BuildSignedApkDialogCreateKeystoreSubDialogFixture method passwordConfirm.

@NotNull
public BuildSignedApkDialogCreateKeystoreSubDialogFixture passwordConfirm(@NotNull String password) {
    JPasswordField passwordField = robot().finder().findByName("myConfirmedPassword", JPasswordField.class);
    new JTextComponentFixture(robot(), passwordField).enterText(password);
    return this;
}
Also used : JTextComponentFixture(org.fest.swing.fixture.JTextComponentFixture) NotNull(org.jetbrains.annotations.NotNull)

Example 17 with JTextComponentFixture

use of org.fest.swing.fixture.JTextComponentFixture in project android by JetBrains.

the class BuildSignedApkDialogCreateKeystoreSubDialogFixture method organizationalUnit.

@NotNull
public BuildSignedApkDialogCreateKeystoreSubDialogFixture organizationalUnit(@NotNull String ou) {
    JTextField ouComponent = robot().finder().findByLabel("Organizational Unit:", JTextField.class);
    new JTextComponentFixture(robot(), ouComponent).enterText(ou);
    return this;
}
Also used : JTextComponentFixture(org.fest.swing.fixture.JTextComponentFixture) NotNull(org.jetbrains.annotations.NotNull)

Example 18 with JTextComponentFixture

use of org.fest.swing.fixture.JTextComponentFixture in project android by JetBrains.

the class BuildSignedApkDialogCreateKeystoreSubDialogFixture method keyStorePath.

@NotNull
public BuildSignedApkDialogCreateKeystoreSubDialogFixture keyStorePath(@NotNull String path) {
    JTextField textField = ((TextFieldWithBrowseButton) robot().finder().findByLabel(target(), "Key store path:")).getTextField();
    new JTextComponentFixture(robot(), textField).enterText(path);
    return this;
}
Also used : TextFieldWithBrowseButton(com.intellij.openapi.ui.TextFieldWithBrowseButton) JTextComponentFixture(org.fest.swing.fixture.JTextComponentFixture) NotNull(org.jetbrains.annotations.NotNull)

Example 19 with JTextComponentFixture

use of org.fest.swing.fixture.JTextComponentFixture in project android by JetBrains.

the class ColorPickerFixture method setColor.

@NotNull
public ColorPickerFixture setColor(@NotNull Color color) {
    String format = myFormat.selectedItem();
    String labelR = "R:";
    String labelG = "G:";
    String labelB = "B:";
    int[] colorComponents = { color.getRed(), color.getGreen(), color.getBlue() };
    if ("HSB".equals(format)) {
        labelR = "H:";
        labelG = "S:";
        float[] floatHSB = Color.RGBtoHSB(colorComponents[0], colorComponents[1], colorComponents[2], null);
        colorComponents[0] = (int) (floatHSB[0] * 360);
        colorComponents[1] = (int) (floatHSB[1] * 100);
        colorComponents[2] = (int) (floatHSB[2] * 100);
    } else if ("ARGB".equals(format)) {
        JTextComponentFixture fieldA = new JTextComponentFixture(robot(), robot().finder().findByLabel(this.target(), "A:", JTextField.class));
        fieldA.enterText(Integer.toString(color.getAlpha()));
    }
    JTextComponentFixture fieldR = new JTextComponentFixture(robot(), robot().finder().findByLabel(this.target(), labelR, JTextField.class));
    fieldR.enterText(Integer.toString(colorComponents[0]));
    JTextComponentFixture fieldG = new JTextComponentFixture(robot(), robot().finder().findByLabel(this.target(), labelG, JTextField.class));
    fieldG.enterText(Integer.toString(colorComponents[1]));
    JTextComponentFixture fieldB = new JTextComponentFixture(robot(), robot().finder().findByLabel(this.target(), labelB, JTextField.class));
    fieldB.enterText(Integer.toString(colorComponents[2]));
    return this;
}
Also used : JTextComponentFixture(org.fest.swing.fixture.JTextComponentFixture) NotNull(org.jetbrains.annotations.NotNull)

Example 20 with JTextComponentFixture

use of org.fest.swing.fixture.JTextComponentFixture in project android by JetBrains.

the class NewModuleDialogFixture method setFileName.

@NotNull
public NewModuleDialogFixture setFileName(String name) {
    TextFieldWithBrowseButton panel = robot().finder().findByLabel(target(), "File name:", TextFieldWithBrowseButton.class);
    new JTextComponentFixture(robot(), robot().finder().findByType(panel, JTextField.class)).deleteText().enterText(name);
    return this;
}
Also used : TextFieldWithBrowseButton(com.intellij.openapi.ui.TextFieldWithBrowseButton) JTextComponentFixture(org.fest.swing.fixture.JTextComponentFixture) NotNull(org.jetbrains.annotations.NotNull)

Aggregations

JTextComponentFixture (org.fest.swing.fixture.JTextComponentFixture)22 NotNull (org.jetbrains.annotations.NotNull)15 JTextComponent (javax.swing.text.JTextComponent)3 PublicAtsApi (com.axway.ats.common.PublicAtsApi)2 SwingElementState (com.axway.ats.uiengine.utilities.swing.SwingElementState)2 TextFieldWithBrowseButton (com.intellij.openapi.ui.TextFieldWithBrowseButton)2 ComponentLookupException (org.fest.swing.exception.ComponentLookupException)2 JComboBoxFixture (org.fest.swing.fixture.JComboBoxFixture)2 JListFixture (org.fest.swing.fixture.JListFixture)2 JTreeFixture (org.fest.swing.fixture.JTreeFixture)2 Test (org.junit.Test)2 ThemeSelectionDialogFixture (com.android.tools.idea.tests.gui.framework.fixture.ThemeSelectionDialogFixture)1 AndroidThemePreviewPanelFixture (com.android.tools.idea.tests.gui.framework.fixture.theme.AndroidThemePreviewPanelFixture)1 NewStyleDialogFixture (com.android.tools.idea.tests.gui.framework.fixture.theme.NewStyleDialogFixture)1 ThemeEditorFixture (com.android.tools.idea.tests.gui.framework.fixture.theme.ThemeEditorFixture)1 ElementNotFoundException (com.axway.ats.uiengine.exceptions.ElementNotFoundException)1 SwingDriverInternal (com.axway.ats.uiengine.internal.driver.SwingDriverInternal)1 Component (java.awt.Component)1 StringSelection (java.awt.datatransfer.StringSelection)1 File (java.io.File)1