i--;
    protected OMDist _findClosest(int x, int y, float limit) {	OMDist omd = new OMDist();	java.util.List targets = getTargets();	ListIterator iterator;        OMGeometry graphic, ret = null;        float closestDistance = Float.MAX_VALUE;	float currentDistance;	int index = NONE;	int i;	if (size() != 0) {	    if (traverseMode == FIRST_ADDED_ON_TOP) {		i = 0;		iterator = targets.listIterator();		while (iterator.hasNext()) {		    graphic = (OMGraphic) iterator.next();		    // cannot select a graphic which isn't visible		    if (!graphic.isVisible())			continue;		    currentDistance = graphic.distance(x, y);		    if (currentDistance < limit && 			currentDistance < closestDistance) {			ret = graphic;			closestDistance = currentDistance;			index = i;			if (currentDistance == 0) {			    break;			}		    }		    i++;		}	    } else {		i = targets.size();		iterator = targets.listIterator(i);		while (iterator.hasPrevious()) {		    graphic = (OMGraphic) iterator.previous();				    // cannot select a graphic which isn't visible		    if (!graphic.isVisible())			continue;		    currentDistance = graphic.distance(x, y);		    if (currentDistance < limit && 			currentDistance < closestDistance) {			ret = graphic;			closestDistance = currentDistance;			index = i;			if (currentDistance == 0) {			    break;			}		    }		    i--;		}	    }	}	omd.omg = ret;	omd.d = closestDistance;	omd.index = index;	return omd;    }