Example #1
0
  /**
   * Removes all trace elements from <code>toTime</code> downto <code>fromTime</code> (excl.).
   *
   * @param fromTime
   * @param fromIndex
   */
  private void removeTraceElementsByTime(long fromTime, int fromIndex) {
    //		updateIndex(UNSELECTED);
    updateTime(fromTime);

    for (int removeIndex = fromIndex; removeIndex >= 0; removeIndex--) {
      ITraceElement te = traceElements.get(removeIndex);
      if (te.getTin() <= fromTime) { // excl.
        break;
      }
      updateIndex(removeIndex - 1);
      removeTraceElement(te);
    }
  }
Example #2
0
  /**
   * Adds all trace elements from <code>fromTime</code> to <code>toTime</code> (incl.).
   *
   * @param fromTime
   * @param toTime
   */
  private void addTraceElementsByTime(int fromIndex, long toTime) {
    // key.setTin(fromTime);
    // int index = Collections.binarySearch(traceElements, key, compaTin);
    // if (index < 0) {
    // index = -index - 1;
    // }

    //		updateIndex(UNSELECTED);
    updateTime(toTime);

    for (int i = fromIndex + 1; i < traceElements.size(); i++) {
      ITraceElement te = traceElements.get(i);
      if (te.getTin() > toTime) { // incl.
        break;
      }
      updateIndex(i);
      addTraceElement(te);
    }
  }
Example #3
0
 @Override
 public void selectTraceElement(long traceId, ITraceElement te) {
   switch (navStatus) {
     case GLOBAL:
       jumpToPointInTime(te.getTin());
       break;
     case LOCAL:
       if (currentTraceId != traceId) {
         selectTrace(traceId);
         resetScene();
       }
       if (te.getTraceId() != traceId) {
         jumpToEvent(traceId, 0);
         // jumpToPointInTime(0);
       } else {
         jumpToEvent(traceId, te.getEoi());
       }
       break;
     default:
       break;
   }
 }
Example #4
0
 @Override
 public int compare(ITraceElement o1, ITraceElement o2) {
   return new Long(o1.getTin()).compareTo(o2.getTin());
 }