コード例 #1
0
ファイル: ProgramCanvas.java プロジェクト: RWTH-OS/MP-MPICH
  /** This function renders in viewport view corresponding to given start and end times */
  void changeExTime(double start, double end) {
    double diff = end - start;
    if (diff <= 0.0) return;

    // int pos = getW (0, start);
    int pos = getW(FrameBegTime, start);
    parent.hbar.setValue(pos); // Position the scrollbar at the start time
    parent.setPosition(pos); // render the view with this start time

    // Now zoom in/out so that the end time corresponds with the given one.
    zoomH((endTime - begTime) / diff);
    parent.zoomH();
  }
コード例 #2
0
ファイル: ProgramCanvas.java プロジェクト: RWTH-OS/MP-MPICH
  /** This function renders in viewport view corresponding to given start and current end times */
  void changeFromTime(double start) {
    if (start >= endTime || start < 0) {
      new ErrorDiag(null, "value must be >= 0 and < " + Double.toString(endTime));
      return;
    }

    double diff = endTime - start;

    // int pos = getW (0, start);
    int pos = getW(FrameBegTime, start);
    parent.hbar.setValue(pos); // Position the scrollbar at the start time
    parent.setPosition(pos); // render the view with this start time

    // Now zoom in/out so that the end time corresponds with the given one.
    zoomH((endTime - begTime) / diff);
    parent.zoomH();
  }