Package com.teamdev.jxbrowser.ui
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 -
Method Summary
Modifier and TypeMethodDescriptiondefault doubleforce()Returns the pressure applied to this TouchPoint.default intid()Returns the identifier of thisTouchPoint.static TouchPoint.BuildernewBuilder(int id, Point screenPosition, com.teamdev.jxbrowser.ui.event.internal.rpc.TouchPoint.State state) Creates a newTouchPointbuilder with the given required parameters.default PointReturns the position relative to the bounds of the screen.default PointReturns the position relative to the bounds of the widget.default doubleradiusX()Returns the major X axis length of the touch ellipse.default doubleradiusY()Returns the major Y axis length of the touch ellipse.default doubleReturns 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 newTouchPointbuilder 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.Builderinstance
-
id
default int id()Returns the identifier of thisTouchPoint.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
Returns the position relative to the bounds of the screen. -
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.
-