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;
}
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;
}
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;
}
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;
}
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;
}
Aggregations