Search in sources :

Example 21 with StandardCategoryURLGenerator

use of org.jfree.chart.urls.StandardCategoryURLGenerator in project SIMVA-SoS by SESoS.

the class BarChartTest method testSetSeriesURLGenerator.

/**
 * Check that setting a URL generator for a series does override the
 * default generator.
 */
@Test
public void testSetSeriesURLGenerator() {
    CategoryPlot plot = (CategoryPlot) this.chart.getPlot();
    CategoryItemRenderer renderer = plot.getRenderer();
    StandardCategoryURLGenerator url1 = new StandardCategoryURLGenerator();
    renderer.setSeriesItemURLGenerator(0, url1);
    CategoryURLGenerator url2 = renderer.getItemURLGenerator(0, 0);
    assertTrue(url2 == url1);
}
Also used : CategoryItemRenderer(org.jfree.chart.renderer.category.CategoryItemRenderer) CategoryURLGenerator(org.jfree.chart.urls.CategoryURLGenerator) StandardCategoryURLGenerator(org.jfree.chart.urls.StandardCategoryURLGenerator) StandardCategoryURLGenerator(org.jfree.chart.urls.StandardCategoryURLGenerator) CategoryPlot(org.jfree.chart.plot.CategoryPlot) Test(org.junit.Test)

Example 22 with StandardCategoryURLGenerator

use of org.jfree.chart.urls.StandardCategoryURLGenerator in project SIMVA-SoS by SESoS.

the class StackedAreaChartTest method testSetSeriesURLGenerator.

/**
 * Check that setting a URL generator for a series does override the
 * default generator.
 */
@Test
public void testSetSeriesURLGenerator() {
    CategoryPlot plot = (CategoryPlot) this.chart.getPlot();
    CategoryItemRenderer renderer = plot.getRenderer();
    StandardCategoryURLGenerator url1 = new StandardCategoryURLGenerator();
    renderer.setSeriesItemURLGenerator(0, url1);
    CategoryURLGenerator url2 = renderer.getItemURLGenerator(0, 0);
    assertTrue(url2 == url1);
}
Also used : CategoryItemRenderer(org.jfree.chart.renderer.category.CategoryItemRenderer) CategoryURLGenerator(org.jfree.chart.urls.CategoryURLGenerator) StandardCategoryURLGenerator(org.jfree.chart.urls.StandardCategoryURLGenerator) StandardCategoryURLGenerator(org.jfree.chart.urls.StandardCategoryURLGenerator) CategoryPlot(org.jfree.chart.plot.CategoryPlot) Test(org.junit.Test)

Example 23 with StandardCategoryURLGenerator

use of org.jfree.chart.urls.StandardCategoryURLGenerator in project SIMVA-SoS by SESoS.

the class StackedBarChart3DTest method testSetSeriesURLGenerator.

/**
 * Check that setting a URL generator for a series does override the
 * default generator.
 */
@Test
public void testSetSeriesURLGenerator() {
    CategoryPlot plot = (CategoryPlot) this.chart.getPlot();
    CategoryItemRenderer renderer = plot.getRenderer();
    StandardCategoryURLGenerator url1 = new StandardCategoryURLGenerator();
    renderer.setSeriesItemURLGenerator(0, url1);
    CategoryURLGenerator url2 = renderer.getItemURLGenerator(0, 0);
    assertTrue(url2 == url1);
}
Also used : CategoryItemRenderer(org.jfree.chart.renderer.category.CategoryItemRenderer) CategoryURLGenerator(org.jfree.chart.urls.CategoryURLGenerator) StandardCategoryURLGenerator(org.jfree.chart.urls.StandardCategoryURLGenerator) StandardCategoryURLGenerator(org.jfree.chart.urls.StandardCategoryURLGenerator) CategoryPlot(org.jfree.chart.plot.CategoryPlot) Test(org.junit.Test)

