public int findPreviousIndex(int current) {
    SearchResult result = new SearchResult();
    int max = myPainter.getErrorStripeCount() - 1;
    if (0 < current && current <= max) {
      result.updateBackward(myPainter, current - 1, 0);
      result.updateBackward(myPainter, max, current);
    }
    else if (0 <= max) {
      result.updateBackward(myPainter, max, 0);
    }
    return result.index;
  }
public int findPreviousIndex(int current)