use of org.jfree.chart.urls.CategoryURLGenerator in project SIMVA-SoS by SESoS.
the class AreaChartTest 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);
assertSame(url2, url1);
}
use of org.jfree.chart.urls.CategoryURLGenerator in project SIMVA-SoS by SESoS.
the class GanttChartTest 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);
assertSame(url2, url1);
}
use of org.jfree.chart.urls.CategoryURLGenerator in project SIMVA-SoS by SESoS.
the class BarChart3DTest 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);
assertSame(url2, url1);
}
use of org.jfree.chart.urls.CategoryURLGenerator in project SIMVA-SoS by SESoS.
the class AbstractCategoryItemRenderer method addItemEntity.
/**
* Adds an entity with the specified hotspot.
*
* @param entities the entity collection.
* @param dataset the dataset.
* @param row the row index.
* @param column the column index.
* @param hotspot the hotspot (<code>null</code> not permitted).
*/
protected void addItemEntity(EntityCollection entities, CategoryDataset dataset, int row, int column, Shape hotspot) {
ParamChecks.nullNotPermitted(hotspot, "hotspot");
if (!getItemCreateEntity(row, column)) {
return;
}
String tip = null;
CategoryToolTipGenerator tipster = getToolTipGenerator(row, column);
if (tipster != null) {
tip = tipster.generateToolTip(dataset, row, column);
}
String url = null;
CategoryURLGenerator urlster = getItemURLGenerator(row, column);
if (urlster != null) {
url = urlster.generateURL(dataset, row, column);
}
CategoryItemEntity entity = new CategoryItemEntity(hotspot, tip, url, dataset, dataset.getRowKey(row), dataset.getColumnKey(column));
entities.add(entity);
}
use of org.jfree.chart.urls.CategoryURLGenerator in project SIMVA-SoS by SESoS.
the class WaterfallChartTest 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);
}
Aggregations