Class PanForceTool.PanForceGesture
java.lang.Object
com.levigo.jadice.web.client.util.Gesture
com.levigo.jadice.web.client.tools.PanForceTool.PanForceGesture
- Enclosing class:
PanForceTool
Pan Gesture with a little panning after MouseUp or TouchEnd
-
Nested Class Summary
Nested classes/interfaces inherited from class com.levigo.jadice.web.client.util.Gesture
Gesture.GestureHandler
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final com.levigo.jadice.web.client.tools.PanForceTool.PanForceGesture.FinishAnimation
protected static final int
protected boolean
protected ViewComponent
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
end()
protected void
protected void
init
(ViewComponent viewComponent) Initializes the Gesture with the givenViewComponent
.protected boolean
isMoveToNextPage
(int x, Rectangle scrollTo, int diffx, int diffy) Decides whether it should move to the next page instead of scrolling.protected void
onStart()
Called when the Gesture is startedprotected void
scroll
(int x, int y, int multiplier) protected void
scrollRecToVisible
(Rectangle rect) Methods inherited from class com.levigo.jadice.web.client.util.Gesture
addDomHandler, addHandler, currentGestureStop, getDescription, getSnapToForSelection, init, onStop, start, stop
-
Field Details
-
SHIFTMULTIPLIER
protected static final int SHIFTMULTIPLIER- See Also:
-
viewComponent
-
started
protected boolean started -
finishAnimation
protected final com.levigo.jadice.web.client.tools.PanForceTool.PanForceGesture.FinishAnimation finishAnimation
-
-
Constructor Details
-
PanForceGesture
public PanForceGesture()
-
-
Method Details
-
onStart
protected void onStart()Description copied from class:Gesture
Called when the Gesture is started -
end
protected void end() -
scroll
protected void scroll(int x, int y, int multiplier) -
scrollRecToVisible
-
isMoveToNextPage
Decides whether it should move to the next page instead of scrolling. By default do nothing and return false.- Parameters:
x
- the current x Position.scrollTo
- the visible rectangle.diffx
- the current difference in x direction.diffy
- the current difference in y direction.- Returns:
- true if there is a page change, otherwise false.
-
fadeOutOverlay
protected void fadeOutOverlay() -
init
Initializes the Gesture with the givenViewComponent
. Reinitialization is supported.- Parameters:
viewComponent
- theViewComponent
-