Package com.google.api.explorer.client.editors

Examples of com.google.api.explorer.client.editors.Editor


      requiredDescription.setVisible(true);
      cellFormatter.addStyleName(row, 0, EmbeddedResources.INSTANCE.style().requiredParameter());
    }

    // Second cell in row displays the editor for the parameter value.
    Editor editor = EditorFactory.forParameter(param);
    nameToEditor.put(paramName, editor);

    Widget editorWidget = editor.createAndSetView().asWidget();
    editorWidget.addStyleName(style.parameterInput());
    table.setWidget(row, 1, editorWidget);

    // Third cell in row displays the description.
    table.setText(row, 2, EmbeddedParameterFormPresenter.generateDescriptionString(param));

    if (paramName.equals("alt")) {
      editor.setValue(ImmutableList.of("json"));
    }

    cellFormatter.addStyleName(row, 0,
        EmbeddedResources.INSTANCE.style().parameterFormNameCell());
    cellFormatter.addStyleName(row, 1,
View Full Code Here


  /** Return a {@link Map} of parameter keys to values as specified by the user. */
  @Override
  public Multimap<String, String> getParameterValues() {
    Multimap<String, String> values = ArrayListMultimap.create();
    for (Map.Entry<String, Editor> entry : nameToEditor.entrySet()) {
      Editor editor = entry.getValue();
      editor.displayValidation();
      values.putAll(entry.getKey(), editor.getValue());
    }

    String fields = this.fieldsTextBox.getText();
    if (!fields.isEmpty()) {
      values.put("fields", fields);
View Full Code Here

TOP

Related Classes of com.google.api.explorer.client.editors.Editor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.