I have tried to subclass the LegendTitle class to allow me to remove the colour in the Legend but have run into some problems.
Even if i just extend LegendTitle and change nothing else, the plot will not render. It gives an error :
java.lang.RuntimeException: Not implemented.
at org.jfree.chart.block.FlowArrangement.arrange(FlowArrangement.java:145)
at org.jfree.chart.block.BlockContainer.arrange(BlockContainer.java:174)
at ColourLegendTitle.arrange(ColourLegendTitle.java:285)
This surprised me a bit as FlowArrangement is the default arrangement for LegendTitle and it seems that constructing a LegendTitle by doing the following:
Code: Select all
LegendTitle title = new LegendTitle(plot);
Am I missing something here?