Example usage for org.jfree.data.time.ohlc OHLCItem getOpenValue

List of usage examples for org.jfree.data.time.ohlc OHLCItem getOpenValue

Introduction

In this page you can find the example usage for org.jfree.data.time.ohlc OHLCItem getOpenValue.

Prototype

public double getOpenValue() 

Source Link

Document

Returns the open value.

Usage

From source file:org.jfree.data.time.ohlc.OHLCSeries.java

/**
 * Adds a data item to the series.  The values from the item passed to
 * this method will be copied into a new object.
 * /* w  w w . j a  va2s  .  c  om*/
 * @param item  the item (<code>null</code> not permitted).
 * 
 * @since 1.0.17
 */
public void add(OHLCItem item) {
    ParamChecks.nullNotPermitted(item, "item");
    add(item.getPeriod(), item.getOpenValue(), item.getHighValue(), item.getLowValue(), item.getCloseValue());
}

From source file:org.jfree.data.time.ohlc.OHLCItemTest.java

/**
 * Some checks for the constructor.// w  w  w .j  ava2  s  .  c o  m
 */
@Test
public void testConstructor1() {
    OHLCItem item1 = new OHLCItem(new Year(2006), 2.0, 4.0, 1.0, 3.0);
    assertEquals(new Year(2006), item1.getPeriod());
    assertEquals(2.0, item1.getOpenValue(), EPSILON);
    assertEquals(4.0, item1.getHighValue(), EPSILON);
    assertEquals(1.0, item1.getLowValue(), EPSILON);
    assertEquals(3.0, item1.getCloseValue(), EPSILON);
}

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 .  j av  a  2s  . c o m
 * @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();
}