(
final int width,
final int height,
final boolean inverted,
final Chapter chapter,
final Archive bookArchive,
final AlbiteFont fontPlain,
final AlbiteFont fontItalic,
final int lineSpacing,
final boolean renderImages,
//#if !(TinyMode || TinyModeExport || LightMode || LightModeExport)
final ZLTextTeXHyphenator hyphenator,
//#endif
final TextParser parser)
| 53 | private boolean inverted; |
| 54 | |
| 55 | public Booklet( |
| 56 | final int width, |
| 57 | final int height, |
| 58 | final boolean inverted, |
| 59 | final Chapter chapter, |
| 60 | final Archive bookArchive, |
| 61 | final AlbiteFont fontPlain, |
| 62 | final AlbiteFont fontItalic, |
| 63 | final int lineSpacing, |
| 64 | final boolean renderImages, |
| 65 | //#if !(TinyMode || TinyModeExport || LightMode || LightModeExport) |
| 66 | final ZLTextTeXHyphenator hyphenator, |
| 67 | //#endif |
| 68 | final TextParser parser) { |
| 69 | |
| 70 | this.width = width; |
| 71 | this.height = height; |
| 72 | this.inverted = inverted; |
| 73 | this.chapter = chapter; |
| 74 | this.bookArchive = bookArchive; |
| 75 | this.fontPlain = fontPlain; |
| 76 | this.fontItalic = fontItalic; |
| 77 | //#if !(TinyMode || TinyModeExport || LightMode || LightModeExport) |
| 78 | this.hyphenator = hyphenator; |
| 79 | //#endif |
| 80 | this.renderImages = renderImages; |
| 81 | |
| 82 | fontHeight = fontPlain.getLineHeight() + lineSpacing; |
| 83 | fontIndent = fontPlain.charWidth(' ') * 3; |
| 84 | |
| 85 | /* |
| 86 | * Typically ~60-100 pages per chapter, so 200 is quite enough |
| 87 | */ |
| 88 | Vector pagesTemp = new Vector(200); |
| 89 | |
| 90 | /* |
| 91 | * Reserve the position of the first dummy page |
| 92 | */ |
| 93 | pagesTemp.addElement(null); |
| 94 | |
| 95 | PageState ps = new PageState(parser); |
| 96 | //#debug |
| 97 | int i = 0; |
| 98 | |
| 99 | try { |
| 100 | /* |
| 101 | * Real pages |
| 102 | */ |
| 103 | TextPage current; |
| 104 | |
| 105 | while (!ps.finishedReading()) { |
| 106 | //#debug |
| 107 | AlbiteMIDlet.LOGGER.log("New page #" + (i++)); |
| 108 | |
| 109 | current = new TextPage(this, ps); |
| 110 | |
| 111 | if (!current.isEmpty()) { |
| 112 | /* |
nothing calls this directly
no test coverage detected