Java源码示例:com.lowagie.text.ChapterAutoNumber

示例1
Element createParagraphElement(String paragraphTitle, String iconName)
		throws DocumentException, IOException {
	final Paragraph paragraph = new Paragraph("", paragraphTitleFont);
	paragraph.setSpacingBefore(5);
	paragraph.setSpacingAfter(5);
	if (iconName != null) {
		paragraph.add(new Chunk(getParagraphImage(iconName), 0, -5));
	}
	final Phrase element = new Phrase(' ' + paragraphTitle, paragraphTitleFont);
	element.setLeading(12);
	paragraph.add(element);
	// chapter pour avoir la liste des signets
	final ChapterAutoNumber chapter = new ChapterAutoNumber(paragraph);
	// sans numéro de chapitre
	chapter.setNumberDepth(0);
	chapter.setBookmarkOpen(false);
	chapter.setTriggerNewPage(false);
	return chapter;
}
 
示例2
/**
 * Creates a ChapterAutoNumber object based on a list of properties.
 * @param attributes
 * @return a Chapter
 */
public static ChapterAutoNumber getChapter(Properties attributes) {
	ChapterAutoNumber chapter = new ChapterAutoNumber("");
	setSectionParameters(chapter, attributes);
	return chapter;
}
 
示例3
/**
 * Creates a ChapterAutoNumber object based on a list of properties.
 * 
 * @param attributes
 * @return a Chapter
 */
public static ChapterAutoNumber getChapter(Properties attributes) {
	ChapterAutoNumber chapter = new ChapterAutoNumber("");
	setSectionParameters(chapter, attributes);
	return chapter;
}