Class TouchInit

    • Constructor Detail

      • TouchInit

        public TouchInit​(double identifier,
                         BaseHtmlElement target)
        Creates an object with identifier and target, both mandatory.
        Parameters:
        identifier - a unique identifier for this touch object
        target - the element on which the touch point started when it was first placed on the surface
    • Method Detail

      • getIdentifier

        public double getIdentifier()
        Returns a unique identifier for this touch object.
        A given touch point (say, by a finger) will have the same identifier for the duration of its movement around the surface.
        This lets you ensure that you're tracking the same touch all the time.
        Returns:
        a unique identifier for this touch object
      • setIdentifier

        public void setIdentifier​(double identifier)
        Sets a unique identifier for this touch object.
        A given touch point (say, by a finger) will have the same identifier for the duration of its movement around the surface.
        This lets you ensure that you're tracking the same touch all the time.
        Parameters:
        identifier - a unique identifier for this touch object
      • getTarget

        public BaseHtmlElement getTarget()
        Returns the element on which the touch point started when it was first placed on the surface, even if the touch point has since moved outside the interactive area of that element or even been removed from the document.
        Returns:
        the element on which the touch point started when it was first placed on the surface
      • setTarget

        public void setTarget​(BaseHtmlElement target)
        Sets the element on which the touch point started when it was first placed on the surface, even if the touch point has since moved outside the interactive area of that element or even been removed from the document.
        Parameters:
        target - the element on which the touch point started when it was first placed on the surface
      • getClientX

        public double getClientX()
        Returns the horizontal position of the touch on the client window of user's screen, excluding any scroll offset.
        Returns:
        the horizontal position of the touch on the client window of user's screen, excluding any scroll offset
      • setClientX

        public void setClientX​(double clientX)
        Sets the horizontal position of the touch on the client window of user's screen, excluding any scroll offset.
        Parameters:
        clientX - the horizontal position of the touch on the client window of user's screen, excluding any scroll offset
      • getClientY

        public double getClientY()
        Returns the vertical position of the touch on the client window of the user's screen, excluding any scroll offset.
        Returns:
        the vertical position of the touch on the client window of the user's screen, excluding any scroll offset
      • setClientY

        public void setClientY​(double clientY)
        Returns the vertical position of the touch on the client window of the user's screen, excluding any scroll offset.
        Parameters:
        clientY - the vertical position of the touch on the client window of the user's screen, excluding any scroll offset
      • getScreenX

        public double getScreenX()
        Returns the horizontal position of the touch on the user's screen.
        Returns:
        the horizontal position of the touch on the user's screen.
      • setScreenX

        public void setScreenX​(double screenX)
        Setss the horizontal position of the touch on the user's screen.
        Parameters:
        screenX - the horizontal position of the touch on the user's screen.
      • getScreenY

        public double getScreenY()
        Returns the vertical position of the touch on the user's screen.
        Returns:
        the vertical position of the touch on the user's screen
      • setScreenY

        public void setScreenY​(double screenY)
        Sets the vertical position of the touch on the user's screen.
        Parameters:
        screenY - the vertical position of the touch on the user's screen
      • getPageX

        public double getPageX()
        Returns the horizontal position of the touch on the client window of user's screen, including any scroll offset.
        Returns:
        the horizontal position of the touch on the client window of user's screen, including any scroll offset
      • setPageX

        public void setPageX​(double pageX)
        Sets the horizontal position of the touch on the client window of user's screen, including any scroll offset.
        Parameters:
        pageX - the horizontal position of the touch on the client window of user's screen, including any scroll offset
      • getPageY

        public double getPageY()
        Returns the horizontal position of the touch on the client window of user's screen, including any scroll offset.
        Returns:
        the horizontal position of the touch on the client window of user's screen, including any scroll offset
      • setPageY

        public void setPageY​(double pageY)
        Sets the horizontal position of the touch on the client window of user's screen, including any scroll offset.
        Parameters:
        pageY - the horizontal position of the touch on the client window of user's screen, including any scroll offset
      • getRadiusX

        public double getRadiusX()
        Returns the radius of the ellipse which most closely circumscribes the touching area (e.g. finger, stylus) along the axis indicated by rotationAngle.
        Returns:
        the radius of the ellipse which most closely circumscribes the touching area (e.g. finger, stylus) along the axis indicated by rotationAngle
      • setRadiusX

        public void setRadiusX​(double radiusX)
        Sets the radius of the ellipse which most closely circumscribes the touching area (e.g. finger, stylus) along the axis indicated by rotationAngle.
        Parameters:
        radiusX - the radius of the ellipse which most closely circumscribes the touching area (e.g. finger, stylus) along the axis indicated by rotationAngle
      • getRadiusY

        public double getRadiusY()
        Returns the radius of the ellipse which most closely circumscribes the touching area (e.g. finger, stylus) along the axis perpendicular to that indicated by rotationAngle.
        Returns:
        the radius of the ellipse which most closely circumscribes the touching area (e.g. finger, stylus) along the axis perpendicular to that indicated by rotationAngle
      • setRadiusY

        public void setRadiusY​(double radiusY)
        Sets the radius of the ellipse which most closely circumscribes the touching area (e.g. finger, stylus) along the axis perpendicular to that indicated by rotationAngle.
        Parameters:
        radiusY - the radius of the ellipse which most closely circumscribes the touching area (e.g. finger, stylus) along the axis perpendicular to that indicated by rotationAngle
      • getRotationAngle

        public double getRotationAngle()
        Returns the angle (in degrees) that the ellipse described by radiusX and radiusY must be rotated, clockwise, to most accurately cover the area of contact between the user and the surface.
        Returns:
        the angle (in degrees) that the ellipse described by radiusX and radiusY must be rotated, clockwise, to most accurately cover the area of contact between the user and the surface
      • setRotationAngle

        public void setRotationAngle​(double rotation)
        Sets the angle (in degrees) that the ellipse described by radiusX and radiusY must be rotated, clockwise, to most accurately cover the area of contact between the user and the surface.
        The value must be greater than or equal to 0 and less than 90.
        Parameters:
        rotation - the angle (in degrees) that the ellipse described by radiusX and radiusY must be rotated, clockwise, to most accurately cover the area of contact between the user and the surface.
        The value must be greater than or equal to 0 and less than 90
      • getForce

        public double getForce()
        Returns the amount of pressure being applied to the surface by the user, as a double between 0.0 (no pressure) and 1.0 (maximum pressure).
        Returns:
        the amount of pressure being applied to the surface by the user
      • setForce

        public void setForce​(double force)
        Sets the amount of pressure being applied to the surface by the user, as a double between 0.0 (no pressure) and 1.0 (maximum pressure).
        Parameters:
        force - the amount of pressure being applied to the surface by the user