本文整理汇总了Java中org.jfree.data.statistics.DefaultMultiValueCategoryDataset类的典型用法代码示例。如果您正苦于以下问题:Java DefaultMultiValueCategoryDataset类的具体用法?Java DefaultMultiValueCategoryDataset怎么用?Java DefaultMultiValueCategoryDataset使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DefaultMultiValueCategoryDataset类属于org.jfree.data.statistics包,在下文中一共展示了DefaultMultiValueCategoryDataset类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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);
}
开发者ID:SpoonLabs,项目名称:astor,代码行数:20,代码来源:DefaultMultiValueCategoryDatasetTests.java
示例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));
}
开发者ID:mdzio,项目名称:ccu-historian,代码行数:34,代码来源:ScatterRendererTest.java
示例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));
}
开发者ID:mdzio,项目名称:ccu-historian,代码行数:36,代码来源:DatasetUtilitiesTest.java
示例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));
}
开发者ID:jfree,项目名称:jfreechart,代码行数:36,代码来源:DatasetUtilsTest.java
示例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));
}
开发者ID:SpoonLabs,项目名称:astor,代码行数:35,代码来源:DatasetUtilitiesTests.java
示例6: testGetValue2
import org.jfree.data.statistics.DefaultMultiValueCategoryDataset; //导入依赖的package包/类
/**
* A simple check for the getValue(int, int) method.
*/
public void testGetValue2() {
DefaultMultiValueCategoryDataset d
= new DefaultMultiValueCategoryDataset();
boolean pass = false;
try {
/* Number n =*/ d.getValue(0, 0);
}
catch (IndexOutOfBoundsException e) {
pass = true;
}
assertTrue(pass);
}
开发者ID:SpoonLabs,项目名称:astor,代码行数:16,代码来源:DefaultMultiValueCategoryDatasetTests.java
示例7: 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);
}
开发者ID:SpoonLabs,项目名称:astor,代码行数:18,代码来源:DefaultMultiValueCategoryDatasetTests.java
示例8: 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));
}
开发者ID:SpoonLabs,项目名称:astor,代码行数:30,代码来源:DefaultMultiValueCategoryDatasetTests.java
注:本文中的org.jfree.data.statistics.DefaultMultiValueCategoryDataset类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论