本文整理汇总了Java中org.geometerplus.fbreader.bookmodel.BookReader.beginParagraph方法的典型用法代码示例。如果您正苦于以下问题:Java BookReader.beginParagraph方法的具体用法?Java BookReader.beginParagraph怎么用?Java BookReader.beginParagraph使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.geometerplus.fbreader.bookmodel.BookReader
的用法示例。
在下文中一共展示了BookReader.beginParagraph方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: doAtStart
import org.geometerplus.fbreader.bookmodel.BookReader; //导入方法依赖的package包/类
protected void doAtStart(XHTMLReader reader, ZLStringMap xmlattributes) {
String fileName = reader.getAttributeValue(xmlattributes, myNamespace, myNameAttribute);
if (fileName != null) {
fileName = MiscUtil.decodeHtmlReference(fileName);
final ZLFile imageFile = ZLFile.createFileByPath(reader.myPathPrefix + fileName);
if (imageFile != null) {
final BookReader modelReader = reader.getModelReader();
boolean flag = modelReader.paragraphIsOpen() && !modelReader.paragraphIsNonEmpty();
if (flag) {
modelReader.endParagraph();
}
final String imageName = imageFile.getLongName();
modelReader.addImageReference(imageName, (short)0, false);
modelReader.addImage(imageName, new ZLFileImage(MimeType.IMAGE_AUTO, imageFile));
if (flag) {
modelReader.beginParagraph();
}
}
}
}
示例2: doAtStart
import org.geometerplus.fbreader.bookmodel.BookReader; //导入方法依赖的package包/类
protected void doAtStart(XHTMLReader reader, ZLStringMap xmlattributes) {
final BookReader modelReader = reader.getModelReader();
modelReader.endParagraph();
// TODO: increase left indent
modelReader.beginParagraph();
// TODO: replace bullet sign by number inside OL tag
modelReader.addData(BULLET);
}
示例3: doAtStart
import org.geometerplus.fbreader.bookmodel.BookReader; //导入方法依赖的package包/类
protected void doAtStart(XHTMLReader reader, ZLStringMap xmlattributes) {
final BookReader modelReader = reader.getModelReader();
switch (myControl) {
case FBTextKind.TITLE:
case FBTextKind.H1:
case FBTextKind.H2:
if (modelReader.Model.BookTextModel.getParagraphsNumber() > 1) {
modelReader.insertEndOfSectionParagraph();
}
modelReader.enterTitle();
break;
}
modelReader.pushKind(myControl);
modelReader.beginParagraph();
}
示例4: doAtStart
import org.geometerplus.fbreader.bookmodel.BookReader; //导入方法依赖的package包/类
protected void doAtStart(XHTMLReader reader, ZLStringMap xmlattributes) {
reader.myPreformatted = true;
final BookReader modelReader = reader.getModelReader();
modelReader.beginParagraph();
modelReader.addControl(FBTextKind.CODE, true);
}