从JAR文件覆盖的方法无效

时间:2019-02-13 14:31:16

标签: java override jfreechart

我正在尝试从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!!!!!!!!");
    }
}

0 个答案:

没有答案