本文整理汇总了Java中org.jfree.chart.urls.CustomPieURLGenerator类的典型用法代码示例。如果您正苦于以下问题:Java CustomPieURLGenerator类的具体用法?Java CustomPieURLGenerator怎么用?Java CustomPieURLGenerator使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CustomPieURLGenerator类属于org.jfree.chart.urls包,在下文中一共展示了CustomPieURLGenerator类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testCloning_URLGenerator
import org.jfree.chart.urls.CustomPieURLGenerator; //导入依赖的package包/类
/**
* Check cloning of the urlGenerator field.
*/
@Test
public void testCloning_URLGenerator() throws CloneNotSupportedException {
CustomPieURLGenerator generator = new CustomPieURLGenerator();
PiePlot p1 = new PiePlot();
p1.setURLGenerator(generator);
PiePlot p2 = (PiePlot) p1.clone();
assertTrue(p1 != p2);
assertTrue(p1.getClass() == p2.getClass());
assertTrue(p1.equals(p2));
// check that the URL generator has been cloned
assertTrue(p1.getURLGenerator() != p2.getURLGenerator());
}
示例2: testCloning_LegendLabelURLGenerator
import org.jfree.chart.urls.CustomPieURLGenerator; //导入依赖的package包/类
/**
* Check cloning of the legendLabelURLGenerator field.
*/
@Test
public void testCloning_LegendLabelURLGenerator() throws CloneNotSupportedException {
CustomPieURLGenerator generator = new CustomPieURLGenerator();
PiePlot p1 = new PiePlot();
p1.setLegendLabelURLGenerator(generator);
PiePlot p2 = (PiePlot) p1.clone();
assertTrue(p1 != p2);
assertTrue(p1.getClass() == p2.getClass());
assertTrue(p1.equals(p2));
// check that the URL generator has been cloned
assertTrue(p1.getLegendLabelURLGenerator()
!= p2.getLegendLabelURLGenerator());
}
示例3: testEquals
import org.jfree.chart.urls.CustomPieURLGenerator; //导入依赖的package包/类
/**
* Some checks for the equals() method.
*/
public void testEquals() {
CustomPieURLGenerator g1 = new CustomPieURLGenerator();
CustomPieURLGenerator g2 = new CustomPieURLGenerator();
assertTrue(g1.equals(g2));
Map m1 = new HashMap();
m1.put("A", "http://www.jfree.org/");
g1.addURLs(m1);
assertFalse(g1.equals(g2));
g2.addURLs(m1);
assertTrue(g1.equals(g2));
}
示例4: testPublicCloneable
import org.jfree.chart.urls.CustomPieURLGenerator; //导入依赖的package包/类
/**
* Checks that the class implements PublicCloneable.
*/
public void testPublicCloneable() {
CustomPieURLGenerator g1 = new CustomPieURLGenerator();
assertTrue(g1 instanceof PublicCloneable);
}