Spec-Zone .ru
спецификации, руководства, описания, API
|
public class RotateEvent extends GestureEvent
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
.
Modifier and Type | Field and Description |
---|---|
static EventType<RotateEvent> |
ANY
Common supertype for all rotate event types.
|
static EventType<RotateEvent> |
ROTATE
This event occurs when user performs a rotating gesture such as
dragging two fingers around each other.
|
static EventType<RotateEvent> |
ROTATION_FINISHED
This event occurs when a rotating gesture ends.
|
static EventType<RotateEvent> |
ROTATION_STARTED
This event occurs when a rotating gesture is detected.
|
consumed, eventType, NULL_SOURCE_TARGET, target
Modifier and Type | Method and Description |
---|---|
double |
getAngle()
Gets the rotation angle of this event.
|
double |
getTotalAngle()
Gets the cumulative rotation angle of this gesture.
|
java.lang.String |
toString()
Returns a string representation of this
RotateEvent object. |
copyFor, getSceneX, getSceneY, getScreenX, getScreenY, getX, getY, isAltDown, isControlDown, isDirect, isInertia, isMetaDown, isShiftDown, isShortcutDown
clone, consume, fireEvent, getEventType, getTarget, isConsumed
public static final EventType<RotateEvent> ANY
public static final EventType<RotateEvent> ROTATE
public static final EventType<RotateEvent> ROTATION_STARTED
public static final EventType<RotateEvent> ROTATION_FINISHED
public double getAngle()
rotate
property value (positive values for clockwise rotation).public double getTotalAngle()
rotate
property value (positive values for clockwise rotation).public java.lang.String toString()
RotateEvent
object.toString
in class GestureEvent
RotateEvent
object.Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. Use is subject to