本文整理汇总了Java中org.jfree.chart.entity.StandardEntityCollection.add方法的典型用法代码示例。如果您正苦于以下问题:Java StandardEntityCollection.add方法的具体用法?Java StandardEntityCollection.add怎么用?Java StandardEntityCollection.add使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jfree.chart.entity.StandardEntityCollection
的用法示例。
在下文中一共展示了StandardEntityCollection.add方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testEquals
import org.jfree.chart.entity.StandardEntityCollection; //导入方法依赖的package包/类
/**
* Confirm that the equals method can distinguish all the required fields.
*/
public void testEquals() {
StandardEntityCollection c1 = new StandardEntityCollection();
StandardEntityCollection c2 = new StandardEntityCollection();
assertTrue(c1.equals(c2));
PieSectionEntity e1 = new PieSectionEntity(new Rectangle2D.Double(1.0,
2.0, 3.0, 4.0), new DefaultPieDataset(), 0, 1, "Key",
"ToolTip", "URL");
c1.add(e1);
assertFalse(c1.equals(c2));
PieSectionEntity e2 = new PieSectionEntity(new Rectangle2D.Double(1.0,
2.0, 3.0, 4.0), new DefaultPieDataset(), 0, 1, "Key",
"ToolTip", "URL");
c2.add(e2);
assertTrue(c1.equals(c2));
}
示例2: testEquals
import org.jfree.chart.entity.StandardEntityCollection; //导入方法依赖的package包/类
/**
* Confirm that the equals method can distinguish all the required fields.
*/
public void testEquals() {
ChartRenderingInfo i1 = new ChartRenderingInfo();
ChartRenderingInfo i2 = new ChartRenderingInfo();
assertTrue(i1.equals(i2));
i1.setChartArea(new Rectangle2D.Double(1.0, 2.0, 3.0, 4.0));
assertFalse(i1.equals(i2));
i2.setChartArea(new Rectangle2D.Double(1.0, 2.0, 3.0, 4.0));
assertTrue(i1.equals(i2));
i1.getPlotInfo().setDataArea(new Rectangle(1, 2, 3, 4));
assertFalse(i1.equals(i2));
i2.getPlotInfo().setDataArea(new Rectangle(1, 2, 3, 4));
assertTrue(i1.equals(i2));
StandardEntityCollection e1 = new StandardEntityCollection();
e1.add(new ChartEntity(new Rectangle(1, 2, 3, 4)));
i1.setEntityCollection(e1);
assertFalse(i1.equals(i2));
StandardEntityCollection e2 = new StandardEntityCollection();
e2.add(new ChartEntity(new Rectangle(1, 2, 3, 4)));
i2.setEntityCollection(e2);
}
示例3: testEquals
import org.jfree.chart.entity.StandardEntityCollection; //导入方法依赖的package包/类
/**
* Confirm that the equals method can distinguish all the required fields.
*/
@Test
public void testEquals() {
ChartRenderingInfo i1 = new ChartRenderingInfo();
ChartRenderingInfo i2 = new ChartRenderingInfo();
assertEquals(i1, i2);
i1.setChartArea(new Rectangle2D.Double(1.0, 2.0, 3.0, 4.0));
assertFalse(i1.equals(i2));
i2.setChartArea(new Rectangle2D.Double(1.0, 2.0, 3.0, 4.0));
assertEquals(i1, i2);
i1.getPlotInfo().setDataArea(new Rectangle(1, 2, 3, 4));
assertFalse(i1.equals(i2));
i2.getPlotInfo().setDataArea(new Rectangle(1, 2, 3, 4));
assertEquals(i1, i2);
StandardEntityCollection e1 = new StandardEntityCollection();
e1.add(new ChartEntity(new Rectangle(1, 2, 3, 4)));
i1.setEntityCollection(e1);
assertFalse(i1.equals(i2));
StandardEntityCollection e2 = new StandardEntityCollection();
e2.add(new ChartEntity(new Rectangle(1, 2, 3, 4)));
i2.setEntityCollection(e2);
}
示例4: testEquals
import org.jfree.chart.entity.StandardEntityCollection; //导入方法依赖的package包/类
/**
* Confirm that the equals method can distinguish all the required fields.
*/
public void testEquals() {
StandardEntityCollection c1 = new StandardEntityCollection();
StandardEntityCollection c2 = new StandardEntityCollection();
assertTrue(c1.equals(c2));
PieSectionEntity e1 = new PieSectionEntity(new Rectangle2D.Double(1.0,
2.0, 3.0, 4.0), new DefaultPieDataset(), 0, 1, "Key",
"ToolTip", "URL");
c1.add(e1);
assertFalse(c1.equals(c2));
PieSectionEntity e2 = new PieSectionEntity(new Rectangle2D.Double(1.0,
2.0, 3.0, 4.0), new DefaultPieDataset(), 0, 1, "Key",
"ToolTip", "URL");
c2.add(e2);
assertTrue(c1.equals(c2));
}
示例5: testEquals
import org.jfree.chart.entity.StandardEntityCollection; //导入方法依赖的package包/类
/**
* Confirm that the equals method can distinguish all the required fields.
*/
public void testEquals() {
ChartRenderingInfo i1 = new ChartRenderingInfo();
ChartRenderingInfo i2 = new ChartRenderingInfo();
assertTrue(i1.equals(i2));
i1.setChartArea(new Rectangle2D.Double(1.0, 2.0, 3.0, 4.0));
assertFalse(i1.equals(i2));
i2.setChartArea(new Rectangle2D.Double(1.0, 2.0, 3.0, 4.0));
assertTrue(i1.equals(i2));
i1.getPlotInfo().setDataArea(new Rectangle(1, 2, 3, 4));
assertFalse(i1.equals(i2));
i2.getPlotInfo().setDataArea(new Rectangle(1, 2, 3, 4));
assertTrue(i1.equals(i2));
StandardEntityCollection e1 = new StandardEntityCollection();
e1.add(new ChartEntity(new Rectangle(1, 2, 3, 4)));
i1.setEntityCollection(e1);
assertFalse(i1.equals(i2));
StandardEntityCollection e2 = new StandardEntityCollection();
e2.add(new ChartEntity(new Rectangle(1, 2, 3, 4)));
i2.setEntityCollection(e2);
}