本文整理汇总了Java中org.jfree.chart.renderer.category.BarRenderer.setItemLabelFont方法的典型用法代码示例。如果您正苦于以下问题:Java BarRenderer.setItemLabelFont方法的具体用法?Java BarRenderer.setItemLabelFont怎么用?Java BarRenderer.setItemLabelFont使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jfree.chart.renderer.category.BarRenderer
的用法示例。
在下文中一共展示了BarRenderer.setItemLabelFont方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testSetItemLabelFont
import org.jfree.chart.renderer.category.BarRenderer; //导入方法依赖的package包/类
/**
* Test that setting the font for ALL series does in fact work (it was
* broken at one point).
*/
public void testSetItemLabelFont() {
BarRenderer r = new BarRenderer();
r.setItemLabelFont(new Font("SansSerif", Font.PLAIN, 33));
assertEquals(new Font("SansSerif", Font.PLAIN, 33),
r.getItemLabelFont(0, 0));
}
示例2: testSetItemLabelFont
import org.jfree.chart.renderer.category.BarRenderer; //导入方法依赖的package包/类
/**
* Test that setting the font for ALL series does in fact work (it was
* broken at one point).
*/
@Test
public void testSetItemLabelFont() {
BarRenderer r = new BarRenderer();
r.setItemLabelFont(new Font("SansSerif", Font.PLAIN, 33));
assertEquals(new Font("SansSerif", Font.PLAIN, 33),
r.getItemLabelFont(0, 0));
}
示例3: setItemLabels
import org.jfree.chart.renderer.category.BarRenderer; //导入方法依赖的package包/类
/**
* not in use yet. This method generates labels above each bar. At this very moment, these labels just show the value of the underlying data
* (which is not very usefull). It could be used to display for example n-values.
* @param plot
*/
@SuppressWarnings("unused")
private void setItemLabels(final CategoryPlot plot) {
final BarRenderer renderer = (BarRenderer) plot.getRenderer();
renderer.setItemLabelGenerator(new StandardCategoryItemLabelGenerator()); // TODO change to a custom ItemLabelGenerator; see JFreeChart
// developer Guide, version 0.9.18 (april 2004), page 80 and
// following pages
renderer.setItemLabelsVisible(true);
renderer.setItemLabelFont(new Font("SansSerif", Font.PLAIN, 9));
renderer.setItemLabelPaint(null);
renderer.setSeriesItemLabelPaint(0, renderer.getSeriesPaint(0));
renderer.setSeriesItemLabelPaint(1, renderer.getSeriesPaint(1));
}
示例4: testSetItemLabelFont
import org.jfree.chart.renderer.category.BarRenderer; //导入方法依赖的package包/类
/**
* Test that setting the font for ALL series does in fact work (it was broken at
* one point).
*/
public void testSetItemLabelFont() {
BarRenderer r = new BarRenderer();
r.setItemLabelFont(new Font("SansSerif", Font.PLAIN, 33));
assertEquals(new Font("SansSerif", Font.PLAIN, 33), r.getItemLabelFont(0, 0));
}