public AnimationTimer(int from, int to) {
				loopCoef = 0;
				toX = to;
				fromX = from;
				movex = 0 + MARGIN;
				// 目的拡大率を算出
				double xs = (getWidth() - 2.0d * MARGIN) / massRange;
				tmpMassStart = massStart + ((toX - MARGIN) / xs);
				tmpMassRange = 10 * (fromX / (10 * xs));
				if (tmpMassRange < MASS_RANGE_MIN) {
					tmpMassRange = MASS_RANGE_MIN;
				}

				// Intensityのレンジを設定
				if ((peaks1 != null) && (massRange <= massRangeMax)) {
					// 最大値を検出。
					int max = 0;
					double start = Math.max(tmpMassStart, 0.0d);
					max = searchPage.getMaxIntensity(start, start + tmpMassRange);
					if (peaks2 != null)
						max = Math.max(max, peaks2.getMaxIntensity(start, start
								+ tmpMassRange));
					// 50単位に変換してスケールを決定
					tmpIntensityRange = (int) ((1.0d + max / 50.0d) * 50.0d);
					if (tmpIntensityRange > INTENSITY_MAX)
						tmpIntensityRange = INTENSITY_MAX;
				}
			}