Spec-Zone .ru
спецификации, руководства, описания, API
|
public class ContextMenuEvent extends InputEvent
The event coordinates contain default position for the context menu. For mouse-triggered events it is the position of the mouse cursor, for keyboard-triggered events it is a point inside of bounds of current focus owner (which is the event's target).
Modifier and Type | Field and Description |
---|---|
static EventType<ContextMenuEvent> |
CONTEXT_MENU_REQUESTED
This event occurs when a context menu is requested.
|
ANY
consumed, eventType, NULL_SOURCE_TARGET, target
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()
Returns horizontal position of the event relative to the
origin of the
Scene that contains the ContextMenuEvent's source. |
double |
getSceneY()
Returns vertical position of the event relative to the
origin of the
Scene that contains the ContextMenuEvent's source. |
double |
getScreenX()
Returns absolute horizontal position of the event.
|
double |
getScreenY()
Returns absolute vertical position of the event.
|
double |
getX()
Horizontal position of the event relative to the
origin of the ContextMenuEvent's source.
|
double |
getY()
Vertical position of the event relative to the
origin of the ContextMenuEvent's source.
|
boolean |
isKeyboardTrigger()
Determines whether this event originated from the keyboard.
|
java.lang.String |
toString()
Returns a string representation of this
ContextMenuEvent object. |
clone, consume, fireEvent, getEventType, getTarget, isConsumed
public static final EventType<ContextMenuEvent> CONTEXT_MENU_REQUESTED
public Event copyFor(java.lang.Object newSource, EventTarget newTarget)
Event
null
, it is
replaced by the NULL_SOURCE_TARGET
value.public boolean isKeyboardTrigger()
public final double getX()
ContextMenuEvent
.public final double getY()
ContextMenuEvent
.public final double getScreenX()
ContextMenuEvent
.public final double getScreenY()
ContextMenuEvent
.public final double getSceneX()
Scene
that contains the ContextMenuEvent'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 ContextMenuEvent's node.
For more information about this event's coordinate semantics please see
the general description of ContextMenuEvent
.Scene
that contains the ContextMenuEvent's sourcepublic final double getSceneY()
Scene
that contains the ContextMenuEvent'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 ContextMenuEvent's node.
For more information about this event's coordinate semantics please see
the general description of ContextMenuEvent
.Scene
that contains the ContextMenuEvent's sourcepublic java.lang.String toString()
ContextMenuEvent
object.toString
in class java.util.EventObject
ContextMenuEvent
object.Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. Use is subject to