Class RotateEvent

java.lang.Object
All Implemented Interfaces:
Serializable, Cloneable

public final class RotateEvent extends GestureEvent
Rotate event indicates that user performed rotating gesture such as dragging two fingers around each other on track pad, touch screen or other similar device.

The event is delivered to the top-most node picked on the gesture coordinates in time of the gesture start - the whole gesture is delivered to the same node even if the coordinates change during the gesture.

The event provides two values: angle is the rotation angle of this event, totalAngle is the rotation angle of the whole gesture. Both values are in degrees and work well when added to the node's rotate property value (positive values for clockwise rotation).

As all gestures, rotation can be direct (performed directly at the concrete coordinates as on touch screen - the center point among all the touches is usually used as the gesture coordinates) or indirect (performed indirectly as on track pad - the mouse cursor location is usually used as the gesture coordinates).

The gesture's ROTATE events are surounded by ROTATION_STARTED and ROTATION_FINISHED events. If rotation inertia is active on the given platform, some ROTATE events with isInertia() returning true can come after ROTATION_FINISHED.

Since:
JavaFX 2.2
See Also: