final BlockResult r = new BlockResult();
if (params instanceof EntityBlockParams) {
ebp = (EntityBlockParams) params;
if (ebp.getGenerateEntities()) {
final EntityCollection ec = new StandardEntityCollection();
final LegendItemEntity entity = new LegendItemEntity(
new Rectangle(area.x, area.y, area.width, area.height));
entity.setSeriesIndex(this.series);
entity.setSeriesKey(this.seriesKey);
entity.setDataset(this.dataset);
entity.setToolTipText(this.getToolTipText());
entity.setURLText(this.getURLText());
ec.add(entity);
r.setEntityCollection(ec);
}
}
return r;