@Override
  public void findNearestHotSpotIn(
      Point cursorPos,
      WorldLocation cursorLoc,
      ComponentConstruct currentNearest,
      Layer parentLayer) {
    // initialise thisDist, since we're going to be over-writing it
    WorldDistance thisDist = new WorldDistance(0, WorldDistance.DEGS);

    Enumeration<Editable> numer = getSegments().elements();
    while (numer.hasMoreElements()) {
      final PlanningSegment thisSeg = (PlanningSegment) numer.nextElement();
      if (thisSeg.getVisible()) {
        // produce a location for the end
        FixWrapper endFix = (FixWrapper) thisSeg.last();
        if (endFix != null) {

          // how far away is it?
          thisDist = endFix.getLocation().rangeFrom(cursorLoc, thisDist);

          final WorldLocation fixLocation =
              new WorldLocation(endFix.getLocation()) {
                private static final long serialVersionUID = 1L;

                @Override
                public void addToMe(WorldVector delta) {
                  super.addToMe(delta);

                  // so, what's the bearing back to the leg start?
                  double newBearing = super.bearingFrom(thisSeg.first().getBounds().getCentre());

                  newBearing = MWC.Algorithms.Conversions.Rads2Degs(newBearing);

                  // limit the bearing to the nearest 5 deg marker
                  int m = ((int) newBearing / 10);
                  newBearing = m * 10d;

                  // trim it to being positive
                  if (newBearing < 0) newBearing += 360;

                  thisSeg.setCourse(newBearing);
                }
              };

          // try range
          currentNearest.checkMe(this, thisDist, null, parentLayer, fixLocation);
        }
      }
    }
  }