Package com.google.speedtracer.client.timeline

Examples of com.google.speedtracer.client.timeline.GraphModel$RegularGraphModel


    selectedVisualization = visualization;

    visualizations.add(visualization);
    detailsViewPanel.addViewForVisualization(visualization);

    GraphModel graphModel = visualization.getModel().getGraphModel();
    graphModel.addDomainObserver(mainTimeLineModel);

    mainTimeLineModel.refresh();
    fixYAxisLabel();
  }
View Full Code Here


  @Override
  protected void paint() {
    canvas.clear();
    for (int i = 0, n = visualizations.size(); i < n; i++) {
      Visualization<?, ?> viz = visualizations.get(i);
      GraphModel model = viz.getModel().getGraphModel();
      GraphUiProps graphUiProps = viz.getGraphUiProps();
      Color graphColor = graphUiProps.getGraphColor();
      Color graphStrokeColor = graphUiProps.getStrokeColor();

      double maxYValue = Math.max(model.getMaxEncounteredValue(),
          graphUiProps.getYAxisScaleCap());

      double yAdjustment = COORD_Y_HEIGHT / maxYValue;

      canvas.setLineWidth(2);
      canvas.setStrokeStyle(graphStrokeColor);
      canvas.setFillStyle(graphColor);
      canvas.setGlobalAlpha(0.7);

      // Redraw timeline
      canvas.beginPath();
      canvas.moveTo(0, COORD_Y_HEIGHT);

      for (int x = 0, p = getPlotPrecision(); x <= p; x++) {
        double xVal = (double) x * getCoordDelta();
        double yVal = model.getRangeValue(getLeftBound()
            + (getDomainDelta() * (double) x), getDomainDelta())
            * yAdjustment;

        canvas.lineTo(xVal, COORD_Y_HEIGHT - yVal);
      }
View Full Code Here

    public static MockUiThreadUtilization create() {
      return create(100);
    }

    public static MockUiThreadUtilization create(double maxUtilization) {
      GraphModel graphModel = GraphModel.createGraphModel(new ModelData(), "",
          "", "", "", false);
      return new MockUiThreadUtilization(graphModel, maxUtilization);
    }
View Full Code Here

TOP

Related Classes of com.google.speedtracer.client.timeline.GraphModel$RegularGraphModel

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.