本文整理了Java中com.koolearn.klibrary.text.view.ZLTextPosition.getElementIndex()
方法的一些代码示例,展示了ZLTextPosition.getElementIndex()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZLTextPosition.getElementIndex()
方法的具体详情如下:
包路径:com.koolearn.klibrary.text.view.ZLTextPosition
类名称:ZLTextPosition
方法名:getElementIndex
暂无
代码示例来源:origin: Jiangzqts/EpubRead
ZLTextImageRegionSoul(ZLTextPosition position, ZLTextImageElement imageElement) {
super(position.getParagraphIndex(), position.getElementIndex(), position.getElementIndex());
ImageElement = imageElement;
}
}
代码示例来源:origin: ydcx/KooReader
ZLTextVideoRegionSoul(ZLTextPosition position, ZLTextVideoElement videoElement) {
super(position.getParagraphIndex(), position.getElementIndex(), position.getElementIndex());
VideoElement = videoElement;
}
}
代码示例来源:origin: ydcx/KooReader
ExtensionRegionSoul(ZLTextPosition position, ExtensionElement element) {
super(position.getParagraphIndex(), position.getElementIndex(), position.getElementIndex());
Element = element;
}
}
代码示例来源:origin: Jiangzqts/EpubRead
ZLTextVideoRegionSoul(ZLTextPosition position, ZLTextVideoElement videoElement) {
super(position.getParagraphIndex(), position.getElementIndex(), position.getElementIndex());
VideoElement = videoElement;
}
}
代码示例来源:origin: ydcx/KooReader
ZLTextImageRegionSoul(ZLTextPosition position, ZLTextImageElement imageElement) {
super(position.getParagraphIndex(), position.getElementIndex(), position.getElementIndex());
ImageElement = imageElement;
}
}
代码示例来源:origin: ydcx/KooReader
ZLTextWordRegionSoul(ZLTextPosition position, ZLTextWord word) {
super(position.getParagraphIndex(), position.getElementIndex(), position.getElementIndex());
Word = word;
}
}
代码示例来源: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: ydcx/KooReader
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
ZLTextHyperlinkRegionSoul(ZLTextPosition position, ZLTextHyperlink hyperlink) {
super(
position.getParagraphIndex(),
startElementIndex(hyperlink, position.getElementIndex()),
endElementIndex(hyperlink, position.getElementIndex())
);
Hyperlink = hyperlink;
}
}
代码示例来源:origin: ydcx/KooReader
ZLTextHyperlinkRegionSoul(ZLTextPosition position, ZLTextHyperlink hyperlink) {
super(
position.getParagraphIndex(),
startElementIndex(hyperlink, position.getElementIndex()),
endElementIndex(hyperlink, position.getElementIndex())
);
Hyperlink = hyperlink;
}
}
代码示例来源:origin: ydcx/KooReader
@Override
public String toString() {
return getClass().getSimpleName() + " [" + getParagraphIndex() + "," + getElementIndex() + "," + getCharIndex() + "]";
}
}
代码示例来源:origin: ydcx/KooReader
public PositionWithTimestamp(ZLTextPosition pos) {
this(
pos.getParagraphIndex(),
pos.getElementIndex(),
pos.getCharIndex(),
(pos instanceof ZLTextFixedPosition.WithTimestamp)
? ((ZLTextFixedPosition.WithTimestamp)pos).Timestamp : -1
);
}
代码示例来源:origin: Jiangzqts/EpubRead
public boolean samePositionAs(ZLTextPosition position) {
return
getParagraphIndex() == position.getParagraphIndex() &&
getElementIndex() == position.getElementIndex() &&
getCharIndex() == position.getCharIndex();
}
代码示例来源:origin: ydcx/KooReader
public ZLTextFixedPosition(ZLTextPosition position) {
ParagraphIndex = position.getParagraphIndex();
ElementIndex = position.getElementIndex();
CharIndex = position.getCharIndex();
}
代码示例来源:origin: ydcx/KooReader
public boolean samePositionAs(ZLTextPosition position) {
return
getParagraphIndex() == position.getParagraphIndex() &&
getElementIndex() == position.getElementIndex() &&
getCharIndex() == position.getCharIndex();
}
代码示例来源:origin: ydcx/KooReader
public int compareTo(ZLTextPosition position) {
final int p0 = getParagraphIndex();
final int p1 = position.getParagraphIndex();
if (p0 != p1) {
return p0 < p1 ? -1 : 1;
}
final int e0 = getElementIndex();
final int e1 = position.getElementIndex();
if (e0 != e1) {
return e0 < e1 ? -1 : 1;
}
return getCharIndex() - position.getCharIndex();
}
代码示例来源:origin: Jiangzqts/EpubRead
public final synchronized void gotoPosition(ZLTextPosition position) {
if (position != null) {
gotoPosition(position.getParagraphIndex(), position.getElementIndex(), position.getCharIndex());
}
}
代码示例来源:origin: ydcx/KooReader
public final synchronized void gotoPosition(ZLTextPosition position) {
if (position != null) {
gotoPosition(position.getParagraphIndex(), position.getElementIndex(), position.getCharIndex());
}
}
代码示例来源:origin: Jiangzqts/EpubRead
public void moveTo(ZLTextPosition position) {
LogUtil.i13("moveTo1:" + toString());
moveToParagraph(position.getParagraphIndex());
moveTo(position.getElementIndex(), position.getCharIndex());
}
代码示例来源:origin: ydcx/KooReader
public void moveTo(ZLTextPosition position) {
LogUtil.i13("moveTo1:" + toString());
moveToParagraph(position.getParagraphIndex());
moveTo(position.getElementIndex(), position.getCharIndex());
}
内容来源于网络,如有侵权,请联系作者删除!