public DynamicTimeSeriesCollection(int nSeries, int nMoments, RegularTimePeriod timeSample, TimeZone zone)
 {
   DynamicTimeSeriesCollection seriesCollection = this;
   this.maximumItemCount = 2000;
   this.timePeriodClass = DynamicTimeSeriesCollection.class\u0024org\u0024jfree\u0024data\u0024time\u0024Minute != null ? DynamicTimeSeriesCollection.class\u0024org\u0024jfree\u0024data\u0024time\u0024Minute : (DynamicTimeSeriesCollection.class\u0024org\u0024jfree\u0024data\u0024time\u0024Minute = DynamicTimeSeriesCollection.class\u0024("org.jfree.data.time.Minute"));
   this.minValue = new Float(0.0f);
   this.maxValue = (Float) null;
   this.maximumItemCount = nMoments;
   this.historyCount = nMoments;
   this.seriesKeys = new IComparable[nSeries];
   for (int index = 0; index < nSeries; ++index)
     this.seriesKeys[index] = (IComparable) "";
   this.newestAt = nMoments - 1;
   this.valueHistory = new DynamicTimeSeriesCollection.ValueSequence[nSeries];
   this.timePeriodClass = Object.instancehelper_getClass((object) timeSample);
   if (this.timePeriodClass == (DynamicTimeSeriesCollection.class\u0024org\u0024jfree\u0024data\u0024time\u0024Second != null ? DynamicTimeSeriesCollection.class\u0024org\u0024jfree\u0024data\u0024time\u0024Second : (DynamicTimeSeriesCollection.class\u0024org\u0024jfree\u0024data\u0024time\u0024Second = DynamicTimeSeriesCollection.class\u0024("org.jfree.data.time.Second"))))
     this.pointsInTime = (RegularTimePeriod[]) new Second[nMoments];
   else if (this.timePeriodClass == (DynamicTimeSeriesCollection.class\u0024org\u0024jfree\u0024data\u0024time\u0024Minute != null ? DynamicTimeSeriesCollection.class\u0024org\u0024jfree\u0024data\u0024time\u0024Minute : (DynamicTimeSeriesCollection.class\u0024org\u0024jfree\u0024data\u0024time\u0024Minute = DynamicTimeSeriesCollection.class\u0024("org.jfree.data.time.Minute"))))
     this.pointsInTime = (RegularTimePeriod[]) new Minute[nMoments];
   else if (this.timePeriodClass == (DynamicTimeSeriesCollection.class\u0024org\u0024jfree\u0024data\u0024time\u0024Hour != null ? DynamicTimeSeriesCollection.class\u0024org\u0024jfree\u0024data\u0024time\u0024Hour : (DynamicTimeSeriesCollection.class\u0024org\u0024jfree\u0024data\u0024time\u0024Hour = DynamicTimeSeriesCollection.class\u0024("org.jfree.data.time.Hour"))))
     this.pointsInTime = (RegularTimePeriod[]) new Hour[nMoments];
   this.workingCalendar = Calendar.getInstance(zone);
   this.position = 0;
   this.domainIsPointsInTime = true;
 }
Exemplo n.º 2
0
 public virtual void add(RegularTimePeriod period, double open, double high, double low, double close)
 {
   if (this.getItemCount() > 0)
   {
     OHLCItem ohlcItem = (OHLCItem) this.getDataItem(0);
     if (!Object.instancehelper_equals((object) Object.instancehelper_getClass((object) period), (object) Object.instancehelper_getClass((object) ohlcItem.getPeriod())))
     {
       string str = "Can't mix RegularTimePeriod class types.";
       Throwable.__\u003CsuppressFillInStackTrace\u003E();
       throw new IllegalArgumentException(str);
     }
   }
   base.add((ComparableObjectItem) new OHLCItem(period, open, high, low, close), true);
 }
 public TimeSeriesDataItem(RegularTimePeriod period, Number value)
 {
   base.\u002Ector();
   TimeSeriesDataItem timeSeriesDataItem = this;
   if (period == null)
   {
     string str = "Null 'period' argument.";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new IllegalArgumentException(str);
   }
   else
   {
     this.period = period;
     this.value = value;
   }
 }
