1
0
Fork 0
mirror of https://github.com/geometer/FBReaderJ.git synced 2025-10-03 09:49:19 +02:00

formatting + @Override annotations

This commit is contained in:
Nikolay Pultsin 2013-10-20 22:04:45 +01:00
parent 0f5fd75544
commit cf76b17a70
3 changed files with 19 additions and 6 deletions

View file

@ -59,7 +59,6 @@ public class BookDownloaderService extends Service {
int ALL = 0x0003; int ALL = 0x0003;
} }
private Set<String> myDownloadingURLs = Collections.synchronizedSet(new HashSet<String>()); private Set<String> myDownloadingURLs = Collections.synchronizedSet(new HashSet<String>());
private Set<Integer> myOngoingNotifications = new HashSet<Integer>(); private Set<Integer> myOngoingNotifications = new HashSet<Integer>();

View file

@ -147,20 +147,24 @@ public class ZLAndroidWidget extends View implements ZLViewWidget, View.OnLongCl
} }
} }
@Override
public void reset() { public void reset() {
myBitmapManager.reset(); myBitmapManager.reset();
} }
@Override
public void repaint() { public void repaint() {
postInvalidate(); postInvalidate();
} }
@Override
public void startManualScrolling(int x, int y, ZLView.Direction direction) { public void startManualScrolling(int x, int y, ZLView.Direction direction) {
final AnimationProvider animator = getAnimationProvider(); final AnimationProvider animator = getAnimationProvider();
animator.setup(direction, getWidth(), getMainAreaHeight()); animator.setup(direction, getWidth(), getMainAreaHeight());
animator.startManualScrolling(x, y); animator.startManualScrolling(x, y);
} }
@Override
public void scrollManuallyTo(int x, int y) { public void scrollManuallyTo(int x, int y) {
final ZLView view = ZLApplication.Instance().getCurrentView(); final ZLView view = ZLApplication.Instance().getCurrentView();
final AnimationProvider animator = getAnimationProvider(); final AnimationProvider animator = getAnimationProvider();
@ -170,6 +174,7 @@ public class ZLAndroidWidget extends View implements ZLViewWidget, View.OnLongCl
} }
} }
@Override
public void startAnimatedScrolling(ZLView.PageIndex pageIndex, int x, int y, ZLView.Direction direction, int speed) { public void startAnimatedScrolling(ZLView.PageIndex pageIndex, int x, int y, ZLView.Direction direction, int speed) {
final ZLView view = ZLApplication.Instance().getCurrentView(); final ZLView view = ZLApplication.Instance().getCurrentView();
if (pageIndex == ZLView.PageIndex.current || !view.canScroll(pageIndex)) { if (pageIndex == ZLView.PageIndex.current || !view.canScroll(pageIndex)) {
@ -183,6 +188,7 @@ public class ZLAndroidWidget extends View implements ZLViewWidget, View.OnLongCl
} }
} }
@Override
public void startAnimatedScrolling(ZLView.PageIndex pageIndex, ZLView.Direction direction, int speed) { public void startAnimatedScrolling(ZLView.PageIndex pageIndex, ZLView.Direction direction, int speed) {
final ZLView view = ZLApplication.Instance().getCurrentView(); final ZLView view = ZLApplication.Instance().getCurrentView();
if (pageIndex == ZLView.PageIndex.current || !view.canScroll(pageIndex)) { if (pageIndex == ZLView.PageIndex.current || !view.canScroll(pageIndex)) {
@ -196,6 +202,7 @@ public class ZLAndroidWidget extends View implements ZLViewWidget, View.OnLongCl
} }
} }
@Override
public void startAnimatedScrolling(int x, int y, int speed) { public void startAnimatedScrolling(int x, int y, int speed) {
final ZLView view = ZLApplication.Instance().getCurrentView(); final ZLView view = ZLApplication.Instance().getCurrentView();
final AnimationProvider animator = getAnimationProvider(); final AnimationProvider animator = getAnimationProvider();
@ -278,8 +285,8 @@ public class ZLAndroidWidget extends View implements ZLViewWidget, View.OnLongCl
return true; return true;
} }
private class LongClickRunnable implements Runnable { private class LongClickRunnable implements Runnable {
@Override
public void run() { public void run() {
if (performLongClick()) { if (performLongClick()) {
myLongClickPerformed = true; myLongClickPerformed = true;
@ -299,6 +306,7 @@ public class ZLAndroidWidget extends View implements ZLViewWidget, View.OnLongCl
} }
private class ShortClickRunnable implements Runnable { private class ShortClickRunnable implements Runnable {
@Override
public void run() { public void run() {
final ZLView view = ZLApplication.Instance().getCurrentView(); final ZLView view = ZLApplication.Instance().getCurrentView();
view.onFingerSingleTap(myPressedX, myPressedY); view.onFingerSingleTap(myPressedX, myPressedY);
@ -394,6 +402,7 @@ public class ZLAndroidWidget extends View implements ZLViewWidget, View.OnLongCl
return true; return true;
} }
@Override
public boolean onLongClick(View v) { public boolean onLongClick(View v) {
final ZLView view = ZLApplication.Instance().getCurrentView(); final ZLView view = ZLApplication.Instance().getCurrentView();
return view.onFingerLongPress(myPressedX, myPressedY); return view.onFingerLongPress(myPressedX, myPressedY);
@ -402,6 +411,7 @@ public class ZLAndroidWidget extends View implements ZLViewWidget, View.OnLongCl
private int myKeyUnderTracking = -1; private int myKeyUnderTracking = -1;
private long myTrackingStartTime; private long myTrackingStartTime;
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) { public boolean onKeyDown(int keyCode, KeyEvent event) {
final ZLApplication application = ZLApplication.Instance(); final ZLApplication application = ZLApplication.Instance();
@ -426,6 +436,7 @@ public class ZLAndroidWidget extends View implements ZLViewWidget, View.OnLongCl
} }
} }
@Override
public boolean onKeyUp(int keyCode, KeyEvent event) { public boolean onKeyUp(int keyCode, KeyEvent event) {
if (myKeyUnderTracking != -1) { if (myKeyUnderTracking != -1) {
if (myKeyUnderTracking == keyCode) { if (myKeyUnderTracking == keyCode) {
@ -443,6 +454,7 @@ public class ZLAndroidWidget extends View implements ZLViewWidget, View.OnLongCl
} }
} }
@Override
protected int computeVerticalScrollExtent() { protected int computeVerticalScrollExtent() {
final ZLView view = ZLApplication.Instance().getCurrentView(); final ZLView view = ZLApplication.Instance().getCurrentView();
if (!view.isScrollbarShown()) { if (!view.isScrollbarShown()) {
@ -459,6 +471,7 @@ public class ZLAndroidWidget extends View implements ZLViewWidget, View.OnLongCl
} }
} }
@Override
protected int computeVerticalScrollOffset() { protected int computeVerticalScrollOffset() {
final ZLView view = ZLApplication.Instance().getCurrentView(); final ZLView view = ZLApplication.Instance().getCurrentView();
if (!view.isScrollbarShown()) { if (!view.isScrollbarShown()) {
@ -475,6 +488,7 @@ public class ZLAndroidWidget extends View implements ZLViewWidget, View.OnLongCl
} }
} }
@Override
protected int computeVerticalScrollRange() { protected int computeVerticalScrollRange() {
final ZLView view = ZLApplication.Instance().getCurrentView(); final ZLView view = ZLApplication.Instance().getCurrentView();
if (!view.isScrollbarShown()) { if (!view.isScrollbarShown()) {