Package com.google.gwt.visualization.client

Examples of com.google.gwt.visualization.client.DataTable


    dataTable.setCell(row++, 1, serverData.moduleStartupDuration, null, null);
    rightChart.draw(dataTable);
  }

  public void populateTimeline(DashboardRecord[] serverData) {
    DataTable dataTable = DataTable.create();
    dataTable.addColumn(ColumnType.STRING, REVISION_TITLE);
    dataTable.addColumn(ColumnType.NUMBER, bootstrapDurationTitle);
    dataTable.addColumn(ColumnType.NUMBER, loadExternalRefsTitle);
    dataTable.addColumn(ColumnType.NUMBER, moduleStartupTitle);
    int length = serverData.length;
    dataTable.addRows(length);
    for (int i = 0; i < length; ++i) {
      addRow(dataTable, length - (i + 1), serverData[i]);
    }

    AreaChart.Options options = AreaChart.Options.create();
View Full Code Here


    int v = this.version;

    HashMap<String, HashMap<String, ArrayList<FindbugsBugInstance>>> pMap = Project
        .getFbMap(p.getP(v));

    DataTable data = DataTable.create();
    data.addColumn(ColumnType.STRING, "");

    data.addRows(1);

    data.setValue(0, 0, "");

    Iterator<String> it1 = pMap.keySet().iterator();
    while (it1.hasNext()) {

      String abbrev = it1.next();

      int col = data.addColumn(ColumnType.NUMBER,
          FindbugsBugInstance.getAbbrevDescription(abbrev));

      data.setValue(0, col, getAbbrevErrorCount(abbrev));
    }

    return data;
  }
