Package com.google.gwt.visualization.client

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


   */
  private AbstractDataTable createTestChartDataTable() {

    Project p = this.project;

    DataTable data = DataTable.create();
    data.addColumn(ColumnType.STRING, "Version");
    data.addColumn(ColumnType.NUMBER, "Lignes de code à tester");
    data.addColumn(ColumnType.NUMBER, "Lignes de code testées");
    data.addRows(p.getVersionCount());

    // Unavailable stats counter
    int z = 0;

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

      int locValue = p.getNloc(i + 1);
      int covValue = p.getNcovl(i + 1);

      // If no value is available for this version, don't represent it on
      // the chart
      if (locValue == -1 || covValue == -1) {
        z++;
      } else {
        // Version
        data.setValue(i - z, 0, String.valueOf(i + 1));
        // Class number
        data.setValue(i - z, 1, locValue);
        // Covered class number
        data.setValue(i - z, 2, covValue);
      }
    }

    return data;
  }
View Full Code Here


    int v = this.version;

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

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

    data.addRows(1);

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

    Iterator<String> it1 = bpMap.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

        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

        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

        options.setWidth(getOffsetWidth());
        options.setHeight(getOffsetHeight());
        options.setTitle(this.graphTitle);
        options.setTitleX(this.graphXTitle);
        options.setTitleY(this.graphYTitle);
        DataTable dataTable = DataTable.create();
        if (dataStructRep != null) {
            for (Map.Entry<String, String> col : dataStructRep) {
                dataTable.addColumn(ColumnType.valueOf(col.getValue()), col.getKey());
            }
        }
        if (dataTableRep != null) {
            for (List<String> row : dataTableRep) {
                dataTable.setValue(getIntValue(row.get(0)), getIntValue(row.get(1)), row.get(2));
            }
        }
        chart.draw(dataTable, options)
    }
View Full Code Here

    @Override
    public Widget cloneDisplay(Map<String, Object> data) {
        LineChart chart = new LineChart();
        populate(chart);
        if (getInput() != null && getInput().getName() != null) {
            DataTable dataTable = DataTable.create();
            Object myData = data.get(getInput().getName());
            populateInput(dataTable, myData);
            chart.draw(dataTable);
        }
        super.populateActions(chart.getElement());
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.