Example usage for org.jfree.data.xy XIntervalSeries getDataItem

List of usage examples for org.jfree.data.xy XIntervalSeries getDataItem

Introduction

In this page you can find the example usage for org.jfree.data.xy XIntervalSeries getDataItem.

Prototype

@Override
public ComparableObjectItem getDataItem(int index) 

Source Link

Document

Returns the data item at the specified index.

Usage

From source file:org.jfree.data.xy.XIntervalSeriesCollection.java

/**
 * Returns the x-value for an item within a series.
 *
 * @param series  the series index./* w w w  . j  av  a 2s .co  m*/
 * @param item  the item index.
 *
 * @return The x-value.
 */
@Override
public Number getX(int series, int item) {
    XIntervalSeries s = (XIntervalSeries) this.data.get(series);
    XIntervalDataItem di = (XIntervalDataItem) s.getDataItem(item);
    return di.getX();
}

From source file:org.jfree.data.xy.XIntervalSeriesCollection.java

/**
 * Returns the y-value for an item within a series.
 *
 * @param series  the series index./*w ww  .j a v  a 2s. co  m*/
 * @param item  the item index.
 *
 * @return The y-value.
 */
@Override
public Number getY(int series, int item) {
    XIntervalSeries s = (XIntervalSeries) this.data.get(series);
    XIntervalDataItem di = (XIntervalDataItem) s.getDataItem(item);
    return new Double(di.getYValue());
}

From source file:org.jfree.data.xy.XIntervalSeriesCollection.java

/**
 * Returns the start x-value for an item within a series.
 *
 * @param series  the series index.// w  ww.j  a v  a2s .  c o m
 * @param item  the item index.
 *
 * @return The x-value.
 */
@Override
public Number getStartX(int series, int item) {
    XIntervalSeries s = (XIntervalSeries) this.data.get(series);
    XIntervalDataItem di = (XIntervalDataItem) s.getDataItem(item);
    return new Double(di.getXLowValue());
}

From source file:org.jfree.data.xy.XIntervalSeriesCollection.java

/**
 * Returns the end x-value for an item within a series.
 *
 * @param series  the series index.//from  w w w  .ja  v  a  2s .co  m
 * @param item  the item index.
 *
 * @return The x-value.
 */
@Override
public Number getEndX(int series, int item) {
    XIntervalSeries s = (XIntervalSeries) this.data.get(series);
    XIntervalDataItem di = (XIntervalDataItem) s.getDataItem(item);
    return new Double(di.getXHighValue());
}