private ThreadModel threadFor(Point point) { List<ThreadModel> threads = fullThreadList(); int threadIndex = threadScale.viewToModelThreadIndex(point); if (threadIndex >= 0 && threadIndex < threads.size()) { return threads.get(threadIndex); } return null; }
private int minThreadIndexFor(Rectangle clipBounds, List<ThreadModel> fullThreadList) { return min(max(threadScale.viewToModelThreadIndex(clipBounds.y), 0), fullThreadList.size() - 1); }