本文整理汇总了Java中org.jfree.chart.renderer.category.BarRenderer.setBaseLegendShape方法的典型用法代码示例。如果您正苦于以下问题:Java BarRenderer.setBaseLegendShape方法的具体用法?Java BarRenderer.setBaseLegendShape怎么用?Java BarRenderer.setBaseLegendShape使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jfree.chart.renderer.category.BarRenderer
的用法示例。
在下文中一共展示了BarRenderer.setBaseLegendShape方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testSerialization
import org.jfree.chart.renderer.category.BarRenderer; //导入方法依赖的package包/类
/**
* Serialize an instance, restore it, and check for equality. In addition,
* test for a bug that was reported where the listener list is 'null' after
* deserialization.
*/
@Test
public void testSerialization() {
BarRenderer r1 = new BarRenderer();
r1.setBaseLegendTextFont(new Font("Dialog", Font.PLAIN, 4));
r1.setBaseLegendTextPaint(new GradientPaint(1.0f, 2.0f, Color.red,
3.0f, 4.0f, Color.green));
r1.setBaseLegendShape(new Line2D.Double(1.0, 2.0, 3.0, 4.0));
BarRenderer r2 = (BarRenderer) TestUtilities.serialised(r1);
assertEquals(r1, r2);
try {
r2.notifyListeners(new RendererChangeEvent(r2));
}
catch (NullPointerException e) {
fail("No exception should be thrown."); // failed
}
}