com.lowagie.text.ChapterAutoNumber Java Examples

The following examples show how to use com.lowagie.text.ChapterAutoNumber. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: PdfDocumentFactory.java    From javamelody with Apache License 2.0 6 votes vote down vote up
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;
}
 
Example #2
Source File: ElementFactory.java    From itext2 with GNU Lesser General Public License v3.0 4 votes vote down vote up
/**
 * 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;
}
 
Example #3
Source File: ElementFactory.java    From gcs with Mozilla Public License 2.0 2 votes vote down vote up
/**
 * 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;
}