use of com.google.gerrit.client.ui.NpIntTextBox in project gerrit by GerritCodeReview.
the class ProjectInfoScreen method renderTextBox.
private TextBox renderTextBox(LabeledWidgetsGrid g, ConfigParameterInfo param) {
NpTextBox textBox = param.type().equals("STRING") ? new NpTextBox() : new NpIntTextBox();
if (param.inheritable()) {
textBox.setValue(param.configuredValue());
Label inheritedLabel = new Label(AdminMessages.I.pluginProjectInheritedValue(param.inheritedValue()));
inheritedLabel.setStyleName(Gerrit.RESOURCES.css().pluginProjectConfigInheritedValue());
HorizontalPanel p = new HorizontalPanel();
p.add(textBox);
p.add(inheritedLabel);
addWidget(g, p, param);
} else {
textBox.setValue(param.value());
addWidget(g, textBox, param);
}
saveEnabler.listenTo(textBox);
return textBox;
}
Aggregations