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.FinishAnimationprotected static final intprotected booleanprotected ViewComponent -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidend()protected voidprotected voidinit(ViewComponent viewComponent) Initializes the Gesture with the givenViewComponent.protected booleanisMoveToNextPage(int x, Rectangle scrollTo, int diffx, int diffy) Decides whether it should move to the next page instead of scrolling.protected voidonStart()Called when the Gesture is startedprotected voidscroll(int x, int y, int multiplier) protected voidscrollRecToVisible(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:GestureCalled 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
-