*/
public Object draw(Graphics2D g2, Rectangle2D area, Object params) {
// draw the block without collecting entities
super.draw(g2, area, null);
EntityBlockParams ebp = null;
BlockResult r = new BlockResult();
if (params instanceof EntityBlockParams) {
ebp = (EntityBlockParams) params;
if (ebp.getGenerateEntities()) {
EntityCollection ec = new StandardEntityCollection();
LegendItemEntity entity = new LegendItemEntity(
(Shape) area.clone());
entity.setSeriesIndex(this.series);
entity.setSeriesKey(this.seriesKey);
entity.setDataset(this.dataset);
entity.setToolTipText(getToolTipText());
entity.setURLText(getURLText());
ec.add(entity);
r.setEntityCollection(ec);
}
}
return r;
}