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 surrounded 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.
| Modifier and Type | Field and Description |
|---|---|
| private final double | |
| public static final EventType | ANY
Common supertype for all rotate event types.
|
| public static final EventType | ROTATE
This event occurs when user performs a rotating gesture such as dragging two fingers around each other. |
| public static final EventType | ROTATION_FINISHED
This event occurs when a rotating gesture ends. |
| public static final EventType | ROTATION_STARTED
This event occurs when a rotating gesture is detected. |
| private static final long | |
| private final double |
| Access | Constructor and Description |
|---|---|
| public | RotateEvent(Object
the source of the event. Can be null. source, EventTarget the target of the event. Can be null. target, final EventType<RotateEvent> The type of the event. eventType, double The x with respect to the scene. x, double The y with respect to the scene. y, double The x coordinate relative to screen. screenX, double The y coordinate relative to screen. screenY, boolean true if shift modifier was pressed. shiftDown, boolean true if control modifier was pressed. controlDown, boolean true if alt modifier was pressed. altDown, boolean true if meta modifier was pressed. metaDown, boolean true if the event was caused by direct input device. See direct, boolean isDirect()if represents inertia of an already finished gesture. inertia, double the rotational angle angle, double the cumulative rotational angle totalAngle, PickResult pick result. Can be null, in this case a 2D pick result
without any further values is constructed
based on the scene coordinates and the target pickResult)Constructs new RotateEvent event. |
| public | RotateEvent(final EventType<RotateEvent>
The type of the event. eventType, double The x with respect to the scene. x, double The y with respect to the scene. y, double The x coordinate relative to screen. screenX, double The y coordinate relative to screen. screenY, boolean true if shift modifier was pressed. shiftDown, boolean true if control modifier was pressed. controlDown, boolean true if alt modifier was pressed. altDown, boolean true if meta modifier was pressed. metaDown, boolean true if the event was caused by direct input device. See direct, boolean isDirect()if represents inertia of an already finished gesture. inertia, double the rotational angle angle, double the cumulative rotational angle totalAngle, PickResult pick result. Can be null, in this case a 2D pick result
without any further values is constructed
based on the scene coordinates pickResult)Constructs new RotateEvent event with null source and target |
| Modifier and Type | Method and Description |
|---|---|
| public RotateEvent | copyFor(Object
the new source of the copied event newSource, EventTarget the new target of the copied event newTarget)Overrides javafx. Creates and returns a copy of this event with the specified event source and target. |
| public RotateEvent | Returns: the event copy with the fields substitutedthe new source of the copied event newSource, EventTarget the new target of the copied event newTarget, EventType<RotateEvent> the new eventType type)Creates a copy of the given event with the given fields substituted. |
| public double | |
| public EventType | getEventType()
Overrides javafx. Gets the event type of this event. |
| public double | Returns: The cumulative rotation angle of this gestureGets the cumulative rotation angle of this gesture. |
| public String | Returns: a string representation of thisRotateEvent object.Overrides javafx. Returns a string representation of this |
| angle | back to summary |
|---|---|
private final double angle
| |
| ANY | back to summary |
|---|---|
| public static final EventType<RotateEvent> ANY Hides javafx. Common supertype for all rotate event types. | |
| ROTATE | back to summary |
|---|---|
| public static final EventType<RotateEvent> ROTATE This event occurs when user performs a rotating gesture such as dragging two fingers around each other. | |
| ROTATION_FINISHED | back to summary |
|---|---|
| public static final EventType<RotateEvent> ROTATION_FINISHED This event occurs when a rotating gesture ends. | |
| ROTATION_STARTED | back to summary |
|---|---|
| public static final EventType<RotateEvent> ROTATION_STARTED This event occurs when a rotating gesture is detected. | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| totalAngle | back to summary |
|---|---|
private final double totalAngle
| |
| RotateEvent | back to summary |
|---|---|
| public RotateEvent(Object source, EventTarget target, final EventType<RotateEvent> eventType, double x, double y, double screenX, double screenY, boolean shiftDown, boolean controlDown, boolean altDown, boolean metaDown, boolean direct, boolean inertia, double angle, double totalAngle, PickResult pickResult) Constructs new RotateEvent event.
| |
| RotateEvent | back to summary |
|---|---|
| public RotateEvent(final EventType<RotateEvent> eventType, double x, double y, double screenX, double screenY, boolean shiftDown, boolean controlDown, boolean altDown, boolean metaDown, boolean direct, boolean inertia, double angle, double totalAngle, PickResult pickResult) Constructs new RotateEvent event with null source and target
| |
| copyFor | back to summary |
|---|---|
| public RotateEvent copyFor(Object newSource, EventTarget newTarget) Overrides javafx. Doc from javafx. Creates and returns a copy of this event with the specified event source
and target. If the source or target is set to
| |
| copyFor | back to summary |
|---|---|
| public RotateEvent copyFor(Object newSource, EventTarget newTarget, EventType<RotateEvent> type) Creates a copy of the given event with the given fields substituted.
| |
| getAngle | back to summary |
|---|---|
| public double getAngle() Gets the rotation angle of this event.
The angle is in degrees and work well when added to the node's
| |
| getEventType | back to summary |
|---|---|
| public EventType Overrides javafx. Doc from javafx. Gets the event type of this event. Objects of the same
| |
| getTotalAngle | back to summary |
|---|---|
| public double getTotalAngle() Gets the cumulative rotation angle of this gesture.
The angle is in degrees and work well when added to the node's
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides javafx. Returns a string representation of this | |