Class GestureEditEvent


public class GestureEditEvent extends PointedEditEvent
Edit Event for multi touch gestures
  • Method Details

    • setPrevPositions

      public void setPrevPositions(Point[] prevPositions)
    • getInputEvent

      public InputEvent getInputEvent()
      Description copied from class: EditEvent
      Overridden in subclasses.

      Implement only for legacy purposes.

      Specified by:
      getInputEvent in class EditEvent
      Returns:
      The inputEvent used for legacy purposes.
    • getFingers

      public int getFingers()
    • getPrevPositions

      public Point[] getPrevPositions()
    • getNewPositions

      public Point[] getNewPositions()
    • getFirstPrevPosition

      public Point getFirstPrevPosition()
    • getFirstNewPosition

      public Point getFirstNewPosition()
    • consume

      public void consume()
      Overrides:
      consume in class EditEvent
    • getAbsolutePoint

      public Point getAbsolutePoint(int finger)
      Specified by:
      getAbsolutePoint in class PointedEditEvent
      Parameters:
      finger - the finger of the touch (only for touch event)
      Returns:
      the Point relative to the PageView-TopLeft
    • getPoint

      public Point getPoint(int finger)
      Description copied from class: PointedEditEvent
      Return the point relative to the RenderedPage's origin in screen coordinates.
      Specified by:
      getPoint in class PointedEditEvent
      Parameters:
      finger - the finger of the touch (only for touch event)
      Returns:
      The point relative to the RenderedPage's origin.
      See Also:
    • getDocumentPoint

      public Point2D getDocumentPoint(int finger)
      Return the finger position in document coordinates.

      Caveat: Clients must not attempt to call this method unless EditEvent.hasPageContext() returned true.

      Overrides:
      getDocumentPoint in class PointedEditEvent
      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

      public Point2D getConstrainedDocumentPoint(int finger)
      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() returned true.

      Overrides:
      getConstrainedDocumentPoint in class PointedEditEvent
      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 class PointedEditEvent
      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 class PointedEditEvent
      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 class PointedEditEvent
      Parameters:
      finger - the finger starting from index 0.
      Returns:
      True, if the finger is within the bounds, false else.