docs: protected void createGrids(AreaImpl root)
      {
          root.updateTopologies();
          for (int i = 0; i < root.getChildCount(); i++)
              createGrids((AreaImpl) root.getChildAt(i));
      }
  
      public boolean isVisuallySeparated(Box box)
      {
          //invisible boxes are not separated
          if (!box.isVisible()) 
              return false;
          //root box is visually separated
          else if (box.getParent() == null)
              return true;
          //non-empty text boxes are visually separated
          else if (box.getType() == Type.TEXT_CONTENT) 
          {
              if (box.getText().trim().isEmpty())
                  return false;
              else
                  return true;
          }
          //replaced boxes are visually separated
          else if (box.getType() == Type.REPLACED_CONTENT)
          {
              return true;
          }
          //list item boxes with a bullet
          else if (box.getDisplayType() == DisplayType.LIST_ITEM)
          {
              return true;
          }
          //other element boxes
          else 
          {
              if (preserveAuxAreas)
                  return true;
              else
              {
                  //check if separated by border -- at least one border needed
                  if (box.getBorderCount() >= 1)
                      return true;
                  //check the background
                  else if (box.isBackgroundSeparated())
                      return true;
                  return false;
              }
          }
  
      }
      
      //=================================================================================
      // tagging
      //=================================================================================
      
      /**
       * Obtains all the tags that are really used in the tree.
       * @return A set of used tags.
       */
      public Set<Tag> getUsedTags()
      {
          Set<Tag> ret = new HashSet<Tag>();
          recursiveGetTags(getRoot(), ret);
          return ret;
      }
      
      private void recursiveGetTags(Area root, Set<Tag> dest)
      {
          dest.addAll(root.getTags().keySet());
          for (int i = 0; i < root.getChildCount(); i++)
              recursiveGetTags(root.getChildAt(i), dest);
      }
      
  }