/**
   * Method paint. Paints the rings on the graph.
   *
   * @param g Graphics - the graphics to be painted.
   */
  @Override
  public void paint(Graphics g) {
    Collection<Double> depths = getDepths();
    g.setColor(Color.gray);
    Graphics2D g2d = (Graphics2D) g;
    Point2D center = radialLayout.getCenter();

    Ellipse2D ellipse = new Ellipse2D.Double();
    for (double d : depths) {
      ellipse.setFrameFromDiagonal(
          center.getX() - d, center.getY() - d, center.getX() + d, center.getY() + d);
      AffineTransform at = AffineTransform.getTranslateInstance(0, 0);
      Shape shape = at.createTransformedShape(ellipse);
      // Shape shape =
      //	vv.getRenderContext().getMultiLayerTransformer().transform(ellipse);
      //
      //	vv.getRenderContext().getMultiLayerTransformer().getTransformer(Layer.LAYOUT).transform(ellipse);

      MutableTransformer viewTransformer =
          vv.getRenderContext().getMultiLayerTransformer().getTransformer(Layer.VIEW);

      if (viewTransformer instanceof MutableTransformerDecorator) {
        shape = vv.getRenderContext().getMultiLayerTransformer().transform(shape);
      } else {
        shape = vv.getRenderContext().getMultiLayerTransformer().transform(Layer.LAYOUT, shape);
      }
      g2d.draw(shape);
    }
  }
    @Override
    public void paint(Graphics g) {
      g.setColor(Color.lightGray);

      Graphics2D g2d = (Graphics2D) g;
      Point2D center = radialLayout.getCenter();

      Ellipse2D ellipse = new Ellipse2D.Double();
      for (double d : depths) {
        ellipse.setFrameFromDiagonal(
            center.getX() - d, center.getY() - d, center.getX() + d, center.getY() + d);
        Shape shape =
            vv.getRenderContext()
                .getMultiLayerTransformer()
                .getTransformer(Layer.LAYOUT)
                .transform(ellipse);
        g2d.draw(shape);
      }
    }