List of usage examples for org.jfree.data.time RegularTimePeriod getMiddleMillisecond
public long getMiddleMillisecond(Calendar calendar)
From source file:edu.dlnu.liuwenpeng.Time.TimeSeriesCollection.java
/** * Returns the x-value for a time period. * /*w ww . j a v a2 s.c o m*/ * @param period the time period (<code>null</code> not permitted). * * @return The x-value. */ protected synchronized long getX(RegularTimePeriod period) { long result = 0L; if (this.xPosition == TimePeriodAnchor.START) { result = period.getFirstMillisecond(this.workingCalendar); } else if (this.xPosition == TimePeriodAnchor.MIDDLE) { result = period.getMiddleMillisecond(this.workingCalendar); } else if (this.xPosition == TimePeriodAnchor.END) { result = period.getLastMillisecond(this.workingCalendar); } return result; }