Spec-Zone .ru
спецификации, руководства, описания, API
|
public class SwipeEvent extends GestureEvent
Unlike some other gestures, the swipe gesture is not continual - the whole gesture produces only one event. The event is delivered to the top-most node picked on the gesture coordinates.
The swipe gesture has four types according to the movement direction.
The gesture can be performed by any number of touch points, the number
is provided by getTouchCount()
method.
Note that swipe and scroll gestures are not exclusive. A single touch screen action can result in both gestures being delivered.
Note that the capability to produce swipes is dependent on the used input devices and underlying platform's capabilities and settings (especially without touch-screen user's possibilities of producing swipes are significantly reduced).
As all gestures, swipe can be direct (performed directly at the concrete coordinates as on touch screen - the center of the gesture is used as gesture coordinates) or indirect (performed indirectly as on track pad - the mouse cursor location is usually used as the gesture coordinates in this case).
Modifier and Type | Field and Description |
---|---|
static EventType<SwipeEvent> |
ANY
Common supertype for all swipe event types.
|
static EventType<SwipeEvent> |
SWIPE_DOWN
This event occurs when user performs downward swipe gesture.
|
static EventType<SwipeEvent> |
SWIPE_LEFT
This event occurs when user performs leftward swipe gesture.
|
static EventType<SwipeEvent> |
SWIPE_RIGHT
This event occurs when user performs rightward swipe gesture.
|
static EventType<SwipeEvent> |
SWIPE_UP
This event occurs when user performs upward swipe gesture.
|
consumed, eventType, NULL_SOURCE_TARGET, target
Modifier and Type | Method and Description |
---|---|
int |
getTouchCount()
Gets number of touch points that caused this event.
|
java.lang.String |
toString()
Returns a string representation of this
SwipeEvent 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<SwipeEvent> ANY
public static final EventType<SwipeEvent> SWIPE_LEFT
public static final EventType<SwipeEvent> SWIPE_RIGHT
public static final EventType<SwipeEvent> SWIPE_UP
public static final EventType<SwipeEvent> SWIPE_DOWN
public int getTouchCount()
public java.lang.String toString()
SwipeEvent
object.toString
in class GestureEvent
SwipeEvent
object.Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. Use is subject to