Class GestureEditEvent
java.lang.Object
com.levigo.jadice.web.client.tool.events.EventObject
com.levigo.jadice.web.client.tool.events.EditEvent
com.levigo.jadice.web.client.tool.events.PointedEditEvent
com.levigo.jadice.web.client.tool.events.GestureEditEvent
Edit Event for multi touch gestures
-
Field Summary
Fields inherited from class com.levigo.jadice.web.client.tool.events.EditEvent
document, pageBounds
Fields inherited from class com.levigo.jadice.web.client.tool.events.EventObject
source
-
Method Summary
Modifier and TypeMethodDescriptionvoid
consume()
getAbsolutePoint
(int finger) getConstrainedDocumentPoint
(int finger) Return the finger position in document coordinates.getDocumentPoint
(int finger) Return the finger position in document coordinates.int
Overridden in subclasses.Point[]
getPoint
(int finger) Return the point relative to the RenderedPage's origin in screen coordinates.Point[]
int
getX
(int finger) Returns the x Position of the given finger.int
getY
(int finger) Returns the y Position of the given finger.boolean
isWithinPageBounds
(int finger) Returns whether the finger is within the bounds.void
setPrevPositions
(Point[] prevPositions) Methods inherited from class com.levigo.jadice.web.client.tool.events.PointedEditEvent
getConstrainedDocumentPoint, getConstrainedPoint, getDocumentPoint, getPointerRelativeX, getPointerRelativeY, setOldPosition
Methods inherited from class com.levigo.jadice.web.client.tool.events.EditEvent
create, getDocument, getGwtEvent, getInputEventType, getModifiers, getModifiersEx, getPage, getPageIndex, getPageRenderControls, getRenderedPageBounds, getRenderedSize, getWhen, hasCanvasTargetSource, hasPageContext, isAltDown, isAltGraphDown, isConsumed, isControlDown, isMetaDown, isPreventPageViewFocus, isShiftDown, preventPageViewFocus, toString
Methods inherited from class com.levigo.jadice.web.client.tool.events.EventObject
getSource
-
Method Details
-
setPrevPositions
-
getInputEvent
Description copied from class:EditEvent
Overridden in subclasses.Implement only for legacy purposes.
- Specified by:
getInputEvent
in classEditEvent
- Returns:
- The inputEvent used for legacy purposes.
-
getFingers
public int getFingers() -
getPrevPositions
-
getNewPositions
-
getFirstPrevPosition
-
getFirstNewPosition
-
consume
public void consume() -
getAbsolutePoint
- Specified by:
getAbsolutePoint
in classPointedEditEvent
- Parameters:
finger
- the finger of the touch (only for touch event)- Returns:
- the Point relative to the PageView-TopLeft
-
getPoint
Description copied from class:PointedEditEvent
Return the point relative to the RenderedPage's origin in screen coordinates.- Specified by:
getPoint
in classPointedEditEvent
- Parameters:
finger
- the finger of the touch (only for touch event)- Returns:
- The point relative to the RenderedPage's origin.
- See Also:
-
getDocumentPoint
Return the finger position in document coordinates.Caveat: Clients must not attempt to call this method unless
EditEvent.hasPageContext()
returnedtrue
.- Overrides:
getDocumentPoint
in classPointedEditEvent
- Parameters:
finger
- the finger starting from index 0.- Returns:
- The point.
- Throws:
IllegalStateException
- if the event does not have a page context.- See Also:
-
getConstrainedDocumentPoint
Return the finger position in document coordinates. If the positin is outside the page's bounds, the position is constrained to lie within the bounds.Caveat: Clients must not attempt to call this method unless
EditEvent.hasPageContext()
returnedtrue
.- Overrides:
getConstrainedDocumentPoint
in classPointedEditEvent
- Parameters:
finger
- the finger starting from index 0.- Returns:
- The position.
- Throws:
IllegalStateException
- if the event does not have a page context.- See Also:
-
getX
public int getX(int finger) Returns the x Position of the given finger.- Overrides:
getX
in classPointedEditEvent
- Parameters:
finger
- the finger starting from index 0.- Returns:
- The x coordinate of the finger.
-
getY
public int getY(int finger) Returns the y Position of the given finger.- Overrides:
getY
in classPointedEditEvent
- Parameters:
finger
- the finger starting from index 0.- Returns:
- The y coordinate of the finger.
-
isWithinPageBounds
public boolean isWithinPageBounds(int finger) Returns whether the finger is within the bounds.- Overrides:
isWithinPageBounds
in classPointedEditEvent
- Parameters:
finger
- the finger starting from index 0.- Returns:
- True, if the finger is within the bounds, false else.
-