Class ZoomEvent

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

public final class ZoomEvent extends GestureEvent
Zoom event indicates that user performed zooming gesture such as dragging two fingers apart 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: 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.

Since:
JavaFX 2.2
See Also: