예제 #1
0
  private Rectangle boundsFor(
      LogInterval logInterval, int threadSetStartIndex, int threadSetEndIndex) {
    int x = uiLogTimeScale.modelToView(logInterval.getStart());
    int width = uiLogTimeScale.modelToView(logInterval.getEnd()) - x;

    int threadSetStartY = threadScale.modelThreadIndexToView(threadSetStartIndex);
    int threadSetEndY = threadScale.modelThreadIndexToView(threadSetEndIndex + 1);

    return new Rectangle(x, threadSetStartY, width, threadSetEndY - threadSetStartY);
  }
예제 #2
0
 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;
 }
예제 #3
0
 @Override
 protected int getPreferredHeight() {
   return threadScale.fullModelToViewLength();
 }
예제 #4
0
 private int minThreadIndexFor(Rectangle clipBounds, List<ThreadModel> fullThreadList) {
   return min(max(threadScale.viewToModelThreadIndex(clipBounds.y), 0), fullThreadList.size() - 1);
 }