/** * Adds all the entities from the specified collection. * * @param collection the collection of entities (<code>null</code> not * permitted). */ public void addAll(EntityCollection collection) { this.entities.addAll(collection.getEntities()); }
/** * Adds all the entities from the specified collection. * * @param collection the collection of entities ({@code null} not * permitted). */ @Override public void addAll(EntityCollection collection) { this.entities.addAll(collection.getEntities()); }
static Map<Shape, String> buildShapeLinkMap(ChartRenderingInfo renderingInfo, int dotsPerPixel) { Map<Shape, String> linkShapes = null; AffineTransform scaleTransform = new AffineTransform(); scaleTransform.scale(dotsPerPixel, dotsPerPixel); for (Object entity : renderingInfo.getEntityCollection().getEntities()) { if (!(entity instanceof ChartEntity)) continue; ChartEntity chartEntity = (ChartEntity) entity; Shape shape = chartEntity.getArea(); String url = chartEntity.getURLText(); if (url != null) { if (linkShapes == null) linkShapes = new HashMap<Shape, String>(); linkShapes.put(scaleTransform.createTransformedShape(shape), url); } } return linkShapes; }