Spec-Zone .ru
спецификации, руководства, описания, API
|
public class ZoomEvent 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: zoomFactor
is the zooming amount
of this event, totalZoomFactor
is the zooming amount of the whole
gesture. The values work well when multiplied with the node's scale
properties (values greater than 1
for zooming in).
As all gestures, zooming 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 ZOOM
events are surounded by ZOOM_STARTED
and ZOOM_FINISHED
events. If zooming inertia is active on the
given platform, some ZOOM
events with isInertia()
returning
true
can come after ZOOM_FINISHED
.
Modifier and Type | Field and Description |
---|---|
static EventType<ZoomEvent> |
ANY
Common supertype for all zoom event types.
|
static EventType<ZoomEvent> |
ZOOM
This event occurs when user performs a zooming gesture such as
dragging two fingers apart.
|
static EventType<ZoomEvent> |
ZOOM_FINISHED
This event occurs when a zooming gesture ends.
|
static EventType<ZoomEvent> |
ZOOM_STARTED
This event occurs when a zooming gesture is detected.
|
consumed, eventType, NULL_SOURCE_TARGET, target
Modifier and Type | Method and Description |
---|---|
double |
getTotalZoomFactor()
Gets the zooming amount of this gesture.
|
double |
getZoomFactor()
Gets the zooming amount of this event.
|
java.lang.String |
toString()
Returns a string representation of this
ZoomEvent 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<ZoomEvent> ZOOM
public static final EventType<ZoomEvent> ZOOM_STARTED
public double getZoomFactor()
scale
properties (values greater
than 1
for zooming in, values between 0
and 1
for zooming out).public double getTotalZoomFactor()
scale
properties (values greater
than 1
for zooming in, values between 0
and 1
for zooming out).public java.lang.String toString()
ZoomEvent
object.toString
in class GestureEvent
ZoomEvent
object.Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. Use is subject to