1 51 52 package com.lowagie.text; 53 54 import java.util.ArrayList ; 55 56 77 78 public class Chapter extends Section { 79 80 private static final long serialVersionUID = 1791000695779357361L; 82 83 87 public Chapter(int number) { 88 super(null, 1); 89 numbers = new ArrayList (); 90 numbers.add(new Integer (number)); 91 triggerNewPage = true; 92 } 93 94 100 101 public Chapter(Paragraph title, int number) { 102 super(title, 1); 103 numbers = new ArrayList (); 104 numbers.add(new Integer (number)); 105 triggerNewPage = true; 106 } 107 108 114 public Chapter(String title, int number) { 115 this(new Paragraph(title), number); 116 } 117 118 120 125 public int type() { 126 return Element.CHAPTER; 127 } 128 129 131 138 public Chapter(java.util.Properties attributes, int number) { 139 this("", number); 140 Chapter chapter = com.lowagie.text.factories.ElementFactory.getChapter(attributes); 141 setNumberDepth(chapter.getNumberDepth()); 142 setIndentation(chapter.getIndentation()); 143 setIndentationLeft(chapter.getIndentationLeft()); 144 setIndentationRight(chapter.getIndentationRight()); 145 } 146 } | Popular Tags |