本文整理汇总了Java中org.geometerplus.android.fbreader.api.TextPosition类的典型用法代码示例。如果您正苦于以下问题:Java TextPosition类的具体用法?Java TextPosition怎么用?Java TextPosition使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
TextPosition类属于org.geometerplus.android.fbreader.api包,在下文中一共展示了TextPosition类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getStoredPosition
import org.geometerplus.android.fbreader.api.TextPosition; //导入依赖的package包/类
public synchronized ZLTextPosition getStoredPosition(long bookId) {
if (myInterface == null) {
return null;
}
try {
final TextPosition position = myInterface.getStoredPosition(bookId);
if (position == null) {
return null;
}
return new ZLTextFixedPosition(
position.ParagraphIndex, position.ElementIndex, position.CharIndex
);
} catch (RemoteException e) {
return null;
}
}
示例2: getStoredPosition
import org.geometerplus.android.fbreader.api.TextPosition; //导入依赖的package包/类
public TextPosition getStoredPosition(long bookId) {
final ZLTextPosition position = myCollection.getStoredPosition(bookId);
if (position == null) {
return null;
}
return new TextPosition(
position.getParagraphIndex(), position.getElementIndex(), position.getCharIndex()
);
}
示例3: storePosition
import org.geometerplus.android.fbreader.api.TextPosition; //导入依赖的package包/类
public void storePosition(long bookId, TextPosition position) {
if (position == null) {
return;
}
myCollection.storePosition(bookId, new ZLTextFixedPosition(
position.ParagraphIndex, position.ElementIndex, position.CharIndex
));
}
示例4: storePosition
import org.geometerplus.android.fbreader.api.TextPosition; //导入依赖的package包/类
public synchronized void storePosition(long bookId, ZLTextPosition position) {
if (position != null && myInterface != null) {
try {
myInterface.storePosition(bookId, new TextPosition(
position.getParagraphIndex(), position.getElementIndex(), position.getCharIndex()
));
} catch (RemoteException e) {
}
}
}