View Full Code Here

   */
  private AbstractDataTable createChartDataTable() {

    Project p = this.project;

    DataTable data = DataTable.create();
    data.addColumn(ColumnType.STRING, "Version");

    ArrayList<FindbugsBugInstance> allBp = new ArrayList<FindbugsBugInstance>();
    for (int i = 0; i < p.getVersionCount(); i++) {

      if (p.getBp(i + 1) != null)
        allBp.addAll(p.getBp(i + 1));
    }

    Set<String> usedAbbrevs = new TreeSet<String>();
    for (int i = 0; i < allBp.size(); i++) {

      usedAbbrevs.add(allBp.get(i).getAbbrev());
    }

    data.addRows(p.getVersionCount());

    Iterator<String> it = usedAbbrevs.iterator();
    while (it.hasNext()) {

      String abbrev = it.next();

      int col = data.addColumn(ColumnType.NUMBER,
          FindbugsBugInstance.getAbbrevDescription(abbrev));

      // Unavailable stats counter
      int z = 0;

      for (int i = 0; i < p.getVersionCount(); i++) {

        if (p.getBp(i + 1) == null) {
          z++;
        } else {

          // Version
          data.setValue(i - z, 0, String.valueOf(i + 1));

          int abbrevErrCount = getAbbrevErrorCount(abbrev, i + 1);

          data.setValue(i - z, col, abbrevErrCount);
        }
      }
    }

    return data;
View Full Code Here

  private AbstractDataTable createTestChartDataTable() {

    Project p = this.project;
    int v = this.version;

    DataTable data = DataTable.create();
    data.addColumn(ColumnType.STRING, "Couverture de code");
    data.addColumn(ColumnType.NUMBER, "Nombre de lignes de code");
    data.addRows(2);

    int locValue = p.getNloc(v);
    int covValue = p.getNcovl(v);

    data.setValue(0, 0, "Lignes de code non testées");
    data.setValue(0, 1, locValue - covValue);
    data.setValue(1, 0, "Lignes de code testées");
    data.setValue(1, 1, covValue);

    return data;
  }
View Full Code Here

   */
  private AbstractDataTable createChartDataTable() {

    Project p = this.project;

    DataTable data = DataTable.create();
    data.addColumn(ColumnType.STRING, "Version");

    ArrayList<FindbugsBugInstance> allP = new ArrayList<FindbugsBugInstance>();
    for (int i = 0; i < p.getVersionCount(); i++) {

      if (p.getP(i + 1) != null)
        allP.addAll(p.getP(i + 1));
    }

    Set<String> usedAbbrevs = new TreeSet<String>();
    for (int i = 0; i < allP.size(); i++) {

      usedAbbrevs.add(allP.get(i).getAbbrev());
    }

    data.addRows(p.getVersionCount());

    Iterator<String> it = usedAbbrevs.iterator();
    while (it.hasNext()) {

      String abbrev = it.next();

      int col = data.addColumn(ColumnType.NUMBER,
          FindbugsBugInstance.getAbbrevDescription(abbrev));

      // Unavailable stats counter
      int z = 0;

      for (int i = 0; i < p.getVersionCount(); i++) {

        if (p.getP(i + 1) == null) {
          z++;
        } else {

          // Version
          data.setValue(i - z, 0, String.valueOf(i + 1));

          int abbrevErrCount = getAbbrevErrorCount(abbrev, i + 1);

          data.setValue(i - z, col, abbrevErrCount);
        }
      }
    }

    return data;
View Full Code Here

   */
  private AbstractDataTable createChartDataTable(GeneralStat s) {

    Project p = this.project;

    DataTable data = DataTable.create();
    data.addColumn(ColumnType.STRING, "Version");
    data.addColumn(ColumnType.NUMBER, getChartLegend(s));
    data.addRows(p.getVersionCount());

    // Unavailable stats counter
    int z = 0;

    for (int i = 0; i < p.getVersionCount(); i++) {

      int statValue = getChartValue(s, i + 1);
      // If no value is available for this version, don't represent it on
      // the chart

      if (statValue != -1) {
        // Version
        data.setValue(i - z, 0, String.valueOf(i + 1));
        // Stat value
        data.setValue(i - z, 1, statValue);
      } else {
        z++;
      }
    }

View Full Code Here

  private AbstractDataTable createTestChartDataTable() {

    Project p = this.project;
    int v = this.version;

    DataTable data = DataTable.create();
    data.addColumn(ColumnType.STRING, "Commentaires");
    data.addColumn(ColumnType.NUMBER,
        "Pourcentage de code qui correspond à des commentaires");
    data.addRows(2);

    int comValue = p.getNcom(v);
    int locValue = p.getNloc(v)+p.getNcom(v);

    data.setValue(0, 0, "Lignes de code qui sont des commentaires");
    data.setValue(0, 1, comValue);
    data.setValue(1, 0, "Lignes de code qui ne sont pas des commentaires");
    data.setValue(1, 1, locValue - comValue);

    return data;
  }
View Full Code Here

  private AbstractDataTable createTestChartDataTable() {

    Project p = this.project;
    int v = this.version;

    DataTable data = DataTable.create();
    data.addColumn(ColumnType.STRING, "Duplication de code");
    data.addColumn(ColumnType.NUMBER, "Pourcentage de duplication de code");
    data.addRows(2);

    int duplValue = p.getNdupl(v);
    int locValue = p.getNloc(v);

    data.setValue(0, 0, "Lignes de code dupliquées");
    data.setValue(0, 1, duplValue);
    data.setValue(1, 0, "Lignes de code non dupliquées");
    data.setValue(1, 1, locValue - duplValue);

    return data;
  }
View Full Code Here

        this.chart = new OrgChart(createData(dialog), createOptions(dialog));
    }

    protected DataTable createData(final Dialog dialog)
    {
        DataTable dataTable = DataTable.create();
        dataTable.addColumn(STRING, "id");
        dataTable.addColumn(STRING, "parent");
        dataTable.addColumn(STRING, "tooltip");

        OrgChartVisitor visitor = new OrgChartVisitor(dataTable);
        dialog.getInterfaceModel().accept(visitor);

        return dataTable;
View Full Code Here

  /**
   * Crea la tabella dati.
   * @return
   */
  private AbstractDataTable createTable() {
    DataTable data = DataTable.create();

    data.addColumn(h1type, h1);
    data.addColumn(h2type, h2);
    data.addRows(list.size());
    // data

    for (int i = 0;i<list.size();i++){
      try {
        insertElement(data,h1type,i,0);
View Full Code Here

TOP

Related Classes of com.google.gwt.visualization.client.DataTable

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.