本文整理汇总了Java中org.jfree.data.xy.VectorSeriesCollection类的典型用法代码示例。如果您正苦于以下问题:Java VectorSeriesCollection类的具体用法?Java VectorSeriesCollection怎么用?Java VectorSeriesCollection使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
VectorSeriesCollection类属于org.jfree.data.xy包,在下文中一共展示了VectorSeriesCollection类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testEquals
import org.jfree.data.xy.VectorSeriesCollection; //导入依赖的package包/类
/**
* Confirm that the equals method can distinguish all the required fields.
*/
public void testEquals() {
VectorSeries s1 = new VectorSeries("Series");
s1.add(1.0, 1.1, 1.2, 1.3);
VectorSeriesCollection c1 = new VectorSeriesCollection();
c1.addSeries(s1);
VectorSeries s2 = new VectorSeries("Series");
s2.add(1.0, 1.1, 1.2, 1.3);
VectorSeriesCollection c2 = new VectorSeriesCollection();
c2.addSeries(s2);
assertTrue(c1.equals(c2));
assertTrue(c2.equals(c1));
c1.addSeries(new VectorSeries("Empty Series"));
assertFalse(c1.equals(c2));
c2.addSeries(new VectorSeries("Empty Series"));
assertTrue(c1.equals(c2));
}
示例2: testRemoveSeries
import org.jfree.data.xy.VectorSeriesCollection; //导入依赖的package包/类
/**
* Some checks for the removeSeries() method.
*/
public void testRemoveSeries() {
VectorSeries s1 = new VectorSeries("S1");
VectorSeries s2 = new VectorSeries("S2");
VectorSeriesCollection vsc = new VectorSeriesCollection();
vsc.addSeries(s1);
vsc.addSeries(s2);
assertEquals(2, vsc.getSeriesCount());
boolean b = vsc.removeSeries(s1);
assertTrue(b);
assertEquals(1, vsc.getSeriesCount());
assertEquals("S2", vsc.getSeriesKey(0));
b = vsc.removeSeries(new VectorSeries("NotInDataset"));
assertFalse(b);
assertEquals(1, vsc.getSeriesCount());
b = vsc.removeSeries(s2);
assertTrue(b);
assertEquals(0, vsc.getSeriesCount());
}
示例3: testPublicCloneable
import org.jfree.data.xy.VectorSeriesCollection; //导入依赖的package包/类
/**
* Verify that this class implements {@link PublicCloneable}.
*/
public void testPublicCloneable() {
VectorSeriesCollection d1 = new VectorSeriesCollection();
assertTrue(d1 instanceof PublicCloneable);
}