gpt4 book ai didi

com.koolearn.klibrary.text.model.ZLTextMark类的使用及代码示例

转载 作者:知者 更新时间:2024-03-13 12:01:07 26 4
gpt4 key购买 nike

本文整理了Java中com.koolearn.klibrary.text.model.ZLTextMark类的一些代码示例,展示了ZLTextMark类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZLTextMark类的具体详情如下:
包路径:com.koolearn.klibrary.text.model.ZLTextMark
类名称:ZLTextMark

ZLTextMark介绍

暂无

代码示例

代码示例来源:origin: ydcx/KooReader

private Processor(ZLTextParagraph paragraph, ExtensionElementManager extManager, LineBreaker lineBreaker, List<ZLTextMark> marks, int paragraphIndex, ArrayList<ZLTextElement> elements) {
  myExtManager = extManager;
  myParagraph = paragraph;
  myLineBreaker = lineBreaker;
  myElements = elements;
  myMarks = marks;
  final ZLTextMark mark = new ZLTextMark(paragraphIndex, 0, 0);
  int i;
  for (i = 0; i < myMarks.size(); i++) {
    if (((ZLTextMark)myMarks.get(i)).compareTo(mark) >= 0) {
      break;
    }
  }
  myFirstMark = i;
  myLastMark = myFirstMark;
  for (; myLastMark != myMarks.size() && ((ZLTextMark)myMarks.get(myLastMark)).ParagraphIndex == paragraphIndex; myLastMark++);
  myOffset = 0;
}

代码示例来源:origin: ydcx/KooReader

public final ZLTextMark getPreviousMark(ZLTextMark position) {
  if ((position == null) || (myMarks == null)) {
    return null;
  }
  ZLTextMark mark = null;
  for (ZLTextMark current : myMarks) {
    if (current.compareTo(position) < 0) {
      if ((mark == null) || (mark.compareTo(current) < 0)) {
        mark = current;
      }
    }
  }
  return mark;
}

代码示例来源:origin: Jiangzqts/EpubRead

public ZLTextMark getMark() {
  if (myParagraphCursor == null) {
    return null;
  }
  final ZLTextParagraphCursor paragraph = myParagraphCursor;
  int paragraphLength = paragraph.getParagraphLength();
  int wordIndex = myElementIndex;
  while ((wordIndex < paragraphLength) && (!(paragraph.getElement(wordIndex) instanceof ZLTextWord))) {
    wordIndex++;
  }
  if (wordIndex < paragraphLength) {
    return new ZLTextMark(paragraph.Index, ((ZLTextWord) paragraph.getElement(wordIndex)).getParagraphOffset(), 0);
  }
  return new ZLTextMark(paragraph.Index + 1, 0, 0);
}

代码示例来源:origin: ydcx/KooReader

public final ZLTextMark getNextMark(ZLTextMark position) {
  if (position == null || myMarks == null) {
    return null;
  }
  ZLTextMark mark = null;
  for (ZLTextMark current : myMarks) {
    if (current.compareTo(position) >= 0) {
      if ((mark == null) || (mark.compareTo(current) > 0)) {
        mark = current;
      }
    }
  }
  return mark;
}

代码示例来源:origin: ydcx/KooReader

public ZLTextMark getMark() {
  if (myParagraphCursor == null) {
    return null;
  }
  final ZLTextParagraphCursor paragraph = myParagraphCursor;
  int paragraphLength = paragraph.getParagraphLength();
  int wordIndex = myElementIndex;
  while ((wordIndex < paragraphLength) && (!(paragraph.getElement(wordIndex) instanceof ZLTextWord))) {
    wordIndex++;
  }
  if (wordIndex < paragraphLength) {
    return new ZLTextMark(paragraph.Index, ((ZLTextWord) paragraph.getElement(wordIndex)).getParagraphOffset(), 0);
  }
  return new ZLTextMark(paragraph.Index + 1, 0, 0);
}

代码示例来源:origin: Jiangzqts/EpubRead

private Processor(ZLTextParagraph paragraph, ExtensionElementManager extManager, LineBreaker lineBreaker, List<ZLTextMark> marks, int paragraphIndex, ArrayList<ZLTextElement> elements) {
  myExtManager = extManager;
  myParagraph = paragraph;
  myLineBreaker = lineBreaker;
  myElements = elements;
  myMarks = marks;
  final ZLTextMark mark = new ZLTextMark(paragraphIndex, 0, 0);
  int i;
  for (i = 0; i < myMarks.size(); i++) {
    if (myMarks.get(i).compareTo(mark) >= 0) {
      break;
    }
  }
  myFirstMark = i;
  myLastMark = myFirstMark;
  for (; myLastMark != myMarks.size() && myMarks.get(myLastMark).ParagraphIndex == paragraphIndex; myLastMark++);
  myOffset = 0;
}

代码示例来源:origin: Jiangzqts/EpubRead

public final ZLTextMark getPreviousMark(ZLTextMark position) {
  if ((position == null) || (myMarks == null)) {
    return null;
  }
  ZLTextMark mark = null;
  for (ZLTextMark current : myMarks) {
    if (current.compareTo(position) < 0) {
      if ((mark == null) || (mark.compareTo(current) < 0)) {
        mark = current;
      }
    }
  }
  return mark;
}

代码示例来源:origin: Jiangzqts/EpubRead

for (ZLSearchUtil.Result res = ZLSearchUtil.find(textData, textOffset, textLength, pattern); res != null;
   res = ZLSearchUtil.find(textData, textOffset, textLength, pattern, res.Start + 1)) {
  myMarks.add(new ZLTextMark(index, offset + res.Start, res.Length));
  ++count;

代码示例来源:origin: Jiangzqts/EpubRead

public final ZLTextMark getNextMark(ZLTextMark position) {
  if (position == null || myMarks == null) {
    return null;
  }
  ZLTextMark mark = null;
  for (ZLTextMark current : myMarks) {
    if (current.compareTo(position) >= 0) {
      if ((mark == null) || (mark.compareTo(current) > 0)) {
        mark = current;
      }
    }
  }
  return mark;
}

代码示例来源:origin: ydcx/KooReader

for (ZLSearchUtil.Result res = ZLSearchUtil.find(textData, textOffset, textLength, pattern); res != null;
   res = ZLSearchUtil.find(textData, textOffset, textLength, pattern, res.Start + 1)) {
  myMarks.add(new ZLTextMark(index, offset + res.Start, res.Length));
  ++count;

代码示例来源:origin: ydcx/KooReader

myCurrentPage.StartCursor.getMark().compareTo(mark) > 0) {
  doRepaint = true;
  gotoPosition(mark.ParagraphIndex, 0, 0);
  preparePaintInfo(myCurrentPage);
while (mark.compareTo(myCurrentPage.EndCursor.getMark()) > 0) {
  doRepaint = true;
  turnPage(true, ScrollingMode.NO_OVERLAPPING, 0);

代码示例来源:origin: Jiangzqts/EpubRead

myCurrentPage.StartCursor.getMark().compareTo(mark) > 0) {
  doRepaint = true;
  gotoPosition(mark.ParagraphIndex, 0, 0);
  preparePaintInfo(myCurrentPage);
while (mark.compareTo(myCurrentPage.EndCursor.getMark()) > 0) {
  doRepaint = true;
  turnPage(true, ScrollingMode.NO_OVERLAPPING, 0);

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com