use of org.jfree.chart.renderer.category.CategoryItemRenderer in project SIMVA-SoS by SESoS.
the class StackedAreaChartTest method testSetSeriesToolTipGenerator.
/**
* Check that setting a tool tip generator for a series does override the
* default generator.
*/
@Test
public void testSetSeriesToolTipGenerator() {
CategoryPlot plot = (CategoryPlot) this.chart.getPlot();
CategoryItemRenderer renderer = plot.getRenderer();
StandardCategoryToolTipGenerator tt = new StandardCategoryToolTipGenerator();
renderer.setSeriesToolTipGenerator(0, tt);
CategoryToolTipGenerator tt2 = renderer.getToolTipGenerator(0, 0);
assertTrue(tt2 == tt);
}
use of org.jfree.chart.renderer.category.CategoryItemRenderer in project SIMVA-SoS by SESoS.
the class StackedBarChart3DTest method testSetSeriesToolTipGenerator.
/**
* Check that setting a tool tip generator for a series does override the
* default generator.
*/
@Test
public void testSetSeriesToolTipGenerator() {
CategoryPlot plot = (CategoryPlot) this.chart.getPlot();
CategoryItemRenderer renderer = plot.getRenderer();
StandardCategoryToolTipGenerator tt = new StandardCategoryToolTipGenerator();
renderer.setSeriesToolTipGenerator(0, tt);
CategoryToolTipGenerator tt2 = renderer.getToolTipGenerator(0, 0);
assertTrue(tt2 == tt);
}
use of org.jfree.chart.renderer.category.CategoryItemRenderer in project SIMVA-SoS by SESoS.
the class StackedBarChartTest method testSetSeriesToolTipGenerator.
/**
* Check that setting a tool tip generator for a series does override the
* default generator.
*/
@Test
public void testSetSeriesToolTipGenerator() {
CategoryPlot plot = (CategoryPlot) this.chart.getPlot();
CategoryItemRenderer renderer = plot.getRenderer();
StandardCategoryToolTipGenerator tt = new StandardCategoryToolTipGenerator();
renderer.setSeriesToolTipGenerator(0, tt);
CategoryToolTipGenerator tt2 = renderer.getToolTipGenerator(0, 0);
assertTrue(tt2 == tt);
}
use of org.jfree.chart.renderer.category.CategoryItemRenderer in project SIMVA-SoS by SESoS.
the class LineChart3DTest method testSetSeriesToolTipGenerator.
/**
* Check that setting a tool tip generator for a series does override the
* default generator.
*/
@Test
public void testSetSeriesToolTipGenerator() {
CategoryPlot plot = (CategoryPlot) this.chart.getPlot();
CategoryItemRenderer renderer = plot.getRenderer();
StandardCategoryToolTipGenerator tt = new StandardCategoryToolTipGenerator();
renderer.setSeriesToolTipGenerator(0, tt);
CategoryToolTipGenerator tt2 = renderer.getToolTipGenerator(0, 0);
assertSame(tt2, tt);
}
use of org.jfree.chart.renderer.category.CategoryItemRenderer in project qpid-broker-j by apache.
the class CategoryStrokeAndPaintApplier method setSeriesShape.
@Override
public void setSeriesShape(final int seriesIndex, final java.awt.Shape shape, final JFreeChart targetChart) {
CategoryItemRenderer renderer = targetChart.getCategoryPlot().getRenderer();
if (renderer instanceof LineAndShapeRenderer) {
LineAndShapeRenderer lineAndShapeRenderer = (LineAndShapeRenderer) renderer;
lineAndShapeRenderer.setSeriesShapesVisible(seriesIndex, true);
lineAndShapeRenderer.setSeriesShape(seriesIndex, shape);
}
}
Aggregations