本文整理汇总了Java中org.jfree.data.statistics.DefaultMultiValueCategoryDataset.add方法的典型用法代码示例。如果您正苦于以下问题:Java DefaultMultiValueCategoryDataset.add方法的具体用法?Java DefaultMultiValueCategoryDataset.add怎么用?Java DefaultMultiValueCategoryDataset.add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jfree.data.statistics.DefaultMultiValueCategoryDataset
的用法示例。
在下文中一共展示了DefaultMultiValueCategoryDataset.add方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testGetColumnCount
import org.jfree.data.statistics.DefaultMultiValueCategoryDataset; //导入方法依赖的package包/类
/**
* Some tests for the getColumnCount() method.
*/
public void testGetColumnCount() {
DefaultMultiValueCategoryDataset d
= new DefaultMultiValueCategoryDataset();
assertTrue(d.getColumnCount() == 0);
List values = new ArrayList();
d.add(values, "R1", "C1");
assertTrue(d.getColumnCount() == 1);
d.add(values, "R1", "C2");
assertTrue(d.getColumnCount() == 2);
d.add(values, "R1", "C2");
assertTrue(d.getColumnCount() == 2);
}
示例2: testFindRangeBounds
import org.jfree.data.statistics.DefaultMultiValueCategoryDataset; //导入方法依赖的package包/类
/**
* Some checks for the findRangeBounds() method.
*/
@Test
public void testFindRangeBounds() {
ScatterRenderer r = new ScatterRenderer();
assertNull(r.findRangeBounds(null));
// an empty dataset should return a null range
DefaultMultiValueCategoryDataset dataset
= new DefaultMultiValueCategoryDataset();
assertNull(r.findRangeBounds(dataset));
List values = Arrays.asList(new Double[] {new Double(1.0)});
dataset.add(values, "R1", "C1");
assertEquals(new Range(1.0, 1.0), r.findRangeBounds(dataset));
values = Arrays.asList(new Double[] {new Double(2.0), new Double(2.2)});
dataset.add(values, "R1", "C2");
assertEquals(new Range(1.0, 2.2), r.findRangeBounds(dataset));
values = Arrays.asList(new Double[] {new Double(-3.0),
new Double(-3.2)});
dataset.add(values, "R1", "C3");
assertEquals(new Range(-3.2, 2.2), r.findRangeBounds(dataset));
values = Arrays.asList(new Double[] {new Double(6.0)});
dataset.add(values, "R2", "C1");
assertEquals(new Range(-3.2, 6.0), r.findRangeBounds(dataset));
r.setSeriesVisible(1, Boolean.FALSE);
assertEquals(new Range(-3.2, 2.2), r.findRangeBounds(dataset));
}
示例3: testIterateToFindRangeBounds_MultiValueCategoryDataset
import org.jfree.data.statistics.DefaultMultiValueCategoryDataset; //导入方法依赖的package包/类
/**
* Some checks for the iterateToFindRangeBounds(CategoryDataset...) method
* with a {@link MultiValueCategoryDataset}.
*/
@Test
public void testIterateToFindRangeBounds_MultiValueCategoryDataset() {
DefaultMultiValueCategoryDataset dataset
= new DefaultMultiValueCategoryDataset();
List visibleSeriesKeys = new ArrayList();
assertNull(DatasetUtilities.iterateToFindRangeBounds(dataset,
visibleSeriesKeys, true));
List values = Arrays.asList(new Double[] {new Double(1.0)});
dataset.add(values, "R1", "C1");
visibleSeriesKeys.add("R1");
assertEquals(new Range(1.0, 1.0),
DatasetUtilities.iterateToFindRangeBounds(dataset,
visibleSeriesKeys, true));
values = Arrays.asList(new Double[] {new Double(2.0), new Double(3.0)});
dataset.add(values, "R1", "C2");
assertEquals(new Range(1.0, 3.0),
DatasetUtilities.iterateToFindRangeBounds(dataset,
visibleSeriesKeys, true));
values = Arrays.asList(new Double[] {new Double(-1.0),
new Double(-2.0)});
dataset.add(values, "R2", "C1");
assertEquals(new Range(1.0, 3.0),
DatasetUtilities.iterateToFindRangeBounds(dataset,
visibleSeriesKeys, true));
visibleSeriesKeys.add("R2");
assertEquals(new Range(-2.0, 3.0),
DatasetUtilities.iterateToFindRangeBounds(dataset,
visibleSeriesKeys, true));
}
示例4: testIterateToFindRangeBounds_MultiValueCategoryDataset
import org.jfree.data.statistics.DefaultMultiValueCategoryDataset; //导入方法依赖的package包/类
/**
* Some checks for the iterateToFindRangeBounds(CategoryDataset...) method
* with a {@link MultiValueCategoryDataset}.
*/
@Test
public void testIterateToFindRangeBounds_MultiValueCategoryDataset() {
DefaultMultiValueCategoryDataset dataset
= new DefaultMultiValueCategoryDataset();
List visibleSeriesKeys = new ArrayList();
assertNull(DatasetUtils.iterateToFindRangeBounds(dataset,
visibleSeriesKeys, true));
List values = Arrays.asList(new Double[] {new Double(1.0)});
dataset.add(values, "R1", "C1");
visibleSeriesKeys.add("R1");
assertEquals(new Range(1.0, 1.0),
DatasetUtils.iterateToFindRangeBounds(dataset,
visibleSeriesKeys, true));
values = Arrays.asList(new Double[] {new Double(2.0), new Double(3.0)});
dataset.add(values, "R1", "C2");
assertEquals(new Range(1.0, 3.0),
DatasetUtils.iterateToFindRangeBounds(dataset,
visibleSeriesKeys, true));
values = Arrays.asList(new Double[] {new Double(-1.0),
new Double(-2.0)});
dataset.add(values, "R2", "C1");
assertEquals(new Range(1.0, 3.0),
DatasetUtils.iterateToFindRangeBounds(dataset,
visibleSeriesKeys, true));
visibleSeriesKeys.add("R2");
assertEquals(new Range(-2.0, 3.0),
DatasetUtils.iterateToFindRangeBounds(dataset,
visibleSeriesKeys, true));
}
示例5: testIterateToFindRangeBounds_MultiValueCategoryDataset
import org.jfree.data.statistics.DefaultMultiValueCategoryDataset; //导入方法依赖的package包/类
/**
* Some checks for the iterateToFindRangeBounds(CategoryDataset...) method
* with a {@link MultiValueCategoryDataset}.
*/
public void testIterateToFindRangeBounds_MultiValueCategoryDataset() {
DefaultMultiValueCategoryDataset dataset
= new DefaultMultiValueCategoryDataset();
List visibleSeriesKeys = new ArrayList();
assertNull(DatasetUtilities.iterateToFindRangeBounds(dataset,
visibleSeriesKeys, true));
List values = Arrays.asList(new Double[] {new Double(1.0)});
dataset.add(values, "R1", "C1");
visibleSeriesKeys.add("R1");
assertEquals(new Range(1.0, 1.0),
DatasetUtilities.iterateToFindRangeBounds(dataset,
visibleSeriesKeys, true));
values = Arrays.asList(new Double[] {new Double(2.0), new Double(3.0)});
dataset.add(values, "R1", "C2");
assertEquals(new Range(1.0, 3.0),
DatasetUtilities.iterateToFindRangeBounds(dataset,
visibleSeriesKeys, true));
values = Arrays.asList(new Double[] {new Double(-1.0),
new Double(-2.0)});
dataset.add(values, "R2", "C1");
assertEquals(new Range(1.0, 3.0),
DatasetUtilities.iterateToFindRangeBounds(dataset,
visibleSeriesKeys, true));
visibleSeriesKeys.add("R2");
assertEquals(new Range(-2.0, 3.0),
DatasetUtilities.iterateToFindRangeBounds(dataset,
visibleSeriesKeys, true));
}
示例6: testGetRowCount
import org.jfree.data.statistics.DefaultMultiValueCategoryDataset; //导入方法依赖的package包/类
/**
* Some tests for the getRowCount() method.
*/
public void testGetRowCount() {
DefaultMultiValueCategoryDataset d
= new DefaultMultiValueCategoryDataset();
assertTrue(d.getRowCount() == 0);
List values = new ArrayList();
d.add(values, "R1", "C1");
assertTrue(d.getRowCount() == 1);
d.add(values, "R2", "C1");
assertTrue(d.getRowCount() == 2);
d.add(values, "R2", "C1");
assertTrue(d.getRowCount() == 2);
}
示例7: testEquals
import org.jfree.data.statistics.DefaultMultiValueCategoryDataset; //导入方法依赖的package包/类
/**
* Confirm that the equals method can distinguish all the required fields.
*/
public void testEquals() {
DefaultMultiValueCategoryDataset d1
= new DefaultMultiValueCategoryDataset();
DefaultMultiValueCategoryDataset d2
= new DefaultMultiValueCategoryDataset();
assertTrue(d1.equals(d2));
assertTrue(d2.equals(d1));
List values = new ArrayList();
d1.add(values, "R1", "C1");
assertFalse(d1.equals(d2));
d2.add(values, "R1", "C1");
assertTrue(d1.equals(d2));
values.add(new Integer(99));
d1.add(values, "R1", "C1");
assertFalse(d1.equals(d2));
d2.add(values, "R1", "C1");
assertTrue(d1.equals(d2));
values.add(new Integer(99));
d1.add(values, "R1", "C2");
assertFalse(d1.equals(d2));
d2.add(values, "R1", "C2");
assertTrue(d1.equals(d2));
}