Example 24 with StandardCategoryURLGenerator

use of org.jfree.chart.urls.StandardCategoryURLGenerator in project SIMVA-SoS by SESoS.

the class StackedBarChartTest method testSetSeriesURLGenerator.

/**
 * Check that setting a URL generator for a series does override the
 * default generator.
 */
@Test
public void testSetSeriesURLGenerator() {
    CategoryPlot plot = (CategoryPlot) this.chart.getPlot();
    CategoryItemRenderer renderer = plot.getRenderer();
    StandardCategoryURLGenerator url1 = new StandardCategoryURLGenerator();
    renderer.setSeriesItemURLGenerator(0, url1);
    CategoryURLGenerator url2 = renderer.getItemURLGenerator(0, 0);
    assertTrue(url2 == url1);
}
Also used : CategoryItemRenderer(org.jfree.chart.renderer.category.CategoryItemRenderer) CategoryURLGenerator(org.jfree.chart.urls.CategoryURLGenerator) StandardCategoryURLGenerator(org.jfree.chart.urls.StandardCategoryURLGenerator) StandardCategoryURLGenerator(org.jfree.chart.urls.StandardCategoryURLGenerator) CategoryPlot(org.jfree.chart.plot.CategoryPlot) Test(org.junit.Test)

Example 25 with StandardCategoryURLGenerator

use of org.jfree.chart.urls.StandardCategoryURLGenerator in project SIMVA-SoS by SESoS.

the class AbstractCategoryItemRendererTest method testEquals_ObjectList3.

@Test
public void testEquals_ObjectList3() {
    BarRenderer r1 = new BarRenderer();
    r1.setSeriesItemURLGenerator(0, new StandardCategoryURLGenerator());
    BarRenderer r2 = new BarRenderer();
    r2.setSeriesItemURLGenerator(0, new StandardCategoryURLGenerator());
    assertEquals(r1, r2);
    r2.setSeriesItemURLGenerator(1, new StandardCategoryURLGenerator());
    assertNotEquals(r1, r2);
}
Also used : StandardCategoryURLGenerator(org.jfree.chart.urls.StandardCategoryURLGenerator) Test(org.junit.Test)

Aggregations

StandardCategoryURLGenerator (org.jfree.chart.urls.StandardCategoryURLGenerator)27 CategoryPlot (org.jfree.chart.plot.CategoryPlot)24 StandardCategoryToolTipGenerator (org.jfree.chart.labels.StandardCategoryToolTipGenerator)15 CategoryAxis (org.jfree.chart.axis.CategoryAxis)14 ValueAxis (org.jfree.chart.axis.ValueAxis)13 Test (org.junit.Test)13 CategoryItemRenderer (org.jfree.chart.renderer.category.CategoryItemRenderer)12 NumberAxis (org.jfree.chart.axis.NumberAxis)10 CategoryURLGenerator (org.jfree.chart.urls.CategoryURLGenerator)10 JFreeChart (org.jfree.chart.JFreeChart)4 ItemLabelPosition (org.jfree.chart.labels.ItemLabelPosition)4 StackedBarRenderer (org.jfree.chart.renderer.category.StackedBarRenderer)4 StackedBarRenderer3D (org.jfree.chart.renderer.category.StackedBarRenderer3D)4 CategoryAxis3D (org.jfree.chart.axis.CategoryAxis3D)3 NumberAxis3D (org.jfree.chart.axis.NumberAxis3D)3 BarRenderer (org.jfree.chart.renderer.category.BarRenderer)3 BarRenderer3D (org.jfree.chart.renderer.category.BarRenderer3D)3 LineAndShapeRenderer (org.jfree.chart.renderer.category.LineAndShapeRenderer)3 LineRenderer3D (org.jfree.chart.renderer.category.LineRenderer3D)3 StackedAreaRenderer (org.jfree.chart.renderer.category.StackedAreaRenderer)3