Package com.sencha.gxt.chart.client.draw.sprite

Examples of com.sencha.gxt.chart.client.draw.sprite.CircleSprite


        setAttribute(element, "rx", rect.getRadius());
        setAttribute(element, "ry", rect.getRadius());

      }
    } else if (sprite instanceof CircleSprite) {
      CircleSprite circle = (CircleSprite) sprite;
      if (circle.isCenterXDirty()) {
        setAttribute(element, "cx", circle.getCenterX());
      }
      if (circle.isCenterYDirty()) {
        setAttribute(element, "cy", circle.getCenterY());
      }
      if (circle.isRadiusDirty()) {
        setAttribute(element, "r", circle.getRadius());
      }
    } else if (sprite instanceof EllipseSprite) {
      EllipseSprite ellipse = (EllipseSprite) sprite;
      if (ellipse.isCenterXDirty()) {
        setAttribute(element, "cx", ellipse.getCenterX());
View Full Code Here


  /**
   * Creates a radial {@link Axis}.
   */
  public RadialAxis() {
    circleConfig = new CircleSprite();
    circleConfig.setStroke(new RGB("#ccc"));
    circleConfig.setFill(Color.NONE);
    axisConfig.setStroke(new RGB("#ccc"));
  }
View Full Code Here

  @Override
  public void clear() {
    super.clear();
    while (circles.size() > 0) {
      CircleSprite sprite = circles.remove(circles.size() - 1);
      if (sprite != null) {
        sprite.remove();
      }
    }
    while (scales.size() > 0) {
      TextSprite sprite = scales.remove(scales.size() - 1);
      if (sprite != null) {
        sprite.remove();
      }
    }
  }
View Full Code Here

    double centerX = bbox.getX() + (bbox.getWidth() / 2);
    double centerY = bbox.getY() + (bbox.getHeight() / 2);
    double rho = Math.min(bbox.getWidth(), bbox.getHeight()) / 2;

    for (int i = 0; i < radialSteps; i++) {
      final CircleSprite circle;
      if (i < circles.size()) {
        circle = circles.get(i);
      } else {
        circle = circleConfig.copy();
        chart.addSprite(circle);
        circles.add(circle);
      }
      circle.setCenterX(centerX);
      circle.setCenterY(centerY);
      circle.setRadius(Math.max(rho * (i + 1) / radialSteps, 0));
      circle.redraw();
    }

    for (int j = (int) length; j < lines.size(); j++) {
      lines.get(j).setHidden(true);
    }
View Full Code Here

      cx = ellipse.getCenterX();
      cy = ellipse.getCenterY();
      rx = ellipse.getRadiusX();
      ry = ellipse.getRadiusY();
    } else if (sprite instanceof CircleSprite) {
      CircleSprite circle = (CircleSprite) sprite;
      if (!circle.isCenterXDirty() && !circle.isCenterYDirty() && !circle.isRadiusDirty() && !ignoreOptimizations) {
        return null;
      }
      cx = circle.getCenterX();
      cy = circle.getCenterY();
      rx = circle.getRadius();
      ry = circle.getRadius();
    } else {
      return null;
    }
    long centerX = Math.round(cx * zoom);
    long yShift = Math.round((cy - ry) * zoom);
 
View Full Code Here

   * @param cy the center x-coordinate of the primitive
   * @param radius the size of the primitive
   * @return the generated primitive
   */
  public static CircleSprite circle(double cx, double cy, double radius) {
    CircleSprite circle = new CircleSprite();
    circle.setCenterX(cx);
    circle.setCenterY(cy);
    circle.setRadius(radius);
    return circle;
  }
View Full Code Here

    setHighlighter(new ScatterHighlighter());

    legendTitles.add("");

    CircleSprite circle = new CircleSprite();
    circle.setRadius(8);
    circle.setZIndex(11);
    markerConfig = circle;
  }
View Full Code Here

TOP

Related Classes of com.sencha.gxt.chart.client.draw.sprite.CircleSprite

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.