Examples of Chapter


Examples of br.com.caelum.tubaina.Chapter

      }
    }

    IntroductionChunk intro = new IntroductionChunk(new ChunkSplitter(resources, "all").splitChunks(introduction));

    return new Chapter(title, intro, sections, resources);
  }
View Full Code Here

Examples of com.cardence.lawshelf.cfr.jaxb.CHAPTER

  // ////////////////////////////////////////////////////////////////////////////
  // ////////////////////////////////////////////////////////////////////////////

  private void didFinishProcessingTitle(TITLE title) {
    final SUBTITLE subtitle = this.findSubtitle(title);
    final CHAPTER chapter = this.findChapterFromTitle(title);

    if (subtitle != null) {
      this.processSubTitleWithParentId(subtitle, null);
    }
    if (chapter != null) {
View Full Code Here

Examples of com.dtrules.samples.bookpreview.datamodel.Chapter

        int start = 1;
        boolean excluded = false;
        while(start < pages){
            int end = randint(20)+20+start;            // Chapters are 20 to 40 pages
            if(pages-end < 10 || end >= pages) end = pages; // Okay, we fit in the last chapter
            Chapter c = new Chapter();                 // Set up the chapter
            c.setBegin_page(start);
            c.setEnd_page(end);
           
            book.getChapters().add(c);                 // Add the chapter, and
            start = end+1;                             //  set the start of the next chapter
     
            if(excluded){                              // We exclude the ending chapters randomly.
View Full Code Here

Examples of com.itextpdf.text.Chapter

    document.add(preface);
    document.newPage();
  }

  private void addContent(Document document) throws DocumentException {
    Chapter catPart=null;
    int k=1;
    for(int j=0; j<a.size(); j++){
      if (!a.get(j).equals(new ArrayList<String>())){
    Anchor anchor = new Anchor(a.get(j).get(0).toString(), catFont);
    anchor.setName(a.get(j).get(0).toString());
    catPart = new Chapter(new Paragraph(anchor), k);

    Paragraph subPara = new Paragraph("Prononciation: ", subFont);
    Section subCatPart = catPart.addSection(subPara);
    subCatPart.add(new Paragraph(a.get(j).get(1).toString()));

    subPara = new Paragraph("Nature: ", subFont);
    subCatPart = catPart.addSection(subPara);
    subCatPart.add(new Paragraph(a.get(j).get(2).toString()));
 
    subPara = new Paragraph("D�finition: ", subFont);
    subCatPart = catPart.addSection(subPara);
    subCatPart.add(new Paragraph(a.get(j).get(3).toString()));
    document.add(catPart);

      k++;
      }
View Full Code Here

Examples of com.lowagie.text.Chapter

      if (list == null) {
        document.add(new Paragraph("This document has no bookmarks."));
      }
      else {
        for (HashMap<String, Object> c: list) {
          Chapter chapter = (Chapter)createBookmark(src.getName(), null, c);
          List<HashMap<String, Object>> kids = (List<HashMap<String, Object>>) c.get("Kids");
          if (kids != null) {
            for (HashMap<String, Object> m: kids) {
              addBookmark(src.getName(), chapter, m);
            }
View Full Code Here

Examples of com.lowagie.text.Chapter

      }
      anchor.setReference(remote);
      title.add(anchor);
    }
    if (section == null) {
      s = new Chapter(title, 0);
    }
    else {
      s = section.addSection(title);
    }
    s.setNumberDepth(0);
View Full Code Here

Examples of com.lowagie.text.Chapter

            Paragraph para = new Paragraph();
            para.add(new RtfTableOfContents("RIGHT CLICK AND HERE AND SELECT \"UPDATE FIELD\" TO UPDATE."));
            document.add(para);

            Paragraph par = new Paragraph("This is some sample content.");
            Chapter chap1 = new Chapter("Chapter 1", 1);
            chap1.add(par);
            Chapter chap2 = new Chapter("Chapter 2", 2);
            chap2.add(par);
            document.add(chap1);
            document.add(chap2);
           
            for(int i = 0; i < 300; i++) {
                if(i == 158) {
View Full Code Here

Examples of com.lowagie.text.Chapter

            list.add(new ListItem("Another one"));
            doc.add(list);

            doc.newPage();

            Chapter chapter = new Chapter(new Paragraph("This is a Chapter"), 1);
            chapter.add(new Paragraph(
                    "This is some text that belongs to this chapter."));
            chapter.add(new Paragraph("A second paragraph. What a surprise."));

            Section section = chapter.addSection(new Paragraph(
                    "This is a subsection"));
            section.add(new Paragraph("Text in the subsection."));

            doc.add(chapter);
View Full Code Here

Examples of com.lowagie.text.Chapter

            // then automatically set for all Chapters.
            document.setFooter(new HeaderFooter(new LwgPhrase("This is page "), new LwgPhrase(".")));
           
            document.open();
           
            Chapter chapter1 = new Chapter("Chapter 1", 1);
            chapter1.add(new Paragraph("This document has different headers and footers " +
                    " for each chapter."));
            document.add(chapter1);

            // After adding the first chapter set the header for the second chapter.
            header = new Paragraph("Chapter 2");
            header.setAlignment(LwgElement.ALIGN_CENTER);
            document.setHeader(new RtfHeaderFooter(header));

            Chapter chapter2 = new Chapter("Chapter 2", 2);
            chapter2.add(new Paragraph("This is the content of chapter 2."));
            document.add(chapter2);
           
            // After adding the second chapter set the header for the third chapter.
            header = new Paragraph("Chapter 3");
            header.setAlignment(LwgElement.ALIGN_CENTER);
            document.setHeader(new RtfHeaderFooter(header));

            Chapter chapter3 = new Chapter("Chapter 3", 3);
            chapter3.add(new Paragraph("Chapter 3 is very boring."));
            document.add(chapter3);

            document.close();
        } catch (FileNotFoundException fnfe) {
            fnfe.printStackTrace();
View Full Code Here

Examples of com.lowagie.text.Chapter

            Paragraph blahblah = new Paragraph("blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah");
            Paragraph blahblahblah = new Paragraph("blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blaah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah");
            // this loop will create 7 chapters
            for (int i = 1; i < 8; i++) {
                Paragraph cTitle = new Paragraph("This is chapter " + i, chapterFont);
                Chapter chapter = new Chapter(cTitle, i);
                // in chapter 4 we change the alignment to ALIGN_JUSTIFIED
                if (i == 4) {
                    blahblahblah.setAlignment(LwgElement.ALIGN_JUSTIFIED);
                    blahblah.setAlignment(LwgElement.ALIGN_JUSTIFIED);
                    chapter.add(blahblah);
                }
                // in chapter 5, the alignment is changed again
                if (i == 5) {
                    blahblahblah.setAlignment(LwgElement.ALIGN_CENTER);
                    blahblah.setAlignment(LwgElement.ALIGN_RIGHT);
                    chapter.add(blahblah);
                }
                // the alignment is changed to ALIGN_JUSTIFIED again
                if (i == 6) {
                    blahblahblah.setAlignment(LwgElement.ALIGN_JUSTIFIED);
                    blahblah.setAlignment(LwgElement.ALIGN_JUSTIFIED);
                }
                // in every chapter 3 sections will be added
                for (int j = 1; j < 4; j++) {
                    Paragraph sTitle = new Paragraph("This is section " + j + " in chapter " + i, sectionFont);
                    Section section = chapter.addSection(sTitle, 1);
                    // for chapters > 2, the outine isn't open by default
                    if (i > 2) section.setBookmarkOpen(false);
                    // in all chapters except the 1st one, some extra text is added to section 3
                    if (j == 3 && i > 1) {
                      section.setIndentationLeft(72);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.