class Link {
    SxImage image;
    SxAnchor anchor;
  }

  void attractTarget(SxAnchor a, Point targetLocation) {

    try {
      Pattern pattern = a.getPattern();
      SxImage img = new SxImage(pattern.getBImage());

      SxClickable clickable = new SxClickable();
      clickable.setLocationRelativeToComponent(img, Layout.OVER);
      guide.addToFront(clickable);

      clickable.clickPoint = a.getCenter();

      Link link = new Link();
      link.image = img;
      link.anchor = a;
      links.add(link);

      img.setShadowDefault();
      img.setActualLocation(a.getActualLocation());

      Dimension currentSize = a.getActualSize();
      Dimension targetSize = new Dimension(currentSize);
      targetSize.width *= 1.5;
      targetSize.height *= 1.5;

      img.addResizeAnimation(currentSize, targetSize);

      Point currentLocation = new Point(a.getActualLocation());

      targetLocation.x -= targetSize.width / 2;
      targetLocation.y -= targetSize.height / 2;

      img.addMoveAnimation(currentLocation, targetLocation);
      guide.addToFront(img);
      img.startAnimation();

      guide.repaint();

    } catch (Exception e) {
      e.printStackTrace();
    }

  }
  SxCircle selection;

  public void allTargetAnchored() {<FILL_FUNCTION_BODY>


    double theta = 0;
    double dtheta = 2.0f * Math.PI / (double) targets.size();

    Location mouseLocation = Env.getMouseLocation();
    int x = mouseLocation.x;
    int y = mouseLocation.y;
    int radius = 50;

    Region r = new Region(mouseLocation.x - radius, mouseLocation.y - radius, radius * 2, radius * 2);
    SxCircle c = new SxCircle(r);
    guide.addToFront(c);

    selection = new SxCircle();
    guide.addToFront(selection);

    // sort targets along x-axis
    Collections.sort(targets, new Comparator<SxAnchor>() {
      @Override
      public int compare(SxAnchor a, SxAnchor b) {
        return b.getX() - a.getX();
      }
    });

    for (SxAnchor target : targets) {

      int px = (int) (x + radius * Math.cos(theta));
      int py = (int) (y + radius * Math.sin(theta));
      theta += dtheta;

      attractTarget(target, new Point(px, py));
    }

  
<no_super_class>