synchronized (m_graph) {
List edges = m_graph.getVisibleEdges();
ListIterator iterator = edges.listIterator(edges.size());
while (iterator.hasPrevious()) {
Edge edge = (Edge) iterator.previous();
EdgePainter edgePainter = getPainterForEdge(edge);
double distance = edgePainter.screenDistanceFromEdge(this, edge, point);
if (distance < minDistance) {
minDistance = distance;
nearestEdge = edge;
}
}