本文整理了Java中com.koolearn.klibrary.text.view.ZLTextWordCursor.getParagraphIndex()
方法的一些代码示例,展示了ZLTextWordCursor.getParagraphIndex()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZLTextWordCursor.getParagraphIndex()
方法的具体详情如下:
包路径:com.koolearn.klibrary.text.view.ZLTextWordCursor
类名称:ZLTextWordCursor
方法名:getParagraphIndex
暂无
代码示例来源:origin: Jiangzqts/EpubRead
public final synchronized int pagePosition1() {
return myCurrentPage == null ? 0 : myCurrentPage.EndCursor.getParagraphIndex();
}
代码示例来源:origin: ydcx/KooReader
public final synchronized int pagePosition1() {
return myCurrentPage == null ? 0 : myCurrentPage.EndCursor.getParagraphIndex();
}
代码示例来源:origin: ydcx/KooReader
public final synchronized String pagePositionPec() {
int current = getCurrentCharNumber(PageIndex.current, false);
int total = sizeOfFullText();
if (getCurrentCharNumber(ZLViewEnums.PageIndex.current, true) == 0) {
return "0.00%";
}
// LogUtil.i24("size1:" + getCurrentCharNumber(PageIndex.current, false) + "/" + sizeOfFullText());
// LogUtil.i24("size2:" + myCurrentPage.EndCursor.getParagraphIndex() + "/" + myModel.getParagraphsNumber());
if (computeTextPageNumber(total) <= 3) {
current = myCurrentPage.EndCursor.getParagraphIndex();
total = myModel.getParagraphsNumber() - 1;
}
final StringBuilder info = new StringBuilder();
float size = (float) current * 100 / total;
DecimalFormat df = new DecimalFormat("0.00");
info.append(df.format(size));
info.append("%");
return info.toString();
}
代码示例来源:origin: ydcx/KooReader
public final synchronized String pagePositionPecReal(ZLTextPage page) {
int current = getCurrentNumber(page, false); // 传入要绘制的page
int total = sizeOfFullText();
if (getCurrentCharNumber(ZLViewEnums.PageIndex.current, true) == 0) {
return "0.00%";
}
if (computeTextPageNumber(total) <= 3) {
current = page.EndCursor.getParagraphIndex();
total = myModel.getParagraphsNumber() - 1;
}
final StringBuilder info = new StringBuilder();
float size = (float) current * 100 / total;
DecimalFormat df = new DecimalFormat("0.00");
info.append(df.format(size));
info.append("%");
return info.toString();
}
代码示例来源:origin: Jiangzqts/EpubRead
public final synchronized String pagePositionPecReal(ZLTextPage page) {
int current = getCurrentNumber(page, false); // 传入要绘制的page
int total = sizeOfFullText();
if (getCurrentCharNumber(ZLViewEnums.PageIndex.current, true) == 0) {
return "0.00%";
}
if (computeTextPageNumber(total) <= 3) {
current = page.EndCursor.getParagraphIndex();
total = myModel.getParagraphsNumber() - 1;
}
final StringBuilder info = new StringBuilder();
float size = (float) current * 100 / total;
DecimalFormat df = new DecimalFormat("0.00");
info.append(df.format(size));
info.append("%");
return info.toString();
}
代码示例来源:origin: Jiangzqts/EpubRead
public final synchronized String pagePositionPec() {
int current = getCurrentCharNumber(PageIndex.current, false);
int total = sizeOfFullText();
if (getCurrentCharNumber(ZLViewEnums.PageIndex.current, true) == 0) {
return "0.00%";
}
// LogUtil.i24("size1:" + getCurrentCharNumber(PageIndex.current, false) + "/" + sizeOfFullText());
// LogUtil.i24("size2:" + myCurrentPage.EndCursor.getParagraphIndex() + "/" + myModel.getParagraphsNumber());
if (computeTextPageNumber(total) <= 3) {
current = myCurrentPage.EndCursor.getParagraphIndex();
total = myModel.getParagraphsNumber() - 1;
}
final StringBuilder info = new StringBuilder();
float size = (float) current * 100 / total;
DecimalFormat df = new DecimalFormat("0.00");
info.append(df.format(size));
info.append("%");
return info.toString();
}
代码示例来源:origin: Jiangzqts/EpubRead
int index = cursor.getParagraphIndex();
if (cursor.isEndOfParagraph()) {
++index;
代码示例来源:origin: Jiangzqts/EpubRead
int index = cursor.getParagraphIndex(); //当前章节段落所在索引
if (cursor.isEndOfParagraph()) {
++index;
代码示例来源:origin: ydcx/KooReader
public TOCTree getCurrentTOCElement() {
final ZLTextWordCursor cursor = BookTextView.getStartCursor();
if (Model == null || cursor == null) {
return null;
}
int index = cursor.getParagraphIndex();
if (cursor.isEndOfParagraph()) {
++index;
}
TOCTree treeToSelect = null;
for (TOCTree tree : Model.TOCTree) {
final TOCTree.Reference reference = tree.getReference();
if (reference == null) {
continue;
}
if (reference.ParagraphIndex > index) {
break;
}
treeToSelect = tree;
}
return treeToSelect;
}
代码示例来源:origin: Jiangzqts/EpubRead
/**
* 获取到当前章节
*
* @return
*/
public TOCTree getCurrentTOCElement() {
final ZLTextWordCursor cursor = BookTextView.getStartCursor();
if (Model == null || cursor == null) {
return null;
}
int index = cursor.getParagraphIndex();
if (cursor.isEndOfParagraph()) {
++index;
}
TOCTree treeToSelect = null;
for (TOCTree tree : Model.TOCTree) {
final TOCTree.Reference reference = tree.getReference();
if (reference == null) {
continue;
}
if (reference.ParagraphIndex > index) {
break;
}
treeToSelect = tree;
}
return treeToSelect;
}
代码示例来源:origin: ydcx/KooReader
public void gotoHome() {
final ZLTextWordCursor cursor = getStartCursor();
if (!cursor.isNull() && cursor.isStartOfParagraph() && cursor.getParagraphIndex() == 0) {
return;
}
gotoPosition(0, 0, 0);
preparePaintInfo();
}
代码示例来源:origin: Jiangzqts/EpubRead
public void gotoHome() {
final ZLTextWordCursor cursor = getStartCursor();
if (!cursor.isNull() && cursor.isStartOfParagraph() && cursor.getParagraphIndex() == 0) {
return;
}
gotoPosition(0, 0, 0);
preparePaintInfo();
}
代码示例来源:origin: Jiangzqts/EpubRead
bookmark.setEnd(cursor.getParagraphIndex(), cursor.getElementIndex(), word.Length);
代码示例来源:origin: ydcx/KooReader
bookmark.setEnd(cursor.getParagraphIndex(), cursor.getElementIndex(), word.Length);
代码示例来源:origin: ydcx/KooReader
return;
if (myCurrentPage.StartCursor.getParagraphIndex() != mark.ParagraphIndex ||
myCurrentPage.StartCursor.getMark().compareTo(mark) > 0) {
doRepaint = true;
代码示例来源:origin: Jiangzqts/EpubRead
return;
if (myCurrentPage.StartCursor.getParagraphIndex() != mark.ParagraphIndex ||
myCurrentPage.StartCursor.getMark().compareTo(mark) > 0) {
doRepaint = true;
内容来源于网络,如有侵权,请联系作者删除!