Exemplo n.º 4
0
 public PeriodAxis(string label, RegularTimePeriod first, RegularTimePeriod last, TimeZone timeZone, Locale locale)
   : base(label, (TickUnitSource) null)
 {
   PeriodAxis periodAxis = this;
   this.minorTickMarkInsideLength = 0.0f;
   this.minorTickMarkOutsideLength = 2f;
   this.minorTickMarkStroke = (Stroke) new BasicStroke(0.5f);
   this.minorTickMarkPaint = (Paint) Color.black;
   if (timeZone == null)
   {
     string str = "Null 'timeZone' argument.";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new IllegalArgumentException(str);
   }
   else if (locale == null)
   {
     string str = "Null 'locale' argument.";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new IllegalArgumentException(str);
   }
   else
   {
     this.first = first;
     this.last = last;
     this.timeZone = timeZone;
     this.locale = locale;
     this.calendar = Calendar.getInstance(timeZone, locale);
     this.first.peg(this.calendar);
     this.last.peg(this.calendar);
     this.autoRangeTimePeriodClass = Object.instancehelper_getClass((object) first);
     this.majorTickTimePeriodClass = Object.instancehelper_getClass((object) first);
     this.minorTickMarksVisible = false;
     this.minorTickTimePeriodClass = RegularTimePeriod.downsize(this.majorTickTimePeriodClass);
     this.setAutoRange(true);
     this.labelInfo = new PeriodAxisLabelInfo[2];
     PeriodAxisLabelInfo[] periodAxisLabelInfoArray1 = this.labelInfo;
     int index1 = 0;
     PeriodAxisLabelInfo.__\u003Cclinit\u003E();
     PeriodAxisLabelInfo periodAxisLabelInfo1 = new PeriodAxisLabelInfo(PeriodAxis.class\u0024org\u0024jfree\u0024data\u0024time\u0024Month != null ? PeriodAxis.class\u0024org\u0024jfree\u0024data\u0024time\u0024Month : (PeriodAxis.class\u0024org\u0024jfree\u0024data\u0024time\u0024Month = PeriodAxis.class\u0024("org.jfree.data.time.Month")), (DateFormat) new SimpleDateFormat("MMM", locale));
     periodAxisLabelInfoArray1[index1] = periodAxisLabelInfo1;
     PeriodAxisLabelInfo[] periodAxisLabelInfoArray2 = this.labelInfo;
     int index2 = 1;
     PeriodAxisLabelInfo.__\u003Cclinit\u003E();
     PeriodAxisLabelInfo periodAxisLabelInfo2 = new PeriodAxisLabelInfo(PeriodAxis.class\u0024org\u0024jfree\u0024data\u0024time\u0024Year != null ? PeriodAxis.class\u0024org\u0024jfree\u0024data\u0024time\u0024Year : (PeriodAxis.class\u0024org\u0024jfree\u0024data\u0024time\u0024Year = PeriodAxis.class\u0024("org.jfree.data.time.Year")), (DateFormat) new SimpleDateFormat("yyyy", locale));
     periodAxisLabelInfoArray2[index2] = periodAxisLabelInfo2;
   }
 }
 public TimeSeriesDataItem(RegularTimePeriod period, double value)
   : this(period, (Number) new Double(value))
 {
 }
Exemplo n.º 6
0
 public OHLCItem(RegularTimePeriod period, double open, double high, double low, double close)
   : base((IComparable) period, (object) new OHLC(open, high, low, close))
 {
 }
 public virtual void setValueAt(object value, int row, int column)
 {
   if (row < this.series.getItemCount())
   {
     if (column != 1)
       return;
     try
     {
       Double @double = Double.valueOf(Object.instancehelper_toString(value));
       this.series.update(row, (Number) @double);
       return;
     }
     catch (NumberFormatException ex)
     {
     }
     System.get_err().println("Number format exception");
   }
   else if (column == 0)
   {
     this.newTimePeriod = (RegularTimePeriod) null;
   }
   else
   {
     if (column != 1)
       return;
     this.newValue = (Number) Double.valueOf(Object.instancehelper_toString(value));
   }
 }
Exemplo n.º 8
0
 public PeriodAxis(string label, RegularTimePeriod first, RegularTimePeriod last)
   : this(label, first, last, TimeZone.getDefault(), Locale.getDefault())
 {
 }
 public virtual long setTimeBase(RegularTimePeriod start)
 {
   if (this.pointsInTime[0] == null)
   {
     this.pointsInTime[0] = start;
     for (int index = 1; index < this.historyCount; ++index)
       this.pointsInTime[index] = this.pointsInTime[index - 1].next();
   }
   this.deltaTime = this.pointsInTime[1].getFirstMillisecond(this.workingCalendar) - this.pointsInTime[0].getFirstMillisecond(this.workingCalendar);
   this.oldestAt = 0;
   this.newestAt = this.historyCount - 1;
   this.findDomainLimits();
   return this.deltaTime;
 }
 public DynamicTimeSeriesCollection(int nSeries, int nMoments, RegularTimePeriod timeSample)
   : this(nSeries, nMoments, timeSample, TimeZone.getDefault())
 {
 }