Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
P
PDF Viewer Scanner White
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wanglei
PDF Viewer Scanner White
Commits
53d03926
Commit
53d03926
authored
Sep 25, 2024
by
wanglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
...
parent
7096a17f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
572 additions
and
873 deletions
+572
-873
PGEventManage.java
...a/com/cherry/lib/doc/office/pg/control/PGEventManage.java
+43
-65
PGPrintMode.java
...ava/com/cherry/lib/doc/office/pg/control/PGPrintMode.java
+6
-0
APageListEventManage.java
...oc/office/system/beans/pagelist/APageListEventManage.java
+150
-239
APageListView.java
...y/lib/doc/office/system/beans/pagelist/APageListView.java
+366
-568
IPageListViewListener.java
...c/office/system/beans/pagelist/IPageListViewListener.java
+2
-0
PrintWord.java
.../java/com/cherry/lib/doc/office/wp/control/PrintWord.java
+5
-0
WPEventManage.java
...a/com/cherry/lib/doc/office/wp/control/WPEventManage.java
+0
-1
No files found.
library/src/main/java/com/cherry/lib/doc/office/pg/control/PGEventManage.java
View file @
53d03926
/*
/*
* 文件名称: PGEventManage.java
* 文件名称: PGEventManage.java
*
*
* 编译器: android2.2
* 编译器: android2.2
* 时间: 下午7:00:11
* 时间: 下午7:00:11
*/
*/
...
@@ -9,7 +9,9 @@ package com.cherry.lib.doc.office.pg.control;
...
@@ -9,7 +9,9 @@ package com.cherry.lib.doc.office.pg.control;
import
com.cherry.lib.doc.office.common.ISlideShow
;
import
com.cherry.lib.doc.office.common.ISlideShow
;
import
com.cherry.lib.doc.office.system.IControl
;
import
com.cherry.lib.doc.office.system.IControl
;
import
com.cherry.lib.doc.office.system.beans.AEventManage
;
import
com.cherry.lib.doc.office.system.beans.AEventManage
;
import
android.graphics.Rect
;
import
android.graphics.Rect
;
import
android.util.Log
;
import
android.view.MotionEvent
;
import
android.view.MotionEvent
;
import
android.view.View
;
import
android.view.View
;
...
@@ -25,134 +27,110 @@ import android.view.View;
...
@@ -25,134 +27,110 @@ import android.view.View;
* <p>
* <p>
* 负责人: ljj8494
* 负责人: ljj8494
* <p>
* <p>
* 负责小组:
* 负责小组:
* <p>
* <p>
* <p>
* <p>
*/
*/
public
class
PGEventManage
extends
AEventManage
public
class
PGEventManage
extends
AEventManage
{
{
/**
/**
*
*
* @param spreadsheet
*/
*/
public
PGEventManage
(
Presentation
presentation
,
IControl
control
)
public
PGEventManage
(
Presentation
presentation
,
IControl
control
)
{
{
super
(
presentation
.
getContext
(),
control
);
super
(
presentation
.
getContext
(),
control
);
this
.
presentation
=
presentation
;
this
.
presentation
=
presentation
;
presentation
.
setOnTouchListener
(
this
);
presentation
.
setOnTouchListener
(
this
);
presentation
.
setLongClickable
(
true
);
presentation
.
setLongClickable
(
true
);
}
}
/**
/**
* 触摸事件
* 触摸事件
*
*/
*/
public
boolean
onTouch
(
View
v
,
MotionEvent
event
)
public
boolean
onTouch
(
View
v
,
MotionEvent
event
)
{
{
super
.
onTouch
(
v
,
event
);
super
.
onTouch
(
v
,
event
);
return
false
;
return
false
;
}
}
/**
/**
*
*
*
*/
*/
public
boolean
onDoubleTap
(
MotionEvent
e
)
public
boolean
onDoubleTap
(
MotionEvent
e
)
{
{
super
.
onDoubleTap
(
e
);
super
.
onDoubleTap
(
e
);
return
true
;
return
true
;
}
}
/**
/**
*
*
*
*/
*/
public
boolean
onScroll
(
MotionEvent
e1
,
MotionEvent
e2
,
float
distanceX
,
float
distanceY
)
public
boolean
onScroll
(
MotionEvent
e1
,
MotionEvent
e2
,
float
distanceX
,
float
distanceY
)
{
{
super
.
onScroll
(
e1
,
e2
,
distanceX
,
distanceY
);
super
.
onScroll
(
e1
,
e2
,
distanceX
,
distanceY
);
return
true
;
return
true
;
}
}
/**
/**
* Fling the scroll view
* Fling the scroll view
*
*
* @param velocityX
X方向速率
* @param velocityX X方向速率
* @param velocityY
Y方向速率
* @param velocityY
Y方向速率
*/
*/
public
void
fling
(
int
velocityX
,
int
velocityY
)
public
void
fling
(
int
velocityX
,
int
velocityY
)
{
{
if
(
presentation
.
isSlideShow
())
{
if
(
presentation
.
isSlideShow
())
if
(
Math
.
abs
(
velocityY
)
<
400
&&
Math
.
abs
(
velocityX
)
<
400
)
{
{
if
(
Math
.
abs
(
velocityY
)
<
400
&&
Math
.
abs
(
velocityX
)
<
400
)
{
presentation
.
slideShow
(
ISlideShow
.
SlideShow_NextStep
);
presentation
.
slideShow
(
ISlideShow
.
SlideShow_NextStep
);
return
;
return
;
}
}
super
.
fling
(
velocityX
,
velocityY
);
super
.
fling
(
velocityX
,
velocityY
);
int
currentIndex
=
presentation
.
getCurrentIndex
();
int
currentIndex
=
presentation
.
getCurrentIndex
();
if
(
Math
.
abs
(
velocityY
)
>
Math
.
abs
(
velocityX
))
if
(
Math
.
abs
(
velocityY
)
>
Math
.
abs
(
velocityX
))
{
{
//vertical
//vertical
if
(
velocityY
<
0
&&
currentIndex
>=
0
)
if
(
velocityY
<
0
&&
currentIndex
>=
0
)
{
{
//previous step
//previous step
presentation
.
slideShow
(
ISlideShow
.
SlideShow_NextStep
);
presentation
.
slideShow
(
ISlideShow
.
SlideShow_NextStep
);
}
else
if
(
velocityY
>
0
&&
currentIndex
<=
presentation
.
getRealSlideCount
()
-
1
)
{
}
else
if
(
velocityY
>
0
&&
currentIndex
<=
presentation
.
getRealSlideCount
()
-
1
)
{
//next step
//next step
presentation
.
slideShow
(
ISlideShow
.
SlideShow_PreviousStep
);
presentation
.
slideShow
(
ISlideShow
.
SlideShow_PreviousStep
);
}
}
}
}
else
{
else
{
// horizontal
// horizontal
if
(
velocityX
<
0
&&
currentIndex
>=
0
)
if
(
velocityX
<
0
&&
currentIndex
>=
0
)
{
{
// previous Slide
// previous Slide
presentation
.
slideShow
(
ISlideShow
.
SlideShow_PreviousSlide
);
presentation
.
slideShow
(
ISlideShow
.
SlideShow_PreviousSlide
);
}
}
else
if
(
velocityX
>
0
&&
currentIndex
<
presentation
.
getRealSlideCount
()
-
1
)
{
else
if
(
velocityX
>
0
&&
currentIndex
<
presentation
.
getRealSlideCount
()
-
1
)
{
// next Slide
// next Slide
presentation
.
slideShow
(
ISlideShow
.
SlideShow_NextSlide
);
presentation
.
slideShow
(
ISlideShow
.
SlideShow_NextSlide
);
}
}
}
}
}
}
}
}
/**
/**
*
*
*
*/
*/
public
boolean
onSingleTapUp
(
MotionEvent
e
)
public
boolean
onSingleTapUp
(
MotionEvent
e
)
{
{
Log
.
e
(
"PGEventManage"
,
"onSingleTapUp"
);
control
.
getMainFrame
().
singleTap
();
super
.
onSingleTapUp
(
e
);
super
.
onSingleTapUp
(
e
);
if
(
e
.
getAction
()
==
MotionEvent
.
ACTION_UP
)
if
(
e
.
getAction
()
==
MotionEvent
.
ACTION_UP
)
{
{
Rect
drawRect
=
presentation
.
getSlideDrawingRect
();
Rect
drawRect
=
presentation
.
getSlideDrawingRect
();
if
(
presentation
.
isSlideShow
()
&&
drawRect
.
contains
((
int
)
e
.
getX
(),
(
int
)
e
.
getY
()))
if
(
presentation
.
isSlideShow
()
&&
drawRect
.
contains
((
int
)
e
.
getX
(),
(
int
)
e
.
getY
()))
{
{
//not click hyperlink, then go to next step
//not click hyperlink, then go to next step
this
.
presentation
.
slideShow
(
ISlideShow
.
SlideShow_NextStep
);
this
.
presentation
.
slideShow
(
ISlideShow
.
SlideShow_NextStep
);
}
}
}
}
return
true
;
return
true
;
}
}
/**
/**
*
*
*/
*/
public
void
dispose
()
public
void
dispose
()
{
{
super
.
dispose
();
super
.
dispose
();
presentation
=
null
;
presentation
=
null
;
}
}
// Spreadsheet
// Spreadsheet
private
Presentation
presentation
;
private
Presentation
presentation
;
}
}
library/src/main/java/com/cherry/lib/doc/office/pg/control/PGPrintMode.java
View file @
53d03926
...
@@ -428,6 +428,12 @@ public class PGPrintMode extends FrameLayout implements IPageListViewListener {
...
@@ -428,6 +428,12 @@ public class PGPrintMode extends FrameLayout implements IPageListViewListener {
return
control
.
getMainFrame
().
getPageListViewMovingPosition
();
return
control
.
getMainFrame
().
getPageListViewMovingPosition
();
}
}
@Override
public
void
singleTab
()
{
Log
.
e
(
"PGPrintMode"
,
"singleTab"
);
control
.
getMainFrame
().
singleTap
();
}
/**
/**
*
*
*/
*/
...
...
library/src/main/java/com/cherry/lib/doc/office/system/beans/pagelist/APageListEventManage.java
View file @
53d03926
This diff is collapsed.
Click to expand it.
library/src/main/java/com/cherry/lib/doc/office/system/beans/pagelist/APageListView.java
View file @
53d03926
This diff is collapsed.
Click to expand it.
library/src/main/java/com/cherry/lib/doc/office/system/beans/pagelist/IPageListViewListener.java
View file @
53d03926
...
@@ -161,4 +161,6 @@ public interface IPageListViewListener
...
@@ -161,4 +161,6 @@ public interface IPageListViewListener
* page list view moving position
* page list view moving position
*/
*/
public
int
getPageListViewMovingPosition
();
public
int
getPageListViewMovingPosition
();
public
void
singleTab
();
}
}
library/src/main/java/com/cherry/lib/doc/office/wp/control/PrintWord.java
View file @
53d03926
...
@@ -434,6 +434,11 @@ public class PrintWord extends FrameLayout implements IPageListViewListener {
...
@@ -434,6 +434,11 @@ public class PrintWord extends FrameLayout implements IPageListViewListener {
return
control
.
getMainFrame
().
getPageListViewMovingPosition
();
return
control
.
getMainFrame
().
getPageListViewMovingPosition
();
}
}
@Override
public
void
singleTab
()
{
}
/**
/**
*
*
*/
*/
...
...
library/src/main/java/com/cherry/lib/doc/office/wp/control/WPEventManage.java
View file @
53d03926
...
@@ -39,7 +39,6 @@ import com.cherry.lib.doc.office.system.beans.AEventManage;
...
@@ -39,7 +39,6 @@ import com.cherry.lib.doc.office.system.beans.AEventManage;
*/
*/
public
class
WPEventManage
extends
AEventManage
{
public
class
WPEventManage
extends
AEventManage
{
/**
/**
* @param spreadsheet
*/
*/
public
WPEventManage
(
Word
word
,
IControl
control
)
{
public
WPEventManage
(
Word
word
,
IControl
control
)
{
super
(
word
.
getContext
(),
control
);
super
(
word
.
getContext
(),
control
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment