code: public static Paragraph constructTitle(Paragraph title, ArrayList numbers, int numberDepth, int numberStyle) {
      	if (title == null) {
      		return null;
      	}
  
          int depth = Math.min(numbers.size(), numberDepth);
          if (depth < 1) {
              return title;
          }
          StringBuffer buf = new StringBuffer(" ");
          for (int i = 0; i < depth; i++) {
              buf.insert(0, ".");
              buf.insert(0, ((Integer) numbers.get(i)).intValue());
          }
          if (numberStyle == NUMBERSTYLE_DOTTED_WITHOUT_FINAL_DOT) {
          	buf.deleteCharAt(buf.length() - 2);
          }
          Paragraph result = new Paragraph(title);
          result.add(0, new Chunk(buf.toString(), title.getFont()));
          return result;
      }
docs: Constructs a Paragraph that will be used as title for a Section or Chapter.
  @param	title	the title of the section
  @param	numbers	a list of sectionnumbers
  @param	numberDepth	how many numbers have to be shown
  @param	numberStyle	the numbering style
  @return	a Paragraph object
  @since	iText 2.0.8