Package com.google.gwt.graphics.client

Examples of com.google.gwt.graphics.client.Canvas


  }

  public Element cloneRenderedCanvasElement() {
    ensureMasterIsRendered();
    int width = (int) (rootEvent.getDuration() * domainToPixels);
    final Canvas canvas = new Canvas(width, COORD_HEIGHT);
    canvas.setLineWidth(2);
    final Element element = canvas.getElement();
    element.setClassName(resources.eventTraceBreakdownCss().masterRender());
    element.getStyle().setPropertyPx("width", width);
    new Renderer(canvas, rootEvent).renderSelfAndChildren();
    return element;
  }
View Full Code Here


      width = 1;
    }

    Css css = resources.eventTraceBreakdownCss();

    final Canvas canvas = new Canvas(width, COORD_HEIGHT);
    canvas.setLineWidth(2);
    final Element element = canvas.getElement();
    final Style style = element.getStyle();
    element.setClassName(css.eventGraph());
    style.setPropertyPx("left", getLeftOffset(event, depth));
    style.setPropertyPx("width", width);
View Full Code Here

      return;
    }

    // See comment in renderNode.
    final JsIntegerDoubleMap accumlatedErrorByType = JsIntegerDoubleMap.create();
    final Canvas canvas = new Canvas(MASTER_COORD_WIDTH, COORD_HEIGHT);
    traverseAndRender(canvas, null, rootEvent, accumlatedErrorByType);
    masterCanvasElement = canvas.getElement();
  }
View Full Code Here

    timeLine = parent;

    Element elem = getElement();

    // Canvas for drawing the graph.
    canvas = new Canvas(COORD_X_WIDTH, COORD_Y_HEIGHT);
    Element canvasElem = canvas.getElement();

    elem.appendChild(canvasElem);

    this.leftBound = leftBound;
View Full Code Here

      PieChart.Resources resources) {
    super(container, data);
    // We want our wrapping container to size to the contents.
    getElement().getStyle().setProperty("display", "inline-block");
    this.resources = resources;
    canvas = new Canvas(CANVAS_COORD_SIZE, CANVAS_COORD_SIZE);
    getElement().appendChild(canvas.getElement());
    canvas.getElement().setClassName(resources.pieChartCss().pieChart());
    canvas.setStrokeStyle(Color.MIDNIGHT_BLUE);
    canvas.setLineWidth(1.0);
View Full Code Here

    this.css = resources.currentSelectionMarkerCss();
    this.mainTimeline = mainTimeline;
    this.parentElement = mainTimeline.getGraphContainerElement();

    // Create a canvas to draw the leader.
    canvas = new Canvas(css.leadWidth(), css.leadHeight());
    canvas.getElement().setClassName(css.lead());

    // Add containers for the label text and the duration box.
    DocumentExt document = parentElement.getOwnerDocument().cast();
    label = document.createDivWithClassName(css.label());
View Full Code Here

TOP

Related Classes of com.google.gwt.graphics.client.Canvas

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.