我正在尝试从JFreeChart库覆盖WaterfallBarRenderer
。我创建了一个本地类并扩展了原始的WaterfallBarRenderer
类,但是我无法覆盖drawItem()
方法。
public class LocalWaterfall extends WaterfallBarRenderer {
public LocalWaterfall() {
System.out.println("Test");
}
/**
*
*/
private static final long serialVersionUID = 1L;
@Override
public void drawItem(Graphics2D g2, CategoryItemRendererState state, Rectangle2D dataArea, CategoryPlot plot,
CategoryAxis domainAxis, ValueAxis rangeAxis, CategoryDataset dataset, int row, int column, int pass) {
super.drawItem(g2, state, dataArea, plot, domainAxis, rangeAxis, dataset, row, column, pass);
System.out.println("drwa item!!!!!!!!");
}
}