List of usage examples for org.jfree.data.time.ohlc OHLCSeries getDataItem
@Override public ComparableObjectItem getDataItem(int index)
From source file:org.jfree.data.time.ohlc.OHLCSeriesCollection.java
/** * Returns the y-value for an item within a series. * * @param series the series index./*from ww w . j a va 2 s. co m*/ * @param item the item index. * * @return The y-value. */ @Override public Number getY(int series, int item) { OHLCSeries s = (OHLCSeries) this.data.get(series); OHLCItem di = (OHLCItem) s.getDataItem(item); return new Double(di.getYValue()); }
From source file:org.jfree.data.time.ohlc.OHLCSeriesCollection.java
/** * Returns the open-value for an item within a series. * * @param series the series index./*from ww w.ja v a 2 s. c om*/ * @param item the item index. * * @return The open-value. */ @Override public double getOpenValue(int series, int item) { OHLCSeries s = (OHLCSeries) this.data.get(series); OHLCItem di = (OHLCItem) s.getDataItem(item); return di.getOpenValue(); }
From source file:org.jfree.data.time.ohlc.OHLCSeriesCollection.java
/** * Returns the close-value for an item within a series. * * @param series the series index./* www .ja v a 2s.co m*/ * @param item the item index. * * @return The close-value. */ @Override public double getCloseValue(int series, int item) { OHLCSeries s = (OHLCSeries) this.data.get(series); OHLCItem di = (OHLCItem) s.getDataItem(item); return di.getCloseValue(); }
From source file:org.jfree.data.time.ohlc.OHLCSeriesCollection.java
/** * Returns the high-value for an item within a series. * * @param series the series index.//from w w w . j a va2s.c o m * @param item the item index. * * @return The high-value. */ @Override public double getHighValue(int series, int item) { OHLCSeries s = (OHLCSeries) this.data.get(series); OHLCItem di = (OHLCItem) s.getDataItem(item); return di.getHighValue(); }
From source file:org.jfree.data.time.ohlc.OHLCSeriesCollection.java
/** * Returns the low-value for an item within a series. * * @param series the series index./*from ww w.ja va2s . c o m*/ * @param item the item index. * * @return The low-value. */ @Override public double getLowValue(int series, int item) { OHLCSeries s = (OHLCSeries) this.data.get(series); OHLCItem di = (OHLCItem) s.getDataItem(item); return di.getLowValue(); }
From source file:org.jfree.data.time.ohlc.OHLCSeriesCollection.java
/** * Returns the x-value for an item within a series. * * @param series the series index./* w w w .j a v a 2s .c o m*/ * @param item the item index. * * @return The x-value. */ @Override public double getXValue(int series, int item) { OHLCSeries s = (OHLCSeries) this.data.get(series); OHLCItem di = (OHLCItem) s.getDataItem(item); RegularTimePeriod period = di.getPeriod(); return getX(period); }