private boolean isOnLink(int x) {
    if (myUseIconAsLink && myIcon != null) {
      int offset = getIconOffset();
      if (x >= offset && x < offset + myIcon.getIconWidth()) return true;
    }
    final HighlightedRegion region = findRegionByX(x);
    return region != null && region.textAttributes == myAnchorAttributes;
  }
private boolean isOnLink(int x)