gpt4 book ai didi

com.koolearn.klibrary.text.view.ZLTextPosition类的使用及代码示例

转载 作者:知者 更新时间:2024-03-13 11:52:38 33 4
gpt4 key购买 nike

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

ZLTextPosition介绍

暂无

代码示例

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

ZLTextElementArea getFirstAfter(ZLTextPosition position) {
  if (position == null) {
    return null;
  }
  synchronized (myAreas) {
    for (ZLTextElementArea area : myAreas) {
      if (position.compareTo(area) <= 0) {
        return area;
      }
    }
  }
  return null;
}

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

public PositionWithTimestamp(ZLTextPosition pos) {
  this(
    pos.getParagraphIndex(),
    pos.getElementIndex(),
    pos.getCharIndex(),
    (pos instanceof ZLTextFixedPosition.WithTimestamp)
      ? ((ZLTextFixedPosition.WithTimestamp)pos).Timestamp : -1
  );
}

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

@Override
  public String toString() {
    return super.toString() + " (" + myParagraphCursor + "," + myElementIndex + "," + myCharIndex + ")";
  }
}

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

ZLTextImageRegionSoul(ZLTextPosition position, ZLTextImageElement imageElement) {
    super(position.getParagraphIndex(), position.getElementIndex(), position.getElementIndex());
    ImageElement = imageElement;
  }
}

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

public void storePosition() { // 进度保存
  final Book bk = Model != null ? Model.Book : null;
  if (bk != null && bk == myStoredPositionBook && myStoredPosition != null && BookTextView != null) {
    final ZLTextPosition position = new ZLTextFixedPosition(BookTextView.getStartCursor());
    if (!myStoredPosition.equals(position)) {
      myStoredPosition = position;
      savePosition();
    }
  }
}

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

private ZLTextHighlighting getWordHilite(ZLTextPosition pos, List<ZLTextHighlighting> hilites) {
  for (ZLTextHighlighting h : hilites) {
    if (h.getStartPosition().compareToIgnoreChar(pos) <= 0
        && pos.compareToIgnoreChar(h.getEndPosition()) <= 0) {
      return h;
    }
  }
  return null;
}

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

gotoPosition(highlighting.getStartPosition().getParagraphIndex(), 0, 0);
preparePaintInfo(myCurrentPage);

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

ExtensionRegionSoul(ZLTextPosition position, ExtensionElement element) {
    super(position.getParagraphIndex(), position.getElementIndex(), position.getElementIndex());
    Element = element;
  }
}

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

public void storePosition() { // 进度保存
  final Book bk = Model != null ? Model.Book : null;
  if (bk != null && bk == myStoredPositionBook && myStoredPosition != null && BookTextView != null) {
    final ZLTextPosition position = new ZLTextFixedPosition(BookTextView.getStartCursor());
    if (!myStoredPosition.equals(position)) {
      myStoredPosition = position;
      savePosition();
    }
  }
}

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

private ZLTextHighlighting getWordHilite(ZLTextPosition pos, List<ZLTextHighlighting> hilites) {
  for (ZLTextHighlighting h : hilites) {
    if (h.getStartPosition().compareToIgnoreChar(pos) <= 0
        && pos.compareToIgnoreChar(h.getEndPosition()) <= 0) {
      return h;
    }
  }
  return null;
}

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

gotoPosition(highlighting.getStartPosition().getParagraphIndex(), 0, 0);
preparePaintInfo(myCurrentPage);

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

public boolean samePositionAs(ZLTextPosition position) {
  return
    getParagraphIndex() == position.getParagraphIndex() &&
    getElementIndex() == position.getElementIndex() &&
    getCharIndex() == position.getCharIndex();
}

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

ZLTextVideoRegionSoul(ZLTextPosition position, ZLTextVideoElement videoElement) {
    super(position.getParagraphIndex(), position.getElementIndex(), position.getElementIndex());
    VideoElement = videoElement;
  }
}

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

ZLTextElementArea getFirstAfter(ZLTextPosition position) {
  if (position == null) {
    return null;
  }
  synchronized (myAreas) {
    for (ZLTextElementArea area : myAreas) {
      if (position.compareTo(area) <= 0) {
        return area;
      }
    }
  }
  return null;
}

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

return false;
if (!myJumpEndPosition.equals(BookTextView.getStartCursor())) {
  return false;

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

@Override
  public String toString() {
    return super.toString() + " (" + myParagraphCursor + "," + myElementIndex + "," + myCharIndex + ")";
  }
}

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

public boolean samePositionAs(ZLTextPosition position) {
  return
    getParagraphIndex() == position.getParagraphIndex() &&
    getElementIndex() == position.getElementIndex() &&
    getCharIndex() == position.getCharIndex();
}

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

public int compareToIgnoreChar(ZLTextPosition position) {
  final int p0 = getParagraphIndex();
  final int p1 = position.getParagraphIndex();
  if (p0 != p1) {
    return p0 < p1 ? -1 : 1;
  }
  return getElementIndex() - position.getElementIndex();
}

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

ZLTextElementArea getLastBefore(ZLTextPosition position) {
  if (position == null) {
    return null;
  }
  synchronized (myAreas) {
    for (int i = myAreas.size() - 1; i >= 0; --i) {
      final ZLTextElementArea area = myAreas.get(i);
      if (position.compareTo(area) > 0) {
        return area;
      }
    }
  }
  return null;
}

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

return false;
if (!myJumpEndPosition.equals(BookTextView.getStartCursor())) {
  return false;

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