Interface TouchPoint


public interface TouchPoint
A touch point on the screen.

A touch point is defined by a pair of numbers that specify the coordinates and other properties related to a user touch on the screen.

Since:
8.0.0
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final class 
    A builder of TouchPoint.
  • Method Summary

    Modifier and Type
    Method
    Description
    default double
    Returns the pressure applied to this TouchPoint.
    default int
    id()
    Returns the identifier of this TouchPoint.
    newBuilder(int id, Point screenPosition, com.teamdev.jxbrowser.ui.event.internal.rpc.TouchPoint.State state)
    Creates a new TouchPoint builder with the given required parameters.
    default Point
    Returns the position relative to the bounds of the screen.
    default Point
    Returns the position relative to the bounds of the widget.
    default double
    Returns the major X axis length of the touch ellipse.
    default double
    Returns the major Y axis length of the touch ellipse.
    default double
    Returns the orientation of the touch ellipse.
  • Method Details

    • newBuilder

      static TouchPoint.Builder newBuilder(int id, Point screenPosition, com.teamdev.jxbrowser.ui.event.internal.rpc.TouchPoint.State state)
      Creates a new TouchPoint builder with the given required parameters.
      Parameters:
      id - The unique identifier of the touch point. When a touch point becomes active, it must be assigned an identifier that is distinct from any other active touch point. While the touch point remains active, all events that refer to it must assign it the same identifier.
      screenPosition - The location on the screen.
      Returns:
      a new TouchPoint.Builder instance
    • id

      default int id()
      Returns the identifier of this TouchPoint.

      This corresponds to the order in which the points were pressed.

    • radiusX

      default double radiusX()
      Returns the major X axis length of the touch ellipse.
    • radiusY

      default double radiusY()
      Returns the major Y axis length of the touch ellipse.
    • rotationAngle

      default double rotationAngle()
      Returns the orientation of the touch ellipse.
    • positionInScreen

      default Point positionInScreen()
      Returns the position relative to the bounds of the screen.
    • positionInWidget

      default Point positionInWidget()
      Returns the position relative to the bounds of the widget.
    • force

      default double force()
      Returns the pressure applied to this TouchPoint.

      This is typically a value between 0 and 1, with 0 indicating no pressure and 1 indicating some maximum pressure.