Java 类com.lowagie.text.ChapterAutoNumber 实例源码

项目:javamelody    文件:PdfDocumentFactory.java   
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;
}
项目:itext2    文件:ElementFactory.java   
/**
 * 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;
}
项目:DroidText    文件:ElementFactory.java   
/**
 * 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;
}