code: public void add(IRenderingElement element) {
          if (element != null) {
              if (element.getClass().equals(ElementGroup.class))
                  elements.addAll(((ElementGroup) element).elements);
              else
                  elements.add(element);
          }
      }
docs: Add a new element to the group.
  
  @param element the element to add to the group