Spec-Zone .ru
спецификации, руководства, описания, API
|
public class GestureEvent extends InputEvent
Delivery of gestures is dependent on the capabilities of the underlying platform and connected input devices. For instance on a PC with mouse and keyboard there is no way of producing a rotating gesture.
Modifier and Type | Field and Description |
---|---|
static EventType<GestureEvent> |
ANY
Common supertype for all gestures.
|
consumed, eventType, NULL_SOURCE_TARGET, target
Modifier | Constructor and Description |
---|---|
protected |
GestureEvent(EventType<? extends GestureEvent> eventType)
Creates a new instance of
GestureEvent . |
protected |
GestureEvent(java.lang.Object source,
EventTarget target,
EventType<? extends GestureEvent> eventType)
Creates a new instance of
GestureEvent . |
Modifier and Type | Method and Description |
---|---|
Event |
copyFor(java.lang.Object newSource,
EventTarget newTarget)
Creates and returns a copy of this event with the specified event source
and target.
|
double |
getSceneX()
Gets the horizontal position of the event relative to the
origin of the
Scene that contains the event's source. |
double |
getSceneY()
Gets the vertical position of the event relative to the
origin of the
Scene that contains the event's source. |
double |
getScreenX()
Gets the absolute horizontal position of the event.
|
double |
getScreenY()
Gets the absolute vertical position of the event.
|
double |
getX()
Gets the horizontal position of the event relative to the
origin of the event's source.
|
double |
getY()
Gets the vertical position of the event relative to the
origin of the event's source.
|
boolean |
isAltDown()
Indicates whether or not the Alt modifier is down on this event.
|
boolean |
isControlDown()
Indicates whether or not the Control modifier is down on this event.
|
boolean |
isDirect()
Indicates whether this gesture is caused by a direct or indirect input
device.
|
boolean |
isInertia()
Indicates if this event represents an inertia of an already finished
gesture.
|
boolean |
isMetaDown()
Indicates whether or not the Meta modifier is down on this event.
|
boolean |
isShiftDown()
Indicates whether or not the Shift modifier is down on this event.
|
boolean |
isShortcutDown()
Indicates whether or not the host platform common shortcut modifier is
down on this event.
|
java.lang.String |
toString()
Returns a string representation of this
GestureEvent object. |
clone, consume, fireEvent, getEventType, getTarget, isConsumed
public static final EventType<GestureEvent> ANY
protected GestureEvent(EventType<? extends GestureEvent> eventType)
GestureEvent
.eventType
- Type of the eventprotected GestureEvent(java.lang.Object source, EventTarget target, EventType<? extends GestureEvent> eventType)
GestureEvent
.source
- Event sourcetarget
- Event targeteventType
- Type of the eventpublic Event copyFor(java.lang.Object newSource, EventTarget newTarget)
Event
null
, it is
replaced by the NULL_SOURCE_TARGET
value.public final double getX()
isDirect()
public final double getY()
isDirect()
public final double getScreenX()
isDirect()
public final double getScreenY()
isDirect()
public final double getSceneX()
Scene
that contains the event's source.
If the node is not in a Scene
, then the value is relative to
the boundsInParent of the root-most parent of the event's node.Scene
that contains the event's sourceisDirect()
public final double getSceneY()
Scene
that contains the event's source.
If the node is not in a Scene
, then the value is relative to
the boundsInParent of the root-most parent of the event's node.Scene
that contains the event's sourceisDirect()
public final boolean isShiftDown()
public final boolean isControlDown()
public final boolean isAltDown()
public final boolean isMetaDown()
public final boolean isDirect()
public boolean isInertia()
public final boolean isShortcutDown()
control
on Windows and meta
(command key) on Mac.true
if the shortcut modifier is down, false
otherwisepublic java.lang.String toString()
GestureEvent
object.toString
in class java.util.EventObject
GestureEvent
object.Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. Use is subject to