public class ContextMenuEvent extends InputEvent
イベントの座標には、コンテキスト・メニューのデフォルトの位置が含まれます。マウスでトリガーされるイベントの場合、それはマウス・カーソルの位置になり、キーボードでトリガーされるイベントの場合、現在のフォーカス所有者(イベントのターゲット)の境界内のポイントになります。
修飾子と型 | フィールドと説明 |
---|---|
static EventType<ContextMenuEvent> |
ANY
すべてのコンテキスト・メニュー・イベント・タイプに共通のスーパータイプ。
|
static EventType<ContextMenuEvent> |
CONTEXT_MENU_REQUESTED
このイベントは、コンテキスト・メニューが要求されたときに発生します。
|
consumed、eventType、NULL_SOURCE_TARGET、target
source
コンストラクタと説明 |
---|
ContextMenuEvent(EventType<ContextMenuEvent> eventType, double x, double y, double screenX, double screenY, boolean keyboardTrigger, PickResult pickResult)
空のソースおよびターゲットを使用した新しいContextMenuイベントを構築します。
|
ContextMenuEvent(Object source, EventTarget target, EventType<ContextMenuEvent> eventType, double x, double y, double screenX, double screenY, boolean keyboardTrigger, PickResult pickResult)
新しいContextMenuイベントを構築します。
|
修飾子と型 | メソッドと説明 |
---|---|
ContextMenuEvent |
copyFor(Object newSource, EventTarget newTarget)
指定したイベント・ソースとターゲットを持つこのイベントのコピーを作成して返します。
|
EventType<ContextMenuEvent> |
getEventType()
このイベントのイベント・タイプを取得します。
|
PickResult |
getPickResult()
選択内容に関する情報を返します。
|
double |
getSceneX()
ContextMenuEventのソースを含む
Scene の原点に対して相対的なイベントの水平位置を返します。 |
double |
getSceneY()
ContextMenuEventのソースを含む
Scene の原点に対して相対的なイベントの垂直位置を返します。 |
double |
getScreenX()
イベントの水平方向の絶対位置を返します。
|
double |
getScreenY()
イベントの垂直方向の絶対位置を返します。
|
double |
getX()
ContextMenuEventのソースの原点に対して相対的なイベントの水平位置。
|
double |
getY()
ContextMenuEventのソースの原点に対して相対的なイベントの垂直位置。
|
double |
getZ()
MouseEventのソースの原点に対して相対的なイベントの深度位置。
|
boolean |
isKeyboardTrigger()
このイベントがキーボードから開始されたかどうかを判別します。
|
String |
toString()
この
ContextMenuEvent オブジェクトの文字列表現を返します。 |
getSource
public static final EventType<ContextMenuEvent> CONTEXT_MENU_REQUESTED
public static final EventType<ContextMenuEvent> ANY
public ContextMenuEvent(Object source, EventTarget target, EventType<ContextMenuEvent> eventType, double x, double y, double screenX, double screenY, boolean keyboardTrigger, PickResult pickResult)
source
- イベントのソース。nullに設定できます。target
- イベントのターゲット。nullに設定できます。eventType
- イベントのタイプ。x
- シーンに関連するxy
- シーンに関連するyscreenX
- 画面に対して相対的なx座標。screenY
- 画面に対して相対的なy座標。keyboardTrigger
- このイベントがキーボードによってトリガーされた場合はtrue。pickResult
- 選択結果。nullに設定でき、その場合は、シーン座標とターゲットに基づいて、追加の値のない2D選択結果が構築されます。public ContextMenuEvent(EventType<ContextMenuEvent> eventType, double x, double y, double screenX, double screenY, boolean keyboardTrigger, PickResult pickResult)
eventType
- イベントのタイプ。x
- シーンに関連するx。y
- シーンに関連するy。screenX
- 画面に対して相対的なx座標。screenY
- 画面に対して相対的なy座標。keyboardTrigger
- このイベントがキーボードによってトリガーされた場合はtrue。pickResult
- 選択結果。nullに設定でき、その場合は、シーン座標に基づいて、追加の値のない2D選択結果が構築されます。public ContextMenuEvent copyFor(Object newSource, EventTarget newTarget)
Event
null
に設定されている場合は、NULL_SOURCE_TARGET
値によって置換されます。public EventType<ContextMenuEvent> getEventType()
Event
Event
クラスの複数のオブジェクトは、異なるイベント・タイプを持つことができます。これらのイベント・タイプでは、発生するイベントの種類をさらに指定します。getEventType
、クラス: InputEvent
public boolean isKeyboardTrigger()
public final double getX()
ContextMenuEvent
の概要を参照してください。public final double getY()
ContextMenuEvent
の概要を参照してください。public final double getZ()
public final double getScreenX()
ContextMenuEvent
の概要を参照してください。public final double getScreenY()
ContextMenuEvent
の概要を参照してください。public final double getSceneX()
Scene
の原点に対して相対的なイベントの水平位置を返します。ノードがScene
にない場合は、値はContextMenuEventのノードの最上位のルート親のboundsInParentに対して相対的になります。このイベントの座標セマンティクスの詳細は、ContextMenuEvent
の概要を参照してください。3Dシーンでは、これは投影変換の適用後にフラットな座標を表します。Scene
の原点に対して相対的なイベントの水平位置public final double getSceneY()
Scene
の原点に対して相対的なイベントの垂直位置を返します。ノードがScene
にない場合は、値はContextMenuEventのノードの最上位のルート親のboundsInParentに対して相対的になります。このイベントの座標セマンティクスの詳細は、ContextMenuEvent
の概要を参照してください。3Dシーンでは、これは投影変換の適用後にフラットな座標を表します。Scene
の原点に対して相対的なイベントの垂直位置public final PickResult getPickResult()
public String toString()
ContextMenuEvent
オブジェクトの文字列表現を返します。toString
、クラス: EventObject
ContextMenuEvent
オブジェクトの文字列表現Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.