Example usage for org.jfree.data.general DefaultKeyedValues2DDataset setValue

List of usage examples for org.jfree.data.general DefaultKeyedValues2DDataset setValue

Introduction

In this page you can find the example usage for org.jfree.data.general DefaultKeyedValues2DDataset setValue.

Prototype

public void setValue(Number value, Comparable rowKey, Comparable columnKey) 

Source Link

Document

Adds or updates a value in the table and sends a DatasetChangeEvent to all registered listeners.

Usage

From source file:org.jfree.data.general.DefaultKeyedValues2DDatasetTest.java

/**
 * Confirm that cloning works.//w ww.j  a v  a2s  . co  m
 */
@Test
public void testCloning() throws CloneNotSupportedException {
    DefaultKeyedValues2DDataset d1 = new DefaultKeyedValues2DDataset();
    d1.setValue(new Integer(1), "V1", "C1");
    d1.setValue(null, "V2", "C1");
    d1.setValue(new Integer(3), "V3", "C2");
    DefaultKeyedValues2DDataset d2 = (DefaultKeyedValues2DDataset) d1.clone();
    assertTrue(d1 != d2);
    assertTrue(d1.getClass() == d2.getClass());
    assertTrue(d1.equals(d2));
}