@DefaultProperty(value="root") public class Scene extends Object implements EventTarget
Scene
クラスは、シーン・グラフのすべての内容のコンテナです。シーンの背景は、fill
プロパティの指定に従って塗りつぶされます。
アプリケーションでは、root
プロパティを設定することによって、シーングラフのルートNode
を指定する必要があります。Group
がルートとして使用されている場合、シーングラフのコンテンツは、シーンの幅および高さでクリップされ、シーンのサイズの変更(ユーザーがステージのサイズを変更した場合)によりシーングラフのレイアウトは変更されません。サイズ変更可能ノード(レイアウトRegion
またはControl
)がルートとして設定されている場合、ルートのサイズはシーンのサイズに追随し、必要に応じてコンテンツの再レイアウトが行われます。
シーンのサイズは、アプリケーションによって構築中に初期化できます。サイズが指定されていない場合、シーンはコンテンツの優先サイズに基づき、自動的にその初期サイズを計算します。1つの寸法のみが指定されている場合、他方の寸法は、ルートのコンテンツ・バイアスについて指定された寸法を使用して計算されます。
アプリケーションは、Scene
の作成時に深度バッファのサポートまたはシーン・アンチエイリアスのサポートをリクエストすることがあります。3D変換のない2D形状のみが含まれるシーンは、深度バッファのサポートもシーン・アンチエイリアスのサポートも必要ありません。3D図形や、3D変換のある2D形状が含まれるシーンは、適切な深度でソートしてレンダリングするために深度バッファのサポートが必要になることがあります。深度ファイティング(Zファイティングとも呼ばれる)を回避するには、3D変換のない2D形状に対して深度テストを無効にします。詳細は、「depthTest
」を参照してください。3D形状を含むシーンは、シーンのアンチエイリアスを有効にすると、そのレンダリングの質を向上させることができます。
depthBufferフラグとantiAliasingフラグは条件付き機能です。それぞれのデフォルト値は、falseおよびSceneAntialiasing.DISABLED
です。詳細は、ConditionalFeature.SCENE3D
を参照してください。
デフォルトのヘッドライトが、1つ以上のShape3D
ノードが含まれるシーンに追加されますが、光ノードは追加されません。この光源は、Color.WHITE
PointLight
で、カメラの位置に配置されます。
Sceneオブジェクトは、JavaFXアプリケーション・スレッドで構築および変更される必要があります。
例:
import javafx.scene.*; import javafx.scene.paint.*; import javafx.scene.shape.*; Group root = new Group(); Scene s = new Scene(root, 300, 300, Color.BLACK); Rectangle r = new Rectangle(25,25,250,250); r.setFill(Color.BLUE); root.getChildren().add(r);
Type | プロパティと説明 |
---|---|
ObjectProperty<Camera> |
camera
この
Scene をレンダリングするために使用するカメラのタイプを指定します。 |
ObjectProperty<Cursor> |
cursor
この
Scene のマウス・カーソルを定義します。 |
ReadOnlyObjectProperty<NodeOrientation> |
effectiveNodeOrientation
シーンのノードの有効な向きは、ノードの向きの継承を解決して、左から右または右から左を返します。
|
ObjectProperty<EventDispatcher> |
eventDispatcher
このシーンのイベント・ディスパッチャを指定します。
|
ObjectProperty<Paint> |
fill
この
Scene の背景の塗りつぶしを定義します。 |
ReadOnlyObjectProperty<Node> |
focusOwner
シーンの現在のフォーカス所有者ノード。
|
ReadOnlyDoubleProperty |
height
この
Scene の高さ |
ObjectProperty<NodeOrientation> |
nodeOrientation
NodeOrientationを保持するプロパティ。
|
ObjectProperty<EventHandler<? super ContextMenuEvent>> |
onContextMenuRequested
この
Scene でマウス・ボタンがクリックされた(押されて放された)ときに呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super MouseEvent>> |
onDragDetected
ドラッグ・ジェスチャが検出されたときに呼び出される関数を定義します。
|
ObjectProperty<EventHandler<? super DragEvent>> |
onDragDone
データがドロップ・ターゲットにドロップされた後に、この@{code Scene}がドラッグ・アンド・ドロップ・ジェスチャのソースである場合に呼び出される関数を定義します。
|
ObjectProperty<EventHandler<? super DragEvent>> |
onDragDropped
ドラッグ・アンド・ドロップ・ジェスチャの間にこの
Scene でマウス・ボタンが放されると呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super DragEvent>> |
onDragEntered
ドラッグ・ジェスチャがこの
Scene に入ると呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super DragEvent>> |
onDragExited
ドラッグ・ジェスチャがこの
Scene から出ると呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super DragEvent>> |
onDragOver
この
Scene 内でドラッグ・ジェスチャが進行しているときに呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super InputMethodEvent>> |
onInputMethodTextChanged
この
Node に入力フォーカスがあり、入力メソッドのテキストが変更されたときに呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super KeyEvent>> |
onKeyPressed
この
Scene のNode に入力フォーカスがあり、キーが入力されたときに呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super KeyEvent>> |
onKeyReleased
この
Scene のNode に入力フォーカスがあり、キーが放されたときに呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super KeyEvent>> |
onKeyTyped
この
Scene のNode に入力フォーカスがあり、キーが入力されたときに呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super MouseEvent>> |
onMouseClicked
この
Scene でマウス・ボタンがクリックされた(押されて放された)ときに呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super MouseDragEvent>> |
onMouseDragEntered
押下、ドラッグ、解放のジェスチャがすべてこの
Scene に入ると呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super MouseDragEvent>> |
onMouseDragExited
押下、ドラッグ、解放のジェスチャがすべてこの
Scene から出ると呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super MouseEvent>> |
onMouseDragged
この
Scene でマウス・ボタンが押されてからドラッグされるときに呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super MouseDragEvent>> |
onMouseDragOver
押下、ドラッグ、解放のジェスチャがすべてこの
Scene 内で進行しているときに呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super MouseDragEvent>> |
onMouseDragReleased
押下、ドラッグ、解放のジェスチャがすべてこの
Scene 内で(マウス・ボタンを放すことにより)終了すると呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super MouseEvent>> |
onMouseEntered
マウスがこの
Scene に入るときに呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super MouseEvent>> |
onMouseExited
マウスがこの
Scene から出るときに呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super MouseEvent>> |
onMouseMoved
この
Scene 内をマウス・カーソルが移動するが、ボタンが押されなかった場合に呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super MouseEvent>> |
onMousePressed
この
Scene でマウス・ボタンが押されたときに呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super MouseEvent>> |
onMouseReleased
この
Scene でマウス・ボタンが放されたときに呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super RotateEvent>> |
onRotate
回転アクションをユーザーが実行すると呼び出される関数を定義します。
|
ObjectProperty<EventHandler<? super RotateEvent>> |
onRotationFinished
回転ジェスチャが終了すると呼び出される関数を定義します。
|
ObjectProperty<EventHandler<? super RotateEvent>> |
onRotationStarted
回転ジェスチャが検出されると呼び出される関数を定義します。
|
ObjectProperty<EventHandler<? super ScrollEvent>> |
onScrollFinished
スクロール・ジェスチャが終了すると呼び出される関数を定義します。
|
ObjectProperty<EventHandler<? super ScrollEvent>> |
onScroll
スクロール・アクションをユーザーが実行すると呼び出される関数を定義します。
|
ObjectProperty<EventHandler<? super ScrollEvent>> |
onScrollStarted
スクロール・ジェスチャが検出されると呼び出される関数を定義します。
|
ObjectProperty<EventHandler<? super SwipeEvent>> |
onSwipeDown
このシーンを中心にした下向きのスワイプ・ジェスチャが発生すると呼び出される関数を定義します。
|
ObjectProperty<EventHandler<? super SwipeEvent>> |
onSwipeLeft
このシーンを中心にした左向きのスワイプ・ジェスチャが発生すると呼び出される関数を定義します。
|
ObjectProperty<EventHandler<? super SwipeEvent>> |
onSwipeRight
このシーンを中心にした右向きのスワイプ・ジェスチャが発生すると呼び出される関数を定義します。
|
ObjectProperty<EventHandler<? super SwipeEvent>> |
onSwipeUp
このシーンを中心にした上向きのスワイプ・ジェスチャが発生すると呼び出される関数を定義します。
|
ObjectProperty<EventHandler<? super TouchEvent>> |
onTouchMoved
タッチ・ポイントが移動すると呼び出される関数を定義します。
|
ObjectProperty<EventHandler<? super TouchEvent>> |
onTouchPressed
新しいタッチ・ポイントが押されると呼び出される関数を定義します。
|
ObjectProperty<EventHandler<? super TouchEvent>> |
onTouchReleased
新しいタッチ・ポイントが押されると呼び出される関数を定義します。
|
ObjectProperty<EventHandler<? super TouchEvent>> |
onTouchStationary
タッチ・ポイントが押されたまま静止しているときに呼び出される関数を定義します。
|
ObjectProperty<EventHandler<? super ZoomEvent>> |
onZoomFinished
ズーム・ジェスチャが終了すると呼び出される関数を定義します。
|
ObjectProperty<EventHandler<? super ZoomEvent>> |
onZoom
ズーム・アクションをユーザーが実行すると呼び出される関数を定義します。
|
ObjectProperty<EventHandler<? super ZoomEvent>> |
onZoomStarted
ズーム・ジェスチャが検出されると呼び出される関数を定義します。
|
ObjectProperty<Parent> |
root
シーン・グラフのルート
Node を定義します。 |
ObjectProperty<String> |
userAgentStylesheet |
ReadOnlyDoubleProperty |
width
この
Scene の幅 |
ReadOnlyObjectProperty<Window> |
window
この
Scene のWindow |
ReadOnlyDoubleProperty |
x
Window のこのScene の水平位置。 |
ReadOnlyDoubleProperty |
y
Window のこのScene の垂直位置。 |
コンストラクタと説明 |
---|
Scene(Parent root)
特定のルート・ノードのシーンを作成します。
|
Scene(Parent root, double width, double height)
指定されたサイズを使用した特定のルート・ノードのシーンを作成します。
|
Scene(Parent root, double width, double height, boolean depthBuffer)
幅と高さの寸法を使用したルートで構成されるシーンを構築し、奥行きのバッファをこのシーンに作成するかどうかを指定します。
|
Scene(Parent root, double width, double height, boolean depthBuffer, SceneAntialiasing antiAliasing)
幅と高さの寸法を使用したルートで構成されるシーンを構築し、奥行きのバッファをこのシーンに作成するかどうかを指定し、シーンのアンチエイリアスをリクエストするかどうかを指定します。
|
Scene(Parent root, double width, double height, Paint fill)
指定されたサイズおよび塗りつぶしの特定のルート・ノードのシーンを作成します。
|
Scene(Parent root, Paint fill)
塗りつぶしを使用した特定のルート・ノードのシーンを作成します。
|
修飾子と型 | メソッドと説明 |
---|---|
<T extends Event> |
addEventFilter(EventType<T> eventType, EventHandler<? super T> eventFilter)
このシーンにイベント・フィルタを登録します。
|
<T extends Event> |
addEventHandler(EventType<T> eventType, EventHandler<? super T> eventHandler)
このシーンにイベント・ハンドラを登録します。
|
void |
addMnemonic(Mnemonic m)
指定されたニーモニックを登録します。
|
EventDispatchChain |
buildEventDispatchChain(EventDispatchChain tail)
このシーンのイベント・ディスパッチ・チェーンを構築します。
|
ObjectProperty<Camera> |
cameraProperty()
この
Scene をレンダリングするために使用するカメラのタイプを指定します。 |
ObjectProperty<Cursor> |
cursorProperty()
この
Scene のマウス・カーソルを定義します。 |
ReadOnlyObjectProperty<NodeOrientation> |
effectiveNodeOrientationProperty()
シーンのノードの有効な向きは、ノードの向きの継承を解決して、左から右または右から左を返します。
|
ObjectProperty<EventDispatcher> |
eventDispatcherProperty()
このシーンのイベント・ディスパッチャを指定します。
|
ObjectProperty<Paint> |
fillProperty()
この
Scene の背景の塗りつぶしを定義します。 |
ReadOnlyObjectProperty<Node> |
focusOwnerProperty()
シーンの現在のフォーカス所有者ノード。
|
ObservableMap<KeyCombination,Runnable> |
getAccelerators()
この
Scene のアクセラレータのリストを取得します。 |
SceneAntialiasing |
getAntiAliasing()
この
Scene の定義済SceneAntialiasing を戻します。 |
Camera |
getCamera()
プロパティcameraの値を取得します。
|
Cursor |
getCursor()
プロパティcursorの値を取得します。
|
NodeOrientation |
getEffectiveNodeOrientation()
プロパティeffectiveNodeOrientationの値を取得します。
|
EventDispatcher |
getEventDispatcher()
プロパティeventDispatcherの値を取得します。
|
Paint |
getFill()
プロパティfillの値を取得します。
|
Node |
getFocusOwner()
プロパティfocusOwnerの値を取得します。
|
double |
getHeight()
プロパティheightの値を取得します。
|
ObservableMap<KeyCombination,ObservableList<Mnemonic>> |
getMnemonics()
この
Scene のニーモニックのリストを取得します。 |
NodeOrientation |
getNodeOrientation()
プロパティnodeOrientationの値を取得します。
|
EventHandler<? super ContextMenuEvent> |
getOnContextMenuRequested()
プロパティonContextMenuRequestedの値を取得します。
|
EventHandler<? super MouseEvent> |
getOnDragDetected()
プロパティonDragDetectedの値を取得します。
|
EventHandler<? super DragEvent> |
getOnDragDone()
プロパティonDragDoneの値を取得します。
|
EventHandler<? super DragEvent> |
getOnDragDropped()
プロパティonDragDroppedの値を取得します。
|
EventHandler<? super DragEvent> |
getOnDragEntered()
プロパティonDragEnteredの値を取得します。
|
EventHandler<? super DragEvent> |
getOnDragExited()
プロパティonDragExitedの値を取得します。
|
EventHandler<? super DragEvent> |
getOnDragOver()
プロパティonDragOverの値を取得します。
|
EventHandler<? super InputMethodEvent> |
getOnInputMethodTextChanged()
プロパティonInputMethodTextChangedの値を取得します。
|
EventHandler<? super KeyEvent> |
getOnKeyPressed()
プロパティonKeyPressedの値を取得します。
|
EventHandler<? super KeyEvent> |
getOnKeyReleased()
プロパティonKeyReleasedの値を取得します。
|
EventHandler<? super KeyEvent> |
getOnKeyTyped()
プロパティonKeyTypedの値を取得します。
|
EventHandler<? super MouseEvent> |
getOnMouseClicked()
プロパティonMouseClickedの値を取得します。
|
EventHandler<? super MouseDragEvent> |
getOnMouseDragEntered()
プロパティonMouseDragEnteredの値を取得します。
|
EventHandler<? super MouseDragEvent> |
getOnMouseDragExited()
プロパティonMouseDragExitedの値を取得します。
|
EventHandler<? super MouseEvent> |
getOnMouseDragged()
プロパティonMouseDraggedの値を取得します。
|
EventHandler<? super MouseDragEvent> |
getOnMouseDragOver()
プロパティonMouseDragOverの値を取得します。
|
EventHandler<? super MouseDragEvent> |
getOnMouseDragReleased()
プロパティonMouseDragReleasedの値を取得します。
|
EventHandler<? super MouseEvent> |
getOnMouseEntered()
プロパティonMouseEnteredの値を取得します。
|
EventHandler<? super MouseEvent> |
getOnMouseExited()
プロパティonMouseExitedの値を取得します。
|
EventHandler<? super MouseEvent> |
getOnMouseMoved()
プロパティonMouseMovedの値を取得します。
|
EventHandler<? super MouseEvent> |
getOnMousePressed()
プロパティonMousePressedの値を取得します。
|
EventHandler<? super MouseEvent> |
getOnMouseReleased()
プロパティonMouseReleasedの値を取得します。
|
EventHandler<? super RotateEvent> |
getOnRotate()
プロパティonRotateの値を取得します。
|
EventHandler<? super RotateEvent> |
getOnRotationFinished()
プロパティonRotationFinishedの値を取得します。
|
EventHandler<? super RotateEvent> |
getOnRotationStarted()
プロパティonRotationStartedの値を取得します。
|
EventHandler<? super ScrollEvent> |
getOnScroll()
プロパティonScrollの値を取得します。
|
EventHandler<? super ScrollEvent> |
getOnScrollFinished()
プロパティonScrollFinishedの値を取得します。
|
EventHandler<? super ScrollEvent> |
getOnScrollStarted()
プロパティonScrollStartedの値を取得します。
|
EventHandler<? super SwipeEvent> |
getOnSwipeDown()
プロパティonSwipeDownの値を取得します。
|
EventHandler<? super SwipeEvent> |
getOnSwipeLeft()
プロパティonSwipeLeftの値を取得します。
|
EventHandler<? super SwipeEvent> |
getOnSwipeRight()
プロパティonSwipeRightの値を取得します。
|
EventHandler<? super SwipeEvent> |
getOnSwipeUp()
プロパティonSwipeUpの値を取得します。
|
EventHandler<? super TouchEvent> |
getOnTouchMoved()
プロパティonTouchMovedの値を取得します。
|
EventHandler<? super TouchEvent> |
getOnTouchPressed()
プロパティonTouchPressedの値を取得します。
|
EventHandler<? super TouchEvent> |
getOnTouchReleased()
プロパティonTouchReleasedの値を取得します。
|
EventHandler<? super TouchEvent> |
getOnTouchStationary()
プロパティonTouchStationaryの値を取得します。
|
EventHandler<? super ZoomEvent> |
getOnZoom()
プロパティonZoomの値を取得します。
|
EventHandler<? super ZoomEvent> |
getOnZoomFinished()
プロパティonZoomFinishedの値を取得します。
|
EventHandler<? super ZoomEvent> |
getOnZoomStarted()
プロパティonZoomStartedの値を取得します。
|
ObservableMap<Object,Object> |
getProperties()
アプリケーション開発者が主に使用するこのノードのプロパティの監視可能なマップを返します。
|
Parent |
getRoot()
プロパティrootの値を取得します。
|
ObservableList<String> |
getStylesheets()
このシーンのコンテンツで使用するスタイルシートにリンクしている文字列URLの監視可能リストを取得します。
|
String |
getUserAgentStylesheet()
このSceneで使用されるuser-agentスタイルシートのURLを取得します。
|
Object |
getUserData()
以前に設定したObjectプロパティを返すか、または
setUserData(java.lang.Object) メソッドを使用してこのようなプロパティを設定していない場合にはnullを返します。 |
double |
getWidth()
プロパティwidthの値を取得します。
|
Window |
getWindow()
プロパティwindowの値を取得します。
|
double |
getX()
プロパティxの値を取得します。
|
double |
getY()
プロパティyの値を取得します。
|
boolean |
hasProperties()
Sceneにプロパティがあるかどうかをテストします。
|
ReadOnlyDoubleProperty |
heightProperty()
この
Scene の高さ |
boolean |
isDepthBuffer()
このシーンの奥行きのバッファの属性を取得します。
|
Node |
lookup(String selector)
指定されたCSSセレクタに基づいて、シーングラフ内の任意のノードを検索します。
|
ObjectProperty<NodeOrientation> |
nodeOrientationProperty()
NodeOrientationを保持するプロパティ。
|
ObjectProperty<EventHandler<? super ContextMenuEvent>> |
onContextMenuRequestedProperty()
この
Scene でマウス・ボタンがクリックされた(押されて放された)ときに呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super MouseEvent>> |
onDragDetectedProperty()
ドラッグ・ジェスチャが検出されたときに呼び出される関数を定義します。
|
ObjectProperty<EventHandler<? super DragEvent>> |
onDragDoneProperty()
データがドロップ・ターゲットにドロップされた後に、この@{code Scene}がドラッグ・アンド・ドロップ・ジェスチャのソースである場合に呼び出される関数を定義します。
|
ObjectProperty<EventHandler<? super DragEvent>> |
onDragDroppedProperty()
ドラッグ・アンド・ドロップ・ジェスチャの間にこの
Scene でマウス・ボタンが放されると呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super DragEvent>> |
onDragEnteredProperty()
ドラッグ・ジェスチャがこの
Scene に入ると呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super DragEvent>> |
onDragExitedProperty()
ドラッグ・ジェスチャがこの
Scene から出ると呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super DragEvent>> |
onDragOverProperty()
この
Scene 内でドラッグ・ジェスチャが進行しているときに呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super InputMethodEvent>> |
onInputMethodTextChangedProperty()
この
Node に入力フォーカスがあり、入力メソッドのテキストが変更されたときに呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super KeyEvent>> |
onKeyPressedProperty()
この
Scene のNode に入力フォーカスがあり、キーが入力されたときに呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super KeyEvent>> |
onKeyReleasedProperty()
この
Scene のNode に入力フォーカスがあり、キーが放されたときに呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super KeyEvent>> |
onKeyTypedProperty()
この
Scene のNode に入力フォーカスがあり、キーが入力されたときに呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super MouseEvent>> |
onMouseClickedProperty()
この
Scene でマウス・ボタンがクリックされた(押されて放された)ときに呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super MouseDragEvent>> |
onMouseDragEnteredProperty()
押下、ドラッグ、解放のジェスチャがすべてこの
Scene に入ると呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super MouseDragEvent>> |
onMouseDragExitedProperty()
押下、ドラッグ、解放のジェスチャがすべてこの
Scene から出ると呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super MouseEvent>> |
onMouseDraggedProperty()
この
Scene でマウス・ボタンが押されてからドラッグされるときに呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super MouseDragEvent>> |
onMouseDragOverProperty()
押下、ドラッグ、解放のジェスチャがすべてこの
Scene 内で進行しているときに呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super MouseDragEvent>> |
onMouseDragReleasedProperty()
押下、ドラッグ、解放のジェスチャがすべてこの
Scene 内で(マウス・ボタンを放すことにより)終了すると呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super MouseEvent>> |
onMouseEnteredProperty()
マウスがこの
Scene に入るときに呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super MouseEvent>> |
onMouseExitedProperty()
マウスがこの
Scene から出るときに呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super MouseEvent>> |
onMouseMovedProperty()
この
Scene 内をマウス・カーソルが移動するが、ボタンが押されなかった場合に呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super MouseEvent>> |
onMousePressedProperty()
この
Scene でマウス・ボタンが押されたときに呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super MouseEvent>> |
onMouseReleasedProperty()
この
Scene でマウス・ボタンが放されたときに呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super RotateEvent>> |
onRotateProperty()
回転アクションをユーザーが実行すると呼び出される関数を定義します。
|
ObjectProperty<EventHandler<? super RotateEvent>> |
onRotationFinishedProperty()
回転ジェスチャが終了すると呼び出される関数を定義します。
|
ObjectProperty<EventHandler<? super RotateEvent>> |
onRotationStartedProperty()
回転ジェスチャが検出されると呼び出される関数を定義します。
|
ObjectProperty<EventHandler<? super ScrollEvent>> |
onScrollFinishedProperty()
スクロール・ジェスチャが終了すると呼び出される関数を定義します。
|
ObjectProperty<EventHandler<? super ScrollEvent>> |
onScrollProperty()
スクロール・アクションをユーザーが実行すると呼び出される関数を定義します。
|
ObjectProperty<EventHandler<? super ScrollEvent>> |
onScrollStartedProperty()
スクロール・ジェスチャが検出されると呼び出される関数を定義します。
|
ObjectProperty<EventHandler<? super SwipeEvent>> |
onSwipeDownProperty()
このシーンを中心にした下向きのスワイプ・ジェスチャが発生すると呼び出される関数を定義します。
|
ObjectProperty<EventHandler<? super SwipeEvent>> |
onSwipeLeftProperty()
このシーンを中心にした左向きのスワイプ・ジェスチャが発生すると呼び出される関数を定義します。
|
ObjectProperty<EventHandler<? super SwipeEvent>> |
onSwipeRightProperty()
このシーンを中心にした右向きのスワイプ・ジェスチャが発生すると呼び出される関数を定義します。
|
ObjectProperty<EventHandler<? super SwipeEvent>> |
onSwipeUpProperty()
このシーンを中心にした上向きのスワイプ・ジェスチャが発生すると呼び出される関数を定義します。
|
ObjectProperty<EventHandler<? super TouchEvent>> |
onTouchMovedProperty()
タッチ・ポイントが移動すると呼び出される関数を定義します。
|
ObjectProperty<EventHandler<? super TouchEvent>> |
onTouchPressedProperty()
新しいタッチ・ポイントが押されると呼び出される関数を定義します。
|
ObjectProperty<EventHandler<? super TouchEvent>> |
onTouchReleasedProperty()
新しいタッチ・ポイントが押されると呼び出される関数を定義します。
|
ObjectProperty<EventHandler<? super TouchEvent>> |
onTouchStationaryProperty()
タッチ・ポイントが押されたまま静止しているときに呼び出される関数を定義します。
|
ObjectProperty<EventHandler<? super ZoomEvent>> |
onZoomFinishedProperty()
ズーム・ジェスチャが終了すると呼び出される関数を定義します。
|
ObjectProperty<EventHandler<? super ZoomEvent>> |
onZoomProperty()
ズーム・アクションをユーザーが実行すると呼び出される関数を定義します。
|
ObjectProperty<EventHandler<? super ZoomEvent>> |
onZoomStartedProperty()
ズーム・ジェスチャが検出されると呼び出される関数を定義します。
|
<T extends Event> |
removeEventFilter(EventType<T> eventType, EventHandler<? super T> eventFilter)
以前に登録したイベント・フィルタをこのシーンから登録解除します。
|
<T extends Event> |
removeEventHandler(EventType<T> eventType, EventHandler<? super T> eventHandler)
以前に登録したイベント・ハンドラをこのシーンから登録解除します。
|
void |
removeMnemonic(Mnemonic m)
指定されたニーモニックを登録解除します。
|
ObjectProperty<Parent> |
rootProperty()
シーン・グラフのルート
Node を定義します。 |
void |
setCamera(Camera value)
プロパティcameraの値を設定します。
|
void |
setCursor(Cursor value)
プロパティcursorの値を設定します。
|
void |
setEventDispatcher(EventDispatcher value)
プロパティeventDispatcherの値を設定します。
|
protected <T extends Event> |
setEventHandler(EventType<T> eventType, EventHandler<? super T> eventHandler)
このイベント・タイプに使用するハンドラを設定します。
|
void |
setFill(Paint value)
プロパティfillの値を設定します。
|
void |
setNodeOrientation(NodeOrientation orientation)
プロパティnodeOrientationの値を設定します。
|
void |
setOnContextMenuRequested(EventHandler<? super ContextMenuEvent> value)
プロパティonContextMenuRequestedの値を設定します。
|
void |
setOnDragDetected(EventHandler<? super MouseEvent> value)
プロパティonDragDetectedの値を設定します。
|
void |
setOnDragDone(EventHandler<? super DragEvent> value)
プロパティonDragDoneの値を設定します。
|
void |
setOnDragDropped(EventHandler<? super DragEvent> value)
プロパティonDragDroppedの値を設定します。
|
void |
setOnDragEntered(EventHandler<? super DragEvent> value)
プロパティonDragEnteredの値を設定します。
|
void |
setOnDragExited(EventHandler<? super DragEvent> value)
プロパティonDragExitedの値を設定します。
|
void |
setOnDragOver(EventHandler<? super DragEvent> value)
プロパティonDragOverの値を設定します。
|
void |
setOnInputMethodTextChanged(EventHandler<? super InputMethodEvent> value)
プロパティonInputMethodTextChangedの値を設定します。
|
void |
setOnKeyPressed(EventHandler<? super KeyEvent> value)
プロパティonKeyPressedの値を設定します。
|
void |
setOnKeyReleased(EventHandler<? super KeyEvent> value)
プロパティonKeyReleasedの値を設定します。
|
void |
setOnKeyTyped(EventHandler<? super KeyEvent> value)
プロパティonKeyTypedの値を設定します。
|
void |
setOnMouseClicked(EventHandler<? super MouseEvent> value)
プロパティonMouseClickedの値を設定します。
|
void |
setOnMouseDragEntered(EventHandler<? super MouseDragEvent> value)
プロパティonMouseDragEnteredの値を設定します。
|
void |
setOnMouseDragExited(EventHandler<? super MouseDragEvent> value)
プロパティonMouseDragExitedの値を設定します。
|
void |
setOnMouseDragged(EventHandler<? super MouseEvent> value)
プロパティonMouseDraggedの値を設定します。
|
void |
setOnMouseDragOver(EventHandler<? super MouseDragEvent> value)
プロパティonMouseDragOverの値を設定します。
|
void |
setOnMouseDragReleased(EventHandler<? super MouseDragEvent> value)
プロパティonMouseDragReleasedの値を設定します。
|
void |
setOnMouseEntered(EventHandler<? super MouseEvent> value)
プロパティonMouseEnteredの値を設定します。
|
void |
setOnMouseExited(EventHandler<? super MouseEvent> value)
プロパティonMouseExitedの値を設定します。
|
void |
setOnMouseMoved(EventHandler<? super MouseEvent> value)
プロパティonMouseMovedの値を設定します。
|
void |
setOnMousePressed(EventHandler<? super MouseEvent> value)
プロパティonMousePressedの値を設定します。
|
void |
setOnMouseReleased(EventHandler<? super MouseEvent> value)
プロパティonMouseReleasedの値を設定します。
|
void |
setOnRotate(EventHandler<? super RotateEvent> value)
プロパティonRotateの値を設定します。
|
void |
setOnRotationFinished(EventHandler<? super RotateEvent> value)
プロパティonRotationFinishedの値を設定します。
|
void |
setOnRotationStarted(EventHandler<? super RotateEvent> value)
プロパティonRotationStartedの値を設定します。
|
void |
setOnScroll(EventHandler<? super ScrollEvent> value)
プロパティonScrollの値を設定します。
|
void |
setOnScrollFinished(EventHandler<? super ScrollEvent> value)
プロパティonScrollFinishedの値を設定します。
|
void |
setOnScrollStarted(EventHandler<? super ScrollEvent> value)
プロパティonScrollStartedの値を設定します。
|
void |
setOnSwipeDown(EventHandler<? super SwipeEvent> value)
プロパティonSwipeDownの値を設定します。
|
void |
setOnSwipeLeft(EventHandler<? super SwipeEvent> value)
プロパティonSwipeLeftの値を設定します。
|
void |
setOnSwipeRight(EventHandler<? super SwipeEvent> value)
プロパティonSwipeRightの値を設定します。
|
void |
setOnSwipeUp(EventHandler<? super SwipeEvent> value)
プロパティonSwipeUpの値を設定します。
|
void |
setOnTouchMoved(EventHandler<? super TouchEvent> value)
プロパティonTouchMovedの値を設定します。
|
void |
setOnTouchPressed(EventHandler<? super TouchEvent> value)
プロパティonTouchPressedの値を設定します。
|
void |
setOnTouchReleased(EventHandler<? super TouchEvent> value)
プロパティonTouchReleasedの値を設定します。
|
void |
setOnTouchStationary(EventHandler<? super TouchEvent> value)
プロパティonTouchStationaryの値を設定します。
|
void |
setOnZoom(EventHandler<? super ZoomEvent> value)
プロパティonZoomの値を設定します。
|
void |
setOnZoomFinished(EventHandler<? super ZoomEvent> value)
プロパティonZoomFinishedの値を設定します。
|
void |
setOnZoomStarted(EventHandler<? super ZoomEvent> value)
プロパティonZoomStartedの値を設定します。
|
void |
setRoot(Parent value)
プロパティrootの値を設定します。
|
void |
setUserAgentStylesheet(String url)
このSceneで使用されるuser-agentスタイルシートのURLを、プラットフォーム・デフォルトのuser-agentスタイルシートのかわりに設定します。
|
void |
setUserData(Object value)
後で取得できる単一のObjectプロパティを設定するためのコンビニエンス・メソッド。
|
void |
snapshot(Callback<SnapshotResult,Void> callback, WritableImage image)
次のフレームでこのシーンのスナップショットを取得し、イメージの準備が整ったとき、指定されたコールバック・メソッドを呼び出します。
|
WritableImage |
snapshot(WritableImage image)
このシーンのスナップショットを取得し、レンダリングされたイメージの準備が整ったときにそれを戻します。
|
Dragboard |
startDragAndDrop(TransferMode... transferModes)
この
Scene 上で認識されたドラッグ・アンド・ドロップ・ジェスチャの候補を確定します。 |
void |
startFullDrag()
ジェスチャ・ソースとして、このシーンで完全な押下、ドラッグ、解放ジェスチャを開始します。
|
ObjectProperty<String> |
userAgentStylesheetProperty() |
ReadOnlyDoubleProperty |
widthProperty()
この
Scene の幅 |
ReadOnlyObjectProperty<Window> |
windowProperty()
この
Scene のWindow |
ReadOnlyDoubleProperty |
xProperty()
Window のこのScene の水平位置。 |
ReadOnlyDoubleProperty |
yProperty()
Window のこのScene の垂直位置。 |
public final ReadOnlyObjectProperty<Window> windowProperty
Scene
のWindow
getWindow()
public final ReadOnlyDoubleProperty xProperty
Window
のこのScene
の水平位置。getX()
public final ReadOnlyDoubleProperty yProperty
Window
のこのScene
の垂直位置。getY()
public final ReadOnlyDoubleProperty widthProperty
Scene
の幅getWidth()
public final ReadOnlyDoubleProperty heightProperty
Scene
の高さgetHeight()
public final ObjectProperty<Camera> cameraProperty
Scene
をレンダリングするために使用するカメラのタイプを指定します。camera
がnullである場合、パラレル・カメラがレンダリングに使用されます。別のScene
またはSubScene
に属するカメラの設定は無効です。
注意: これは条件付き機能です。詳細は、ConditionalFeature.SCENE3D
を参照してください。
getCamera()
、setCamera(Camera)
public final ObjectProperty<Paint> fillProperty
Scene
の背景の塗りつぶしを定義します。null
値は、背景なしの描画および透明なPaint
の両方がサポートされていることを意味します。Sceneのデフォルトの塗りつぶしはColor.WHITE
ですが、通常はScene
のroot node
の背景塗りつぶしが引き伸ばされてScene
内のすべての使用可能領域を占有するため、この色がユーザーに最初に表示される方が一般的です。Scene
のルート・ノードにはCSSスタイル・クラス'root'が割り当てられ、JavaFXに付属のデフォルト・ユーザー・エージェント・スタイルシート(現在はCaspianおよびModena)はこのrootスタイル・クラスに対してスタイル設定を適用します。Caspianの場合、これはルート・ノードの背景塗りつぶし色に影響を与えませんが、Modenaの場合、デフォルトの塗りつぶしはライト・グレー色に設定されます。getFill()
、setFill(Paint)
public final ObjectProperty<Parent> rootProperty
Node
を定義します。Group
がルートとして使用されている場合、シーングラフのコンテンツは、シーンの幅および高さでクリップされ、シーンのサイズの変更(ユーザーがステージのサイズを変更した場合)によりシーングラフのレイアウトは変更されません。サイズ変更可能ノード(レイアウトRegion
またはControl
)がルートとして設定されている場合、ルートのサイズはシーンのサイズに追随し、必要に応じてコンテンツの再レイアウトが行われます。シーンはnullルートを受け入れません。getRoot()
、setRoot(Parent)
public final ObjectProperty<Cursor> cursorProperty
Scene
のマウス・カーソルを定義します。getCursor()
、setCursor(Cursor)
public final ObjectProperty<String> userAgentStylesheetProperty
getUserAgentStylesheet()
、setUserAgentStylesheet(String)
public final ReadOnlyObjectProperty<Node> focusOwnerProperty
getFocusOwner()
public final ObjectProperty<EventDispatcher> eventDispatcherProperty
EventDispatcher
に置換した場合、新しいディスパッチャは、置換されたディスパッチャにイベントを転送して、シーンのデフォルトのイベント処理動作を維持する必要があります。public final ObjectProperty<EventHandler<? super ContextMenuEvent>> onContextMenuRequestedProperty
Scene
でマウス・ボタンがクリックされた(押されて放された)ときに呼び出される関数を定義します。getOnContextMenuRequested()
、setOnContextMenuRequested(EventHandler)
public final ObjectProperty<EventHandler<? super MouseEvent>> onMouseClickedProperty
Scene
でマウス・ボタンがクリックされた(押されて放された)ときに呼び出される関数を定義します。public final ObjectProperty<EventHandler<? super MouseEvent>> onMouseDraggedProperty
Scene
でマウス・ボタンが押されてからドラッグされるときに呼び出される関数を定義します。public final ObjectProperty<EventHandler<? super MouseEvent>> onMouseEnteredProperty
Scene
に入るときに呼び出される関数を定義します。public final ObjectProperty<EventHandler<? super MouseEvent>> onMouseExitedProperty
Scene
から出るときに呼び出される関数を定義します。public final ObjectProperty<EventHandler<? super MouseEvent>> onMouseMovedProperty
Scene
内をマウス・カーソルが移動するが、ボタンが押されなかった場合に呼び出される関数を定義します。public final ObjectProperty<EventHandler<? super MouseEvent>> onMousePressedProperty
Scene
でマウス・ボタンが押されたときに呼び出される関数を定義します。public final ObjectProperty<EventHandler<? super MouseEvent>> onMouseReleasedProperty
Scene
でマウス・ボタンが放されたときに呼び出される関数を定義します。public final ObjectProperty<EventHandler<? super MouseEvent>> onDragDetectedProperty
public final ObjectProperty<EventHandler<? super MouseDragEvent>> onMouseDragOverProperty
Scene
内で進行しているときに呼び出される関数を定義します。getOnMouseDragOver()
、setOnMouseDragOver(EventHandler)
public final ObjectProperty<EventHandler<? super MouseDragEvent>> onMouseDragReleasedProperty
Scene
内で(マウス・ボタンを放すことにより)終了すると呼び出される関数を定義します。getOnMouseDragReleased()
、setOnMouseDragReleased(EventHandler)
public final ObjectProperty<EventHandler<? super MouseDragEvent>> onMouseDragEnteredProperty
Scene
に入ると呼び出される関数を定義します。getOnMouseDragEntered()
、setOnMouseDragEntered(EventHandler)
public final ObjectProperty<EventHandler<? super MouseDragEvent>> onMouseDragExitedProperty
Scene
から出ると呼び出される関数を定義します。getOnMouseDragExited()
、setOnMouseDragExited(EventHandler)
public final ObjectProperty<EventHandler<? super ScrollEvent>> onScrollStartedProperty
getOnScrollStarted()
、setOnScrollStarted(EventHandler)
public final ObjectProperty<EventHandler<? super ScrollEvent>> onScrollProperty
public final ObjectProperty<EventHandler<? super ScrollEvent>> onScrollFinishedProperty
getOnScrollFinished()
、setOnScrollFinished(EventHandler)
public final ObjectProperty<EventHandler<? super RotateEvent>> onRotationStartedProperty
getOnRotationStarted()
、setOnRotationStarted(EventHandler)
public final ObjectProperty<EventHandler<? super RotateEvent>> onRotateProperty
getOnRotate()
、setOnRotate(EventHandler)
public final ObjectProperty<EventHandler<? super RotateEvent>> onRotationFinishedProperty
getOnRotationFinished()
、setOnRotationFinished(EventHandler)
public final ObjectProperty<EventHandler<? super ZoomEvent>> onZoomStartedProperty
getOnZoomStarted()
、setOnZoomStarted(EventHandler)
public final ObjectProperty<EventHandler<? super ZoomEvent>> onZoomProperty
getOnZoom()
、setOnZoom(EventHandler)
public final ObjectProperty<EventHandler<? super ZoomEvent>> onZoomFinishedProperty
getOnZoomFinished()
、setOnZoomFinished(EventHandler)
public final ObjectProperty<EventHandler<? super SwipeEvent>> onSwipeUpProperty
getOnSwipeUp()
、setOnSwipeUp(EventHandler)
public final ObjectProperty<EventHandler<? super SwipeEvent>> onSwipeDownProperty
getOnSwipeDown()
、setOnSwipeDown(EventHandler)
public final ObjectProperty<EventHandler<? super SwipeEvent>> onSwipeLeftProperty
getOnSwipeLeft()
、setOnSwipeLeft(EventHandler)
public final ObjectProperty<EventHandler<? super SwipeEvent>> onSwipeRightProperty
getOnSwipeRight()
、setOnSwipeRight(EventHandler)
public final ObjectProperty<EventHandler<? super TouchEvent>> onTouchPressedProperty
getOnTouchPressed()
、setOnTouchPressed(EventHandler)
public final ObjectProperty<EventHandler<? super TouchEvent>> onTouchMovedProperty
getOnTouchMoved()
、setOnTouchMoved(EventHandler)
public final ObjectProperty<EventHandler<? super TouchEvent>> onTouchReleasedProperty
getOnTouchReleased()
、setOnTouchReleased(EventHandler)
public final ObjectProperty<EventHandler<? super TouchEvent>> onTouchStationaryProperty
getOnTouchStationary()
、setOnTouchStationary(EventHandler)
public final ObjectProperty<EventHandler<? super DragEvent>> onDragEnteredProperty
Scene
に入ると呼び出される関数を定義します。public final ObjectProperty<EventHandler<? super DragEvent>> onDragExitedProperty
Scene
から出ると呼び出される関数を定義します。public final ObjectProperty<EventHandler<? super DragEvent>> onDragOverProperty
Scene
内でドラッグ・ジェスチャが進行しているときに呼び出される関数を定義します。public final ObjectProperty<EventHandler<? super DragEvent>> onDragDroppedProperty
public final ObjectProperty<EventHandler<? super DragEvent>> onDragDoneProperty
transferMode
は、ドロップ・ターゲットで何が起きたかを示します。transferMode
の値がMOVE
である場合には、ソースがそのデータをクリアできます。ソースのデータをクリアすると、ドラッグ・アンド・ドロップ・ジェスチャによってデータが移動された適切な外観がユーザーに表示されます。値がNONE
のtransferMode
は、ドラッグ・アンド・ドロップ・ジェスチャでデータが転送されなかったことを示しています。public final ObjectProperty<EventHandler<? super KeyEvent>> onKeyPressedProperty
Scene
のNode
に入力フォーカスがあり、キーが入力されたときに呼び出される関数を定義します。この関数は、キャプチャ・フェーズまたはバブリング・フェーズでイベントがまだ使用されていない場合にのみ呼び出されます。public final ObjectProperty<EventHandler<? super KeyEvent>> onKeyReleasedProperty
Scene
のNode
に入力フォーカスがあり、キーが放されたときに呼び出される関数を定義します。この関数は、キャプチャ・フェーズまたはバブリング・フェーズでイベントがまだ使用されていない場合にのみ呼び出されます。public final ObjectProperty<EventHandler<? super KeyEvent>> onKeyTypedProperty
Scene
のNode
に入力フォーカスがあり、キーが入力されたときに呼び出される関数を定義します。この関数は、キャプチャ・フェーズまたはバブリング・フェーズでイベントがまだ使用されていない場合にのみ呼び出されます。public final ObjectProperty<EventHandler<? super InputMethodEvent>> onInputMethodTextChangedProperty
Node
に入力フォーカスがあり、入力メソッドのテキストが変更されたときに呼び出される関数を定義します。この関数がこのNode
に定義されていない場合、入力メソッド・コンポジションの結果文字列は、一連のonKeyTyped
関数呼出しとして受け取ります。
Node
が入力フォーカスを失うと、JavaFXランタイムによって既存の変換テキスト(存在する場合)が自動的にコミットされます。public final ObjectProperty<NodeOrientation> nodeOrientationProperty
ノードの向きは、ノード内の視覚データのフローを表します。英語の世界では、視覚データのフローは一般に左から右になります。アラビア語やヘブライ語の世界では、視覚データのフローは右から左になります。これは、どちらの世界においてもテキストを読む方向と一致しています。デフォルト値は左から右です。
getNodeOrientation()
、setNodeOrientation(NodeOrientation)
public final ReadOnlyObjectProperty<NodeOrientation> effectiveNodeOrientationProperty
getEffectiveNodeOrientation()
public Scene(Parent root)
root
- シーングラフのルート・ノードNullPointerException
- ルートがnullの場合public Scene(Parent root, double width, double height)
root
- シーングラフのルート・ノードwidth
- シーンの幅height
- シーンの高さNullPointerException
- ルートがnullの場合public Scene(Parent root, Paint fill)
root
- 親fill
- 塗りつぶしNullPointerException
- ルートがnullの場合public Scene(Parent root, double width, double height, Paint fill)
root
- シーングラフのルート・ノードwidth
- シーンの幅height
- シーンの高さfill
- 塗りつぶしNullPointerException
- ルートがnullの場合public Scene(Parent root, double width, double height, boolean depthBuffer)
3D変換のない2D形状のみが含まれるシーンには、深度バッファは必要ありません。3D図形や、3D変換のある2D形状が含まれるシーンは、適切な深度でソートしてレンダリングするために深度バッファのサポートが必要になることがあります。深度ファイティング(Zファイティングとも呼ばれる)を回避するには、3D変換のない2D形状に対して深度テストを無効にします。詳細は、「depthTest
」を参照してください。
root
- シーングラフのルート・ノードwidth
- シーンの幅height
- シーンの高さdepthBuffer
- 奥行きのバッファのフラグ
depthBufferフラグは条件付き機能であり、そのデフォルト値はfalseです。詳細は、ConditionalFeature.SCENE3D
を参照してください。
NullPointerException
- ルートがnullの場合Node.setDepthTest(DepthTest)
public Scene(Parent root, double width, double height, boolean depthBuffer, SceneAntialiasing antiAliasing)
3D変換のない2D形状のみが含まれるシーンは、深度バッファのサポートもシーン・アンチエイリアスのサポートも必要ありません。3D図形や、3D変換のある2D形状が含まれるシーンは、適切な深度でソートしてレンダリングするために深度バッファのサポートが必要になることがあります。深度ファイティング(Zファイティングとも呼ばれる)を回避するには、3D変換のない2D形状に対して深度テストを無効にします。詳細は、「depthTest
」を参照してください。3D形状を含むシーンは、シーンのアンチエイリアスを有効にすると、そのレンダリングの質を向上させることができます。
Sceneは、表示されているWindow
(Window.isShowing()
)にアタッチされていないかぎり、どのスレッドでも作成および変更できます。これはSceneがスレッドセーフであるという意味ではないため、複数のスレッドから同時に操作することは不正であり、予期しない結果を引き起こすことがあるため、避けてください。
root
- シーングラフのルート・ノードwidth
- シーンの幅height
- シーンの高さdepthBuffer
- 奥行きのバッファのフラグantiAliasing
- シーンのアンチエイリアス属性。値null
はDISABLEDとして扱われます。
depthBufferおよびantiAliasingは、条件付き機能です。それぞれのデフォルト値は、falseおよびSceneAntialiasing.DISABLED
です。詳細は、ConditionalFeature.SCENE3D
を参照してください。
NullPointerException
- ルートがnullの場合Node.setDepthTest(DepthTest)
public final SceneAntialiasing getAntiAliasing()
Scene
の定義済SceneAntialiasing
を戻します。
注意: これは条件付き機能です。詳細は、ConditionalFeature.SCENE3D
およびSceneAntialiasing
を参照してください。
public final Window getWindow()
Scene
のWindow
public final ReadOnlyObjectProperty<Window> windowProperty()
Scene
のWindow
getWindow()
public final double getX()
Window
のこのScene
の水平位置。public final ReadOnlyDoubleProperty xProperty()
Window
のこのScene
の水平位置。getX()
public final double getY()
Window
のこのScene
の垂直位置。public final ReadOnlyDoubleProperty yProperty()
Window
のこのScene
の垂直位置。getY()
public final double getWidth()
Scene
の幅public final ReadOnlyDoubleProperty widthProperty()
Scene
の幅getWidth()
public final double getHeight()
Scene
の高さpublic final ReadOnlyDoubleProperty heightProperty()
Scene
の高さgetHeight()
public final void setCamera(Camera value)
Scene
をレンダリングするために使用するカメラのタイプを指定します。camera
がnullである場合、パラレル・カメラがレンダリングに使用されます。別のScene
またはSubScene
に属するカメラの設定は無効です。
注意: これは条件付き機能です。詳細は、ConditionalFeature.SCENE3D
を参照してください。
public final Camera getCamera()
Scene
をレンダリングするために使用するカメラのタイプを指定します。camera
がnullである場合、パラレル・カメラがレンダリングに使用されます。別のScene
またはSubScene
に属するカメラの設定は無効です。
注意: これは条件付き機能です。詳細は、ConditionalFeature.SCENE3D
を参照してください。
public final ObjectProperty<Camera> cameraProperty()
Scene
をレンダリングするために使用するカメラのタイプを指定します。camera
がnullである場合、パラレル・カメラがレンダリングに使用されます。別のScene
またはSubScene
に属するカメラの設定は無効です。
注意: これは条件付き機能です。詳細は、ConditionalFeature.SCENE3D
を参照してください。
getCamera()
、setCamera(Camera)
public final void setFill(Paint value)
Scene
の背景の塗りつぶしを定義します。null
値は、背景なしの描画および透明なPaint
の両方がサポートされていることを意味します。Sceneのデフォルトの塗りつぶしはColor.WHITE
ですが、通常はScene
のroot node
の背景塗りつぶしが引き伸ばされてScene
内のすべての使用可能領域を占有するため、この色がユーザーに最初に表示される方が一般的です。Scene
のルート・ノードにはCSSスタイル・クラス'root'が割り当てられ、JavaFXに付属のデフォルト・ユーザー・エージェント・スタイルシート(現在はCaspianおよびModena)はこのrootスタイル・クラスに対してスタイル設定を適用します。Caspianの場合、これはルート・ノードの背景塗りつぶし色に影響を与えませんが、Modenaの場合、デフォルトの塗りつぶしはライト・グレー色に設定されます。public final Paint getFill()
Scene
の背景の塗りつぶしを定義します。null
値は、背景なしの描画および透明なPaint
の両方がサポートされていることを意味します。Sceneのデフォルトの塗りつぶしはColor.WHITE
ですが、通常はScene
のroot node
の背景塗りつぶしが引き伸ばされてScene
内のすべての使用可能領域を占有するため、この色がユーザーに最初に表示される方が一般的です。Scene
のルート・ノードにはCSSスタイル・クラス'root'が割り当てられ、JavaFXに付属のデフォルト・ユーザー・エージェント・スタイルシート(現在はCaspianおよびModena)はこのrootスタイル・クラスに対してスタイル設定を適用します。Caspianの場合、これはルート・ノードの背景塗りつぶし色に影響を与えませんが、Modenaの場合、デフォルトの塗りつぶしはライト・グレー色に設定されます。public final ObjectProperty<Paint> fillProperty()
Scene
の背景の塗りつぶしを定義します。null
値は、背景なしの描画および透明なPaint
の両方がサポートされていることを意味します。Sceneのデフォルトの塗りつぶしはColor.WHITE
ですが、通常はScene
のroot node
の背景塗りつぶしが引き伸ばされてScene
内のすべての使用可能領域を占有するため、この色がユーザーに最初に表示される方が一般的です。Scene
のルート・ノードにはCSSスタイル・クラス'root'が割り当てられ、JavaFXに付属のデフォルト・ユーザー・エージェント・スタイルシート(現在はCaspianおよびModena)はこのrootスタイル・クラスに対してスタイル設定を適用します。Caspianの場合、これはルート・ノードの背景塗りつぶし色に影響を与えませんが、Modenaの場合、デフォルトの塗りつぶしはライト・グレー色に設定されます。getFill()
、setFill(Paint)
public final void setRoot(Parent value)
Node
を定義します。Group
がルートとして使用されている場合、シーングラフのコンテンツは、シーンの幅および高さでクリップされ、シーンのサイズの変更(ユーザーがステージのサイズを変更した場合)によりシーングラフのレイアウトは変更されません。サイズ変更可能ノード(レイアウトRegion
またはControl
)がルートとして設定されている場合、ルートのサイズはシーンのサイズに追随し、必要に応じてコンテンツの再レイアウトが行われます。シーンはnullルートを受け入れません。public final Parent getRoot()
Node
を定義します。Group
がルートとして使用されている場合、シーングラフのコンテンツは、シーンの幅および高さでクリップされ、シーンのサイズの変更(ユーザーがステージのサイズを変更した場合)によりシーングラフのレイアウトは変更されません。サイズ変更可能ノード(レイアウトRegion
またはControl
)がルートとして設定されている場合、ルートのサイズはシーンのサイズに追随し、必要に応じてコンテンツの再レイアウトが行われます。シーンはnullルートを受け入れません。public final ObjectProperty<Parent> rootProperty()
Node
を定義します。Group
がルートとして使用されている場合、シーングラフのコンテンツは、シーンの幅および高さでクリップされ、シーンのサイズの変更(ユーザーがステージのサイズを変更した場合)によりシーングラフのレイアウトは変更されません。サイズ変更可能ノード(レイアウトRegion
またはControl
)がルートとして設定されている場合、ルートのサイズはシーンのサイズに追随し、必要に応じてコンテンツの再レイアウトが行われます。シーンはnullルートを受け入れません。getRoot()
、setRoot(Parent)
public WritableImage snapshot(WritableImage image)
Paint
によりクリアされます。次に、シーン内のノードがイメージにレンダリングされます。シーン座標の点(0,0)が、イメージの(0,0)にマップされます。イメージがシーンのサイズより小さい場合、イメージによってレンダリングがクリップされます。
アプリケーションによって明示的にアニメーション化されているか、または(チャート・アニメーションのように)暗黙的にアニメーション化されているシーンのスナップショットを取得する場合、スナップショットは取得した瞬間にシーングラフの状態に基づいてレンダリングされ、それ以降のアニメーションの変更は反映されません。
image
- レンダリングされたシーンを保持するために使用される書込み可能イメージnullにでき、その場合、新しいWritableImageが構築されます。イメージがnull以外の場合、シーンは既存のイメージにレンダリングされます。この場合、レンダリングされる領域は、シーンの幅と高さではなく、イメージの幅と高さによって決定されます。IllegalStateException
- このメソッドがJavaFXアプリケーション・スレッド以外のスレッドで呼び出された場合。public void snapshot(Callback<SnapshotResult,Void> callback, WritableImage image)
Paint
によりクリアされます。次に、シーン内のノードがイメージにレンダリングされます。シーン座標の点(0,0)が、イメージの(0,0)にマップされます。イメージがシーンのサイズより小さい場合、イメージによってレンダリングがクリップされます。
これは非同期の呼出しであり、他のイベントやアニメーションが、シーンがレンダリングされる前に処理される可能性があることを意味します。このような場合、このようなイベントがシーン内のノードを変更し、この変更がレンダリングされたイメージに反映されます(これはStageにレンダリングされるフレームにも反映されます)。
アプリケーションによって明示的にアニメーション化されているか、または(チャート・アニメーションのように)暗黙的にアニメーション化されているシーンのスナップショットを取得する場合、スナップショットは取得した瞬間にシーングラフの状態に基づいてレンダリングされ、それ以降のアニメーションの変更は反映されません。
callback
- イメージの準備が整ったときに呼び出されるコール・メソッドを備えたクラス。コールバックの呼出しメソッドに渡されるSnapshotResultには、レンダリングされたイメージおよびレンダリングされたソース・シーンが含まれます。callbackパラメータはnullにしないでください。image
- レンダリングされたシーンを保持するために使用される書込み可能イメージnullにでき、その場合、新しいWritableImageが構築されます。イメージがnull以外の場合、シーンは既存のイメージにレンダリングされます。この場合、レンダリングされる領域は、シーンの幅と高さではなく、イメージの幅と高さによって決定されます。IllegalStateException
- このメソッドがJavaFXアプリケーション・スレッド以外のスレッドで呼び出された場合。NullPointerException
- callbackパラメータがnullの場合。public final void setCursor(Cursor value)
Scene
のマウス・カーソルを定義します。public final Cursor getCursor()
Scene
のマウス・カーソルを定義します。public final ObjectProperty<Cursor> cursorProperty()
Scene
のマウス・カーソルを定義します。getCursor()
、setCursor(Cursor)
public Node lookup(String selector)
selector
- 検索するためのCSSセレクタselector
に一致するシーン内のNode
、見つからない場合はnull
。public final ObservableList<String> getStylesheets()
URLは、[scheme:][//authority][path]形式の階層URIです。URLに[scheme:]コンポーネントがない場合、URLは[path]コンポーネントのみとみなされます。[path]の前の「/」文字はすべて無視され、[path]はアプリケーションのクラスパスのルートへの相対パスとして扱われます。
package com.example.javafx.app;
import javafx.application.Application;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.stage.Stage;
public class MyApp extends Application {
@Override public void start(Stage stage) {
Scene scene = new Scene(new Group());
scene.getStylesheets().add("/com/example/javafx/app/mystyles.css");
stage.setScene(scene);
stage.show();
}
public static void main(String[] args) {
launch(args);
}
}
シーングラフでのCSSの使用の詳細は、「CSSリファレンス・ガイド」を参照してください。public final ObjectProperty<String> userAgentStylesheetProperty()
getUserAgentStylesheet()
、setUserAgentStylesheet(String)
public final String getUserAgentStylesheet()
シーングラフでのCSSの使用の詳細は、「CSSリファレンス・ガイド」を参照してください。
public final void setUserAgentStylesheet(String url)
シーングラフでのCSSの使用の詳細は、「CSSリファレンス・ガイド」を参照してください。
url
- URLは、[scheme:][//authority][path]形式の階層URIです。URLに[scheme:]コンポーネントがない場合、URLは[path]コンポーネントのみとみなされます。[path]の前の「/」文字はすべて無視され、[path]はアプリケーションのクラスパスのルートへの相対パスとして扱われます。public final boolean isDepthBuffer()
public final Node getFocusOwner()
public final ReadOnlyObjectProperty<Node> focusOwnerProperty()
getFocusOwner()
public final void setEventDispatcher(EventDispatcher value)
EventDispatcher
に置換した場合、新しいディスパッチャは、置換されたディスパッチャにイベントを転送して、シーンのデフォルトのイベント処理動作を維持する必要があります。public final EventDispatcher getEventDispatcher()
EventDispatcher
に置換した場合、新しいディスパッチャは、置換されたディスパッチャにイベントを転送して、シーンのデフォルトのイベント処理動作を維持する必要があります。public final ObjectProperty<EventDispatcher> eventDispatcherProperty()
EventDispatcher
に置換した場合、新しいディスパッチャは、置換されたディスパッチャにイベントを転送して、シーンのデフォルトのイベント処理動作を維持する必要があります。public final <T extends Event> void addEventHandler(EventType<T> eventType, EventHandler<? super T> eventHandler)
Event
を受け取ると呼び出されます。T
- ハンドラの特定のイベント・クラスeventType
- ハンドラが受け取るイベントのタイプeventHandler
- 登録するハンドラNullPointerException
- イベント・タイプまたはハンドラがnullの場合public final <T extends Event> void removeEventHandler(EventType<T> eventType, EventHandler<? super T> eventHandler)
T
- ハンドラの特定のイベント・クラスeventType
- 登録解除するイベント・タイプeventHandler
- 登録解除するハンドラNullPointerException
- イベント・タイプまたはハンドラがnullの場合public final <T extends Event> void addEventFilter(EventType<T> eventType, EventHandler<? super T> eventFilter)
Event
を受け取ると呼び出されます。T
- フィルタの特定のイベント・クラスeventType
- フィルタが受け取るイベントのタイプeventFilter
- 登録するフィルタNullPointerException
- イベント・タイプまたはフィルタがnullの場合public final <T extends Event> void removeEventFilter(EventType<T> eventType, EventHandler<? super T> eventFilter)
T
- フィルタの特定のイベント・クラスeventType
- 登録解除するイベント・タイプeventFilter
- 登録解除するフィルタNullPointerException
- イベント・タイプまたはフィルタがnullの場合protected final <T extends Event> void setEventHandler(EventType<T> eventType, EventHandler<? super T> eventHandler)
T
- ハンドラの特定のイベント・クラスeventType
- 指定のeventHandlerに関連付けるイベント・タイプeventHandler
- 登録するハンドラ、または登録解除する場合はnullNullPointerException
- イベント・タイプがnullの場合public void addMnemonic(Mnemonic m)
m
- ニーモニックpublic void removeMnemonic(Mnemonic m)
m
- ニーモニックpublic ObservableMap<KeyCombination,ObservableList<Mnemonic>> getMnemonics()
Scene
のニーモニックのリストを取得します。public ObservableMap<KeyCombination,Runnable> getAccelerators()
Scene
のアクセラレータのリストを取得します。public EventDispatchChain buildEventDispatchChain(EventDispatchChain tail)
buildEventDispatchChain
、インタフェース: EventTarget
tail
- 構築元となる初期チェーンpublic final void setOnContextMenuRequested(EventHandler<? super ContextMenuEvent> value)
Scene
でマウス・ボタンがクリックされた(押されて放された)ときに呼び出される関数を定義します。public final EventHandler<? super ContextMenuEvent> getOnContextMenuRequested()
Scene
でマウス・ボタンがクリックされた(押されて放された)ときに呼び出される関数を定義します。public final ObjectProperty<EventHandler<? super ContextMenuEvent>> onContextMenuRequestedProperty()
Scene
でマウス・ボタンがクリックされた(押されて放された)ときに呼び出される関数を定義します。getOnContextMenuRequested()
、setOnContextMenuRequested(EventHandler)
public final void setOnMouseClicked(EventHandler<? super MouseEvent> value)
Scene
でマウス・ボタンがクリックされた(押されて放された)ときに呼び出される関数を定義します。public final EventHandler<? super MouseEvent> getOnMouseClicked()
Scene
でマウス・ボタンがクリックされた(押されて放された)ときに呼び出される関数を定義します。public final ObjectProperty<EventHandler<? super MouseEvent>> onMouseClickedProperty()
Scene
でマウス・ボタンがクリックされた(押されて放された)ときに呼び出される関数を定義します。public final void setOnMouseDragged(EventHandler<? super MouseEvent> value)
Scene
でマウス・ボタンが押されてからドラッグされるときに呼び出される関数を定義します。public final EventHandler<? super MouseEvent> getOnMouseDragged()
Scene
でマウス・ボタンが押されてからドラッグされるときに呼び出される関数を定義します。public final ObjectProperty<EventHandler<? super MouseEvent>> onMouseDraggedProperty()
Scene
でマウス・ボタンが押されてからドラッグされるときに呼び出される関数を定義します。public final void setOnMouseEntered(EventHandler<? super MouseEvent> value)
Scene
に入るときに呼び出される関数を定義します。public final EventHandler<? super MouseEvent> getOnMouseEntered()
Scene
に入るときに呼び出される関数を定義します。public final ObjectProperty<EventHandler<? super MouseEvent>> onMouseEnteredProperty()
Scene
に入るときに呼び出される関数を定義します。public final void setOnMouseExited(EventHandler<? super MouseEvent> value)
Scene
から出るときに呼び出される関数を定義します。public final EventHandler<? super MouseEvent> getOnMouseExited()
Scene
から出るときに呼び出される関数を定義します。public final ObjectProperty<EventHandler<? super MouseEvent>> onMouseExitedProperty()
Scene
から出るときに呼び出される関数を定義します。public final void setOnMouseMoved(EventHandler<? super MouseEvent> value)
Scene
内をマウス・カーソルが移動するが、ボタンが押されなかった場合に呼び出される関数を定義します。public final EventHandler<? super MouseEvent> getOnMouseMoved()
Scene
内をマウス・カーソルが移動するが、ボタンが押されなかった場合に呼び出される関数を定義します。public final ObjectProperty<EventHandler<? super MouseEvent>> onMouseMovedProperty()
Scene
内をマウス・カーソルが移動するが、ボタンが押されなかった場合に呼び出される関数を定義します。public final void setOnMousePressed(EventHandler<? super MouseEvent> value)
Scene
でマウス・ボタンが押されたときに呼び出される関数を定義します。public final EventHandler<? super MouseEvent> getOnMousePressed()
Scene
でマウス・ボタンが押されたときに呼び出される関数を定義します。public final ObjectProperty<EventHandler<? super MouseEvent>> onMousePressedProperty()
Scene
でマウス・ボタンが押されたときに呼び出される関数を定義します。public final void setOnMouseReleased(EventHandler<? super MouseEvent> value)
Scene
でマウス・ボタンが放されたときに呼び出される関数を定義します。public final EventHandler<? super MouseEvent> getOnMouseReleased()
Scene
でマウス・ボタンが放されたときに呼び出される関数を定義します。public final ObjectProperty<EventHandler<? super MouseEvent>> onMouseReleasedProperty()
Scene
でマウス・ボタンが放されたときに呼び出される関数を定義します。public final void setOnDragDetected(EventHandler<? super MouseEvent> value)
public final EventHandler<? super MouseEvent> getOnDragDetected()
public final ObjectProperty<EventHandler<? super MouseEvent>> onDragDetectedProperty()
public final void setOnMouseDragOver(EventHandler<? super MouseDragEvent> value)
Scene
内で進行しているときに呼び出される関数を定義します。public final EventHandler<? super MouseDragEvent> getOnMouseDragOver()
Scene
内で進行しているときに呼び出される関数を定義します。public final ObjectProperty<EventHandler<? super MouseDragEvent>> onMouseDragOverProperty()
Scene
内で進行しているときに呼び出される関数を定義します。getOnMouseDragOver()
、setOnMouseDragOver(EventHandler)
public final void setOnMouseDragReleased(EventHandler<? super MouseDragEvent> value)
Scene
内で(マウス・ボタンを放すことにより)終了すると呼び出される関数を定義します。public final EventHandler<? super MouseDragEvent> getOnMouseDragReleased()
Scene
内で(マウス・ボタンを放すことにより)終了すると呼び出される関数を定義します。public final ObjectProperty<EventHandler<? super MouseDragEvent>> onMouseDragReleasedProperty()
Scene
内で(マウス・ボタンを放すことにより)終了すると呼び出される関数を定義します。getOnMouseDragReleased()
、setOnMouseDragReleased(EventHandler)
public final void setOnMouseDragEntered(EventHandler<? super MouseDragEvent> value)
Scene
に入ると呼び出される関数を定義します。public final EventHandler<? super MouseDragEvent> getOnMouseDragEntered()
Scene
に入ると呼び出される関数を定義します。public final ObjectProperty<EventHandler<? super MouseDragEvent>> onMouseDragEnteredProperty()
Scene
に入ると呼び出される関数を定義します。getOnMouseDragEntered()
、setOnMouseDragEntered(EventHandler)
public final void setOnMouseDragExited(EventHandler<? super MouseDragEvent> value)
Scene
から出ると呼び出される関数を定義します。public final EventHandler<? super MouseDragEvent> getOnMouseDragExited()
Scene
から出ると呼び出される関数を定義します。public final ObjectProperty<EventHandler<? super MouseDragEvent>> onMouseDragExitedProperty()
Scene
から出ると呼び出される関数を定義します。getOnMouseDragExited()
、setOnMouseDragExited(EventHandler)
public final void setOnScrollStarted(EventHandler<? super ScrollEvent> value)
public final EventHandler<? super ScrollEvent> getOnScrollStarted()
public final ObjectProperty<EventHandler<? super ScrollEvent>> onScrollStartedProperty()
getOnScrollStarted()
、setOnScrollStarted(EventHandler)
public final void setOnScroll(EventHandler<? super ScrollEvent> value)
public final EventHandler<? super ScrollEvent> getOnScroll()
public final ObjectProperty<EventHandler<? super ScrollEvent>> onScrollProperty()
public final void setOnScrollFinished(EventHandler<? super ScrollEvent> value)
public final EventHandler<? super ScrollEvent> getOnScrollFinished()
public final ObjectProperty<EventHandler<? super ScrollEvent>> onScrollFinishedProperty()
getOnScrollFinished()
、setOnScrollFinished(EventHandler)
public final void setOnRotationStarted(EventHandler<? super RotateEvent> value)
public final EventHandler<? super RotateEvent> getOnRotationStarted()
public final ObjectProperty<EventHandler<? super RotateEvent>> onRotationStartedProperty()
getOnRotationStarted()
、setOnRotationStarted(EventHandler)
public final void setOnRotate(EventHandler<? super RotateEvent> value)
public final EventHandler<? super RotateEvent> getOnRotate()
public final ObjectProperty<EventHandler<? super RotateEvent>> onRotateProperty()
getOnRotate()
、setOnRotate(EventHandler)
public final void setOnRotationFinished(EventHandler<? super RotateEvent> value)
public final EventHandler<? super RotateEvent> getOnRotationFinished()
public final ObjectProperty<EventHandler<? super RotateEvent>> onRotationFinishedProperty()
getOnRotationFinished()
、setOnRotationFinished(EventHandler)
public final void setOnZoomStarted(EventHandler<? super ZoomEvent> value)
public final EventHandler<? super ZoomEvent> getOnZoomStarted()
public final ObjectProperty<EventHandler<? super ZoomEvent>> onZoomStartedProperty()
getOnZoomStarted()
、setOnZoomStarted(EventHandler)
public final void setOnZoom(EventHandler<? super ZoomEvent> value)
public final EventHandler<? super ZoomEvent> getOnZoom()
public final ObjectProperty<EventHandler<? super ZoomEvent>> onZoomProperty()
getOnZoom()
、setOnZoom(EventHandler)
public final void setOnZoomFinished(EventHandler<? super ZoomEvent> value)
public final EventHandler<? super ZoomEvent> getOnZoomFinished()
public final ObjectProperty<EventHandler<? super ZoomEvent>> onZoomFinishedProperty()
getOnZoomFinished()
、setOnZoomFinished(EventHandler)
public final void setOnSwipeUp(EventHandler<? super SwipeEvent> value)
public final EventHandler<? super SwipeEvent> getOnSwipeUp()
public final ObjectProperty<EventHandler<? super SwipeEvent>> onSwipeUpProperty()
getOnSwipeUp()
、setOnSwipeUp(EventHandler)
public final void setOnSwipeDown(EventHandler<? super SwipeEvent> value)
public final EventHandler<? super SwipeEvent> getOnSwipeDown()
public final ObjectProperty<EventHandler<? super SwipeEvent>> onSwipeDownProperty()
getOnSwipeDown()
、setOnSwipeDown(EventHandler)
public final void setOnSwipeLeft(EventHandler<? super SwipeEvent> value)
public final EventHandler<? super SwipeEvent> getOnSwipeLeft()
public final ObjectProperty<EventHandler<? super SwipeEvent>> onSwipeLeftProperty()
getOnSwipeLeft()
、setOnSwipeLeft(EventHandler)
public final void setOnSwipeRight(EventHandler<? super SwipeEvent> value)
public final EventHandler<? super SwipeEvent> getOnSwipeRight()
public final ObjectProperty<EventHandler<? super SwipeEvent>> onSwipeRightProperty()
getOnSwipeRight()
、setOnSwipeRight(EventHandler)
public final void setOnTouchPressed(EventHandler<? super TouchEvent> value)
public final EventHandler<? super TouchEvent> getOnTouchPressed()
public final ObjectProperty<EventHandler<? super TouchEvent>> onTouchPressedProperty()
getOnTouchPressed()
、setOnTouchPressed(EventHandler)
public final void setOnTouchMoved(EventHandler<? super TouchEvent> value)
public final EventHandler<? super TouchEvent> getOnTouchMoved()
public final ObjectProperty<EventHandler<? super TouchEvent>> onTouchMovedProperty()
getOnTouchMoved()
、setOnTouchMoved(EventHandler)
public final void setOnTouchReleased(EventHandler<? super TouchEvent> value)
public final EventHandler<? super TouchEvent> getOnTouchReleased()
public final ObjectProperty<EventHandler<? super TouchEvent>> onTouchReleasedProperty()
getOnTouchReleased()
、setOnTouchReleased(EventHandler)
public final void setOnTouchStationary(EventHandler<? super TouchEvent> value)
public final EventHandler<? super TouchEvent> getOnTouchStationary()
public final ObjectProperty<EventHandler<? super TouchEvent>> onTouchStationaryProperty()
getOnTouchStationary()
、setOnTouchStationary(EventHandler)
public final void setOnDragEntered(EventHandler<? super DragEvent> value)
public final EventHandler<? super DragEvent> getOnDragEntered()
public final ObjectProperty<EventHandler<? super DragEvent>> onDragEnteredProperty()
Scene
に入ると呼び出される関数を定義します。public final void setOnDragExited(EventHandler<? super DragEvent> value)
Scene
から出ると呼び出される関数を定義します。public final EventHandler<? super DragEvent> getOnDragExited()
Scene
から出ると呼び出される関数を定義します。public final ObjectProperty<EventHandler<? super DragEvent>> onDragExitedProperty()
Scene
から出ると呼び出される関数を定義します。public final void setOnDragOver(EventHandler<? super DragEvent> value)
Scene
内でドラッグ・ジェスチャが進行しているときに呼び出される関数を定義します。public final EventHandler<? super DragEvent> getOnDragOver()
Scene
内でドラッグ・ジェスチャが進行しているときに呼び出される関数を定義します。public final ObjectProperty<EventHandler<? super DragEvent>> onDragOverProperty()
Scene
内でドラッグ・ジェスチャが進行しているときに呼び出される関数を定義します。public final void setOnDragDropped(EventHandler<? super DragEvent> value)
public final EventHandler<? super DragEvent> getOnDragDropped()
public final ObjectProperty<EventHandler<? super DragEvent>> onDragDroppedProperty()
public final void setOnDragDone(EventHandler<? super DragEvent> value)
transferMode
は、ドロップ・ターゲットで何が起きたかを示します。transferMode
の値がMOVE
である場合には、ソースがそのデータをクリアできます。ソースのデータをクリアすると、ドラッグ・アンド・ドロップ・ジェスチャによってデータが移動された適切な外観がユーザーに表示されます。値がNONE
のtransferMode
は、ドラッグ・アンド・ドロップ・ジェスチャでデータが転送されなかったことを示しています。public final EventHandler<? super DragEvent> getOnDragDone()
transferMode
は、ドロップ・ターゲットで何が起きたかを示します。transferMode
の値がMOVE
である場合には、ソースがそのデータをクリアできます。ソースのデータをクリアすると、ドラッグ・アンド・ドロップ・ジェスチャによってデータが移動された適切な外観がユーザーに表示されます。値がNONE
のtransferMode
は、ドラッグ・アンド・ドロップ・ジェスチャでデータが転送されなかったことを示しています。public final ObjectProperty<EventHandler<? super DragEvent>> onDragDoneProperty()
transferMode
は、ドロップ・ターゲットで何が起きたかを示します。transferMode
の値がMOVE
である場合には、ソースがそのデータをクリアできます。ソースのデータをクリアすると、ドラッグ・アンド・ドロップ・ジェスチャによってデータが移動された適切な外観がユーザーに表示されます。値がNONE
のtransferMode
は、ドラッグ・アンド・ドロップ・ジェスチャでデータが転送されなかったことを示しています。public Dragboard startDragAndDrop(TransferMode... transferModes)
Scene
上で認識されたドラッグ・アンド・ドロップ・ジェスチャの候補を確定します。DRAG_DETECTEDイベント・ハンドラからのみ呼び出すことができます。返されたDragboard
は、ドラッグ・アンド・ドロップ・ジェスチャの実行時にデータを転送するために使用されます。このScene
のデータをDragboard
に格納すると、このScene
がドラッグ・アンド・ドロップ・ジェスチャのソースとしても識別されます。ドラッグ・アンド・ドロップ・ジェスチャの詳細は、DragEvent
の概要を参照してください。transferModes
- このNode
でサポートされているTransferMode
Scene
のデータを格納するDragboard
。IllegalStateException
- この時点ではドラッグ・アンド・ドロップを開始できない場合(DRAG_DETECTED
イベント処理の外で呼び出されます)。DragEvent
public void startFullDrag()
DRAG_DETECTED
マウス・イベント・ハンドラからのみ呼び出すことができます。ドラッグ・ジェスチャの詳細は、MouseEvent
およびMouseDragEvent
の概要を参照してください。IllegalStateException
- この時点では完全な押下、ドラッグ、解放のジェスチャを開始できない場合(DRAG_DETECTED
イベント処理の外で呼び出されます)。MouseEvent
、MouseDragEvent
public final void setOnKeyPressed(EventHandler<? super KeyEvent> value)
Scene
のNode
に入力フォーカスがあり、キーが入力されたときに呼び出される関数を定義します。この関数は、キャプチャ・フェーズまたはバブリング・フェーズでイベントがまだ使用されていない場合にのみ呼び出されます。public final EventHandler<? super KeyEvent> getOnKeyPressed()
Scene
のNode
に入力フォーカスがあり、キーが入力されたときに呼び出される関数を定義します。この関数は、キャプチャ・フェーズまたはバブリング・フェーズでイベントがまだ使用されていない場合にのみ呼び出されます。public final ObjectProperty<EventHandler<? super KeyEvent>> onKeyPressedProperty()
Scene
のNode
に入力フォーカスがあり、キーが入力されたときに呼び出される関数を定義します。この関数は、キャプチャ・フェーズまたはバブリング・フェーズでイベントがまだ使用されていない場合にのみ呼び出されます。public final void setOnKeyReleased(EventHandler<? super KeyEvent> value)
Scene
のNode
に入力フォーカスがあり、キーが放されたときに呼び出される関数を定義します。この関数は、キャプチャ・フェーズまたはバブリング・フェーズでイベントがまだ使用されていない場合にのみ呼び出されます。public final EventHandler<? super KeyEvent> getOnKeyReleased()
Scene
のNode
に入力フォーカスがあり、キーが放されたときに呼び出される関数を定義します。この関数は、キャプチャ・フェーズまたはバブリング・フェーズでイベントがまだ使用されていない場合にのみ呼び出されます。public final ObjectProperty<EventHandler<? super KeyEvent>> onKeyReleasedProperty()
Scene
のNode
に入力フォーカスがあり、キーが放されたときに呼び出される関数を定義します。この関数は、キャプチャ・フェーズまたはバブリング・フェーズでイベントがまだ使用されていない場合にのみ呼び出されます。public final void setOnKeyTyped(EventHandler<? super KeyEvent> value)
Scene
のNode
に入力フォーカスがあり、キーが入力されたときに呼び出される関数を定義します。この関数は、キャプチャ・フェーズまたはバブリング・フェーズでイベントがまだ使用されていない場合にのみ呼び出されます。public final EventHandler<? super KeyEvent> getOnKeyTyped()
Scene
のNode
に入力フォーカスがあり、キーが入力されたときに呼び出される関数を定義します。この関数は、キャプチャ・フェーズまたはバブリング・フェーズでイベントがまだ使用されていない場合にのみ呼び出されます。public final ObjectProperty<EventHandler<? super KeyEvent>> onKeyTypedProperty()
Scene
のNode
に入力フォーカスがあり、キーが入力されたときに呼び出される関数を定義します。この関数は、キャプチャ・フェーズまたはバブリング・フェーズでイベントがまだ使用されていない場合にのみ呼び出されます。public final void setOnInputMethodTextChanged(EventHandler<? super InputMethodEvent> value)
Node
に入力フォーカスがあり、入力メソッドのテキストが変更されたときに呼び出される関数を定義します。この関数がこのNode
に定義されていない場合、入力メソッド・コンポジションの結果文字列は、一連のonKeyTyped
関数呼出しとして受け取ります。
Node
が入力フォーカスを失うと、JavaFXランタイムによって既存の変換テキスト(存在する場合)が自動的にコミットされます。public final EventHandler<? super InputMethodEvent> getOnInputMethodTextChanged()
Node
に入力フォーカスがあり、入力メソッドのテキストが変更されたときに呼び出される関数を定義します。この関数がこのNode
に定義されていない場合、入力メソッド・コンポジションの結果文字列は、一連のonKeyTyped
関数呼出しとして受け取ります。
Node
が入力フォーカスを失うと、JavaFXランタイムによって既存の変換テキスト(存在する場合)が自動的にコミットされます。public final ObjectProperty<EventHandler<? super InputMethodEvent>> onInputMethodTextChangedProperty()
Node
に入力フォーカスがあり、入力メソッドのテキストが変更されたときに呼び出される関数を定義します。この関数がこのNode
に定義されていない場合、入力メソッド・コンポジションの結果文字列は、一連のonKeyTyped
関数呼出しとして受け取ります。
Node
が入力フォーカスを失うと、JavaFXランタイムによって既存の変換テキスト(存在する場合)が自動的にコミットされます。public final ObservableMap<Object,Object> getProperties()
public boolean hasProperties()
public void setUserData(Object value)
getUserData()
を呼び出して取得できます。value
- 格納される値。これは、後でgetUserData()
を呼び出して取得できます。public Object getUserData()
setUserData(java.lang.Object)
メソッドを使用してこのようなプロパティを設定していない場合にはnullを返します。public final void setNodeOrientation(NodeOrientation orientation)
ノードの向きは、ノード内の視覚データのフローを表します。英語の世界では、視覚データのフローは一般に左から右になります。アラビア語やヘブライ語の世界では、視覚データのフローは右から左になります。これは、どちらの世界においてもテキストを読む方向と一致しています。デフォルト値は左から右です。
public final NodeOrientation getNodeOrientation()
ノードの向きは、ノード内の視覚データのフローを表します。英語の世界では、視覚データのフローは一般に左から右になります。アラビア語やヘブライ語の世界では、視覚データのフローは右から左になります。これは、どちらの世界においてもテキストを読む方向と一致しています。デフォルト値は左から右です。
public final ObjectProperty<NodeOrientation> nodeOrientationProperty()
ノードの向きは、ノード内の視覚データのフローを表します。英語の世界では、視覚データのフローは一般に左から右になります。アラビア語やヘブライ語の世界では、視覚データのフローは右から左になります。これは、どちらの世界においてもテキストを読む方向と一致しています。デフォルト値は左から右です。
getNodeOrientation()
、setNodeOrientation(NodeOrientation)
public final NodeOrientation getEffectiveNodeOrientation()
public final ReadOnlyObjectProperty<NodeOrientation> effectiveNodeOrientationProperty()
getEffectiveNodeOrientation()
Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.