DynamicTimeSeriesCollection in 0.9.5: correction

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Irv Thomae

DynamicTimeSeriesCollection in 0.9.5: correction

Post by Irv Thomae » Tue Feb 11, 2003 10:52 pm

Hi David,
This morning I finished converting my application from 0.9.4 to 0.9.5. It's a small detail, but I was especially pleased with how you streamlined/simplified the task of setting a plot title.

I was happy to see that my DynamicTimeSeriesCollection class was included in the new release. However, I did find two errors in the class as packaged in 0.9.5. Both arise from the newly introduced distinction between TimePeriod (now an interface) and RegularTimePeriod (an abstract class which seems to be essentially the same as "TImePeriod" in previous releases.)

Among the constructors for DynamicTimePeriodCollection , there are two constructors that each take a "TimePeriod" argument. Those need to be updated, such that argument type is RegularTimePeriod. (Presumably this is necessary because Second, Minute, Hour, etc. now extend abstract class RegularTimePeriod, rather than interface TimePeriod - at any rate, my updated application hung with a NoSuchMethodError until I made the change.)

Fortunately, the corrections will be very easy to include in 0.9.6....

Irv Thomae
ISTS/IRIA/Dartmouth College
Hanover, NH (USA)

Irv Thomae

Re: DynamicTimeSeriesCollection in 0.9.5: correction

Post by Irv Thomae » Tue Feb 11, 2003 11:15 pm

Actually, in additon to the constructor changes, there's one more place that needs the same kind of change:
the return type of method advanceTime() should also be RegularTimePeriod, instead of TimePeriod.

Irv Thomae

David Gilbert

Re: DynamicTimeSeriesCollection in 0.9.5: correction

Post by David Gilbert » Tue Feb 11, 2003 11:25 pm

Hi Irv,

Thanks for the report...I've fixed this for 0.9.6.

Regards,

Dave Gilbert

Locked