use of com.intellij.ui.components.JBLabel in project android by JetBrains.
the class NlPropertyInspectorFixture method findPropertyComponent.
@Nullable
private Component findPropertyComponent(@NotNull String name, @Nullable Icon icon) {
try {
JBLabel label = waitUntilFound(robot(), myPanel, new GenericTypeMatcher<JBLabel>(JBLabel.class) {
@Override
protected boolean isMatching(@NotNull JBLabel label) {
return name.equals(label.getText()) && label.getIcon() == icon;
}
});
Container parent = label.getParent();
Component[] components = parent.getComponents();
for (int i = 0; i < components.length; i++) {
if (label == components[i]) {
return components[i + 1];
}
}
return null;
} catch (WaitTimedOutError ex) {
return null;
}
}
use of com.intellij.ui.components.JBLabel in project android by JetBrains.
the class AbstractWizardStepFixture method getValidationText.
public String getValidationText() {
JBLabel validationLabel = robot().finder().findByName(target(), "ValidationLabel", JBLabel.class);
Wait.seconds(1).expecting("validation text to appear").until(() -> validationLabel.getText().matches(".*\\S.*"));
return validationLabel.getText();
}
use of com.intellij.ui.components.JBLabel in project android by JetBrains.
the class ConfigureActivityStep method onEntering.
@Override
protected void onEntering() {
// Verified by shouldSkip
assert getModel().getTargetTemplate() != null;
myRootPanel.removeAll();
int row = 0;
for (String param : getModel().getTargetTemplate().getParameters()) {
myRootPanel.add(new JBLabel(param + ": "), new TabularLayout.Constraint(row, 0));
JBTextField valueTextField = new JBTextField("Value" + (row + 1));
valueTextField.putClientProperty("param", param);
myRootPanel.add(valueTextField, new TabularLayout.Constraint(row, 1));
if (row == 0) {
myPreferredFocus = valueTextField;
}
row++;
}
}
Aggregations