code: @Override
      public IRenderingElement generate(IAtomContainer container, RendererModel model) {
  
          final Map<IChemObject, Integer> highlight = container.getProperty(ID_MAP);
  
          if (highlight == null) return null;
  
          final Palette palette = model.getParameter(HighlightPalette.class).getValue();
          final double radius = model.getParameter(HighlightRadius.class).getValue()
                  / model.getParameter(BasicSceneGenerator.Scale.class).getValue();
  
          final Map<Integer, Area> shapes = new HashMap<Integer, Area>();
  
          for (IAtom atom : container.atoms()) {
  
              Integer id = highlight.get(atom);
  
              if (id == null) continue;
  
              Area area = shapes.get(id);
              Shape shape = createAtomHighlight(atom, radius);
  
              if (area == null)
                  shapes.put(id, new Area(shape));
              else
                  area.add(new Area(shape));
          }
  
          for (IBond bond : container.bonds()) {
  
              Integer id = highlight.get(bond);
  
              if (id == null) continue;
  
              Area area = shapes.get(id);
              Shape shape = createBondHighlight(bond, radius);
  
              if (area == null)
                  shapes.put(id, (area = new Area(shape)));
              else
                  area.add(new Area(shape));
  
              // punch out the area occupied by atoms highlighted with a
              // different color
  
              IAtom   a1   = bond.getBegin(), a2 = bond.getEnd();
              Integer a1Id = highlight.get(a1), a2Id = highlight.get(a2);
  
              if (a1Id != null && !a1Id.equals(id)) area.subtract(shapes.get(a1Id));
              if (a2Id != null && !a2Id.equals(id)) area.subtract(shapes.get(a2Id));
          }
  
          // create rendering elements for each highlight shape
          ElementGroup group = new ElementGroup();
          for (Map.Entry<Integer, Area> e : shapes.entrySet()) {
              group.add(GeneralPath.shapeOf(e.getValue(), palette.color(e.getKey())));
          }
  
          return group;
      }
docs: {@inheritDoc}