mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-06 03:50:19 +02:00
added ZLTextView.getProgress() method
This commit is contained in:
parent
02c0c0f54e
commit
e9fa03ed9b
1 changed files with 6 additions and 0 deletions
|
@ -23,6 +23,7 @@ import java.util.*;
|
|||
|
||||
import org.geometerplus.zlibrary.core.application.ZLApplication;
|
||||
import org.geometerplus.zlibrary.core.filesystem.ZLFile;
|
||||
import org.geometerplus.zlibrary.core.util.RationalNumber;
|
||||
import org.geometerplus.zlibrary.core.util.ZLColor;
|
||||
import org.geometerplus.zlibrary.core.view.ZLPaintContext;
|
||||
|
||||
|
@ -767,6 +768,11 @@ public abstract class ZLTextView extends ZLTextViewBase {
|
|||
return new PagePosition(current, total);
|
||||
}
|
||||
|
||||
public final RationalNumber getProgress() {
|
||||
final PagePosition position = pagePosition();
|
||||
return RationalNumber.create(position.Current, position.Total);
|
||||
}
|
||||
|
||||
public final synchronized void gotoPage(int page) {
|
||||
if (myModel == null || myModel.getParagraphsNumber() == 0) {
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue