Search in sources :

Example 1 with NpIntTextBox

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;
}
Also used : NpIntTextBox(com.google.gerrit.client.ui.NpIntTextBox) Label(com.google.gwt.user.client.ui.Label) HorizontalPanel(com.google.gwt.user.client.ui.HorizontalPanel) NpTextBox(com.google.gwtexpui.globalkey.client.NpTextBox)

Aggregations

NpIntTextBox (com.google.gerrit.client.ui.NpIntTextBox)1 HorizontalPanel (com.google.gwt.user.client.ui.HorizontalPanel)1 Label (com.google.gwt.user.client.ui.Label)1 NpTextBox (com.google.gwtexpui.globalkey.client.NpTextBox)1