@IDProperty(value="id") public abstract class Node extends Object implements EventTarget, Styleable
シーングラフ内の各アイテムはNode
と呼ばれます。ブランチ・ノードは、具象サブクラスとしてGroup
、Region
およびControl
を持つParent
タイプか、またはそのサブクラスになります。
リーフ・ノードは、Rectangle
、Text
、ImageView
、MediaView
などのクラスか、または子を持たないその他のリーフ・クラスになります。各シーングラフ・ツリー内には、親を持たないノードが1個のみあり、それをルート・ノードと呼びます。
シーングラフには複数のツリーが存在する場合があります。それらのツリーの中には、Scene
の一部となっているために、表示できるものもあります。その一方で、どのScene
にも含まれないツリーもあります。
ノードはシーングラフ内のどの場所においても最大で1回しか出現できません。具体的には、Scene
のルート・ノードとして、Parent
の子ObservableListとして、またはNode
のクリップとしてノードが出現できるのは、いずれの場合も1回にかぎられます。
シーングラフはサイクルを持つことができません。サイクルはノードがツリー内でそのノード自体の祖先である場合に存在し、この際、Group
のコンテンツObservableList、Parent
の子ObservableListおよびNode
のクリップについての前述の関係が考慮されます。
プログラムによって親(グループ、リージョンなど)に子ノードを追加し、そのノードがすでに別の親またはシーンのルートの子である場合、そのノードは前の親から自動的に(警告なしで)削除されます。前述のルールに違反する別の方法によってプログラムからシーングラフを変更しようとすると、例外がスローされ、変更試行が無視され、シーングラフが元の状態に戻されます。
サブツリーをシーングラフ内の別の場所に移動するなど、シーングラフの構造を配置変更できます。そのためには、通常、現在の場所からサブツリーを削除してから、新しい場所に挿入します。ただし、アプリケーションによってサブツリーを明示的に削除しない場合は、前述のとおり自動的に削除されます。
ノード・オブジェクトは、表示されているWindow
内のScene
にまだアタッチされていないかぎり、どのスレッドでも構築および変更できます。アプリケーションは、このようなSceneにノードをアタッチするか、JavaFXアプリケーション・スレッドでノードを変更する必要があります。
シーングラフ内の各ノードには一意のid
を割り当てることができます。このidは、シーングラフ内でのid
の一意性保証は設計者や開発者が担うという点で、HTMLタグのid属性とよく似ています。lookup(String)
という簡易関数を使用すると、シーングラフ内またはシーングラフのサブツリー内で一意のidを持つノードを検索できます。idは、スタイルを適用するノードを識別するためにも使用できます。CSSに関する後述の項を参照してください。
Node
クラスは、従来のコンピュータ・グラフィックスのローカル座標系を定義します。この座標系では、x
軸が右方向に増え、y
軸が下方向に増えていきます。図形の具象ノード・クラスには、このローカル座標空間内での図形のジオメトリと位置を定義するための変数が用意されています。たとえば、Rectangle
にはx
、y
、width
およびheight
変数があり、Circle
にはcenterX
、centerY
およびradius
があります。
デバイスのピクセル・レベルで、整数座標が隅およびピクセル間の隙間にマップされ、ピクセルの中心が整数ピクセル位置間の中点に表示されます。すべての座標値が浮動小数点数で指定されるため、座標はこれらの隅(浮動小数点値が正確な整数値を持つ場合)やピクセル上のあらゆる場所を正確に指します。たとえば、座標(0.5, 0.5)
は、Stage
上の左上のピクセルの中心を指します。同様に、(0, 0)
にある寸法10
x10
の矩形は、Stage
上の左上のピクセルの左上隅から、10番目のスキャンライン上の10番目のピクセルの右下隅までになります。この矩形内の最後のピクセルのピクセル中心は座標(9.5, 9.5)
にあります。
実際には、後述するように、ほとんどのノードの座標系に変換が適用されます。そのため、デバイスの座標とピクセル・グリッドの位置合せに関する前述の情報は、ノードのローカル座標ではなく、変換後の座標に関連します。Shape
クラスは、座標のマッピングやレンダリングへの影響に関するコンテキスト固有の重要な追加情報を表します。
あらゆるNode
に変換を適用できます。これには、平行移動、回転、スケーリングまたはシャーリングがあります。
平行移動変換は、ノードの座標空間の原点をx軸またはy軸に沿って移動するというものです。たとえば、原点(x=0, y=0)、幅100、高さ50のRectangle
を作成してから、Translate
を適用してx軸に沿って10移動する場合(x=10)、矩形は(x=10, y=0)に描画され、幅100および高さ50はそのまま維持されます。矩形のx
変数ではなく、原点が移動されることに注意してください。
一般的なノード変換は整数の距離の分だけ平行移動することであり、ステージにノードをレイアウトする場合によく使用されます。このような整数平行移動では、デバイスのピクセル・マッピングが維持され、ピクセル間の隙間に整数のローカル座標がマップされたままになります。
回転変換は、指定したピボット・ポイントを中心としてノードの座標空間を回転するというものです。結果として、ノードは回転しているように見えます。たとえば、原点(x=0, y=0)、幅100、高さ30のRectangle
を作成してから、Rotate
を適用して原点をピボット(pivotX=0, pivotY=0)として90度回転する場合(angle=90)、矩形はxおよびyが0、高さが100、幅が-30であるかのように描画されます。つまり、ピンが左上隅に固定されていて、矩形がそのピンを中心として時計回りに90度回転しているかのように見えます。かわりにピボット・ポイントを矩形の中心(x=50、y=15)に配置した場合、矩形はその中心を基準として回転しているように見えます。
すべての変換と同様に、矩形のx、y、widthおよびheight変数(ローカル座標空間に対して相対的に維持される)は変更されず、実際には矩形の座標空間全体が変更されることに注意してください。
スケーリング変換は、スケール係数に基づいてノードを大きくまたは小さく表示するというものです。スケーリングでは、ローカル座標の軸に沿った各距離単位にスケール係数を乗算して、ノードの座標空間が変更されます。回転変換と同様に、スケーリング変換もピボット・ポイントを中心として適用されます。これは、ズームの中心となるノード内のポイントと考えることができます。たとえば、strokeWidth
5、幅50、高さ50のRectangle
を作成してから、Scale
を適用して原点をピボット(pivotX=0, pivotY=0)としてスケール係数(x=2.0, y=2.0)でスケーリングする場合、矩形全体(ストロークを含む)のサイズが2倍になり、原点から右方向および下方向に拡大されます。
シャーリング変換(傾斜と呼ばれる場合もある)は、x軸とy軸が垂直でなくなるように一方の軸を事実上回転するというものです。
順序付けした変換の連鎖を指定することにより、複数の変換を適用できます。変換の適用順序は、transforms
変数で指定するObservableListによって定義します。
すべてのNode
が変換に対応しているため、各ノードのジオメトリ境界矩形の表現を変換の適用有無に応じて変えることができます。
各Node
には、未変換ローカル座標におけるNode
の境界矩形を指定するboundsInLocal
変数(読取り専用)があります。boundsInLocal
には、ノードの図形ジオメトリ(ローカルの位置/サイズ変数の範囲から外れるゼロ以外のストロークに必要なスペースを含む)、clip
変数およびeffect
変数が含まれます。
それに加え、各Node
には、transforms
、scaleX
/scaleY
、rotate
、translateX
/translateY
、layoutX
/layoutY
で設定する変換など、すべての変換を適用した後のNode
の境界矩形を指定するboundsInParent
変数(読取り専用)があります。これがboundsInParentと呼ばれるのは、矩形が親の座標系に対して相対的になるためです。これはノードの視覚境界です。
最後に、layoutBounds
変数では、Node
の矩形境界を定義します。この境界は、レイアウト計算の基準となるものであり、ノードの視覚境界とは異なる場合があります。図形、テキストおよびImageViewの場合、layoutBoundsにはデフォルトでは図形ジオメトリ(ゼロ以外のstrokeWidth
に必要なスペースを含む)のみが含まれ、効果、クリップ、変換は含まれません。サイズ変更可能なクラス(リージョンおよびコントロール)の場合、layoutBoundsは常に0,0 width x height
にマップされます。
このイメージは、変換およびboundsInLocal
がないノードを示しています。
このイメージを20度回転すると、次のようになります。
赤の矩形は、ノードの親の座標空間における
boundsInParent
を表します。boundsInLocal
は1つ目のイメージと変わりません。このイメージ内の緑の矩形は、ノードの座標空間におけるboundsInLocal
を表します。
これらのイメージは、塗りつぶしとストロークが適用された矩形とその境界を示しています。1つ目の矩形[x:10.0 y:10.0 width:100.0 height:100.0 strokeWidth:0]
は境界[x:10.0 y:10.0 width:100.0 height:100.0]
を持ちます。2つ目の矩形[x:10.0 y:10.0 width:100.0 height:100.0 strokeWidth:5]
は境界[x:7.5 y:7.5 width:105 height:105]
を持ちます(ストロークはデフォルトでは中央揃えされるため、その半分のみが元の境界の外に出ています。内側または外側のストロークを作成することもできます)。どちらの矩形にも変換は適用されていないため、boundsInParent
とboundsInLocal
は同じです。
Node
クラスには、CSSによってこのノードをスタイル指定するために使用するid
、styleClass
およびstyle
変数が含まれています。id
およびstyleClass
変数は、CSSスタイルシートでスタイルの適用先ノードを識別するために使用します。style
変数には、このノードに直接適用されるスタイル・プロパティとその値が含まれています。
CSSおよびCSSスタイルをノードに適用する方法の詳細は、「CSSリファレンス・ガイド」を参照してください。
Type | プロパティと説明 |
---|---|
ObjectProperty<String> |
accessibleHelp
この
Node のアクセス可能なヘルプ・テキスト。 |
ObjectProperty<String> |
accessibleRoleDescription
この
Node のロール説明。 |
ObjectProperty<AccessibleRole> |
accessibleRole
この
Node のアクセス可能な役割。 |
ObjectProperty<String> |
accessibleText
この
Node のアクセス可能なテキスト。 |
ObjectProperty<BlendMode> |
blendMode
この個別のノードを後ろのシーンにブレンドするために使用される
BlendMode 。 |
ReadOnlyObjectProperty<Bounds> |
boundsInLocal
ノードの未変換ローカル座標空間にある、その
Node の矩形境界線。 |
ReadOnlyObjectProperty<Bounds> |
boundsInParent
変換を含むこの
Node の矩形境界線。 |
ObjectProperty<CacheHint> |
cacheHint
ビットマップ・キャッシングを制御するための追加ヒント。
|
BooleanProperty |
cache
この
Node をビットマップとしてキャッシュするかどうかを示すシステムのパフォーマンス・ヒント。 |
ObjectProperty<Node> |
clip
このノードのクリッピングの形を定義するために使用する
Node を指定します。 |
ObjectProperty<Cursor> |
cursor
この
Node とサブノードのマウス・カーソルを定義します。 |
ObjectProperty<DepthTest> |
depthTest
このノードをレンダリングする際に、深度テストを使用するかどうかを示します。
|
ReadOnlyBooleanProperty |
disabled
この
Node を無効にするかどうかを示します。 |
BooleanProperty |
disable
この
Node の個別の無効化状態を定義します。 |
ReadOnlyObjectProperty<NodeOrientation> |
effectiveNodeOrientation
ノードの有効な向きは、ノードの向きの継承を解決して、左から右または右から左を返します。
|
ObjectProperty<Effect> |
effect
この
Node に適用する効果を指定します。 |
ObjectProperty<EventDispatcher> |
eventDispatcher
このノードのイベント・ディスパッチャを指定します。
|
ReadOnlyBooleanProperty |
focused
現在この
Node に入力フォーカスがあるかどうかを示します。 |
BooleanProperty |
focusTraversable
この
Node は、フォーカス・トラバーサル・サイクルの一部である必要があります。 |
ReadOnlyBooleanProperty |
hover
この
Node にカーソルが置かれているかどうか。 |
StringProperty |
id
この
Node のID。 |
ObjectProperty<InputMethodRequests> |
inputMethodRequests
InputMethodRequestsを保持するプロパティ。
|
ReadOnlyObjectProperty<Bounds> |
layoutBounds
このノードのレイアウト計算に使用する矩形境界。
|
DoubleProperty |
layoutX
レイアウト目的のためにこの
Node の変換に追加される変換のX座標を定義します。 |
DoubleProperty |
layoutY
レイアウト目的のためにこの
Node の変換に追加される変換のY座標を定義します。 |
ReadOnlyObjectProperty<Transform> |
localToParentTransform
ローカルから親への計算済変換を維持するアファイン変換。
|
ReadOnlyObjectProperty<Transform> |
localToSceneTransform
ローカルからシーンへの計算済変換を維持するアファイン変換。
|
BooleanProperty |
managed
このノードのレイアウトを親が管理するかどうかを定義します。
|
BooleanProperty |
mouseTransparent
true の場合、このノードは(そのすべての子とともに)マウス・イベントに対して完全に透過的になります。 |
ObjectProperty<NodeOrientation> |
nodeOrientation
NodeOrientationを保持するプロパティ。
|
ObjectProperty<EventHandler<? super ContextMenuEvent>> |
onContextMenuRequested
この
Node でコンテキスト・メニューがリクエストされたときに呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super MouseEvent>> |
onDragDetected
ドラッグ・ジェスチャが検出されたときに呼び出される関数を定義します。
|
ObjectProperty<EventHandler<? super DragEvent>> |
onDragDone
データがドロップ・ターゲットにドロップされた後に、この
Node がドラッグ・アンド・ドロップ・ジェスチャのソースである場合に呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super DragEvent>> |
onDragDropped
ドラッグ・アンド・ドロップ・ジェスチャの間にこの
Node でマウス・ボタンが放されると呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super DragEvent>> |
onDragEntered
ドラッグ・ジェスチャがこの
Node に入ると呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super DragEvent>> |
onDragExited
ドラッグ・ジェスチャがこの
Node から出ると呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super DragEvent>> |
onDragOver
この
Node 内でドラッグ・ジェスチャが進行しているときに呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super InputMethodEvent>> |
onInputMethodTextChanged
この
Node に入力フォーカスがあり、入力メソッドのテキストが変更されたときに呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super KeyEvent>> |
onKeyPressed
この
Node またはその子Node に入力フォーカスがあり、キーが押されたときに呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super KeyEvent>> |
onKeyReleased
この
Node またはその子Node に入力フォーカスがあり、キーが放されたときに呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super KeyEvent>> |
onKeyTyped
この
Node またはその子Node に入力フォーカスがあり、キーが入力されたときに呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super MouseEvent>> |
onMouseClicked
この
Node でマウス・ボタンがクリックされた(押されて放された)ときに呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super MouseDragEvent>> |
onMouseDragEntered
押下、ドラッグ、解放のジェスチャがすべてこの
Node に入ると呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super MouseDragEvent>> |
onMouseDragExited
押下、ドラッグ、解放のジェスチャがすべてこの
Node から出ると呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super MouseEvent>> |
onMouseDragged
この
Node でマウス・ボタンが押されてからドラッグされるときに呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super MouseDragEvent>> |
onMouseDragOver
押下、ドラッグ、解放のジェスチャがすべてこの
Node 内で進行しているときに呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super MouseDragEvent>> |
onMouseDragReleased
押下、ドラッグ、解放のジェスチャがすべてこの
Node 内で(マウス・ボタンを放すことにより)終了すると呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super MouseEvent>> |
onMouseEntered
マウスがこの
Node に入るときに呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super MouseEvent>> |
onMouseExited
マウスがこの
Node から出るときに呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super MouseEvent>> |
onMouseMoved
この
Node 内をマウス・カーソルが移動するが、ボタンが押されなかった場合に呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super MouseEvent>> |
onMousePressed
この
Node でマウス・ボタンが押されたときに呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super MouseEvent>> |
onMouseReleased
この
Node でマウス・ボタンが放されたときに呼び出される関数を定義します。 |
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
ズーム・ジェスチャが検出されると呼び出される関数を定義します。
|
DoubleProperty |
opacity
Node を表示する透明度(つまり、濃淡がない)を指定します。 |
ReadOnlyObjectProperty<Parent> |
parent
この
Node の親ノードです。 |
BooleanProperty |
pickOnBounds
MouseEvent によってトリガーされた場合またはcontains 関数呼出しの場合の、このノードに対するピッキング計算の実行方法を定義します。 |
ReadOnlyBooleanProperty |
pressed
Node が押されているかどうか。 |
DoubleProperty |
rotate
Node の中心を基準とする回転角度を定義します(角度の単位で測定)。 |
ObjectProperty<Point3D> |
rotationAxis
この
Node の回転軸を定義します。 |
DoubleProperty |
scaleX
この
Node のX軸に沿って、オブジェクトの中心のまわりに座標がスケールされる係数を定義します。 |
DoubleProperty |
scaleY
この
Node のY軸に沿って、オブジェクトの中心のまわりに座標がスケールされる係数を定義します。 |
DoubleProperty |
scaleZ
この
Node のZ軸に沿って、オブジェクトの中心のまわりに座標がスケールされる係数を定義します。 |
ReadOnlyObjectProperty<Scene> |
scene
この
Node が一部であるScene 。 |
StringProperty |
style
この
Node に関連付けられているCSSスタイルの文字列表現。 |
DoubleProperty |
translateX
この
Node の変換に追加される変換のX座標を定義します。 |
DoubleProperty |
translateY
この
Node の変換に追加される変換のY座標を定義します。 |
DoubleProperty |
translateZ
この
Node の変換された座標に追加される変換のZ座標を定義します。 |
BooleanProperty |
visible
この
Node およびサブノードをシーン・グラフの一部としてレンダリングするかどうかを指定します。 |
修飾子と型 | フィールドと説明 |
---|---|
static double |
BASELINE_OFFSET_SAME_AS_HEIGHT
これは、
getBaselineOffset() から返される場合がある特殊な値です。 |
修飾子 | コンストラクタと説明 |
---|---|
protected |
Node()
ノードの新しいインスタンスを作成します。
|
修飾子と型 | メソッドと説明 |
---|---|
ObjectProperty<String> |
accessibleHelpProperty()
この
Node のアクセス可能なヘルプ・テキスト。 |
ObjectProperty<String> |
accessibleRoleDescriptionProperty()
この
Node のロール説明。 |
ObjectProperty<AccessibleRole> |
accessibleRoleProperty()
この
Node のアクセス可能な役割。 |
ObjectProperty<String> |
accessibleTextProperty()
この
Node のアクセス可能なテキスト。 |
<T extends Event> |
addEventFilter(EventType<T> eventType, EventHandler<? super T> eventFilter)
このノードに対するイベント・フィルタを登録します。
|
<T extends Event> |
addEventHandler(EventType<T> eventType, EventHandler<? super T> eventHandler)
このノードに対するイベント・ハンドラを登録します。
|
void |
applyCss()
必要に応じて、このノードとその子(存在する場合)にスタイルを適用します。
|
void |
autosize()
ノードがサイズ変更可能な場合、そのレイアウト境界を現在の優先幅および優先高に設定します。
|
ObjectProperty<BlendMode> |
blendModeProperty()
この個別のノードを後ろのシーンにブレンドするために使用される
BlendMode 。 |
ReadOnlyObjectProperty<Bounds> |
boundsInLocalProperty()
ノードの未変換ローカル座標空間にある、その
Node の矩形境界線。 |
ReadOnlyObjectProperty<Bounds> |
boundsInParentProperty()
変換を含むこの
Node の矩形境界線。 |
EventDispatchChain |
buildEventDispatchChain(EventDispatchChain tail)
このノードのイベント・ディスパッチ・チェーンを構築します。
|
ObjectProperty<CacheHint> |
cacheHintProperty()
ビットマップ・キャッシングを制御するための追加ヒント。
|
BooleanProperty |
cacheProperty()
この
Node をビットマップとしてキャッシュするかどうかを示すシステムのパフォーマンス・ヒント。 |
ObjectProperty<Node> |
clipProperty()
このノードのクリッピングの形を定義するために使用する
Node を指定します。 |
double |
computeAreaInScreen()
物理画面上にピクセル単位で投影されるこの
Node の領域を返します。 |
boolean |
contains(double localX, double localY)
特定の点(この
Node のローカル座標空間で指定される)がこのNode の形状に含まれる場合に、true を返します。 |
boolean |
contains(Point2D localPoint)
特定の点(この
Node のローカル座標空間で指定される)がこのNode の形状に含まれる場合に、true を返します。 |
ObjectProperty<Cursor> |
cursorProperty()
この
Node とサブノードのマウス・カーソルを定義します。 |
ObjectProperty<DepthTest> |
depthTestProperty()
このノードをレンダリングする際に、深度テストを使用するかどうかを示します。
|
ReadOnlyBooleanProperty |
disabledProperty()
この
Node を無効にするかどうかを示します。 |
BooleanProperty |
disableProperty()
この
Node の個別の無効化状態を定義します。 |
ReadOnlyObjectProperty<NodeOrientation> |
effectiveNodeOrientationProperty()
ノードの有効な向きは、ノードの向きの継承を解決して、左から右または右から左を返します。
|
ObjectProperty<Effect> |
effectProperty()
この
Node に適用する効果を指定します。 |
ObjectProperty<EventDispatcher> |
eventDispatcherProperty()
このノードのイベント・ディスパッチャを指定します。
|
void |
executeAccessibleAction(AccessibleAction action, Object... parameters)
このメソッドは、引数で指定されたアクションの実行をリクエストするためにアシスティブ・テクノロジによって呼び出されます。
|
void |
fireEvent(Event event)
指定したイベントを起動します。
|
ReadOnlyBooleanProperty |
focusedProperty()
現在この
Node に入力フォーカスがあるかどうかを示します。 |
BooleanProperty |
focusTraversableProperty()
この
Node は、フォーカス・トラバーサル・サイクルの一部である必要があります。 |
String |
getAccessibleHelp()
プロパティaccessibleHelpの値を取得します。
|
AccessibleRole |
getAccessibleRole()
プロパティaccessibleRoleの値を取得します。
|
String |
getAccessibleRoleDescription()
プロパティaccessibleRoleDescriptionの値を取得します。
|
String |
getAccessibleText()
プロパティaccessibleTextの値を取得します。
|
double |
getBaselineOffset()
ノードのlayoutBounds.minYの場所からのアルファベット(またはローマン体)のベースライン・オフセット。このノードと他のノードをベースラインを基準に垂直方向に位置合せする場合に使用する必要があります。
|
BlendMode |
getBlendMode()
プロパティblendModeの値を取得します。
|
Bounds |
getBoundsInLocal()
プロパティboundsInLocalの値を取得します。
|
Bounds |
getBoundsInParent()
プロパティboundsInParentの値を取得します。
|
CacheHint |
getCacheHint()
プロパティcacheHintの値を取得します。
|
static List<CssMetaData<? extends Styleable,?>> |
getClassCssMetaData() |
Node |
getClip()
プロパティclipの値を取得します。
|
Orientation |
getContentBias()
レイアウト用にノードのサイズ変更バイアスの向きを返します。
|
List<CssMetaData<? extends Styleable,?>> |
getCssMetaData()
NodeのCssMetaDataがリフレクションなしでアクセス可能になるように、このメソッドは
getClassCssMetaData() に委任する必要があります。 |
Cursor |
getCursor()
プロパティcursorの値を取得します。
|
DepthTest |
getDepthTest()
プロパティdepthTestの値を取得します。
|
Effect |
getEffect()
プロパティeffectの値を取得します。
|
NodeOrientation |
getEffectiveNodeOrientation()
プロパティeffectiveNodeOrientationの値を取得します。
|
EventDispatcher |
getEventDispatcher()
プロパティeventDispatcherの値を取得します。
|
String |
getId()
この
Node のID。 |
InputMethodRequests |
getInputMethodRequests()
プロパティinputMethodRequestsの値を取得します。
|
Bounds |
getLayoutBounds()
プロパティlayoutBoundsの値を取得します。
|
double |
getLayoutX()
プロパティlayoutXの値を取得します。
|
double |
getLayoutY()
プロパティlayoutYの値を取得します。
|
Transform |
getLocalToParentTransform()
プロパティlocalToParentTransformの値を取得します。
|
Transform |
getLocalToSceneTransform()
プロパティlocalToSceneTransformの値を取得します。
|
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の値を取得します。
|
double |
getOpacity()
プロパティopacityの値を取得します。
|
Parent |
getParent()
プロパティparentの値を取得します。
|
ObservableMap<Object,Object> |
getProperties()
アプリケーション開発者が主に使用するこのノードのプロパティの監視可能なマップを返します。
|
ObservableSet<PseudoClass> |
getPseudoClassStates()
このStyleableの擬似クラスの状態を返します。
|
double |
getRotate()
プロパティrotateの値を取得します。
|
Point3D |
getRotationAxis()
プロパティrotationAxisの値を取得します。
|
double |
getScaleX()
プロパティscaleXの値を取得します。
|
double |
getScaleY()
プロパティscaleYの値を取得します。
|
double |
getScaleZ()
プロパティscaleZの値を取得します。
|
Scene |
getScene()
プロパティsceneの値を取得します。
|
String |
getStyle()
この
Node に関連付けられているCSSスタイルの文字列表現。 |
Styleable |
getStyleableParent()
このStyleableの親を返すか、親がない場合はnullを返します。
|
ObservableList<String> |
getStyleClass()
特に外部スタイル・エンジン用に、ノードを論理的にグループ化するために使用できる文字列識別子のリスト。
|
ObservableList<Transform> |
getTransforms()
この
Node に適用されるTransform オブジェクトのObservableListを定義します。 |
double |
getTranslateX()
プロパティtranslateXの値を取得します。
|
double |
getTranslateY()
プロパティtranslateYの値を取得します。
|
double |
getTranslateZ()
プロパティtranslateZの値を取得します。
|
String |
getTypeSelector()
セレクタの照合に使用されるこの
Styleable の型。 |
Object |
getUserData()
以前に設定したObjectプロパティを返すか、または
setUserData(java.lang.Object) メソッドを使用してこのようなプロパティを設定していない場合にはnullを返します。 |
boolean |
hasProperties()
ノードにプロパティがあるかどうかをテストします。
|
ReadOnlyBooleanProperty |
hoverProperty()
この
Node にカーソルが置かれているかどうか。 |
StringProperty |
idProperty()
この
Node のID。 |
ObjectProperty<InputMethodRequests> |
inputMethodRequestsProperty()
InputMethodRequestsを保持するプロパティ。
|
boolean |
intersects(Bounds localBounds)
特定の境界(この
Node のローカル座標空間で指定される)がこのNode の形状と交差する場合に、true を返します。 |
boolean |
intersects(double localX, double localY, double localWidth, double localHeight)
特定の矩形(この
Node のローカル座標空間で指定される)がこのNode の形状と交差する場合に、true を返します。 |
boolean |
isCache()
プロパティcacheの値を取得します。
|
boolean |
isDisable()
プロパティdisableの値を取得します。
|
boolean |
isDisabled()
プロパティdisabledの値を取得します。
|
boolean |
isFocused()
プロパティfocusedの値を取得します。
|
boolean |
isFocusTraversable()
プロパティfocusTraversableの値を取得します。
|
boolean |
isHover()
プロパティhoverの値を取得します。
|
boolean |
isManaged()
プロパティmanagedの値を取得します。
|
boolean |
isMouseTransparent()
プロパティmouseTransparentの値を取得します。
|
boolean |
isPickOnBounds()
プロパティpickOnBoundsの値を取得します。
|
boolean |
isPressed()
プロパティpressedの値を取得します。
|
boolean |
isResizable()
このノードが、その親によってサイズ変更可能なタイプかどうかを示します。
|
boolean |
isVisible()
プロパティvisibleの値を取得します。
|
ReadOnlyObjectProperty<Bounds> |
layoutBoundsProperty()
このノードのレイアウト計算に使用する矩形境界。
|
DoubleProperty |
layoutXProperty()
レイアウト目的のためにこの
Node の変換に追加される変換のX座標を定義します。 |
DoubleProperty |
layoutYProperty()
レイアウト目的のためにこの
Node の変換に追加される変換のY座標を定義します。 |
Bounds |
localToParent(Bounds localBounds)
この
Node のローカル座標空間からその親の座標空間に境界を変換します。 |
Point2D |
localToParent(double localX, double localY)
この
Node のローカル座標空間からその親の座標空間に点を変換します。 |
Point3D |
localToParent(double x, double y, double z)
この
Node のローカル座標空間からその親の座標空間に点を変換します。 |
Point2D |
localToParent(Point2D localPoint)
この
Node のローカル座標空間からその親の座標空間に点を変換します。 |
Point3D |
localToParent(Point3D localPoint)
この
Node のローカル座標空間からその親の座標空間に点を変換します。 |
ReadOnlyObjectProperty<Transform> |
localToParentTransformProperty()
ローカルから親への計算済変換を維持するアファイン変換。
|
Bounds |
localToScene(Bounds localBounds)
この
Node のローカル座標空間からそのシーンの座標空間に境界を変換します。 |
Bounds |
localToScene(Bounds localBounds, boolean rootScene)
この
Node のローカル座標空間からそのシーンの座標空間に境界を変換します。 |
Point2D |
localToScene(double localX, double localY)
この
Node のローカル座標空間からそのシーンの座標空間に点を変換します。 |
Point2D |
localToScene(double x, double y, boolean rootScene)
この
Node のローカル座標空間からそのシーンの座標空間に点を変換します。 |
Point3D |
localToScene(double x, double y, double z)
この
Node のローカル座標空間からそのシーンの座標空間に点を変換します。 |
Point3D |
localToScene(double x, double y, double z, boolean rootScene)
この
Node のローカル座標空間からそのシーンの座標空間に点を変換します。 |
Point2D |
localToScene(Point2D localPoint)
この
Node のローカル座標空間からそのシーンの座標空間に点を変換します。 |
Point2D |
localToScene(Point2D localPoint, boolean rootScene)
この
Node のローカル座標空間からそのシーンの座標空間に点を変換します。 |
Point3D |
localToScene(Point3D localPoint)
この
Node のローカル座標空間からそのシーンの座標空間に点を変換します。 |
Point3D |
localToScene(Point3D localPoint, boolean rootScene)
この
Node のローカル座標空間からそのシーンの座標空間に点を変換します。 |
ReadOnlyObjectProperty<Transform> |
localToSceneTransformProperty()
ローカルからシーンへの計算済変換を維持するアファイン変換。
|
Bounds |
localToScreen(Bounds localBounds)
この
Node のローカル座標空間からそのScreen の座標空間に境界を変換します。 |
Point2D |
localToScreen(double localX, double localY)
この
Node のローカル座標空間からそのScreen の座標空間に点を変換します。 |
Point2D |
localToScreen(double localX, double localY, double localZ)
この
Node のローカル座標空間からそのScreen の座標空間に点を変換します。 |
Point2D |
localToScreen(Point2D localPoint)
この
Node のローカル座標空間からそのScreen の座標空間に点を変換します。 |
Point2D |
localToScreen(Point3D localPoint)
この
Node のローカル座標空間からそのScreen の座標空間に点を変換します。 |
Node |
lookup(String selector)
特定のCSSセレクタに基づいて、この
Node または最初のサブノードを検索します。 |
Set<Node> |
lookupAll(String selector)
特定のCSSセレクタと一致するすべての
Node (このノードとすべての子を含む)を検索します。 |
BooleanProperty |
managedProperty()
このノードのレイアウトを親が管理するかどうかを定義します。
|
double |
maxHeight(double width)
レイアウト計算に使用するノードの最大高を返します。
|
double |
maxWidth(double height)
レイアウト計算に使用するノードの最大幅を返します。
|
double |
minHeight(double width)
レイアウト計算に使用するノードの最小高を返します。
|
double |
minWidth(double height)
レイアウト計算に使用するノードの最小幅を返します。
|
BooleanProperty |
mouseTransparentProperty()
true の場合、このノードは(そのすべての子とともに)マウス・イベントに対して完全に透過的になります。 |
ObjectProperty<NodeOrientation> |
nodeOrientationProperty()
NodeOrientationを保持するプロパティ。
|
void |
notifyAccessibleAttributeChanged(AccessibleAttribute attributes)
このメソッドは、属性の値が変更されたことをアシスティブ・テクノロジに通知するためにアプリケーションによって呼び出されます。
|
ObjectProperty<EventHandler<? super ContextMenuEvent>> |
onContextMenuRequestedProperty()
この
Node でコンテキスト・メニューがリクエストされたときに呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super MouseEvent>> |
onDragDetectedProperty()
ドラッグ・ジェスチャが検出されたときに呼び出される関数を定義します。
|
ObjectProperty<EventHandler<? super DragEvent>> |
onDragDoneProperty()
データがドロップ・ターゲットにドロップされた後に、この
Node がドラッグ・アンド・ドロップ・ジェスチャのソースである場合に呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super DragEvent>> |
onDragDroppedProperty()
ドラッグ・アンド・ドロップ・ジェスチャの間にこの
Node でマウス・ボタンが放されると呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super DragEvent>> |
onDragEnteredProperty()
ドラッグ・ジェスチャがこの
Node に入ると呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super DragEvent>> |
onDragExitedProperty()
ドラッグ・ジェスチャがこの
Node から出ると呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super DragEvent>> |
onDragOverProperty()
この
Node 内でドラッグ・ジェスチャが進行しているときに呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super InputMethodEvent>> |
onInputMethodTextChangedProperty()
この
Node に入力フォーカスがあり、入力メソッドのテキストが変更されたときに呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super KeyEvent>> |
onKeyPressedProperty()
この
Node またはその子Node に入力フォーカスがあり、キーが押されたときに呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super KeyEvent>> |
onKeyReleasedProperty()
この
Node またはその子Node に入力フォーカスがあり、キーが放されたときに呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super KeyEvent>> |
onKeyTypedProperty()
この
Node またはその子Node に入力フォーカスがあり、キーが入力されたときに呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super MouseEvent>> |
onMouseClickedProperty()
この
Node でマウス・ボタンがクリックされた(押されて放された)ときに呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super MouseDragEvent>> |
onMouseDragEnteredProperty()
押下、ドラッグ、解放のジェスチャがすべてこの
Node に入ると呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super MouseDragEvent>> |
onMouseDragExitedProperty()
押下、ドラッグ、解放のジェスチャがすべてこの
Node から出ると呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super MouseEvent>> |
onMouseDraggedProperty()
この
Node でマウス・ボタンが押されてからドラッグされるときに呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super MouseDragEvent>> |
onMouseDragOverProperty()
押下、ドラッグ、解放のジェスチャがすべてこの
Node 内で進行しているときに呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super MouseDragEvent>> |
onMouseDragReleasedProperty()
押下、ドラッグ、解放のジェスチャがすべてこの
Node 内で(マウス・ボタンを放すことにより)終了すると呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super MouseEvent>> |
onMouseEnteredProperty()
マウスがこの
Node に入るときに呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super MouseEvent>> |
onMouseExitedProperty()
マウスがこの
Node から出るときに呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super MouseEvent>> |
onMouseMovedProperty()
この
Node 内をマウス・カーソルが移動するが、ボタンが押されなかった場合に呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super MouseEvent>> |
onMousePressedProperty()
この
Node でマウス・ボタンが押されたときに呼び出される関数を定義します。 |
ObjectProperty<EventHandler<? super MouseEvent>> |
onMouseReleasedProperty()
この
Node でマウス・ボタンが放されたときに呼び出される関数を定義します。 |
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()
ズーム・ジェスチャが検出されると呼び出される関数を定義します。
|
DoubleProperty |
opacityProperty()
Node を表示する透明度(つまり、濃淡がない)を指定します。 |
ReadOnlyObjectProperty<Parent> |
parentProperty()
この
Node の親ノードです。 |
Bounds |
parentToLocal(Bounds parentBounds)
親の座標空間からこの
Node のローカル座標空間に矩形を変換します。 |
Point2D |
parentToLocal(double parentX, double parentY)
親の座標空間からこの
Node のローカル座標空間に点を変換します。 |
Point3D |
parentToLocal(double parentX, double parentY, double parentZ)
親の座標空間からこの
Node のローカル座標空間に点を変換します。 |
Point2D |
parentToLocal(Point2D parentPoint)
親の座標空間からこの
Node のローカル座標空間に点を変換します。 |
Point3D |
parentToLocal(Point3D parentPoint)
親の座標空間からこの
Node のローカル座標空間に点を変換します。 |
BooleanProperty |
pickOnBoundsProperty()
MouseEvent によってトリガーされた場合またはcontains 関数呼出しの場合の、このノードに対するピッキング計算の実行方法を定義します。 |
double |
prefHeight(double width)
レイアウト計算に使用するノードの優先高を返します。
|
double |
prefWidth(double height)
レイアウト計算に使用するノードの優先幅を返します。
|
ReadOnlyBooleanProperty |
pressedProperty()
Node が押されているかどうか。 |
void |
pseudoClassStateChanged(PseudoClass pseudoClass, boolean active)
このNodeの擬似クラスが変更されたことを示すために使用します。
|
Object |
queryAccessibleAttribute(AccessibleAttribute attribute, Object... parameters)
このメソッドは、属性の値をリクエストするためにアシスティブ・テクノロジによって呼び出されます。
|
void |
relocate(double x, double y)
ノードのlayoutXおよびlayoutY平行移動プロパティを設定して、このノードを親のx,y位置に再配置します。
|
<T extends Event> |
removeEventFilter(EventType<T> eventType, EventHandler<? super T> eventFilter)
以前登録済のイベント・フィルタをこのノードから登録解除します。
|
<T extends Event> |
removeEventHandler(EventType<T> eventType, EventHandler<? super T> eventHandler)
以前登録済のイベント・ハンドラをこのノードから登録解除します。
|
void |
requestFocus()
この
Node が入力フォーカスを取得すること、およびこのNode のトップ・レベルの祖先がフォーカスされたウィンドウになることを要求します。 |
void |
resize(double width, double height)
ノードがサイズ変更可能な場合、そのレイアウト境界を指定の幅および高さに設定します。
|
void |
resizeRelocate(double x, double y, double width, double height)
ノードがサイズ変更可能な場合、そのレイアウト境界を指定の幅および高さに設定します。
|
DoubleProperty |
rotateProperty()
Node の中心を基準とする回転角度を定義します(角度の単位で測定)。 |
ObjectProperty<Point3D> |
rotationAxisProperty()
この
Node の回転軸を定義します。 |
DoubleProperty |
scaleXProperty()
この
Node のX軸に沿って、オブジェクトの中心のまわりに座標がスケールされる係数を定義します。 |
DoubleProperty |
scaleYProperty()
この
Node のY軸に沿って、オブジェクトの中心のまわりに座標がスケールされる係数を定義します。 |
DoubleProperty |
scaleZProperty()
この
Node のZ軸に沿って、オブジェクトの中心のまわりに座標がスケールされる係数を定義します。 |
ReadOnlyObjectProperty<Scene> |
sceneProperty()
この
Node が一部であるScene 。 |
Bounds |
sceneToLocal(Bounds sceneBounds)
シーンの座標空間からこの
Node のローカル座標空間に矩形を変換します。 |
Bounds |
sceneToLocal(Bounds bounds, boolean rootScene)
シーンの座標空間からこの
Node のローカル座標空間に境界を変換します。 |
Point2D |
sceneToLocal(double sceneX, double sceneY)
シーンの座標空間からこの
Node のローカル座標空間に点を変換します。 |
Point2D |
sceneToLocal(double x, double y, boolean rootScene)
シーンの座標空間からこの
Node のローカル座標空間に点を変換します。 |
Point3D |
sceneToLocal(double sceneX, double sceneY, double sceneZ)
シーンの座標空間からこの
Node のローカル座標空間に点を変換します。 |
Point2D |
sceneToLocal(Point2D scenePoint)
シーンの座標空間からこの
Node のローカル座標空間に点を変換します。 |
Point2D |
sceneToLocal(Point2D point, boolean rootScene)
シーンの座標空間からこの
Node のローカル座標空間に点を変換します。 |
Point3D |
sceneToLocal(Point3D scenePoint)
シーンの座標空間からこの
Node のローカル座標空間に点を変換します。 |
Bounds |
screenToLocal(Bounds screenBounds)
Screen の座標空間からこのNode のローカル座標空間に矩形を変換します。 |
Point2D |
screenToLocal(double screenX, double screenY)
Screen の座標空間からこのNode のローカル座標空間に点を変換します。 |
Point2D |
screenToLocal(Point2D screenPoint)
Screen の座標空間からこのNode のローカル座標空間に点を変換します。 |
void |
setAccessibleHelp(String value)
プロパティaccessibleHelpの値を設定します。
|
void |
setAccessibleRole(AccessibleRole value)
プロパティaccessibleRoleの値を設定します。
|
void |
setAccessibleRoleDescription(String value)
プロパティaccessibleRoleDescriptionの値を設定します。
|
void |
setAccessibleText(String value)
プロパティaccessibleTextの値を設定します。
|
void |
setBlendMode(BlendMode value)
プロパティblendModeの値を設定します。
|
void |
setCache(boolean value)
プロパティcacheの値を設定します。
|
void |
setCacheHint(CacheHint value)
プロパティcacheHintの値を設定します。
|
void |
setClip(Node value)
プロパティclipの値を設定します。
|
void |
setCursor(Cursor value)
プロパティcursorの値を設定します。
|
void |
setDepthTest(DepthTest value)
プロパティdepthTestの値を設定します。
|
void |
setDisable(boolean value)
プロパティdisableの値を設定します。
|
protected void |
setDisabled(boolean value)
プロパティdisabledの値を設定します。
|
void |
setEffect(Effect value)
プロパティeffectの値を設定します。
|
void |
setEventDispatcher(EventDispatcher value)
プロパティeventDispatcherの値を設定します。
|
protected <T extends Event> |
setEventHandler(EventType<T> eventType, EventHandler<? super T> eventHandler)
このイベント・タイプに使用するハンドラを設定します。
|
protected void |
setFocused(boolean value)
プロパティfocusedの値を設定します。
|
void |
setFocusTraversable(boolean value)
プロパティfocusTraversableの値を設定します。
|
protected void |
setHover(boolean value)
プロパティhoverの値を設定します。
|
void |
setId(String value)
プロパティidの値を設定します。
|
void |
setInputMethodRequests(InputMethodRequests value)
プロパティinputMethodRequestsの値を設定します。
|
void |
setLayoutX(double value)
プロパティlayoutXの値を設定します。
|
void |
setLayoutY(double value)
プロパティlayoutYの値を設定します。
|
void |
setManaged(boolean value)
プロパティmanagedの値を設定します。
|
void |
setMouseTransparent(boolean value)
プロパティmouseTransparentの値を設定します。
|
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 |
setOpacity(double value)
プロパティopacityの値を設定します。
|
void |
setPickOnBounds(boolean value)
プロパティpickOnBoundsの値を設定します。
|
protected void |
setPressed(boolean value)
プロパティpressedの値を設定します。
|
void |
setRotate(double value)
プロパティrotateの値を設定します。
|
void |
setRotationAxis(Point3D value)
プロパティrotationAxisの値を設定します。
|
void |
setScaleX(double value)
プロパティscaleXの値を設定します。
|
void |
setScaleY(double value)
プロパティscaleYの値を設定します。
|
void |
setScaleZ(double value)
プロパティscaleZの値を設定します。
|
void |
setStyle(String value)
この
Node に関連付けられているCSSスタイルの文字列表現。 |
void |
setTranslateX(double value)
プロパティtranslateXの値を設定します。
|
void |
setTranslateY(double value)
プロパティtranslateYの値を設定します。
|
void |
setTranslateZ(double value)
プロパティtranslateZの値を設定します。
|
void |
setUserData(Object value)
後で取得できる単一のObjectプロパティを設定するためのコンビニエンス・メソッド。
|
void |
setVisible(boolean value)
プロパティvisibleの値を設定します。
|
void |
snapshot(Callback<SnapshotResult,Void> callback, SnapshotParameters params, WritableImage image)
次のフレームでこのノードのスナップショットを取得し、イメージの準備が整ったとき、指定されたコールバック・メソッドを呼び出します。
|
WritableImage |
snapshot(SnapshotParameters params, WritableImage image)
このノードのスナップショットを取得し、準備が整ったら、レンダリングされたイメージを返します。
|
Dragboard |
startDragAndDrop(TransferMode... transferModes)
この
Node 上で認識されたドラッグ・アンド・ドロップ・ジェスチャの候補を確定します。 |
void |
startFullDrag()
このノードをジェスチャ・ソースとして、完全な押下、ドラッグ、解放ジェスチャを開始します。
|
StringProperty |
styleProperty()
この
Node に関連付けられているCSSスタイルの文字列表現。 |
void |
toBack()
Z順序に関して、この
Node をその兄弟ノードの後ろに移動します。 |
void |
toFront()
Z順序に関して、この
Node をその兄弟ノードの前に移動します。 |
String |
toString()
オブジェクトの文字列表現を返します。
|
DoubleProperty |
translateXProperty()
この
Node の変換に追加される変換のX座標を定義します。 |
DoubleProperty |
translateYProperty()
この
Node の変換に追加される変換のY座標を定義します。 |
DoubleProperty |
translateZProperty()
この
Node の変換された座標に追加される変換のZ座標を定義します。 |
boolean |
usesMirroring()
ノードの向きが右から左の場合にノードをミラー化するかどうかを指定します。
|
BooleanProperty |
visibleProperty()
この
Node およびサブノードをシーン・グラフの一部としてレンダリングするかどうかを指定します。 |
public final ReadOnlyObjectProperty<Parent> parentProperty
Node
の親ノードです。このNode
がシーングラフに追加されていない場合、parentはnullになります。getParent()
public final ReadOnlyObjectProperty<Scene> sceneProperty
Node
が一部であるScene
。ノードがシーンに含まれていない場合、この変数はnullになります。getScene()
public final StringProperty idProperty
Node
のID。この単純な文字列識別子は、シーン・グラフ内で特定のノードを検索するのに役立ちます。ノードのIDはシーン・グラフ内で一意である必要がありますが、この一意性は強制されません。これは、HTML要素のid属性に似ています(CSS IDの指定)。
たとえば、ノードのidにmyIdが指定された場合、このノードの検索に使用できるlookupメソッドはscene.lookup("#myId");
のようになります。
getId()
、setId(String)
public final StringProperty styleProperty
Node
に関連付けられているCSSスタイルの文字列表現。これは、HTML要素のstyle属性に似ています。HTMLのstyle属性と同様に、この変数にはスタイル・プロパティと値が含まれ、スタイル・ルールのセレクタ部分は含まれていないことに注意してください。getStyle()
、setStyle(String)
public final BooleanProperty visibleProperty
Node
およびサブノードをシーン・グラフの一部としてレンダリングするかどうかを指定します。ノードは可視ですが、画面外にあったり、別のノードに隠れている場合などには、レンダリングされたシーンに表示されません。不可視のノードは、マウス・イベントやキーボード・フォーカスを受け取りません。また、ノードが不可視になったときに、キーボード・フォーカスは維持されません。isVisible()
、setVisible(boolean)
public final ObjectProperty<Cursor> cursorProperty
Node
とサブノードのマウス・カーソルを定義します。nullの場合、null以外のカーソルが定義された最初の親ノードのカーソルが使用されます。カーソルが定義されたノードがシーングラフに存在しない場合、Scene
のカーソルが使用されます。getCursor()
、setCursor(Cursor)
public final DoubleProperty opacityProperty
Node
を表示する透明度(つまり、濃淡がない)を指定します。0%の不透明度を持つノードは、完全に透明になります。つまり、引き続きvisible
でレンダリングされますが、一般に目には見えません。このルールの例外として、Node
をブレンド・モードおよびブレンド効果と組み合せた場合、透明なノードのレンダリングに引き続き影響が生じる可能性があります。不透明度が50%の場合、ノードは50%の透明度でレンダリングされます。
不透明度が設定されたvisible
ノードは、引き続きマウス・イベントを受け取り、キーボード・フォーカスの対象となります。たとえば、大きな不可視の矩形によってシーングラフ内のすべてのNode
を覆うことにより、ユーザーには表示しないがマウス・イベントのインターセプトは行うようにする場合、不透明度を0%とした大きなRectangle
を作成します。
不透明度は0から1までの値として指定します。0より小さい値は0とみなされ、1より大きい値は1とみなされます。
一部のプラットフォームでは、ImageViewでopacity変数がサポートされない場合があります。
1.0より小さい不透明度と3D変換を組み合せる場合、既知の制限があります。不透明度/ブレンドは基本的に2Dイメージ操作です。3D変換された子を持つGroup
ノードに1.0より小さい不透明度を設定した場合、その子は子間にzバッファを適用せずに順番にレンダリングされるようになります。
getOpacity()
、setOpacity(double)
public final ObjectProperty<BlendMode> blendModeProperty
BlendMode
。このノードがグループであった場合、すべての子がそれぞれ独自のブレンド・モードを使用して個別に一時バッファ内に合成され、その一時バッファが指定のブレンド・モードを使用してシーン内に合成されます。値null
はパススルーとして扱われ、グループなどの親には影響せず、単一ノードの場合はSRC_OVERと同等になりますgetBlendMode()
、setBlendMode(BlendMode)
public final ObjectProperty<Node> clipProperty
Node
を指定します。このクリッピング・ノードは、シーングラフの観点ではこのNode
の子ではありません。正確には、このNode
にクリップを定義するために使用するものです。
たとえば、ImageView
ノードをマスクとして使用してクリップを表すことができます。または、Rectangle
やCircle
などの幾何学的形状を持つノードのいずれかを使用することもできます。または、Text
ノードを使用してクリップを表すこともできます。
クリップを設定する際のシーングラフ構造の制限については、Node
クラスのドキュメントを参照してください。clip変数の変更がこれらの制限に違反する場合、その変更は無視され、clip変数は前の値に戻されます。
これは条件付き機能であることに注意してください。詳細は、ConditionalFeature.SHAPE_CLIP
を参照してください。
クリップと3D変換を組み合せる場合、既知の制限があります。クリッピングは基本的に2Dイメージ操作です。3D変換された子を持つGroup
ノードにクリップを設定した場合、その子は子間にzバッファを適用せずに順番にレンダリングされるようになります。
getClip()
、setClip(Node)
public final BooleanProperty cacheProperty
Node
をビットマップとしてキャッシュするかどうかを示すシステムのパフォーマンス・ヒント。ノードのビットマップ表現のレンダリングは、多くの場合、プリミティブ(特にぼかしなどの効果が適用されているプリミティブ)をレンダリングする場合と比較して高速になります。ただし、メモリー使用率も増加します。このヒントは、そのトレードオフ(パフォーマンス向上とメモリー使用率増加の交換)に価値があるかどうかを示します。また、GPU加速型プラットフォームなどの一部のプラットフォームでは、GPUでのレンダリングが非常に高速であることから、ぼかしやその他の効果が使用されている場合にノードをビットマップとしてキャッシュする利点はほとんどありません。cacheHintProperty()
変数には、より積極的なビットマップ・キャッシングを有効化するためのオプションが別途用意されています。
キャッシングは、3D変換が適用されたノード自体とその祖先または子孫に対しては無効化される場合があります。
isCache()
、setCache(boolean)
public final ObjectProperty<CacheHint> cacheHintProperty
レンダリングの負荷が高いノードをアニメーション化する場合など、特定の状況において、キャッシュされたビットマップを再生成することなく、ノードで変換を実行できるようにすることが望ましいことがあります。このような場合のオプションは、キャッシュされたビットマップ自体で変換を実行することです。
この方法では、アニメーションのパフォーマンスが大幅に向上しますが、その一方で視覚品質が低下する可能性があります。cacheHint
変数は、そのトレードオフ(アニメーションのパフォーマンスと視覚品質の交換)をいつどのように許容するかに関するヒントをシステムに与えます。
cacheHintは、ノードがアニメーション化されている場合にのみ有効化できます。このようにすると、負荷が高いノードを画面上に表示するときに、円滑なアニメーション化を維持したまま、完全な視覚品質を確保することが可能です。
例:
expensiveNode.setCache(true);
expensiveNode.setCacheHint(CacheHint.QUALITY);
...
// Do an animation
expensiveNode.setCacheHint(CacheHint.SPEED);
new Timeline(
new KeyFrame(Duration.seconds(2),
new KeyValue(expensiveNode.scaleXProperty(), 2.0),
new KeyValue(expensiveNode.scaleYProperty(), 2.0),
new KeyValue(expensiveNode.rotateProperty(), 360),
new KeyValue(expensiveNode.cacheHintProperty(), CacheHint.QUALITY)
)
).play();
cacheHint
はシステムに対するヒントにすぎないことに注意してください。ノードや変換の詳細によっては、このヒントが無視される場合もあります。
Node.cache
がfalseの場合、cacheHintは無視されます。キャッシングは、3D変換が適用されたノード自体とその祖先または子孫に対しては無効化される場合があります。
getCacheHint()
、setCacheHint(CacheHint)
public final ObjectProperty<Effect> effectProperty
Node
に適用する効果を指定します。
これは条件付き機能であることに注意してください。詳細は、ConditionalFeature.EFFECT
を参照してください。
効果と3D変換を組み合せる場合、既知の制限があります。効果は基本的に2Dイメージ操作です。3D変換された子を持つGroup
ノードに効果を設定した場合、その子は子間にzバッファを適用せずに順番にレンダリングされるようになります。
getEffect()
、setEffect(Effect)
public final ObjectProperty<DepthTest> depthTestProperty
DepthTest.DISABLE
にすると、このノードに対して深度テストが無効化されます。depthTestフラグをDepthTest.ENABLE
にすると、このノードに対して深度テストが有効化されます。depthTestフラグをDepthTest.INHERIT
にすると、深度テストが親ノードに対して有効化されているか、親ノードがnullの場合に、このノードに対しても深度テストが有効化されます。
depthTestフラグは、Scene
のdepthBufferフラグがtrueの場合(つまり、Scene
に奥行きのバッファが関連付けられている場合)にのみ使用します。
深度テスト比較は、depthTestを有効化したノード間でのみ実行されます。depthTestを無効化したノードでは、奥行きのバッファの読取り、テストまたは書込みは行われません。つまり、そのZ値は他のノードでの深度テストでは考慮されません。
これは条件付き機能であることに注意してください。詳細は、ConditionalFeature.SCENE3D
を参照してください。
depthBufferが入力引数の1つとして使用されているシーンのコンストラクタを参照してください。
getDepthTest()
、setDepthTest(DepthTest)
public final BooleanProperty disableProperty
Node
の個別の無効化状態を定義します。disable
をtrueに設定すると、このNode
とそのサブノードがすべて無効化されます。このプロパティは、Node
の無効化状態を設定する場合にのみ使用してください。Node
の無効化状態を問い合せる場合は、かわりにdisabled
プロパティを使用する必要があります。このNode
の個別のdisable
状態がfalse
であっても、祖先が無効化された結果としてNode
が無効化されている可能性があるためです。isDisable()
、setDisable(boolean)
public final BooleanProperty pickOnBoundsProperty
MouseEvent
によってトリガーされた場合またはcontains
関数呼出しの場合の、このノードに対するピッキング計算の実行方法を定義します。pickOnBounds
がtrueの場合、ピッキングはこのノードの境界との交差から計算されます。それ以外の場合、ピッキングはこのノードの幾何学的形状との交差から計算されます。isPickOnBounds()
、setPickOnBounds(boolean)
public final ReadOnlyBooleanProperty disabledProperty
Node
を無効にするかどうかを示します。Node
は、シーングラフ内のそのノード自体またはその祖先のいずれかでdisable
がtrue
に設定されている場合に無効化されます。
無効化されたNode
のレンダリング方法を変えて、ユーザーにそのノードが無効化状態であることを示す必要があります。このような無効化レンダリングはNode
の実装に依存します。javafx.scene.shape
に含まれているshapeクラスについては、このようなレンダリングをデフォルトでは実装しません。そのため、図形を使用して入力を処理するアプリケーション自体で適切な無効化レンダリングを実装する必要があります。一方で、javafx.scene.control
に定義されたユーザー・インタフェース・コントロールについては、無効化を区別するレンダリングを実装します。
無効化されたNode
は、マウス・イベントやキー・イベントを受け取りません。
isDisabled()
、setDisabled(boolean)
public final ObjectProperty<EventHandler<? super DragEvent>> onDragEnteredProperty
Node
に入ると呼び出される関数を定義します。public final ObjectProperty<EventHandler<? super DragEvent>> onDragExitedProperty
Node
から出ると呼び出される関数を定義します。public final ObjectProperty<EventHandler<? super DragEvent>> onDragOverProperty
Node
内でドラッグ・ジェスチャが進行しているときに呼び出される関数を定義します。public final ObjectProperty<EventHandler<? super DragEvent>> onDragDroppedProperty
public final ObjectProperty<EventHandler<? super DragEvent>> onDragDoneProperty
Node
がドラッグ・アンド・ドロップ・ジェスチャのソースである場合に呼び出される関数を定義します。イベントのtransferMode
は、ドロップ・ターゲットで何が起きたかを示します。transferMode
の値がMOVE
である場合には、ソースがそのデータをクリアできます。ソースのデータをクリアすると、ドラッグ・アンド・ドロップ・ジェスチャによってデータが移動された適切な外観がユーザーに表示されます。値がNONE
のtransferMode
は、ドラッグ・アンド・ドロップ・ジェスチャでデータが転送されなかったことを示しています。public final BooleanProperty managedProperty
layoutBounds
の計算で考慮し、シーンのレイアウト・パスでそのノードをレイアウトします。管理対象のノードのlayoutBoundsが変わると、シーングラフ上位の最も近いレイアウト・ルート(通常はシーンのルート・ノード)に対して再レイアウトが自動的にトリガーされます。
ノードが管理対象外の場合、その親は優先サイズの計算とレイアウトの両方において子を無視します。layoutBoundsが変更されても、上位で再レイアウトはトリガーされません。管理対象外のノードのタイプがParent
である場合、そのノードはレイアウト・ルートとして動作します。つまり、その下位でParent.requestLayout()
を呼び出した場合、そのノードをルートとするブランチのみが再レイアウトされ、結果としてそのノードとその下位に対するレイアウトの変更は分離されます。管理対象外のノードのサイズと位置の設定はアプリケーションで行う必要があります。
デフォルトでは、すべてのノードが管理対象です。
public final DoubleProperty layoutXProperty
Node
の変換に追加される変換のX座標を定義します。値は、ノードの位置を現在のlayoutBounds minX
位置(0でない可能性あり)から目的の位置に調整するために必要なオフセットとして計算する必要があります。
たとえば、textnode
はfinalX
に配置する必要があります。
textnode.setLayoutX(finalX - textnode.getLayoutBounds().getMinX());
layoutBounds minX
を減算しなかった場合、ノードが間違って配置される可能性があります。relocate(x, y)
メソッドは正しい計算を自動的に実行するため、一般には、layoutXを直接設定するよりもこのメソッドを使用するのが妥当です。
ノードの最終的な平行移動はlayoutX
+ translateX
として計算されます。layoutX
によりノードの安定位置を決定し、translateX
により必要に応じてその位置を動的に調整します。
ノードが管理対象であり、Region
がその親となっている場合、そのレイアウト・リージョン自体のレイアウト・ポリシーに従ってlayoutX
が設定されます。ノードが管理対象外であるか、Group
がその親となっている場合は、アプリケーションで直接layoutX
を設定してノードを配置できます。
public final DoubleProperty layoutYProperty
Node
の変換に追加される変換のY座標を定義します。値は、ノードの位置を現在のlayoutBounds minY
位置(0でない可能性あり)から目的の位置に調整するために必要なオフセットとして計算する必要があります。
たとえば、textnode
はfinalY
に配置する必要があります。
textnode.setLayoutY(finalY - textnode.getLayoutBounds().getMinY());
layoutBounds minY
を減算しなかった場合、ノードが間違って配置される可能性があります。relocate(x, y)
メソッドは正しい計算を自動的に実行するため、一般には、layoutYを直接設定するよりもこのメソッドを使用するのが妥当です。
ノードの最終的な平行移動はlayoutY
+ translateY
として計算されます。layoutY
によりノードの安定位置を決定し、translateY
により必要に応じてその位置を動的に調整します。
ノードが管理対象であり、Region
がその親となっている場合、そのリージョン自体のレイアウト・ポリシーに従ってlayoutY
が設定されます。ノードが管理対象外であるか、Group
がその親となっている場合は、アプリケーションで直接layoutY
を設定してノードを配置できます。
public final ReadOnlyObjectProperty<Bounds> boundsInParentProperty
Node
の矩形境界(その変換を含む)。boundsInParent
は、ローカル境界(boundsInLocal
で定義)を取得し、変換(次の追加変数を設定して作成)を適用することによって計算されます。
transforms
ObservableListscaleX
、scaleY
rotate
layoutX
、layoutY
translateX
、translateY
結果の境界は概念的にはNode
の親の座標空間内にありますが、ノードの親でこれらの境界を計算する必要はありません。
このメソッドではノードの可視性は考慮されません。計算はこのNode
のジオメトリのみに基づいて行われます。
このプロパティは常にnull以外の値を持ちます。
ノードのジオメトリが変更されるか、transforms ObservableList、translateX、translateY、layoutX、layoutY、scaleX、scaleY、rotateのいずれかの変数が変更されると、boundsInParentが自動的に再計算されます。そのため、ノードのこれらの値のいずれかをこの変数に依存する式にバインドするとエラーになります。たとえば、ノードの配置目的で図形のxまたはy変数、translateX、translateYをboundsInParentにバインドしないでください。
getBoundsInParent()
public final ReadOnlyObjectProperty<Bounds> boundsInLocalProperty
Node
の矩形境界線。Shape
を拡張するノードの場合、ローカル境界には、位置属性およびサイズ属性によって定義される図形のジオメトリ外に出る可能性があるゼロ以外のストロークに必要なスペースも含まれます。ローカル境界には、clip
で設定されるクリッピングおよびeffect
で設定される効果も含まれます。
このメソッドではノードの可視性は考慮されません。計算はこのNode
のジオメトリのみに基づいて行われます。
このプロパティは常にnull以外の値を持ちます。
ノードのジオメトリが変更されるたびに、boundsInLocalが自動的に再計算されます。そのため、ノードのこれらの値のいずれかをこの変数に依存する式にバインドするとエラーになります。たとえば、ノードの配置目的で図形のxまたはy変数をboundsInLocalにバインドしないでください。
getBoundsInLocal()
public final ReadOnlyObjectProperty<Bounds> layoutBoundsProperty
layoutBounds
はノードの視覚境界とは異なる可能性があり、ノード・タイプによって計算方法も異なります。
サイズ変更可能なノード・タイプの場合(Region
、Control
またはWebView
)、layoutBoundsは常に0,0 width x height
になります。サイズ変更不可能なノード・タイプの場合(Shape
、Text
またはGroup
)、layoutBoundsはノードのジオメトリ・プロパティに基づいて計算され、ノードのクリップ、効果または変換を含みません。詳細は、個々のクラスのドキュメントを参照してください。
layoutX
、layoutY
、translateX
およびtranslateY
変数はlayoutBoundsには含まれないことに注意してください。レイアウト・コードでは最初に(layoutBoundsを使用して)ノードの現在のサイズと位置を決定してから、目的のレイアウト位置に配置されるようにlayoutX
およびlayoutY
を設定してノードの平行移動を調整する必要があるため、この点は重要です。
layoutBoundsの計算はノードのジオメトリ変数に関連することが多いため、このような変数をlayoutBounds
に依存する式にバインドするとエラーになります。たとえば、ノードの配置目的で図形のxまたはy変数をlayoutBoundsにバインドしないでください。
layoutBoundsがnullになることはありません。
getLayoutBounds()
public final DoubleProperty translateXProperty
Node
の変換に追加される変換のX座標を定義します。
ノードの最終的な平行移動はlayoutX
+ translateX
として計算されます。layoutX
によりノードの安定位置を決定し、translateX
により必要に応じてその位置を動的に調整します。
この変数を使用すると、ノードのlayoutBounds
に支障がないようにノードの位置を変更できるため、ノードの位置をアニメーション化する場合に役立ちます。
getTranslateX()
、setTranslateX(double)
public final DoubleProperty translateYProperty
Node
の変換に追加される変換のY座標を定義します。
ノードの最終的な平行移動はlayoutY
+ translateY
として計算されます。layoutY
によりノードの安定位置を決定し、translateY
により必要に応じてその位置を動的に調整します。
この変数を使用すると、ノードのlayoutBounds
に支障がないようにノードの位置を変更できるため、ノードの位置をアニメーション化する場合に役立ちます。
getTranslateY()
、setTranslateY(double)
public final DoubleProperty translateZProperty
Node
の変換された座標に追加される変換のZ座標を定義します。この値は、transforms
ObservableListおよびlayoutZ
によって定義する平行移動に追加されます。
この変数を使用すると、ノードのレイアウト境界に支障がないようにノードの位置を変更できるため、ノードの位置をアニメーション化する場合に役立ちます。
これは条件付き機能であることに注意してください。詳細は、ConditionalFeature.SCENE3D
を参照してください。
getTranslateZ()
、setTranslateZ(double)
public final DoubleProperty scaleXProperty
Node
のX軸に沿って、オブジェクトの中心のまわりに座標がスケールされる係数を定義します。手動またはアニメーションによりノードの拡大やアニメーション化を行うために使用します。
このスケール係数はデフォルトではlayoutBounds
に含まれていないため、すべての効果および変換を考慮した後にノード全体をスケーリングする場合に適しています。
スケールの中心として使用されるピボット・ポイントは、無変換のlayoutBounds
の中心です。
getScaleX()
、setScaleX(double)
public final DoubleProperty scaleYProperty
Node
のY軸に沿って、オブジェクトの中心のまわりに座標がスケールされる係数を定義します。手動またはアニメーションによりノードの拡大やアニメーション化を行うために使用します。
このスケール係数はデフォルトではlayoutBounds
に含まれていないため、すべての効果および変換を考慮した後にノード全体をスケーリングする場合に適しています。
スケールの中心として使用されるピボット・ポイントは、無変換のlayoutBounds
の中心です。
getScaleY()
、setScaleY(double)
public final DoubleProperty scaleZProperty
Node
のZ軸に沿って、オブジェクトの中心のまわりに座標がスケールされる係数を定義します。手動またはアニメーションによりノードの拡大やアニメーション化を行うために使用します。
このスケール係数はデフォルトではlayoutBounds
に含まれていないため、すべての効果および変換を考慮した後にノード全体をスケーリングする場合に適しています。
スケールの中心として使用されるピボット・ポイントは、boundsInLocal
を取得し、transforms
ObservableListのすべての変換を適用することによって形成される矩形境界の中心です。
これは条件付き機能であることに注意してください。詳細は、ConditionalFeature.SCENE3D
を参照してください。
getScaleZ()
、setScaleZ(double)
public final DoubleProperty rotateProperty
Node
の中心を基準とする回転角度を定義します(角度の単位で測定)。Node
を回転するために使用します。
この回転係数はデフォルトではlayoutBounds
に含まれておらず、すべての効果および変換を考慮してからノード全体を回転するのに適しています。
回転の中心として使用されるピボット・ポイントは、無変換のlayoutBounds
の中心です。
ピボット・ポイントはこのNode
のレイアウト境界の中心として計算されるため、レイアウト境界が変わると、ピボット・ポイントも変わり、オブジェクトが移動される可能性があります。リーフ・ノードの場合、ジオメトリが変わると、レイアウト境界も変わります。グループ・ノードの場合、その子(子のジオメトリ、クリップ、効果、位置、向き、スケールなど)が変わると、グループのレイアウト境界も変わります。このようにピボット・ポイントが移動することが望ましくない場合は、アプリケーションでかわりにノードのtransforms
ObservableListを使用し、ユーザーが指定可能なピボット・ポイントに対応したRotate
変換を追加する必要があります。
getRotate()
、setRotate(double)
public final ObjectProperty<Point3D> rotationAxisProperty
Node
の回転軸を定義します。
これは条件付き機能であることに注意してください。詳細は、ConditionalFeature.SCENE3D
を参照してください。
getRotationAxis()
、setRotationAxis(Point3D)
public final ReadOnlyObjectProperty<Transform> localToParentTransformProperty
getLocalToParentTransform()
public final ReadOnlyObjectProperty<Transform> localToSceneTransformProperty
SubScene
内にある場合、このプロパティはルート・シーンではなくサブシーンまでの変換を表します。
このプロパティに対してリスナーやバインディングを登録する場合、ルート・ノードまでのすべての親で無効化をリスニングする必要があります。これは、多くのノードでこのプロパティに対してリスナーを登録すると、共通の親における変換変更のパフォーマンスが低下する可能性があることを意味します。
getLocalToSceneTransform()
public final ObjectProperty<NodeOrientation> nodeOrientationProperty
ノードの向きは、ノード内の視覚データのフローを表します。英語の世界では、視覚データのフローは一般に左から右になります。アラビア語やヘブライ語の世界では、視覚データのフローは右から左になります。これは、どちらの世界においてもテキストを読む方向と一致しています。デフォルト値は左から右です。
public final ReadOnlyObjectProperty<NodeOrientation> effectiveNodeOrientationProperty
getEffectiveNodeOrientation()
public final BooleanProperty mouseTransparentProperty
true
の場合、このノードは(そのすべての子とともに)マウス・イベントに対して完全に透過的になります。マウス・イベントのターゲットを選択する際には、mouseTransparent
がtrue
に設定されたノードとそのサブツリーは考慮されません。public final ReadOnlyBooleanProperty hoverProperty
Node
にカーソルが置かれているかどうか。一般に、これはノード上にマウスを置いていることに起因するものですが、グラフィックス・タブレット上のペン・ホバリングやその他の形式の入力に起因する場合もあります。
ホバーの現在の実装では、マウスの入出イベントに基づいてこのノードがホバー状態かどうか判断されます。つまり、この機能は、現時点ではマウスに対応したシステムでのみサポートされています。将来の実装では、別の手段によるホバー・サポートが提供される予定です。
isHover()
、setHover(boolean)
public final ReadOnlyBooleanProperty pressedProperty
Node
が押されているかどうか。一般に、これは第一マウス・ボタンの押下時に該当します。ただし、サブクラスでは、その他のマウス・ボタン状態やキー状態に起因してノードが押されるように定義することもできます。isPressed()
、setPressed(boolean)
public final ObjectProperty<EventHandler<? super ContextMenuEvent>> onContextMenuRequestedProperty
Node
でコンテキスト・メニューがリクエストされたときに呼び出される関数を定義します。getOnContextMenuRequested()
、setOnContextMenuRequested(EventHandler)
public final ObjectProperty<EventHandler<? super MouseEvent>> onMouseClickedProperty
Node
でマウス・ボタンがクリックされた(押されて放された)ときに呼び出される関数を定義します。public final ObjectProperty<EventHandler<? super MouseEvent>> onMouseDraggedProperty
Node
でマウス・ボタンが押されてからドラッグされるときに呼び出される関数を定義します。public final ObjectProperty<EventHandler<? super MouseEvent>> onMouseEnteredProperty
Node
に入るときに呼び出される関数を定義します。public final ObjectProperty<EventHandler<? super MouseEvent>> onMouseExitedProperty
Node
から出るときに呼び出される関数を定義します。public final ObjectProperty<EventHandler<? super MouseEvent>> onMouseMovedProperty
Node
内をマウス・カーソルが移動するが、ボタンが押されなかった場合に呼び出される関数を定義します。public final ObjectProperty<EventHandler<? super MouseEvent>> onMousePressedProperty
Node
でマウス・ボタンが押されたときに呼び出される関数を定義します。public final ObjectProperty<EventHandler<? super MouseEvent>> onMouseReleasedProperty
Node
でマウス・ボタンが放されたときに呼び出される関数を定義します。public final ObjectProperty<EventHandler<? super MouseEvent>> onDragDetectedProperty
public final ObjectProperty<EventHandler<? super MouseDragEvent>> onMouseDragOverProperty
Node
内で進行しているときに呼び出される関数を定義します。getOnMouseDragOver()
、setOnMouseDragOver(EventHandler)
public final ObjectProperty<EventHandler<? super MouseDragEvent>> onMouseDragReleasedProperty
Node
内で(マウス・ボタンを放すことにより)終了すると呼び出される関数を定義します。getOnMouseDragReleased()
、setOnMouseDragReleased(EventHandler)
public final ObjectProperty<EventHandler<? super MouseDragEvent>> onMouseDragEnteredProperty
Node
に入ると呼び出される関数を定義します。getOnMouseDragEntered()
、setOnMouseDragEntered(EventHandler)
public final ObjectProperty<EventHandler<? super MouseDragEvent>> onMouseDragExitedProperty
Node
から出ると呼び出される関数を定義します。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 KeyEvent>> onKeyPressedProperty
Node
またはその子Node
に入力フォーカスがあり、キーが押されたときに呼び出される関数を定義します。この関数は、キャプチャ・フェーズまたはバブリング・フェーズでイベントがまだ使用されていない場合にのみ呼び出されます。public final ObjectProperty<EventHandler<? super KeyEvent>> onKeyReleasedProperty
Node
またはその子Node
に入力フォーカスがあり、キーが放されたときに呼び出される関数を定義します。この関数は、キャプチャ・フェーズまたはバブリング・フェーズでイベントがまだ使用されていない場合にのみ呼び出されます。public final ObjectProperty<EventHandler<? super KeyEvent>> onKeyTypedProperty
Node
またはその子Node
に入力フォーカスがあり、キーが入力されたときに呼び出される関数を定義します。この関数は、キャプチャ・フェーズまたはバブリング・フェーズでイベントがまだ使用されていない場合にのみ呼び出されます。public final ObjectProperty<EventHandler<? super InputMethodEvent>> onInputMethodTextChangedProperty
Node
に入力フォーカスがあり、入力メソッドのテキストが変更されたときに呼び出される関数を定義します。この関数がこのNode
に定義されていない場合、入力メソッド・コンポジションの結果文字列は、一連のonKeyTyped
関数呼出しとして受け取ります。
Node
が入力フォーカスを失うと、JavaFXランタイムによって既存の変換テキスト(存在する場合)が自動的にコミットされます。public final ObjectProperty<InputMethodRequests> inputMethodRequestsProperty
public final ReadOnlyBooleanProperty focusedProperty
Node
に入力フォーカスがあるかどうかを示します。入力フォーカスを設定するには、ノードがScene
のフォーカス所有者であり、可視かつアクティブなStage
にそのシーンが存在する必要があります。詳細は、requestFocus()
を参照してください。isFocused()
、setFocused(boolean)
public final BooleanProperty focusTraversableProperty
Node
は、フォーカス・トラバーサル・サイクルの一部である必要があります。このプロパティがtrue
の場合、標準のフォーカス・トラバーサル・キーを使用して、このNode
に、またはこのNode
からフォーカスを移すことができます。デスクトップでは、通常、フォーカスを前方に移す場合は[TAB]
キーを使用し、フォーカスを後方に移す場合は[SHIFT] + [TAB]
キーを使用します。Scene
が作成されると、フォーカスの対象としてfocusTraversable
変数がtrueに設定されているNode
に自動的にフォーカスが設定されます。ただし、requestFocus()
を呼び出してフォーカスを明示的に設定している場合を除きます。isFocusTraversable()
、setFocusTraversable(boolean)
public final ObjectProperty<EventDispatcher> eventDispatcherProperty
EventDispatcher
に置換した場合、新しいディスパッチャは、置換されたディスパッチャにイベントを転送して、ノードのデフォルトのイベント処理動作を維持する必要があります。public final ObjectProperty<AccessibleRole> accessibleRoleProperty
Node
のアクセス可能な役割。
スクリーン・リーダーはノードの役割を使用して、サポートされている属性およびアクションを判別します。
AccessibleRole.NODE
getAccessibleRole()
、setAccessibleRole(AccessibleRole)
public final ObjectProperty<String> accessibleRoleDescriptionProperty
Node
のロール説明。
通常、ノードに対して役割が提供されている場合、スクリーン・リーダーはノードのコンテンツおよび役割を読み上げます。この値が設定されている場合、デフォルトをオーバーライドすることが可能です。これは、役割のセットが事前定義されているため便利です。たとえば、ノードの役割をボタンに設定し、役割説明を任意のテキストにすることができます。
getAccessibleRoleDescription()
、setAccessibleRoleDescription(String)
public final ObjectProperty<String> accessibleTextProperty
Node
のアクセス可能なテキスト。
このプロパティは、スクリーン・リーダーが読み上げるテキストを設定するために使用します。ノードが通常テキストを読み上げる場合、そのテキストはオーバーライドされます。たとえば、ボタンは通常、コントロール内のテキストを使用して読み上げますが、この値が設定されると、この動作を停止します。
getAccessibleText()
、setAccessibleText(String)
public final ObjectProperty<String> accessibleHelpProperty
Node
のアクセス可能なヘルプ・テキスト。
ヘルプ・テキストは、ノードのアクセス可能なテキストの詳細な説明を提供します。デフォルトでは、ノードにツール・チップがある場合、このテキストが使用されます。
getAccessibleHelp()
、setAccessibleHelp(String)
public static final double BASELINE_OFFSET_SAME_AS_HEIGHT
getBaselineOffset()
から返される場合がある特殊な値です。このノードの親(レイアウト・ペイン)がこのノードの高さをベースラインとして使用する必要があることを意味します。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 Parent getParent()
Node
の親ノードです。このNode
がシーングラフに追加されていない場合、parentはnullになります。public final ReadOnlyObjectProperty<Parent> parentProperty()
Node
の親ノードです。このNode
がシーングラフに追加されていない場合、parentはnullになります。getParent()
public final Scene getScene()
Node
が一部であるScene
。ノードがシーンに含まれていない場合、この変数はnullになります。public final ReadOnlyObjectProperty<Scene> sceneProperty()
Node
が一部であるScene
。ノードがシーンに含まれていない場合、この変数はnullになります。getScene()
public final void setId(String value)
Node
のID。この単純な文字列識別子は、シーン・グラフ内で特定のノードを検索するのに役立ちます。ノードのIDはシーン・グラフ内で一意である必要がありますが、この一意性は強制されません。これは、HTML要素のid属性に似ています(CSS IDの指定)。
たとえば、ノードのidにmyIdが指定された場合、このノードの検索に使用できるlookupメソッドはscene.lookup("#myId");
のようになります。
public final String getId()
Node
のID。この単純な文字列識別子は、シーン・グラフ内で特定のノードを検索するのに役立ちます。ノードのIDはシーン・グラフ内で一意である必要がありますが、この一意性は強制されません。これは、HTML要素のid属性に似ています(CSS IDの指定)。getId
、インタフェース: Styleable
setId
メソッドを使用してこのNode
に割り当てられたid、またはnull
(idが割り当てられていない場合)。public final StringProperty idProperty()
Node
のID。この単純な文字列識別子は、シーン・グラフ内で特定のノードを検索するのに役立ちます。ノードのIDはシーン・グラフ内で一意である必要がありますが、この一意性は強制されません。これは、HTML要素のid属性に似ています(CSS IDの指定)。
たとえば、ノードのidにmyIdが指定された場合、このノードの検索に使用できるlookupメソッドはscene.lookup("#myId");
のようになります。
getId()
、setId(String)
public final ObservableList<String> getStyleClass()
Styleable
getStyleClass
、インタフェース: Styleable
public final void setStyle(String value)
Node
に関連付けられているCSSスタイルの文字列表現。これは、HTML要素のstyle属性に似ています。HTMLのstyle属性と同様に、この変数にはスタイル・プロパティと値が含まれ、スタイル・ルールのセレクタ部分は含まれていないことに注意してください。value
- このNode
に使用するインラインCSSスタイル。null
は暗黙的に空の文字列に変換されます。public final String getStyle()
Node
に関連付けられているCSSスタイルの文字列表現。これは、HTML要素のstyle属性に似ています。HTMLのstyle属性と同様に、この変数にはスタイル・プロパティと値が含まれ、スタイル・ルールのセレクタ部分は含まれていないことに注意してください。getStyle
、インタフェース: Styleable
Node
に関連付けられているインラインCSSスタイル。このNode
にインライン・スタイルがない場合は、空の文字列が返されます。public final StringProperty styleProperty()
Node
に関連付けられているCSSスタイルの文字列表現。これは、HTML要素のstyle属性に似ています。HTMLのstyle属性と同様に、この変数にはスタイル・プロパティと値が含まれ、スタイル・ルールのセレクタ部分は含まれていないことに注意してください。getStyle()
、setStyle(String)
public final void setVisible(boolean value)
Node
およびサブノードをシーン・グラフの一部としてレンダリングするかどうかを指定します。ノードは可視ですが、画面外にあったり、別のノードに隠れている場合などには、レンダリングされたシーンに表示されません。不可視のノードは、マウス・イベントやキーボード・フォーカスを受け取りません。また、ノードが不可視になったときに、キーボード・フォーカスは維持されません。public final boolean isVisible()
Node
およびサブノードをシーン・グラフの一部としてレンダリングするかどうかを指定します。ノードは可視ですが、画面外にあったり、別のノードに隠れている場合などには、レンダリングされたシーンに表示されません。不可視のノードは、マウス・イベントやキーボード・フォーカスを受け取りません。また、ノードが不可視になったときに、キーボード・フォーカスは維持されません。public final BooleanProperty visibleProperty()
Node
およびサブノードをシーン・グラフの一部としてレンダリングするかどうかを指定します。ノードは可視ですが、画面外にあったり、別のノードに隠れている場合などには、レンダリングされたシーンに表示されません。不可視のノードは、マウス・イベントやキーボード・フォーカスを受け取りません。また、ノードが不可視になったときに、キーボード・フォーカスは維持されません。isVisible()
、setVisible(boolean)
public final void setCursor(Cursor value)
Node
とサブノードのマウス・カーソルを定義します。nullの場合、null以外のカーソルが定義された最初の親ノードのカーソルが使用されます。カーソルが定義されたノードがシーングラフに存在しない場合、Scene
のカーソルが使用されます。public final Cursor getCursor()
Node
とサブノードのマウス・カーソルを定義します。nullの場合、null以外のカーソルが定義された最初の親ノードのカーソルが使用されます。カーソルが定義されたノードがシーングラフに存在しない場合、Scene
のカーソルが使用されます。public final ObjectProperty<Cursor> cursorProperty()
Node
とサブノードのマウス・カーソルを定義します。nullの場合、null以外のカーソルが定義された最初の親ノードのカーソルが使用されます。カーソルが定義されたノードがシーングラフに存在しない場合、Scene
のカーソルが使用されます。getCursor()
、setCursor(Cursor)
public final void setOpacity(double value)
Node
を表示する透明度(つまり、濃淡がない)を指定します。0%の不透明度を持つノードは、完全に透明になります。つまり、引き続きvisible
でレンダリングされますが、一般に目には見えません。このルールの例外として、Node
をブレンド・モードおよびブレンド効果と組み合せた場合、透明なノードのレンダリングに引き続き影響が生じる可能性があります。不透明度が50%の場合、ノードは50%の透明度でレンダリングされます。
不透明度が設定されたvisible
ノードは、引き続きマウス・イベントを受け取り、キーボード・フォーカスの対象となります。たとえば、大きな不可視の矩形によってシーングラフ内のすべてのNode
を覆うことにより、ユーザーには表示しないがマウス・イベントのインターセプトは行うようにする場合、不透明度を0%とした大きなRectangle
を作成します。
不透明度は0から1までの値として指定します。0より小さい値は0とみなされ、1より大きい値は1とみなされます。
一部のプラットフォームでは、ImageViewでopacity変数がサポートされない場合があります。
1.0より小さい不透明度と3D変換を組み合せる場合、既知の制限があります。不透明度/ブレンドは基本的に2Dイメージ操作です。3D変換された子を持つGroup
ノードに1.0より小さい不透明度を設定した場合、その子は子間にzバッファを適用せずに順番にレンダリングされるようになります。
public final double getOpacity()
Node
を表示する透明度(つまり、濃淡がない)を指定します。0%の不透明度を持つノードは、完全に透明になります。つまり、引き続きvisible
でレンダリングされますが、一般に目には見えません。このルールの例外として、Node
をブレンド・モードおよびブレンド効果と組み合せた場合、透明なノードのレンダリングに引き続き影響が生じる可能性があります。不透明度が50%の場合、ノードは50%の透明度でレンダリングされます。
不透明度が設定されたvisible
ノードは、引き続きマウス・イベントを受け取り、キーボード・フォーカスの対象となります。たとえば、大きな不可視の矩形によってシーングラフ内のすべてのNode
を覆うことにより、ユーザーには表示しないがマウス・イベントのインターセプトは行うようにする場合、不透明度を0%とした大きなRectangle
を作成します。
不透明度は0から1までの値として指定します。0より小さい値は0とみなされ、1より大きい値は1とみなされます。
一部のプラットフォームでは、ImageViewでopacity変数がサポートされない場合があります。
1.0より小さい不透明度と3D変換を組み合せる場合、既知の制限があります。不透明度/ブレンドは基本的に2Dイメージ操作です。3D変換された子を持つGroup
ノードに1.0より小さい不透明度を設定した場合、その子は子間にzバッファを適用せずに順番にレンダリングされるようになります。
public final DoubleProperty opacityProperty()
Node
を表示する透明度(つまり、濃淡がない)を指定します。0%の不透明度を持つノードは、完全に透明になります。つまり、引き続きvisible
でレンダリングされますが、一般に目には見えません。このルールの例外として、Node
をブレンド・モードおよびブレンド効果と組み合せた場合、透明なノードのレンダリングに引き続き影響が生じる可能性があります。不透明度が50%の場合、ノードは50%の透明度でレンダリングされます。
不透明度が設定されたvisible
ノードは、引き続きマウス・イベントを受け取り、キーボード・フォーカスの対象となります。たとえば、大きな不可視の矩形によってシーングラフ内のすべてのNode
を覆うことにより、ユーザーには表示しないがマウス・イベントのインターセプトは行うようにする場合、不透明度を0%とした大きなRectangle
を作成します。
不透明度は0から1までの値として指定します。0より小さい値は0とみなされ、1より大きい値は1とみなされます。
一部のプラットフォームでは、ImageViewでopacity変数がサポートされない場合があります。
1.0より小さい不透明度と3D変換を組み合せる場合、既知の制限があります。不透明度/ブレンドは基本的に2Dイメージ操作です。3D変換された子を持つGroup
ノードに1.0より小さい不透明度を設定した場合、その子は子間にzバッファを適用せずに順番にレンダリングされるようになります。
getOpacity()
、setOpacity(double)
public final void setBlendMode(BlendMode value)
BlendMode
。このノードがグループであった場合、すべての子がそれぞれ独自のブレンド・モードを使用して個別に一時バッファ内に合成され、その一時バッファが指定のブレンド・モードを使用してシーン内に合成されます。値null
はパススルーとして扱われ、グループなどの親には影響せず、単一ノードの場合はSRC_OVERと同等になりますpublic final BlendMode getBlendMode()
BlendMode
。このノードがグループであった場合、すべての子がそれぞれ独自のブレンド・モードを使用して個別に一時バッファ内に合成され、その一時バッファが指定のブレンド・モードを使用してシーン内に合成されます。値null
はパススルーとして扱われ、グループなどの親には影響せず、単一ノードの場合はSRC_OVERと同等になりますpublic final ObjectProperty<BlendMode> blendModeProperty()
BlendMode
。このノードがグループであった場合、すべての子がそれぞれ独自のブレンド・モードを使用して個別に一時バッファ内に合成され、その一時バッファが指定のブレンド・モードを使用してシーン内に合成されます。値null
はパススルーとして扱われ、グループなどの親には影響せず、単一ノードの場合はSRC_OVERと同等になりますgetBlendMode()
、setBlendMode(BlendMode)
public final void setClip(Node value)
Node
を指定します。このクリッピング・ノードは、シーングラフの観点ではこのNode
の子ではありません。正確には、このNode
にクリップを定義するために使用するものです。
たとえば、ImageView
ノードをマスクとして使用してクリップを表すことができます。または、Rectangle
やCircle
などの幾何学的形状を持つノードのいずれかを使用することもできます。または、Text
ノードを使用してクリップを表すこともできます。
クリップを設定する際のシーングラフ構造の制限については、Node
クラスのドキュメントを参照してください。clip変数の変更がこれらの制限に違反する場合、その変更は無視され、clip変数は前の値に戻されます。
これは条件付き機能であることに注意してください。詳細は、ConditionalFeature.SHAPE_CLIP
を参照してください。
クリップと3D変換を組み合せる場合、既知の制限があります。クリッピングは基本的に2Dイメージ操作です。3D変換された子を持つGroup
ノードにクリップを設定した場合、その子は子間にzバッファを適用せずに順番にレンダリングされるようになります。
public final Node getClip()
Node
を指定します。このクリッピング・ノードは、シーングラフの観点ではこのNode
の子ではありません。正確には、このNode
にクリップを定義するために使用するものです。
たとえば、ImageView
ノードをマスクとして使用してクリップを表すことができます。または、Rectangle
やCircle
などの幾何学的形状を持つノードのいずれかを使用することもできます。または、Text
ノードを使用してクリップを表すこともできます。
クリップを設定する際のシーングラフ構造の制限については、Node
クラスのドキュメントを参照してください。clip変数の変更がこれらの制限に違反する場合、その変更は無視され、clip変数は前の値に戻されます。
これは条件付き機能であることに注意してください。詳細は、ConditionalFeature.SHAPE_CLIP
を参照してください。
クリップと3D変換を組み合せる場合、既知の制限があります。クリッピングは基本的に2Dイメージ操作です。3D変換された子を持つGroup
ノードにクリップを設定した場合、その子は子間にzバッファを適用せずに順番にレンダリングされるようになります。
public final ObjectProperty<Node> clipProperty()
Node
を指定します。このクリッピング・ノードは、シーングラフの観点ではこのNode
の子ではありません。正確には、このNode
にクリップを定義するために使用するものです。
たとえば、ImageView
ノードをマスクとして使用してクリップを表すことができます。または、Rectangle
やCircle
などの幾何学的形状を持つノードのいずれかを使用することもできます。または、Text
ノードを使用してクリップを表すこともできます。
クリップを設定する際のシーングラフ構造の制限については、Node
クラスのドキュメントを参照してください。clip変数の変更がこれらの制限に違反する場合、その変更は無視され、clip変数は前の値に戻されます。
これは条件付き機能であることに注意してください。詳細は、ConditionalFeature.SHAPE_CLIP
を参照してください。
クリップと3D変換を組み合せる場合、既知の制限があります。クリッピングは基本的に2Dイメージ操作です。3D変換された子を持つGroup
ノードにクリップを設定した場合、その子は子間にzバッファを適用せずに順番にレンダリングされるようになります。
getClip()
、setClip(Node)
public final void setCache(boolean value)
Node
をビットマップとしてキャッシュするかどうかを示すシステムのパフォーマンス・ヒント。ノードのビットマップ表現のレンダリングは、多くの場合、プリミティブ(特にぼかしなどの効果が適用されているプリミティブ)をレンダリングする場合と比較して高速になります。ただし、メモリー使用率も増加します。このヒントは、そのトレードオフ(パフォーマンス向上とメモリー使用率増加の交換)に価値があるかどうかを示します。また、GPU加速型プラットフォームなどの一部のプラットフォームでは、GPUでのレンダリングが非常に高速であることから、ぼかしやその他の効果が使用されている場合にノードをビットマップとしてキャッシュする利点はほとんどありません。cacheHintProperty()
変数には、より積極的なビットマップ・キャッシングを有効化するためのオプションが別途用意されています。
キャッシングは、3D変換が適用されたノード自体とその祖先または子孫に対しては無効化される場合があります。
public final boolean isCache()
Node
をビットマップとしてキャッシュするかどうかを示すシステムのパフォーマンス・ヒント。ノードのビットマップ表現のレンダリングは、多くの場合、プリミティブ(特にぼかしなどの効果が適用されているプリミティブ)をレンダリングする場合と比較して高速になります。ただし、メモリー使用率も増加します。このヒントは、そのトレードオフ(パフォーマンス向上とメモリー使用率増加の交換)に価値があるかどうかを示します。また、GPU加速型プラットフォームなどの一部のプラットフォームでは、GPUでのレンダリングが非常に高速であることから、ぼかしやその他の効果が使用されている場合にノードをビットマップとしてキャッシュする利点はほとんどありません。cacheHintProperty()
変数には、より積極的なビットマップ・キャッシングを有効化するためのオプションが別途用意されています。
キャッシングは、3D変換が適用されたノード自体とその祖先または子孫に対しては無効化される場合があります。
public final BooleanProperty cacheProperty()
Node
をビットマップとしてキャッシュするかどうかを示すシステムのパフォーマンス・ヒント。ノードのビットマップ表現のレンダリングは、多くの場合、プリミティブ(特にぼかしなどの効果が適用されているプリミティブ)をレンダリングする場合と比較して高速になります。ただし、メモリー使用率も増加します。このヒントは、そのトレードオフ(パフォーマンス向上とメモリー使用率増加の交換)に価値があるかどうかを示します。また、GPU加速型プラットフォームなどの一部のプラットフォームでは、GPUでのレンダリングが非常に高速であることから、ぼかしやその他の効果が使用されている場合にノードをビットマップとしてキャッシュする利点はほとんどありません。cacheHintProperty()
変数には、より積極的なビットマップ・キャッシングを有効化するためのオプションが別途用意されています。
キャッシングは、3D変換が適用されたノード自体とその祖先または子孫に対しては無効化される場合があります。
isCache()
、setCache(boolean)
public final void setCacheHint(CacheHint value)
レンダリングの負荷が高いノードをアニメーション化する場合など、特定の状況において、キャッシュされたビットマップを再生成することなく、ノードで変換を実行できるようにすることが望ましいことがあります。このような場合のオプションは、キャッシュされたビットマップ自体で変換を実行することです。
この方法では、アニメーションのパフォーマンスが大幅に向上しますが、その一方で視覚品質が低下する可能性があります。cacheHint
変数は、そのトレードオフ(アニメーションのパフォーマンスと視覚品質の交換)をいつどのように許容するかに関するヒントをシステムに与えます。
cacheHintは、ノードがアニメーション化されている場合にのみ有効化できます。このようにすると、負荷が高いノードを画面上に表示するときに、円滑なアニメーション化を維持したまま、完全な視覚品質を確保することが可能です。
例:
expensiveNode.setCache(true);
expensiveNode.setCacheHint(CacheHint.QUALITY);
...
// Do an animation
expensiveNode.setCacheHint(CacheHint.SPEED);
new Timeline(
new KeyFrame(Duration.seconds(2),
new KeyValue(expensiveNode.scaleXProperty(), 2.0),
new KeyValue(expensiveNode.scaleYProperty(), 2.0),
new KeyValue(expensiveNode.rotateProperty(), 360),
new KeyValue(expensiveNode.cacheHintProperty(), CacheHint.QUALITY)
)
).play();
cacheHint
はシステムに対するヒントにすぎないことに注意してください。ノードや変換の詳細によっては、このヒントが無視される場合もあります。
Node.cache
がfalseの場合、cacheHintは無視されます。キャッシングは、3D変換が適用されたノード自体とその祖先または子孫に対しては無効化される場合があります。
public final CacheHint getCacheHint()
レンダリングの負荷が高いノードをアニメーション化する場合など、特定の状況において、キャッシュされたビットマップを再生成することなく、ノードで変換を実行できるようにすることが望ましいことがあります。このような場合のオプションは、キャッシュされたビットマップ自体で変換を実行することです。
この方法では、アニメーションのパフォーマンスが大幅に向上しますが、その一方で視覚品質が低下する可能性があります。cacheHint
変数は、そのトレードオフ(アニメーションのパフォーマンスと視覚品質の交換)をいつどのように許容するかに関するヒントをシステムに与えます。
cacheHintは、ノードがアニメーション化されている場合にのみ有効化できます。このようにすると、負荷が高いノードを画面上に表示するときに、円滑なアニメーション化を維持したまま、完全な視覚品質を確保することが可能です。
例:
expensiveNode.setCache(true);
expensiveNode.setCacheHint(CacheHint.QUALITY);
...
// Do an animation
expensiveNode.setCacheHint(CacheHint.SPEED);
new Timeline(
new KeyFrame(Duration.seconds(2),
new KeyValue(expensiveNode.scaleXProperty(), 2.0),
new KeyValue(expensiveNode.scaleYProperty(), 2.0),
new KeyValue(expensiveNode.rotateProperty(), 360),
new KeyValue(expensiveNode.cacheHintProperty(), CacheHint.QUALITY)
)
).play();
cacheHint
はシステムに対するヒントにすぎないことに注意してください。ノードや変換の詳細によっては、このヒントが無視される場合もあります。
Node.cache
がfalseの場合、cacheHintは無視されます。キャッシングは、3D変換が適用されたノード自体とその祖先または子孫に対しては無効化される場合があります。
public final ObjectProperty<CacheHint> cacheHintProperty()
レンダリングの負荷が高いノードをアニメーション化する場合など、特定の状況において、キャッシュされたビットマップを再生成することなく、ノードで変換を実行できるようにすることが望ましいことがあります。このような場合のオプションは、キャッシュされたビットマップ自体で変換を実行することです。
この方法では、アニメーションのパフォーマンスが大幅に向上しますが、その一方で視覚品質が低下する可能性があります。cacheHint
変数は、そのトレードオフ(アニメーションのパフォーマンスと視覚品質の交換)をいつどのように許容するかに関するヒントをシステムに与えます。
cacheHintは、ノードがアニメーション化されている場合にのみ有効化できます。このようにすると、負荷が高いノードを画面上に表示するときに、円滑なアニメーション化を維持したまま、完全な視覚品質を確保することが可能です。
例:
expensiveNode.setCache(true);
expensiveNode.setCacheHint(CacheHint.QUALITY);
...
// Do an animation
expensiveNode.setCacheHint(CacheHint.SPEED);
new Timeline(
new KeyFrame(Duration.seconds(2),
new KeyValue(expensiveNode.scaleXProperty(), 2.0),
new KeyValue(expensiveNode.scaleYProperty(), 2.0),
new KeyValue(expensiveNode.rotateProperty(), 360),
new KeyValue(expensiveNode.cacheHintProperty(), CacheHint.QUALITY)
)
).play();
cacheHint
はシステムに対するヒントにすぎないことに注意してください。ノードや変換の詳細によっては、このヒントが無視される場合もあります。
Node.cache
がfalseの場合、cacheHintは無視されます。キャッシングは、3D変換が適用されたノード自体とその祖先または子孫に対しては無効化される場合があります。
getCacheHint()
、setCacheHint(CacheHint)
public final void setEffect(Effect value)
Node
に適用する効果を指定します。
これは条件付き機能であることに注意してください。詳細は、ConditionalFeature.EFFECT
を参照してください。
効果と3D変換を組み合せる場合、既知の制限があります。効果は基本的に2Dイメージ操作です。3D変換された子を持つGroup
ノードに効果を設定した場合、その子は子間にzバッファを適用せずに順番にレンダリングされるようになります。
public final Effect getEffect()
Node
に適用する効果を指定します。
これは条件付き機能であることに注意してください。詳細は、ConditionalFeature.EFFECT
を参照してください。
効果と3D変換を組み合せる場合、既知の制限があります。効果は基本的に2Dイメージ操作です。3D変換された子を持つGroup
ノードに効果を設定した場合、その子は子間にzバッファを適用せずに順番にレンダリングされるようになります。
public final ObjectProperty<Effect> effectProperty()
Node
に適用する効果を指定します。
これは条件付き機能であることに注意してください。詳細は、ConditionalFeature.EFFECT
を参照してください。
効果と3D変換を組み合せる場合、既知の制限があります。効果は基本的に2Dイメージ操作です。3D変換された子を持つGroup
ノードに効果を設定した場合、その子は子間にzバッファを適用せずに順番にレンダリングされるようになります。
getEffect()
、setEffect(Effect)
public final void setDepthTest(DepthTest value)
DepthTest.DISABLE
にすると、このノードに対して深度テストが無効化されます。depthTestフラグをDepthTest.ENABLE
にすると、このノードに対して深度テストが有効化されます。depthTestフラグをDepthTest.INHERIT
にすると、深度テストが親ノードに対して有効化されているか、親ノードがnullの場合に、このノードに対しても深度テストが有効化されます。
depthTestフラグは、Scene
のdepthBufferフラグがtrueの場合(つまり、Scene
に奥行きのバッファが関連付けられている場合)にのみ使用します。
深度テスト比較は、depthTestを有効化したノード間でのみ実行されます。depthTestを無効化したノードでは、奥行きのバッファの読取り、テストまたは書込みは行われません。つまり、そのZ値は他のノードでの深度テストでは考慮されません。
これは条件付き機能であることに注意してください。詳細は、ConditionalFeature.SCENE3D
を参照してください。
depthBufferが入力引数の1つとして使用されているシーンのコンストラクタを参照してください。
public final DepthTest getDepthTest()
DepthTest.DISABLE
にすると、このノードに対して深度テストが無効化されます。depthTestフラグをDepthTest.ENABLE
にすると、このノードに対して深度テストが有効化されます。depthTestフラグをDepthTest.INHERIT
にすると、深度テストが親ノードに対して有効化されているか、親ノードがnullの場合に、このノードに対しても深度テストが有効化されます。
depthTestフラグは、Scene
のdepthBufferフラグがtrueの場合(つまり、Scene
に奥行きのバッファが関連付けられている場合)にのみ使用します。
深度テスト比較は、depthTestを有効化したノード間でのみ実行されます。depthTestを無効化したノードでは、奥行きのバッファの読取り、テストまたは書込みは行われません。つまり、そのZ値は他のノードでの深度テストでは考慮されません。
これは条件付き機能であることに注意してください。詳細は、ConditionalFeature.SCENE3D
を参照してください。
depthBufferが入力引数の1つとして使用されているシーンのコンストラクタを参照してください。
public final ObjectProperty<DepthTest> depthTestProperty()
DepthTest.DISABLE
にすると、このノードに対して深度テストが無効化されます。depthTestフラグをDepthTest.ENABLE
にすると、このノードに対して深度テストが有効化されます。depthTestフラグをDepthTest.INHERIT
にすると、深度テストが親ノードに対して有効化されているか、親ノードがnullの場合に、このノードに対しても深度テストが有効化されます。
depthTestフラグは、Scene
のdepthBufferフラグがtrueの場合(つまり、Scene
に奥行きのバッファが関連付けられている場合)にのみ使用します。
深度テスト比較は、depthTestを有効化したノード間でのみ実行されます。depthTestを無効化したノードでは、奥行きのバッファの読取り、テストまたは書込みは行われません。つまり、そのZ値は他のノードでの深度テストでは考慮されません。
これは条件付き機能であることに注意してください。詳細は、ConditionalFeature.SCENE3D
を参照してください。
depthBufferが入力引数の1つとして使用されているシーンのコンストラクタを参照してください。
getDepthTest()
、setDepthTest(DepthTest)
public final void setDisable(boolean value)
Node
の個別の無効化状態を定義します。disable
をtrueに設定すると、このNode
とそのサブノードがすべて無効化されます。このプロパティは、Node
の無効化状態を設定する場合にのみ使用してください。Node
の無効化状態を問い合せる場合は、かわりにdisabled
プロパティを使用する必要があります。このNode
の個別のdisable
状態がfalse
であっても、祖先が無効化された結果としてNode
が無効化されている可能性があるためです。public final boolean isDisable()
Node
の個別の無効化状態を定義します。disable
をtrueに設定すると、このNode
とそのサブノードがすべて無効化されます。このプロパティは、Node
の無効化状態を設定する場合にのみ使用してください。Node
の無効化状態を問い合せる場合は、かわりにdisabled
プロパティを使用する必要があります。このNode
の個別のdisable
状態がfalse
であっても、祖先が無効化された結果としてNode
が無効化されている可能性があるためです。public final BooleanProperty disableProperty()
Node
の個別の無効化状態を定義します。disable
をtrueに設定すると、このNode
とそのサブノードがすべて無効化されます。このプロパティは、Node
の無効化状態を設定する場合にのみ使用してください。Node
の無効化状態を問い合せる場合は、かわりにdisabled
プロパティを使用する必要があります。このNode
の個別のdisable
状態がfalse
であっても、祖先が無効化された結果としてNode
が無効化されている可能性があるためです。isDisable()
、setDisable(boolean)
public final void setPickOnBounds(boolean value)
MouseEvent
によってトリガーされた場合またはcontains
関数呼出しの場合の、このノードに対するピッキング計算の実行方法を定義します。pickOnBounds
がtrueの場合、ピッキングはこのノードの境界との交差から計算されます。それ以外の場合、ピッキングはこのノードの幾何学的形状との交差から計算されます。public final boolean isPickOnBounds()
MouseEvent
によってトリガーされた場合またはcontains
関数呼出しの場合の、このノードに対するピッキング計算の実行方法を定義します。pickOnBounds
がtrueの場合、ピッキングはこのノードの境界との交差から計算されます。それ以外の場合、ピッキングはこのノードの幾何学的形状との交差から計算されます。public final BooleanProperty pickOnBoundsProperty()
MouseEvent
によってトリガーされた場合またはcontains
関数呼出しの場合の、このノードに対するピッキング計算の実行方法を定義します。pickOnBounds
がtrueの場合、ピッキングはこのノードの境界との交差から計算されます。それ以外の場合、ピッキングはこのノードの幾何学的形状との交差から計算されます。isPickOnBounds()
、setPickOnBounds(boolean)
protected final void setDisabled(boolean value)
Node
を無効にするかどうかを示します。Node
は、シーングラフ内のそのノード自体またはその祖先のいずれかでdisable
がtrue
に設定されている場合に無効化されます。
無効化されたNode
のレンダリング方法を変えて、ユーザーにそのノードが無効化状態であることを示す必要があります。このような無効化レンダリングはNode
の実装に依存します。javafx.scene.shape
に含まれているshapeクラスについては、このようなレンダリングをデフォルトでは実装しません。そのため、図形を使用して入力を処理するアプリケーション自体で適切な無効化レンダリングを実装する必要があります。一方で、javafx.scene.control
に定義されたユーザー・インタフェース・コントロールについては、無効化を区別するレンダリングを実装します。
無効化されたNode
は、マウス・イベントやキー・イベントを受け取りません。
public final boolean isDisabled()
Node
を無効にするかどうかを示します。Node
は、シーングラフ内のそのノード自体またはその祖先のいずれかでdisable
がtrue
に設定されている場合に無効化されます。
無効化されたNode
のレンダリング方法を変えて、ユーザーにそのノードが無効化状態であることを示す必要があります。このような無効化レンダリングはNode
の実装に依存します。javafx.scene.shape
に含まれているshapeクラスについては、このようなレンダリングをデフォルトでは実装しません。そのため、図形を使用して入力を処理するアプリケーション自体で適切な無効化レンダリングを実装する必要があります。一方で、javafx.scene.control
に定義されたユーザー・インタフェース・コントロールについては、無効化を区別するレンダリングを実装します。
無効化されたNode
は、マウス・イベントやキー・イベントを受け取りません。
public final ReadOnlyBooleanProperty disabledProperty()
Node
を無効にするかどうかを示します。Node
は、シーングラフ内のそのノード自体またはその祖先のいずれかでdisable
がtrue
に設定されている場合に無効化されます。
無効化されたNode
のレンダリング方法を変えて、ユーザーにそのノードが無効化状態であることを示す必要があります。このような無効化レンダリングはNode
の実装に依存します。javafx.scene.shape
に含まれているshapeクラスについては、このようなレンダリングをデフォルトでは実装しません。そのため、図形を使用して入力を処理するアプリケーション自体で適切な無効化レンダリングを実装する必要があります。一方で、javafx.scene.control
に定義されたユーザー・インタフェース・コントロールについては、無効化を区別するレンダリングを実装します。
無効化されたNode
は、マウス・イベントやキー・イベントを受け取りません。
isDisabled()
、setDisabled(boolean)
public Node lookup(String selector)
Node
または最初のサブノードを検索します。このノードがParent
の場合、この関数は一致が見つかるまで下位ブランチに進みます。指定したセレクタと一致するサブノードが複数存在する場合は、最初に見つかったものを返します。
たとえば、ノードのidにmyIdが指定された場合、このノードの検索に使用できるlookupメソッドはscene.lookup("#myId");
のようになります。
selector
- 検索するノードのcssセレクタNode
を先頭として、CSS selector
と一致する最初のノード、またはnull (何も見つからなかった場合)。public Set<Node> lookupAll(String selector)
Node
(このノードとすべての子を含む)を検索します。一致が何も見つからなかった場合は、空の変更不可能なセットが返されます。セットは明示的には順序付けされません。selector
- 検索するノードのcssセレクタNode
を先頭として(これも含む)、CSS selector
と一致するすべてのノード。返されるセットは常に順序付けなしかつ変更不可能となり、nullにはなりません。public void toBack()
Node
をその兄弟ノードの後ろに移動します。これを行うために、このNode
を親のcontent
ObservableList内の先頭位置に移動します。このNode
がグループに含まれていない場合、この関数は何も行いません。public void toFront()
Node
をその兄弟ノードの前に移動します。これを行うために、このNode
を親のcontent
ObservableList内の末尾位置に移動します。このNode
がグループに含まれていない場合、この関数は何も行いません。public WritableImage snapshot(SnapshotParameters params, WritableImage image)
Paint
に対して、デスティネーション・イメージ全体がクリアされます。その後、このノードがイメージにレンダリングされます。SnapshotParametersで指定したビューポートがnullの場合、このノードのboundsInParent
の左上のピクセルに対して、SnapshotParametersで指定した変換が最初に適用され、その後でイメージの左上のピクセル(0,0)にマップされます。null以外のビューポートを指定した場合、そのビューポートの左上のピクセルがイメージの左上のピクセル(0,0)にマップされます。どちらの場合も、イメージの(0,0)へのマッピングには整数平行移動が使用されます。レンダリングされたイメージの外側にあるノードの一部がイメージによってクリップされます。
アプリケーションによって明示的にアニメーション化されているか、または(チャート・アニメーションのように)暗黙的にアニメーション化されているシーンのスナップショットを取得する場合、スナップショットは取得した瞬間にシーングラフの状態に基づいてレンダリングされ、それ以降のアニメーションの変更は反映されません。
注意: CSSおよびレイアウトが正しく機能するためには、ノードがシーンに含まれている必要があります(シーンはステージにアタッチされていてもかまいませんが、必須ではありません)。
params
- レンダリングを制御する属性を含むスナップショット・パラメータ。SnapshotParametersオブジェクトがnullの場合は、このノードがシーンに含まれていればシーンの属性が使用され、含まれていなければデフォルト属性が使用されます。image
- レンダリングされたノードを保持するために使用される書込み可能イメージ。nullにでき、その場合、新しいWritableImageが構築されます。新しいイメージは、このノードの変換後の境界から導出されるか、またはSnapShotParametersで指定したビューポートのサイズから導出される幅および高さの整数値を使用して構築されます。これらの整数値は、イメージにこのノードの境界または指定したビューポートが完全に収まるように決定されます。イメージがnull以外の場合、ノードは既存のイメージにレンダリングされます。この場合、境界またはビューポートの幅および高さのかわりに、イメージの幅および高さに基づいてレンダリング対象領域が決定されます。IllegalStateException
- このメソッドがJavaFXアプリケーション・スレッド以外のスレッドで呼び出された場合。public void snapshot(Callback<SnapshotResult,Void> callback, SnapshotParameters params, WritableImage image)
Paint
に対して、デスティネーション・イメージ全体がクリアされます。その後、このノードがイメージにレンダリングされます。SnapshotParametersで指定したビューポートがnullの場合、このノードのboundsInParent
の左上のピクセルに対して、SnapshotParametersで指定した変換が最初に適用され、その後でイメージの左上のピクセル(0,0)にマップされます。null以外のビューポートを指定した場合、そのビューポートの左上のピクセルがイメージの左上のピクセル(0,0)にマップされます。どちらの場合も、イメージの(0,0)へのマッピングには整数平行移動が使用されます。レンダリングされたイメージの外側にあるノードの一部がイメージによってクリップされます。
これは非同期呼出しです。つまり、ノードがレンダリングされる前に、他のイベントまたはアニメーションが処理される場合があります。このようなイベントによってノードまたはその子のいずれかが変更された場合、レンダリングされたイメージにその変更が反映されます(このノードがライブ・シーングラフに含まれている場合は、ステージにレンダリングされたフレームにも同様に反映されます)。
アプリケーションによって明示的にアニメーション化されているか、または(チャート・アニメーションのように)暗黙的にアニメーション化されているノードのスナップショットを取得する場合、スナップショットは取得した瞬間にシーングラフの状態に基づいてレンダリングされ、それ以降のアニメーションの変更は反映されません。
注意: CSSおよびレイアウトが正しく機能するためには、ノードがシーンに含まれている必要があります(シーンはステージにアタッチされていてもかまいませんが、必須ではありません)。
callback
- イメージの準備が整ったときに呼び出されるコール・メソッドを備えたクラス。callbackのコール・メソッドに渡されるSnapshotResultには、レンダリングされたイメージ、レンダリングされたソース・ノードおよびSnapshotParametersのコピーが含まれます。callbackパラメータはnullにしないでください。params
- レンダリングを制御する属性を含むスナップショット・パラメータ。SnapshotParametersオブジェクトがnullの場合は、このノードがシーンに含まれていればシーンの属性が使用され、含まれていなければデフォルト属性が使用されます。image
- レンダリングされたノードを保持するために使用される書込み可能イメージ。nullにでき、その場合、新しいWritableImageが構築されます。新しいイメージは、このノードの変換後の境界から導出されるか、またはSnapShotParametersで指定したビューポートのサイズから導出される幅および高さの整数値を使用して構築されます。これらの整数値は、イメージにこのノードの境界または指定したビューポートが完全に収まるように決定されます。イメージがnull以外の場合、ノードは既存のイメージにレンダリングされます。この場合、境界またはビューポートの幅および高さのかわりに、イメージの幅および高さに基づいてレンダリング対象領域が決定されます。IllegalStateException
- このメソッドがJavaFXアプリケーション・スレッド以外のスレッドで呼び出された場合。NullPointerException
- callbackパラメータがnullの場合。public final void setOnDragEntered(EventHandler<? super DragEvent> value)
Node
に入ると呼び出される関数を定義します。public final EventHandler<? super DragEvent> getOnDragEntered()
Node
に入ると呼び出される関数を定義します。public final ObjectProperty<EventHandler<? super DragEvent>> onDragEnteredProperty()
Node
に入ると呼び出される関数を定義します。public final void setOnDragExited(EventHandler<? super DragEvent> value)
Node
から出ると呼び出される関数を定義します。public final EventHandler<? super DragEvent> getOnDragExited()
Node
から出ると呼び出される関数を定義します。public final ObjectProperty<EventHandler<? super DragEvent>> onDragExitedProperty()
Node
から出ると呼び出される関数を定義します。public final void setOnDragOver(EventHandler<? super DragEvent> value)
Node
内でドラッグ・ジェスチャが進行しているときに呼び出される関数を定義します。public final EventHandler<? super DragEvent> getOnDragOver()
Node
内でドラッグ・ジェスチャが進行しているときに呼び出される関数を定義します。public final ObjectProperty<EventHandler<? super DragEvent>> onDragOverProperty()
Node
内でドラッグ・ジェスチャが進行しているときに呼び出される関数を定義します。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)
Node
がドラッグ・アンド・ドロップ・ジェスチャのソースである場合に呼び出される関数を定義します。イベントのtransferMode
は、ドロップ・ターゲットで何が起きたかを示します。transferMode
の値がMOVE
である場合には、ソースがそのデータをクリアできます。ソースのデータをクリアすると、ドラッグ・アンド・ドロップ・ジェスチャによってデータが移動された適切な外観がユーザーに表示されます。値がNONE
のtransferMode
は、ドラッグ・アンド・ドロップ・ジェスチャでデータが転送されなかったことを示しています。public final EventHandler<? super DragEvent> getOnDragDone()
Node
がドラッグ・アンド・ドロップ・ジェスチャのソースである場合に呼び出される関数を定義します。イベントのtransferMode
は、ドロップ・ターゲットで何が起きたかを示します。transferMode
の値がMOVE
である場合には、ソースがそのデータをクリアできます。ソースのデータをクリアすると、ドラッグ・アンド・ドロップ・ジェスチャによってデータが移動された適切な外観がユーザーに表示されます。値がNONE
のtransferMode
は、ドラッグ・アンド・ドロップ・ジェスチャでデータが転送されなかったことを示しています。public final ObjectProperty<EventHandler<? super DragEvent>> onDragDoneProperty()
Node
がドラッグ・アンド・ドロップ・ジェスチャのソースである場合に呼び出される関数を定義します。イベントのtransferMode
は、ドロップ・ターゲットで何が起きたかを示します。transferMode
の値がMOVE
である場合には、ソースがそのデータをクリアできます。ソースのデータをクリアすると、ドラッグ・アンド・ドロップ・ジェスチャによってデータが移動された適切な外観がユーザーに表示されます。値がNONE
のtransferMode
は、ドラッグ・アンド・ドロップ・ジェスチャでデータが転送されなかったことを示しています。public Dragboard startDragAndDrop(TransferMode... transferModes)
Node
上で認識されたドラッグ・アンド・ドロップ・ジェスチャの候補を確定します。DRAG_DETECTEDイベント・ハンドラからのみ呼び出すことができます。返されたDragboard
は、ドラッグ・アンド・ドロップ・ジェスチャの実行時にデータを転送するために使用されます。また、このNode
のデータをDragboard
に配置すると、このNode
がドラッグ・アンド・ドロップ・ジェスチャのソースとみなされます。ドラッグ・アンド・ドロップ・ジェスチャの詳細は、DragEvent
の概要を参照してください。transferModes
- このNode
でサポートされているTransferMode
Node
のデータの配置先となるDragboard
IllegalStateException
- この時点ではドラッグ・アンド・ドロップを開始できない場合(DRAG_DETECTED
イベント処理の外で呼び出されたか、このノードがシーン内にない場合)。DragEvent
public void startFullDrag()
DRAG_DETECTED
マウス・イベント・ハンドラからのみ呼び出すことができます。ドラッグ・ジェスチャの詳細は、MouseEvent
およびMouseDragEvent
の概要を参照してください。IllegalStateException
- この時点では完全な押下、ドラッグ、解放ジェスチャを開始できない場合(DRAG_DETECTED
イベント処理の外で呼び出されたか、このノードがシーン内にない場合)。MouseEvent
、MouseDragEvent
public final void setManaged(boolean value)
layoutBounds
の計算で考慮し、シーンのレイアウト・パスでそのノードをレイアウトします。管理対象のノードのlayoutBoundsが変わると、シーングラフ上位の最も近いレイアウト・ルート(通常はシーンのルート・ノード)に対して再レイアウトが自動的にトリガーされます。
ノードが管理対象外の場合、その親は優先サイズの計算とレイアウトの両方において子を無視します。layoutBoundsが変更されても、上位で再レイアウトはトリガーされません。管理対象外のノードのタイプがParent
である場合、そのノードはレイアウト・ルートとして動作します。つまり、その下位でParent.requestLayout()
を呼び出した場合、そのノードをルートとするブランチのみが再レイアウトされ、結果としてそのノードとその下位に対するレイアウトの変更は分離されます。管理対象外のノードのサイズと位置の設定はアプリケーションで行う必要があります。
デフォルトでは、すべてのノードが管理対象です。
public final boolean isManaged()
layoutBounds
の計算で考慮し、シーンのレイアウト・パスでそのノードをレイアウトします。管理対象のノードのlayoutBoundsが変わると、シーングラフ上位の最も近いレイアウト・ルート(通常はシーンのルート・ノード)に対して再レイアウトが自動的にトリガーされます。
ノードが管理対象外の場合、その親は優先サイズの計算とレイアウトの両方において子を無視します。layoutBoundsが変更されても、上位で再レイアウトはトリガーされません。管理対象外のノードのタイプがParent
である場合、そのノードはレイアウト・ルートとして動作します。つまり、その下位でParent.requestLayout()
を呼び出した場合、そのノードをルートとするブランチのみが再レイアウトされ、結果としてそのノードとその下位に対するレイアウトの変更は分離されます。管理対象外のノードのサイズと位置の設定はアプリケーションで行う必要があります。
デフォルトでは、すべてのノードが管理対象です。
public final BooleanProperty managedProperty()
layoutBounds
の計算で考慮し、シーンのレイアウト・パスでそのノードをレイアウトします。管理対象のノードのlayoutBoundsが変わると、シーングラフ上位の最も近いレイアウト・ルート(通常はシーンのルート・ノード)に対して再レイアウトが自動的にトリガーされます。
ノードが管理対象外の場合、その親は優先サイズの計算とレイアウトの両方において子を無視します。layoutBoundsが変更されても、上位で再レイアウトはトリガーされません。管理対象外のノードのタイプがParent
である場合、そのノードはレイアウト・ルートとして動作します。つまり、その下位でParent.requestLayout()
を呼び出した場合、そのノードをルートとするブランチのみが再レイアウトされ、結果としてそのノードとその下位に対するレイアウトの変更は分離されます。管理対象外のノードのサイズと位置の設定はアプリケーションで行う必要があります。
デフォルトでは、すべてのノードが管理対象です。
public final void setLayoutX(double value)
Node
の変換に追加される変換のX座標を定義します。値は、ノードの位置を現在のlayoutBounds minX
位置(0でない可能性あり)から目的の位置に調整するために必要なオフセットとして計算する必要があります。
たとえば、textnode
はfinalX
に配置する必要があります。
textnode.setLayoutX(finalX - textnode.getLayoutBounds().getMinX());
layoutBounds minX
を減算しなかった場合、ノードが間違って配置される可能性があります。relocate(x, y)
メソッドは正しい計算を自動的に実行するため、一般には、layoutXを直接設定するよりもこのメソッドを使用するのが妥当です。
ノードの最終的な平行移動はlayoutX
+ translateX
として計算されます。layoutX
によりノードの安定位置を決定し、translateX
により必要に応じてその位置を動的に調整します。
ノードが管理対象であり、Region
がその親となっている場合、そのレイアウト・リージョン自体のレイアウト・ポリシーに従ってlayoutX
が設定されます。ノードが管理対象外であるか、Group
がその親となっている場合は、アプリケーションで直接layoutX
を設定してノードを配置できます。
public final double getLayoutX()
Node
の変換に追加される変換のX座標を定義します。値は、ノードの位置を現在のlayoutBounds minX
位置(0でない可能性あり)から目的の位置に調整するために必要なオフセットとして計算する必要があります。
たとえば、textnode
はfinalX
に配置する必要があります。
textnode.setLayoutX(finalX - textnode.getLayoutBounds().getMinX());
layoutBounds minX
を減算しなかった場合、ノードが間違って配置される可能性があります。relocate(x, y)
メソッドは正しい計算を自動的に実行するため、一般には、layoutXを直接設定するよりもこのメソッドを使用するのが妥当です。
ノードの最終的な平行移動はlayoutX
+ translateX
として計算されます。layoutX
によりノードの安定位置を決定し、translateX
により必要に応じてその位置を動的に調整します。
ノードが管理対象であり、Region
がその親となっている場合、そのレイアウト・リージョン自体のレイアウト・ポリシーに従ってlayoutX
が設定されます。ノードが管理対象外であるか、Group
がその親となっている場合は、アプリケーションで直接layoutX
を設定してノードを配置できます。
public final DoubleProperty layoutXProperty()
Node
の変換に追加される変換のX座標を定義します。値は、ノードの位置を現在のlayoutBounds minX
位置(0でない可能性あり)から目的の位置に調整するために必要なオフセットとして計算する必要があります。
たとえば、textnode
はfinalX
に配置する必要があります。
textnode.setLayoutX(finalX - textnode.getLayoutBounds().getMinX());
layoutBounds minX
を減算しなかった場合、ノードが間違って配置される可能性があります。relocate(x, y)
メソッドは正しい計算を自動的に実行するため、一般には、layoutXを直接設定するよりもこのメソッドを使用するのが妥当です。
ノードの最終的な平行移動はlayoutX
+ translateX
として計算されます。layoutX
によりノードの安定位置を決定し、translateX
により必要に応じてその位置を動的に調整します。
ノードが管理対象であり、Region
がその親となっている場合、そのレイアウト・リージョン自体のレイアウト・ポリシーに従ってlayoutX
が設定されます。ノードが管理対象外であるか、Group
がその親となっている場合は、アプリケーションで直接layoutX
を設定してノードを配置できます。
public final void setLayoutY(double value)
Node
の変換に追加される変換のY座標を定義します。値は、ノードの位置を現在のlayoutBounds minY
位置(0でない可能性あり)から目的の位置に調整するために必要なオフセットとして計算する必要があります。
たとえば、textnode
はfinalY
に配置する必要があります。
textnode.setLayoutY(finalY - textnode.getLayoutBounds().getMinY());
layoutBounds minY
を減算しなかった場合、ノードが間違って配置される可能性があります。relocate(x, y)
メソッドは正しい計算を自動的に実行するため、一般には、layoutYを直接設定するよりもこのメソッドを使用するのが妥当です。
ノードの最終的な平行移動はlayoutY
+ translateY
として計算されます。layoutY
によりノードの安定位置を決定し、translateY
により必要に応じてその位置を動的に調整します。
ノードが管理対象であり、Region
がその親となっている場合、そのリージョン自体のレイアウト・ポリシーに従ってlayoutY
が設定されます。ノードが管理対象外であるか、Group
がその親となっている場合は、アプリケーションで直接layoutY
を設定してノードを配置できます。
public final double getLayoutY()
Node
の変換に追加される変換のY座標を定義します。値は、ノードの位置を現在のlayoutBounds minY
位置(0でない可能性あり)から目的の位置に調整するために必要なオフセットとして計算する必要があります。
たとえば、textnode
はfinalY
に配置する必要があります。
textnode.setLayoutY(finalY - textnode.getLayoutBounds().getMinY());
layoutBounds minY
を減算しなかった場合、ノードが間違って配置される可能性があります。relocate(x, y)
メソッドは正しい計算を自動的に実行するため、一般には、layoutYを直接設定するよりもこのメソッドを使用するのが妥当です。
ノードの最終的な平行移動はlayoutY
+ translateY
として計算されます。layoutY
によりノードの安定位置を決定し、translateY
により必要に応じてその位置を動的に調整します。
ノードが管理対象であり、Region
がその親となっている場合、そのリージョン自体のレイアウト・ポリシーに従ってlayoutY
が設定されます。ノードが管理対象外であるか、Group
がその親となっている場合は、アプリケーションで直接layoutY
を設定してノードを配置できます。
public final DoubleProperty layoutYProperty()
Node
の変換に追加される変換のY座標を定義します。値は、ノードの位置を現在のlayoutBounds minY
位置(0でない可能性あり)から目的の位置に調整するために必要なオフセットとして計算する必要があります。
たとえば、textnode
はfinalY
に配置する必要があります。
textnode.setLayoutY(finalY - textnode.getLayoutBounds().getMinY());
layoutBounds minY
を減算しなかった場合、ノードが間違って配置される可能性があります。relocate(x, y)
メソッドは正しい計算を自動的に実行するため、一般には、layoutYを直接設定するよりもこのメソッドを使用するのが妥当です。
ノードの最終的な平行移動はlayoutY
+ translateY
として計算されます。layoutY
によりノードの安定位置を決定し、translateY
により必要に応じてその位置を動的に調整します。
ノードが管理対象であり、Region
がその親となっている場合、そのリージョン自体のレイアウト・ポリシーに従ってlayoutY
が設定されます。ノードが管理対象外であるか、Group
がその親となっている場合は、アプリケーションで直接layoutY
を設定してノードを配置できます。
public void relocate(double x, double y)
このメソッドはtranslateXまたはtranslateYを変更しません。これらも設定されている場合は、layoutXおよびlayoutYに追加され、該当する量の分だけ最終位置が調整されます。
x
- ターゲットのx座標位置y
- ターゲットのy座標位置public boolean isResizable()
このメソッドによってfalseが返されると、親はレイアウト中にそれをサイズ変更できず(resize()の操作なし)、最小、推奨および最大サイズとしてそのlayoutBoundsを返します。グループ、テキストおよびすべての図形はサイズ変更可能ではないため、そのサイズ設定はアプリケーションで適切なプロパティ(矩形の場合は幅と高さ、テキストの場合はテキストなど)を設定することによって確立する必要があります。サイズ変更可能でないノードも、レイアウト中に再配置される場合があります。
getContentBias()
、minWidth(double)
、minHeight(double)
、prefWidth(double)
、prefHeight(double)
、maxWidth(double)
、maxHeight(double)
、resize(double, double)
、getLayoutBounds()
public Orientation getContentBias()
Resizableのサブクラスはこのメソッドをオーバーライドし、適切な値を返す必要があります。
isResizable()
、minWidth(double)
、minHeight(double)
、prefWidth(double)
、prefHeight(double)
、maxWidth(double)
、maxHeight(double)
public double minWidth(double height)
このメソッドを呼び出すレイアウト・コードで、ノードのコンテンツ・バイアスを最初にチェックする必要があります。ノードに垂直方向のコンテンツ・バイアスがある場合は、呼出し元が最小幅の基になる高さの値を渡す必要があります。ノードに水平方向またはnullのコンテンツ・バイアスがある場合は、呼出し元が-1を渡す必要があります。
垂直方向のコンテンツ・バイアスがあるノードのサブクラスでは、-1または正の値のheightパラメータが必要です。他のすべてのサブクラスではheightパラメータ(-1の可能性が高い)が無視されることがあります。
ノードのmaxWidth(double)
がこの数値より小さい場合は、minWidth
が優先されます。これは、ノードがminWidth
よりも小さくサイズ変更できないことを意味します。
height
- 最小幅がそれに依存する場合に使用する必要がある高さisResizable()
、getContentBias()
public double minHeight(double width)
このメソッドを呼び出すレイアウト・コードで、ノードのコンテンツ・バイアスを最初にチェックする必要があります。ノードに水平方向のコンテンツ・バイアスがある場合は、呼出し元が最小高の基になる幅の値を渡す必要があります。ノードに垂直方向またはnullのコンテンツ・バイアスがある場合は、呼出し元が-1を渡す必要があります。
水平方向のコンテンツ・バイアスがあるノードのサブクラスでは、-1または正の値のwidthパラメータが必要です。他のすべてのサブクラスではwidthパラメータ(-1の可能性が高い)が無視されることがあります。
ノードのmaxHeight(double)
がこの数値より小さい場合は、minHeight
が優先されます。これは、ノードがminHeight
よりも小さくサイズ変更できないことを意味します。
width
- 最小高さがそれに依存する場合に使用する必要がある幅isResizable()
、getContentBias()
public double prefWidth(double height)
このメソッドを呼び出すレイアウト・コードで、ノードのコンテンツ・バイアスを最初にチェックする必要があります。ノードのコンテンツ・バイアスが垂直方向の場合、呼出し元は優先幅の基準となる高さの値を渡す必要があります。ノードに水平方向またはnullのコンテンツ・バイアスがある場合は、呼出し元が-1を渡す必要があります。
垂直方向のコンテンツ・バイアスがあるノードのサブクラスでは、-1または正の値のheightパラメータが必要です。他のすべてのサブクラスではheightパラメータ(-1の可能性が高い)が無視されることがあります。
height
- 推奨される幅がそれに依存する場合に使用する必要がある高さisResizable()
、getContentBias()
、autosize()
public double prefHeight(double width)
このメソッドを呼び出すレイアウト・コードで、ノードのコンテンツ・バイアスを最初にチェックする必要があります。ノードのコンテンツ・バイアスが水平方向の場合、呼出し元は優先高の基準となる幅の値を渡す必要があります。ノードに垂直方向またはnullのコンテンツ・バイアスがある場合は、呼出し元が-1を渡す必要があります。
コンテンツ・バイアスが水平方向のノードのサブクラスでは、-1か正の値かを問わず、高さパラメータを考慮する必要があります。他のすべてのサブクラスではheightパラメータ(-1の可能性が高い)が無視されることがあります。
width
- 推奨される高さがそれに依存する場合に使用する必要がある幅getContentBias()
、autosize()
public double maxWidth(double height)
ノードがサイズ変更可能でない場合は、そのlayoutBoundsの幅を返します。
このメソッドを呼び出すレイアウト・コードで、ノードのコンテンツ・バイアスを最初にチェックする必要があります。ノードのコンテンツ・バイアスが垂直方向の場合、呼出し元は最大幅の基準となる高さの値を渡す必要があります。ノードに水平方向またはnullのコンテンツ・バイアスがある場合は、呼出し元が-1を渡す必要があります。
垂直方向のコンテンツ・バイアスがあるノードのサブクラスでは、-1または正の値のheightパラメータが必要です。他のすべてのサブクラスではheightパラメータ(-1の可能性が高い)が無視されることがあります。
ノードのminWidth(double)
の方が大きい場合は、maxWidth
よりも優先されます。これは、ノードがminWidth
よりも小さくサイズ変更できないことを意味します。
height
- 最大幅がそれに依存する場合に使用する必要がある高さisResizable()
、getContentBias()
public double maxHeight(double width)
ノードがサイズ変更可能でない場合は、そのlayoutBoundsの高さを返します。
このメソッドを呼び出すレイアウト・コードで、ノードのコンテンツ・バイアスを最初にチェックする必要があります。ノードのコンテンツ・バイアスが水平方向の場合、呼出し元は最大高の基準となる幅の値を渡す必要があります。ノードに垂直方向またはnullのコンテンツ・バイアスがある場合は、呼出し元が-1を渡す必要があります。
水平方向のコンテンツ・バイアスがあるノードのサブクラスでは、-1または正の値のwidthパラメータが必要です。他のすべてのサブクラスではwidthパラメータ(-1の可能性が高い)が無視されることがあります。
ノードのminHeight(double)
の方が大きい場合は、maxHeight
よりも優先されます。これは、ノードがminHeight
よりも小さくサイズ変更できないことを意味します。
width
- 最大高さがそれに依存する場合に使用する必要がある幅isResizable()
、getContentBias()
public void resize(double width, double height)
このメソッドは、通常、親ノードでlayoutChildren()メソッドを使用する方法でのみ呼び出してください。すべての親クラスはサイズ変更可能な子を自動的にサイズ変更するため、子が管理対象外でないかぎり、アプリケーションで直接行ったサイズ変更はノードの親によってオーバーライドされます。
親は、幅と高さの値がサイズ変更可能なノードの優先幅に収まるようにする必要があります。autosize()メソッドは、親が単にノードを優先サイズにサイズ変更する必要がある場合に使用できます。
width
- ターゲット・レイアウトのレイアウト境界の幅height
- ターゲット・レイアウトのレイアウト境界の高さisResizable()
、getContentBias()
、autosize()
、minWidth(double)
、minHeight(double)
、prefWidth(double)
、prefHeight(double)
、maxWidth(double)
、maxHeight(double)
、getLayoutBounds()
public final void autosize()
このメソッドは、ノードのコンテンツ・バイアスを自動的に問い合せて、水平方向の場合はノードの優先幅を渡して優先高を取得し、垂直方向の場合はノードの優先高を渡して優先幅を取得し、nullの場合は優先幅/優先高を個別に計算します。
public void resizeRelocate(double x, double y, double width, double height)
ノードがサイズ変更された時点で(サイズ変更可能な場合)、ノードのlayoutXおよびlayoutY平行移動プロパティを設定して、親の座標空間内のx,yに再配置します。
このメソッドは、通常、親ノードでlayoutChildren()メソッドを使用する方法でのみ呼び出してください。すべての親クラスはサイズ変更可能な子を自動的にサイズ変更するため、子が管理対象外でないかぎり、アプリケーションで直接行ったサイズ変更はノードの親によってオーバーライドされます。
親は、幅と高さの値がサイズ変更可能なノードの優先幅に収まるようにする必要があります。autosize()およびrelocate()メソッドは、親が単にノードを優先サイズにサイズ変更して再配置する必要がある場合に使用できます。
x
- ターゲットのx座標位置y
- ターゲットのy座標位置width
- ターゲット・レイアウトのレイアウト境界の幅height
- ターゲット・レイアウトのレイアウト境界の高さisResizable()
、getContentBias()
、autosize()
、minWidth(double)
、minHeight(double)
、prefWidth(double)
、prefHeight(double)
、maxWidth(double)
、maxHeight(double)
public double getBaselineOffset()
BASELINE_OFFSET_SAME_AS_HEIGHT
を返し、サイズ変更不可能なノードの場合はlayoutBoundsの高さを返します。テキストを含むサブクラスでは、このメソッドをオーバーライドして、実際のテキスト・ベースライン・オフセットを返す必要があります。BASELINE_OFFSET_SAME_AS_HEIGHT
public double computeAreaInScreen()
Node
の領域を返します。public final Bounds getBoundsInParent()
Node
の矩形境界(その変換を含む)。boundsInParent
は、ローカル境界(boundsInLocal
で定義)を取得し、変換(次の追加変数を設定して作成)を適用することによって計算されます。
transforms
ObservableListscaleX
、scaleY
rotate
layoutX
、layoutY
translateX
、translateY
結果の境界は概念的にはNode
の親の座標空間内にありますが、ノードの親でこれらの境界を計算する必要はありません。
このメソッドではノードの可視性は考慮されません。計算はこのNode
のジオメトリのみに基づいて行われます。
このプロパティは常にnull以外の値を持ちます。
ノードのジオメトリが変更されるか、transforms ObservableList、translateX、translateY、layoutX、layoutY、scaleX、scaleY、rotateのいずれかの変数が変更されると、boundsInParentが自動的に再計算されます。そのため、ノードのこれらの値のいずれかをこの変数に依存する式にバインドするとエラーになります。たとえば、ノードの配置目的で図形のxまたはy変数、translateX、translateYをboundsInParentにバインドしないでください。
public final ReadOnlyObjectProperty<Bounds> boundsInParentProperty()
Node
の矩形境界(その変換を含む)。boundsInParent
は、ローカル境界(boundsInLocal
で定義)を取得し、変換(次の追加変数を設定して作成)を適用することによって計算されます。
transforms
ObservableListscaleX
、scaleY
rotate
layoutX
、layoutY
translateX
、translateY
結果の境界は概念的にはNode
の親の座標空間内にありますが、ノードの親でこれらの境界を計算する必要はありません。
このメソッドではノードの可視性は考慮されません。計算はこのNode
のジオメトリのみに基づいて行われます。
このプロパティは常にnull以外の値を持ちます。
ノードのジオメトリが変更されるか、transforms ObservableList、translateX、translateY、layoutX、layoutY、scaleX、scaleY、rotateのいずれかの変数が変更されると、boundsInParentが自動的に再計算されます。そのため、ノードのこれらの値のいずれかをこの変数に依存する式にバインドするとエラーになります。たとえば、ノードの配置目的で図形のxまたはy変数、translateX、translateYをboundsInParentにバインドしないでください。
getBoundsInParent()
public final Bounds getBoundsInLocal()
Node
の矩形境界線。Shape
を拡張するノードの場合、ローカル境界には、位置属性およびサイズ属性によって定義される図形のジオメトリ外に出る可能性があるゼロ以外のストロークに必要なスペースも含まれます。ローカル境界には、clip
で設定されるクリッピングおよびeffect
で設定される効果も含まれます。
このメソッドではノードの可視性は考慮されません。計算はこのNode
のジオメトリのみに基づいて行われます。
このプロパティは常にnull以外の値を持ちます。
ノードのジオメトリが変更されるたびに、boundsInLocalが自動的に再計算されます。そのため、ノードのこれらの値のいずれかをこの変数に依存する式にバインドするとエラーになります。たとえば、ノードの配置目的で図形のxまたはy変数をboundsInLocalにバインドしないでください。
public final ReadOnlyObjectProperty<Bounds> boundsInLocalProperty()
Node
の矩形境界線。Shape
を拡張するノードの場合、ローカル境界には、位置属性およびサイズ属性によって定義される図形のジオメトリ外に出る可能性があるゼロ以外のストロークに必要なスペースも含まれます。ローカル境界には、clip
で設定されるクリッピングおよびeffect
で設定される効果も含まれます。
このメソッドではノードの可視性は考慮されません。計算はこのNode
のジオメトリのみに基づいて行われます。
このプロパティは常にnull以外の値を持ちます。
ノードのジオメトリが変更されるたびに、boundsInLocalが自動的に再計算されます。そのため、ノードのこれらの値のいずれかをこの変数に依存する式にバインドするとエラーになります。たとえば、ノードの配置目的で図形のxまたはy変数をboundsInLocalにバインドしないでください。
getBoundsInLocal()
public final Bounds getLayoutBounds()
layoutBounds
はノードの視覚境界とは異なる可能性があり、ノード・タイプによって計算方法も異なります。
サイズ変更可能なノード・タイプの場合(Region
、Control
またはWebView
)、layoutBoundsは常に0,0 width x height
になります。サイズ変更不可能なノード・タイプの場合(Shape
、Text
またはGroup
)、layoutBoundsはノードのジオメトリ・プロパティに基づいて計算され、ノードのクリップ、効果または変換を含みません。詳細は、個々のクラスのドキュメントを参照してください。
layoutX
、layoutY
、translateX
およびtranslateY
変数はlayoutBoundsには含まれないことに注意してください。レイアウト・コードでは最初に(layoutBoundsを使用して)ノードの現在のサイズと位置を決定してから、目的のレイアウト位置に配置されるようにlayoutX
およびlayoutY
を設定してノードの平行移動を調整する必要があるため、この点は重要です。
layoutBoundsの計算はノードのジオメトリ変数に関連することが多いため、このような変数をlayoutBounds
に依存する式にバインドするとエラーになります。たとえば、ノードの配置目的で図形のxまたはy変数をlayoutBoundsにバインドしないでください。
layoutBoundsがnullになることはありません。
public final ReadOnlyObjectProperty<Bounds> layoutBoundsProperty()
layoutBounds
はノードの視覚境界とは異なる可能性があり、ノード・タイプによって計算方法も異なります。
サイズ変更可能なノード・タイプの場合(Region
、Control
またはWebView
)、layoutBoundsは常に0,0 width x height
になります。サイズ変更不可能なノード・タイプの場合(Shape
、Text
またはGroup
)、layoutBoundsはノードのジオメトリ・プロパティに基づいて計算され、ノードのクリップ、効果または変換を含みません。詳細は、個々のクラスのドキュメントを参照してください。
layoutX
、layoutY
、translateX
およびtranslateY
変数はlayoutBoundsには含まれないことに注意してください。レイアウト・コードでは最初に(layoutBoundsを使用して)ノードの現在のサイズと位置を決定してから、目的のレイアウト位置に配置されるようにlayoutX
およびlayoutY
を設定してノードの平行移動を調整する必要があるため、この点は重要です。
layoutBoundsの計算はノードのジオメトリ変数に関連することが多いため、このような変数をlayoutBounds
に依存する式にバインドするとエラーになります。たとえば、ノードの配置目的で図形のxまたはy変数をlayoutBoundsにバインドしないでください。
layoutBoundsがnullになることはありません。
getLayoutBounds()
public boolean contains(double localX, double localY)
Node
のローカル座標空間で指定される)がこのNode
の形状に含まれる場合に、true
を返します。このメソッドでは可視性は考慮されません。テストはこのNode
のジオメトリのみに基づいて行われます。public boolean contains(Point2D localPoint)
Node
のローカル座標空間で指定される)がこのNode
の形状に含まれる場合に、true
を返します。このメソッドでは可視性は考慮されません。テストはこのNode
のジオメトリのみに基づいて行われます。public boolean intersects(double localX, double localY, double localWidth, double localHeight)
Node
のローカル座標空間で指定される)がこのNode
の形状と交差する場合に、true
を返します。このメソッドでは可視性は考慮されません。テストはこのNode
のジオメトリのみに基づいて行われます。この関数のデフォルトの動作は、単に特定の座標がローカル境界と交差するかどうかをチェックします。public boolean intersects(Bounds localBounds)
Node
のローカル座標空間で指定される)がこのNode
の形状と交差する場合に、true
を返します。このメソッドでは可視性は考慮されません。テストはこのNode
のジオメトリのみに基づいて行われます。この関数のデフォルトの動作は、単に特定の座標がローカル境界と交差するかどうかをチェックします。public Point2D screenToLocal(double screenX, double screenY)
Screen
の座標空間からこのNode
のローカル座標空間に点を変換します。screenX
- 画面上の点のx座標screenY
- 画面上の点のy座標Window
内にない場合)。ローカルからシーンへの変換が反転不可能な場合も、nullが返されます。public Point2D screenToLocal(Point2D screenPoint)
Screen
の座標空間からこのNode
のローカル座標空間に点を変換します。screenPoint
- 画面上の点Window
内にない場合)。ローカルからシーンへの変換が反転不可能な場合も、nullが返されます。public Bounds screenToLocal(Bounds screenBounds)
Screen
の座標空間からこのNode
のローカル座標空間に矩形を変換します。2D空間でのみ妥当な結果を返します。screenBounds
- 画面上の境界Window
内にない場合)。ローカルからシーンへの変換が反転不可能な場合も、nullが返されます。public Point2D sceneToLocal(double x, double y, boolean rootScene)
Node
のローカル座標空間に点を変換します。NodeにSubScene
がない場合や、rootScene
がtrueに設定されている場合、引数はgetScene()
により返されたNodeのScene
座標内にあります。それ以外の場合は、サブシーン座標が使用されます(これはsceneToLocal(double, double)
を呼び出すことと同じです)x
- x座標y
- y座標rootScene
- NodeがSubScene内にある場合でもScene座標を使用するかどうかpublic Point2D sceneToLocal(Point2D point, boolean rootScene)
Node
のローカル座標空間に点を変換します。NodeにSubScene
がない場合や、rootScene
がtrueに設定されている場合、引数はgetScene()
により返されたNodeのScene
座標内にあります。それ以外の場合は、サブシーン座標が使用されます(これはsceneToLocal(javafx.geometry.Point2D)
を呼び出すことと同じです)point
- 点rootScene
- NodeがSubScene内にある場合でもScene座標を使用するかどうかpublic Bounds sceneToLocal(Bounds bounds, boolean rootScene)
Node
のローカル座標空間に境界を変換します。NodeにSubScene
がない場合や、rootScene
がtrueに設定されている場合、引数はgetScene()
により返されたNodeのScene
座標内にあります。それ以外の場合は、サブシーン座標が使用されます(これはsceneToLocal(javafx.geometry.Bounds)
を呼び出すことと同じです)。
rootScene
をtrue
に設定した状態で3D境界を変換することはできないため、3D境界を変換しようとするとnull
が生成されます。
bounds
- 境界rootScene
- NodeがSubScene内にある場合でもScene座標を使用するかどうかpublic Point2D sceneToLocal(double sceneX, double sceneY)
sceneX
- シーン上の点のx座標sceneY
- シーン上の点のy座標Window
内にない場合)。ローカルからシーンへの変換が反転不可能な場合も、nullが返されます。public Point2D sceneToLocal(Point2D scenePoint)
scenePoint
- シーン上の点Window
内にない場合)。ローカルからシーンへの変換が反転不可能な場合も、nullが返されます。public Point3D sceneToLocal(Point3D scenePoint)
scenePoint
- シーン上の点Window
内にない場合)。ローカルからシーンへの変換が反転不可能な場合も、nullが返されます。public Point3D sceneToLocal(double sceneX, double sceneY, double sceneZ)
sceneX
- シーン上の点のx座標sceneY
- シーン上の点のy座標sceneZ
- シーン上の点のz座標Window
内にない場合)。ローカルからシーンへの変換が反転不可能な場合も、nullが返されます。public Bounds sceneToLocal(Bounds sceneBounds)
sceneBounds
- シーン上の境界Window
内にない場合)。ローカルからシーンへの変換が反転不可能な場合も、nullが返されます。public Point2D localToScreen(double localX, double localY)
Node
のローカル座標空間からそのScreen
の座標空間に点を変換します。localX
- ノードの空間内の点のx座標localY
- ノードの空間内の点のy座標Window
内にない場合)public Point2D localToScreen(Point2D localPoint)
Node
のローカル座標空間からそのScreen
の座標空間に点を変換します。localPoint
- ノードの空間内の点Window
内にない場合)public Point2D localToScreen(double localX, double localY, double localZ)
Node
のローカル座標空間からそのScreen
の座標空間に点を変換します。localX
- ノードの空間内の点のx座標localY
- ノードの空間内の点のy座標localZ
- ノードの空間内の点のz座標Window
内にない場合)public Point2D localToScreen(Point3D localPoint)
Node
のローカル座標空間からそのScreen
の座標空間に点を変換します。localPoint
- ノードの空間内の点Window
内にない場合)public Bounds localToScreen(Bounds localBounds)
Node
のローカル座標空間からそのScreen
の座標空間に境界を変換します。localBounds
- ノードの空間内の境界Window
内にない場合)public Point2D localToScene(double localX, double localY)
localX
- ノードの空間内の点のx座標localY
- ノードの空間内の点のy座標Window
内にない場合)public Point2D localToScene(Point2D localPoint)
localPoint
- ノードの空間内の点Window
内にない場合)public Point3D localToScene(Point3D localPoint)
localToScene(javafx.geometry.Point3D, boolean)
public Point3D localToScene(double x, double y, double z)
localToScene(double, double, double, boolean)
public Point3D localToScene(Point3D localPoint, boolean rootScene)
Node
のローカル座標空間からそのシーンの座標空間に点を変換します。NodeにSubScene
がない場合や、rootScene
がtrueに設定されている場合、結果の点はgetScene()
により返されたNodeのScene
座標内にあります。それ以外の場合は、サブシーン座標が使用されます(これはlocalToScene(javafx.geometry.Point3D)
を呼び出すことと同じです)localPoint
- ローカル座標の点rootScene
- NodeがSubScene内にある場合でもScene座標を使用するかどうかlocalToScene(javafx.geometry.Point3D)
public Point3D localToScene(double x, double y, double z, boolean rootScene)
Node
のローカル座標空間からそのシーンの座標空間に点を変換します。NodeにSubScene
がない場合や、rootScene
がtrueに設定されている場合、結果の点はgetScene()
により返されたNodeのScene
座標内にあります。それ以外の場合は、サブシーン座標が使用されます(これはlocalToScene(double, double, double)
を呼び出すことと同じです)x
- ローカル座標の点のx座標y
- ローカル座標の点のy座標z
- ローカル座標の点のz座標rootScene
- NodeがSubScene内にある場合でもScene座標を使用するかどうかlocalToScene(double, double, double)
public Point2D localToScene(Point2D localPoint, boolean rootScene)
Node
のローカル座標空間からそのシーンの座標空間に点を変換します。NodeにSubScene
がない場合や、rootScene
がtrueに設定されている場合、結果の点はgetScene()
により返されたNodeのScene
座標内にあります。それ以外の場合は、サブシーン座標が使用されます(これはlocalToScene(javafx.geometry.Point2D)
を呼び出すことと同じです)localPoint
- ローカル座標の点rootScene
- NodeがSubScene内にある場合でもScene座標を使用するかどうかlocalToScene(javafx.geometry.Point2D)
public Point2D localToScene(double x, double y, boolean rootScene)
Node
のローカル座標空間からそのシーンの座標空間に点を変換します。NodeにSubScene
がない場合や、rootScene
がtrueに設定されている場合、結果の点はgetScene()
により返されたNodeのScene
座標内にあります。それ以外の場合は、サブシーン座標が使用されます(これはlocalToScene(double, double)
を呼び出すことと同じです)x
- ローカル座標の点のx座標y
- ローカル座標の点のy座標rootScene
- NodeがSubScene内にある場合でもScene座標を使用するかどうかlocalToScene(double, double)
public Bounds localToScene(Bounds localBounds, boolean rootScene)
Node
のローカル座標空間からそのシーンの座標空間に境界を変換します。NodeにSubScene
がない場合や、rootScene
がtrueに設定されている場合、結果の境界はgetScene()
により返されたNodeのScene
座標内にあります。それ以外の場合は、サブシーン座標が使用されます(これはlocalToScene(javafx.geometry.Bounds)
を呼び出すことと同じです)。localBounds
- ローカル座標の境界rootScene
- NodeがSubScene内にある場合でもScene座標を使用するかどうかlocalToScene(javafx.geometry.Bounds)
public Bounds localToScene(Bounds localBounds)
localBounds
- ノードの空間内の境界Window
内にない場合)localToScene(javafx.geometry.Bounds, boolean)
public Point2D parentToLocal(double parentX, double parentY)
Node
のローカル座標空間に点を変換します。public Point3D parentToLocal(Point3D parentPoint)
Node
のローカル座標空間に点を変換します。public Point3D parentToLocal(double parentX, double parentY, double parentZ)
Node
のローカル座標空間に点を変換します。public Point2D localToParent(double localX, double localY)
Node
のローカル座標空間からその親の座標空間に点を変換します。public Point3D localToParent(Point3D localPoint)
Node
のローカル座標空間からその親の座標空間に点を変換します。public Point3D localToParent(double x, double y, double z)
Node
のローカル座標空間からその親の座標空間に点を変換します。public final ObservableList<Transform> getTransforms()
Node
に適用されるTransform
オブジェクトのObservableListを定義します。変換のこのObservableListは、translateX
、translateY
、scaleX
、scaleY
およびrotate
変換よりも前に適用されます。public final void setTranslateX(double value)
Node
の変換に追加される変換のX座標を定義します。
ノードの最終的な平行移動はlayoutX
+ translateX
として計算されます。layoutX
によりノードの安定位置を決定し、translateX
により必要に応じてその位置を動的に調整します。
この変数を使用すると、ノードのlayoutBounds
に支障がないようにノードの位置を変更できるため、ノードの位置をアニメーション化する場合に役立ちます。
public final double getTranslateX()
Node
の変換に追加される変換のX座標を定義します。
ノードの最終的な平行移動はlayoutX
+ translateX
として計算されます。layoutX
によりノードの安定位置を決定し、translateX
により必要に応じてその位置を動的に調整します。
この変数を使用すると、ノードのlayoutBounds
に支障がないようにノードの位置を変更できるため、ノードの位置をアニメーション化する場合に役立ちます。
public final DoubleProperty translateXProperty()
Node
の変換に追加される変換のX座標を定義します。
ノードの最終的な平行移動はlayoutX
+ translateX
として計算されます。layoutX
によりノードの安定位置を決定し、translateX
により必要に応じてその位置を動的に調整します。
この変数を使用すると、ノードのlayoutBounds
に支障がないようにノードの位置を変更できるため、ノードの位置をアニメーション化する場合に役立ちます。
getTranslateX()
、setTranslateX(double)
public final void setTranslateY(double value)
Node
の変換に追加される変換のY座標を定義します。
ノードの最終的な平行移動はlayoutY
+ translateY
として計算されます。layoutY
によりノードの安定位置を決定し、translateY
により必要に応じてその位置を動的に調整します。
この変数を使用すると、ノードのlayoutBounds
に支障がないようにノードの位置を変更できるため、ノードの位置をアニメーション化する場合に役立ちます。
public final double getTranslateY()
Node
の変換に追加される変換のY座標を定義します。
ノードの最終的な平行移動はlayoutY
+ translateY
として計算されます。layoutY
によりノードの安定位置を決定し、translateY
により必要に応じてその位置を動的に調整します。
この変数を使用すると、ノードのlayoutBounds
に支障がないようにノードの位置を変更できるため、ノードの位置をアニメーション化する場合に役立ちます。
public final DoubleProperty translateYProperty()
Node
の変換に追加される変換のY座標を定義します。
ノードの最終的な平行移動はlayoutY
+ translateY
として計算されます。layoutY
によりノードの安定位置を決定し、translateY
により必要に応じてその位置を動的に調整します。
この変数を使用すると、ノードのlayoutBounds
に支障がないようにノードの位置を変更できるため、ノードの位置をアニメーション化する場合に役立ちます。
getTranslateY()
、setTranslateY(double)
public final void setTranslateZ(double value)
Node
の変換された座標に追加される変換のZ座標を定義します。この値は、transforms
ObservableListおよびlayoutZ
によって定義する平行移動に追加されます。
この変数を使用すると、ノードのレイアウト境界に支障がないようにノードの位置を変更できるため、ノードの位置をアニメーション化する場合に役立ちます。
これは条件付き機能であることに注意してください。詳細は、ConditionalFeature.SCENE3D
を参照してください。
public final double getTranslateZ()
Node
の変換された座標に追加される変換のZ座標を定義します。この値は、transforms
ObservableListおよびlayoutZ
によって定義する平行移動に追加されます。
この変数を使用すると、ノードのレイアウト境界に支障がないようにノードの位置を変更できるため、ノードの位置をアニメーション化する場合に役立ちます。
これは条件付き機能であることに注意してください。詳細は、ConditionalFeature.SCENE3D
を参照してください。
public final DoubleProperty translateZProperty()
Node
の変換された座標に追加される変換のZ座標を定義します。この値は、transforms
ObservableListおよびlayoutZ
によって定義する平行移動に追加されます。
この変数を使用すると、ノードのレイアウト境界に支障がないようにノードの位置を変更できるため、ノードの位置をアニメーション化する場合に役立ちます。
これは条件付き機能であることに注意してください。詳細は、ConditionalFeature.SCENE3D
を参照してください。
getTranslateZ()
、setTranslateZ(double)
public final void setScaleX(double value)
Node
のX軸に沿って、オブジェクトの中心のまわりに座標がスケールされる係数を定義します。手動またはアニメーションによりノードの拡大やアニメーション化を行うために使用します。
このスケール係数はデフォルトではlayoutBounds
に含まれていないため、すべての効果および変換を考慮した後にノード全体をスケーリングする場合に適しています。
スケールの中心として使用されるピボット・ポイントは、無変換のlayoutBounds
の中心です。
public final double getScaleX()
Node
のX軸に沿って、オブジェクトの中心のまわりに座標がスケールされる係数を定義します。手動またはアニメーションによりノードの拡大やアニメーション化を行うために使用します。
このスケール係数はデフォルトではlayoutBounds
に含まれていないため、すべての効果および変換を考慮した後にノード全体をスケーリングする場合に適しています。
スケールの中心として使用されるピボット・ポイントは、無変換のlayoutBounds
の中心です。
public final DoubleProperty scaleXProperty()
Node
のX軸に沿って、オブジェクトの中心のまわりに座標がスケールされる係数を定義します。手動またはアニメーションによりノードの拡大やアニメーション化を行うために使用します。
このスケール係数はデフォルトではlayoutBounds
に含まれていないため、すべての効果および変換を考慮した後にノード全体をスケーリングする場合に適しています。
スケールの中心として使用されるピボット・ポイントは、無変換のlayoutBounds
の中心です。
getScaleX()
、setScaleX(double)
public final void setScaleY(double value)
Node
のY軸に沿って、オブジェクトの中心のまわりに座標がスケールされる係数を定義します。手動またはアニメーションによりノードの拡大やアニメーション化を行うために使用します。
このスケール係数はデフォルトではlayoutBounds
に含まれていないため、すべての効果および変換を考慮した後にノード全体をスケーリングする場合に適しています。
スケールの中心として使用されるピボット・ポイントは、無変換のlayoutBounds
の中心です。
public final double getScaleY()
Node
のY軸に沿って、オブジェクトの中心のまわりに座標がスケールされる係数を定義します。手動またはアニメーションによりノードの拡大やアニメーション化を行うために使用します。
このスケール係数はデフォルトではlayoutBounds
に含まれていないため、すべての効果および変換を考慮した後にノード全体をスケーリングする場合に適しています。
スケールの中心として使用されるピボット・ポイントは、無変換のlayoutBounds
の中心です。
public final DoubleProperty scaleYProperty()
Node
のY軸に沿って、オブジェクトの中心のまわりに座標がスケールされる係数を定義します。手動またはアニメーションによりノードの拡大やアニメーション化を行うために使用します。
このスケール係数はデフォルトではlayoutBounds
に含まれていないため、すべての効果および変換を考慮した後にノード全体をスケーリングする場合に適しています。
スケールの中心として使用されるピボット・ポイントは、無変換のlayoutBounds
の中心です。
getScaleY()
、setScaleY(double)
public final void setScaleZ(double value)
Node
のZ軸に沿って、オブジェクトの中心のまわりに座標がスケールされる係数を定義します。手動またはアニメーションによりノードの拡大やアニメーション化を行うために使用します。
このスケール係数はデフォルトではlayoutBounds
に含まれていないため、すべての効果および変換を考慮した後にノード全体をスケーリングする場合に適しています。
スケールの中心として使用されるピボット・ポイントは、boundsInLocal
を取得し、transforms
ObservableListのすべての変換を適用することによって形成される矩形境界の中心です。
これは条件付き機能であることに注意してください。詳細は、ConditionalFeature.SCENE3D
を参照してください。
public final double getScaleZ()
Node
のZ軸に沿って、オブジェクトの中心のまわりに座標がスケールされる係数を定義します。手動またはアニメーションによりノードの拡大やアニメーション化を行うために使用します。
このスケール係数はデフォルトではlayoutBounds
に含まれていないため、すべての効果および変換を考慮した後にノード全体をスケーリングする場合に適しています。
スケールの中心として使用されるピボット・ポイントは、boundsInLocal
を取得し、transforms
ObservableListのすべての変換を適用することによって形成される矩形境界の中心です。
これは条件付き機能であることに注意してください。詳細は、ConditionalFeature.SCENE3D
を参照してください。
public final DoubleProperty scaleZProperty()
Node
のZ軸に沿って、オブジェクトの中心のまわりに座標がスケールされる係数を定義します。手動またはアニメーションによりノードの拡大やアニメーション化を行うために使用します。
このスケール係数はデフォルトではlayoutBounds
に含まれていないため、すべての効果および変換を考慮した後にノード全体をスケーリングする場合に適しています。
スケールの中心として使用されるピボット・ポイントは、boundsInLocal
を取得し、transforms
ObservableListのすべての変換を適用することによって形成される矩形境界の中心です。
これは条件付き機能であることに注意してください。詳細は、ConditionalFeature.SCENE3D
を参照してください。
getScaleZ()
、setScaleZ(double)
public final void setRotate(double value)
Node
の中心を基準とする回転角度を定義します(角度の単位で測定)。Node
を回転するために使用します。
この回転係数はデフォルトではlayoutBounds
に含まれておらず、すべての効果および変換を考慮してからノード全体を回転するのに適しています。
回転の中心として使用されるピボット・ポイントは、無変換のlayoutBounds
の中心です。
ピボット・ポイントはこのNode
のレイアウト境界の中心として計算されるため、レイアウト境界が変わると、ピボット・ポイントも変わり、オブジェクトが移動される可能性があります。リーフ・ノードの場合、ジオメトリが変わると、レイアウト境界も変わります。グループ・ノードの場合、その子(子のジオメトリ、クリップ、効果、位置、向き、スケールなど)が変わると、グループのレイアウト境界も変わります。このようにピボット・ポイントが移動することが望ましくない場合は、アプリケーションでかわりにノードのtransforms
ObservableListを使用し、ユーザーが指定可能なピボット・ポイントに対応したRotate
変換を追加する必要があります。
public final double getRotate()
Node
の中心を基準とする回転角度を定義します(角度の単位で測定)。Node
を回転するために使用します。
この回転係数はデフォルトではlayoutBounds
に含まれておらず、すべての効果および変換を考慮してからノード全体を回転するのに適しています。
回転の中心として使用されるピボット・ポイントは、無変換のlayoutBounds
の中心です。
ピボット・ポイントはこのNode
のレイアウト境界の中心として計算されるため、レイアウト境界が変わると、ピボット・ポイントも変わり、オブジェクトが移動される可能性があります。リーフ・ノードの場合、ジオメトリが変わると、レイアウト境界も変わります。グループ・ノードの場合、その子(子のジオメトリ、クリップ、効果、位置、向き、スケールなど)が変わると、グループのレイアウト境界も変わります。このようにピボット・ポイントが移動することが望ましくない場合は、アプリケーションでかわりにノードのtransforms
ObservableListを使用し、ユーザーが指定可能なピボット・ポイントに対応したRotate
変換を追加する必要があります。
public final DoubleProperty rotateProperty()
Node
の中心を基準とする回転角度を定義します(角度の単位で測定)。Node
を回転するために使用します。
この回転係数はデフォルトではlayoutBounds
に含まれておらず、すべての効果および変換を考慮してからノード全体を回転するのに適しています。
回転の中心として使用されるピボット・ポイントは、無変換のlayoutBounds
の中心です。
ピボット・ポイントはこのNode
のレイアウト境界の中心として計算されるため、レイアウト境界が変わると、ピボット・ポイントも変わり、オブジェクトが移動される可能性があります。リーフ・ノードの場合、ジオメトリが変わると、レイアウト境界も変わります。グループ・ノードの場合、その子(子のジオメトリ、クリップ、効果、位置、向き、スケールなど)が変わると、グループのレイアウト境界も変わります。このようにピボット・ポイントが移動することが望ましくない場合は、アプリケーションでかわりにノードのtransforms
ObservableListを使用し、ユーザーが指定可能なピボット・ポイントに対応したRotate
変換を追加する必要があります。
getRotate()
、setRotate(double)
public final void setRotationAxis(Point3D value)
Node
の回転軸を定義します。
これは条件付き機能であることに注意してください。詳細は、ConditionalFeature.SCENE3D
を参照してください。
public final Point3D getRotationAxis()
Node
の回転軸を定義します。
これは条件付き機能であることに注意してください。詳細は、ConditionalFeature.SCENE3D
を参照してください。
public final ObjectProperty<Point3D> rotationAxisProperty()
Node
の回転軸を定義します。
これは条件付き機能であることに注意してください。詳細は、ConditionalFeature.SCENE3D
を参照してください。
getRotationAxis()
、setRotationAxis(Point3D)
public final ReadOnlyObjectProperty<Transform> localToParentTransformProperty()
getLocalToParentTransform()
public final Transform getLocalToParentTransform()
public final ReadOnlyObjectProperty<Transform> localToSceneTransformProperty()
SubScene
内にある場合、このプロパティはルート・シーンではなくサブシーンまでの変換を表します。
このプロパティに対してリスナーやバインディングを登録する場合、ルート・ノードまでのすべての親で無効化をリスニングする必要があります。これは、多くのノードでこのプロパティに対してリスナーを登録すると、共通の親における変換変更のパフォーマンスが低下する可能性があることを意味します。
getLocalToSceneTransform()
public final Transform getLocalToSceneTransform()
SubScene
内にある場合、このプロパティはルート・シーンではなくサブシーンまでの変換を表します。
このプロパティに対してリスナーやバインディングを登録する場合、ルート・ノードまでのすべての親で無効化をリスニングする必要があります。これは、多くのノードでこのプロパティに対してリスナーを登録すると、共通の親における変換変更のパフォーマンスが低下する可能性があることを意味します。
public final void setNodeOrientation(NodeOrientation orientation)
public final NodeOrientation getNodeOrientation()
public final ObjectProperty<NodeOrientation> nodeOrientationProperty()
ノードの向きは、ノード内の視覚データのフローを表します。英語の世界では、視覚データのフローは一般に左から右になります。アラビア語やヘブライ語の世界では、視覚データのフローは右から左になります。これは、どちらの世界においてもテキストを読む方向と一致しています。デフォルト値は左から右です。
public final NodeOrientation getEffectiveNodeOrientation()
public final ReadOnlyObjectProperty<NodeOrientation> effectiveNodeOrientationProperty()
getEffectiveNodeOrientation()
public boolean usesMirroring()
ノードがミラー化される場合は、起点が自動的に右上隅に移動され、ミラー化変換を使用して子がレイアウトされ、ノードが右から左に描画されます。ノードによっては、変換を使用せずに右から左に描画した方がよい場合があります。これらのノードに対してfalse
を指定すると、向きが右から左のときに自動変換が使用されなくなります。
public final void setMouseTransparent(boolean value)
true
の場合、このノードは(そのすべての子とともに)マウス・イベントに対して完全に透過的になります。マウス・イベントのターゲットを選択する際には、mouseTransparent
がtrue
に設定されたノードとそのサブツリーは考慮されません。public final boolean isMouseTransparent()
true
の場合、このノードは(そのすべての子とともに)マウス・イベントに対して完全に透過的になります。マウス・イベントのターゲットを選択する際には、mouseTransparent
がtrue
に設定されたノードとそのサブツリーは考慮されません。public final BooleanProperty mouseTransparentProperty()
true
の場合、このノードは(そのすべての子とともに)マウス・イベントに対して完全に透過的になります。マウス・イベントのターゲットを選択する際には、mouseTransparent
がtrue
に設定されたノードとそのサブツリーは考慮されません。protected final void setHover(boolean value)
Node
にカーソルが置かれているかどうか。一般に、これはノード上にマウスを置いていることに起因するものですが、グラフィックス・タブレット上のペン・ホバリングやその他の形式の入力に起因する場合もあります。
ホバーの現在の実装では、マウスの入出イベントに基づいてこのノードがホバー状態かどうか判断されます。つまり、この機能は、現時点ではマウスに対応したシステムでのみサポートされています。将来の実装では、別の手段によるホバー・サポートが提供される予定です。
public final boolean isHover()
Node
にカーソルが置かれているかどうか。一般に、これはノード上にマウスを置いていることに起因するものですが、グラフィックス・タブレット上のペン・ホバリングやその他の形式の入力に起因する場合もあります。
ホバーの現在の実装では、マウスの入出イベントに基づいてこのノードがホバー状態かどうか判断されます。つまり、この機能は、現時点ではマウスに対応したシステムでのみサポートされています。将来の実装では、別の手段によるホバー・サポートが提供される予定です。
public final ReadOnlyBooleanProperty hoverProperty()
Node
にカーソルが置かれているかどうか。一般に、これはノード上にマウスを置いていることに起因するものですが、グラフィックス・タブレット上のペン・ホバリングやその他の形式の入力に起因する場合もあります。
ホバーの現在の実装では、マウスの入出イベントに基づいてこのノードがホバー状態かどうか判断されます。つまり、この機能は、現時点ではマウスに対応したシステムでのみサポートされています。将来の実装では、別の手段によるホバー・サポートが提供される予定です。
isHover()
、setHover(boolean)
protected final void setPressed(boolean value)
Node
が押されているかどうか。一般に、これは第一マウス・ボタンの押下時に該当します。ただし、サブクラスでは、その他のマウス・ボタン状態やキー状態に起因してノードが押されるように定義することもできます。public final boolean isPressed()
Node
が押されているかどうか。一般に、これは第一マウス・ボタンの押下時に該当します。ただし、サブクラスでは、その他のマウス・ボタン状態やキー状態に起因してノードが押されるように定義することもできます。public final ReadOnlyBooleanProperty pressedProperty()
Node
が押されているかどうか。一般に、これは第一マウス・ボタンの押下時に該当します。ただし、サブクラスでは、その他のマウス・ボタン状態やキー状態に起因してノードが押されるように定義することもできます。isPressed()
、setPressed(boolean)
public final void setOnContextMenuRequested(EventHandler<? super ContextMenuEvent> value)
Node
でコンテキスト・メニューがリクエストされたときに呼び出される関数を定義します。public final EventHandler<? super ContextMenuEvent> getOnContextMenuRequested()
Node
でコンテキスト・メニューがリクエストされたときに呼び出される関数を定義します。public final ObjectProperty<EventHandler<? super ContextMenuEvent>> onContextMenuRequestedProperty()
Node
でコンテキスト・メニューがリクエストされたときに呼び出される関数を定義します。getOnContextMenuRequested()
、setOnContextMenuRequested(EventHandler)
public final void setOnMouseClicked(EventHandler<? super MouseEvent> value)
Node
でマウス・ボタンがクリックされた(押されて放された)ときに呼び出される関数を定義します。public final EventHandler<? super MouseEvent> getOnMouseClicked()
Node
でマウス・ボタンがクリックされた(押されて放された)ときに呼び出される関数を定義します。public final ObjectProperty<EventHandler<? super MouseEvent>> onMouseClickedProperty()
Node
でマウス・ボタンがクリックされた(押されて放された)ときに呼び出される関数を定義します。public final void setOnMouseDragged(EventHandler<? super MouseEvent> value)
Node
でマウス・ボタンが押されてからドラッグされるときに呼び出される関数を定義します。public final EventHandler<? super MouseEvent> getOnMouseDragged()
Node
でマウス・ボタンが押されてからドラッグされるときに呼び出される関数を定義します。public final ObjectProperty<EventHandler<? super MouseEvent>> onMouseDraggedProperty()
Node
でマウス・ボタンが押されてからドラッグされるときに呼び出される関数を定義します。public final void setOnMouseEntered(EventHandler<? super MouseEvent> value)
Node
に入るときに呼び出される関数を定義します。public final EventHandler<? super MouseEvent> getOnMouseEntered()
Node
に入るときに呼び出される関数を定義します。public final ObjectProperty<EventHandler<? super MouseEvent>> onMouseEnteredProperty()
Node
に入るときに呼び出される関数を定義します。public final void setOnMouseExited(EventHandler<? super MouseEvent> value)
Node
から出るときに呼び出される関数を定義します。public final EventHandler<? super MouseEvent> getOnMouseExited()
Node
から出るときに呼び出される関数を定義します。public final ObjectProperty<EventHandler<? super MouseEvent>> onMouseExitedProperty()
Node
から出るときに呼び出される関数を定義します。public final void setOnMouseMoved(EventHandler<? super MouseEvent> value)
Node
内をマウス・カーソルが移動するが、ボタンが押されなかった場合に呼び出される関数を定義します。public final EventHandler<? super MouseEvent> getOnMouseMoved()
Node
内をマウス・カーソルが移動するが、ボタンが押されなかった場合に呼び出される関数を定義します。public final ObjectProperty<EventHandler<? super MouseEvent>> onMouseMovedProperty()
Node
内をマウス・カーソルが移動するが、ボタンが押されなかった場合に呼び出される関数を定義します。public final void setOnMousePressed(EventHandler<? super MouseEvent> value)
Node
でマウス・ボタンが押されたときに呼び出される関数を定義します。public final EventHandler<? super MouseEvent> getOnMousePressed()
Node
でマウス・ボタンが押されたときに呼び出される関数を定義します。public final ObjectProperty<EventHandler<? super MouseEvent>> onMousePressedProperty()
Node
でマウス・ボタンが押されたときに呼び出される関数を定義します。public final void setOnMouseReleased(EventHandler<? super MouseEvent> value)
Node
でマウス・ボタンが放されたときに呼び出される関数を定義します。public final EventHandler<? super MouseEvent> getOnMouseReleased()
Node
でマウス・ボタンが放されたときに呼び出される関数を定義します。public final ObjectProperty<EventHandler<? super MouseEvent>> onMouseReleasedProperty()
Node
でマウス・ボタンが放されたときに呼び出される関数を定義します。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)
Node
内で進行しているときに呼び出される関数を定義します。public final EventHandler<? super MouseDragEvent> getOnMouseDragOver()
Node
内で進行しているときに呼び出される関数を定義します。public final ObjectProperty<EventHandler<? super MouseDragEvent>> onMouseDragOverProperty()
Node
内で進行しているときに呼び出される関数を定義します。getOnMouseDragOver()
、setOnMouseDragOver(EventHandler)
public final void setOnMouseDragReleased(EventHandler<? super MouseDragEvent> value)
Node
内で(マウス・ボタンを放すことにより)終了すると呼び出される関数を定義します。public final EventHandler<? super MouseDragEvent> getOnMouseDragReleased()
Node
内で(マウス・ボタンを放すことにより)終了すると呼び出される関数を定義します。public final ObjectProperty<EventHandler<? super MouseDragEvent>> onMouseDragReleasedProperty()
Node
内で(マウス・ボタンを放すことにより)終了すると呼び出される関数を定義します。getOnMouseDragReleased()
、setOnMouseDragReleased(EventHandler)
public final void setOnMouseDragEntered(EventHandler<? super MouseDragEvent> value)
Node
に入ると呼び出される関数を定義します。public final EventHandler<? super MouseDragEvent> getOnMouseDragEntered()
Node
に入ると呼び出される関数を定義します。public final ObjectProperty<EventHandler<? super MouseDragEvent>> onMouseDragEnteredProperty()
Node
に入ると呼び出される関数を定義します。getOnMouseDragEntered()
、setOnMouseDragEntered(EventHandler)
public final void setOnMouseDragExited(EventHandler<? super MouseDragEvent> value)
Node
から出ると呼び出される関数を定義します。public final EventHandler<? super MouseDragEvent> getOnMouseDragExited()
Node
から出ると呼び出される関数を定義します。public final ObjectProperty<EventHandler<? super MouseDragEvent>> onMouseDragExitedProperty()
Node
から出ると呼び出される関数を定義します。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 setOnKeyPressed(EventHandler<? super KeyEvent> value)
Node
またはその子Node
に入力フォーカスがあり、キーが押されたときに呼び出される関数を定義します。この関数は、キャプチャ・フェーズまたはバブリング・フェーズでイベントがまだ使用されていない場合にのみ呼び出されます。public final EventHandler<? super KeyEvent> getOnKeyPressed()
Node
またはその子Node
に入力フォーカスがあり、キーが押されたときに呼び出される関数を定義します。この関数は、キャプチャ・フェーズまたはバブリング・フェーズでイベントがまだ使用されていない場合にのみ呼び出されます。public final ObjectProperty<EventHandler<? super KeyEvent>> onKeyPressedProperty()
Node
またはその子Node
に入力フォーカスがあり、キーが押されたときに呼び出される関数を定義します。この関数は、キャプチャ・フェーズまたはバブリング・フェーズでイベントがまだ使用されていない場合にのみ呼び出されます。public final void setOnKeyReleased(EventHandler<? super KeyEvent> value)
Node
またはその子Node
に入力フォーカスがあり、キーが放されたときに呼び出される関数を定義します。この関数は、キャプチャ・フェーズまたはバブリング・フェーズでイベントがまだ使用されていない場合にのみ呼び出されます。public final EventHandler<? super KeyEvent> getOnKeyReleased()
Node
またはその子Node
に入力フォーカスがあり、キーが放されたときに呼び出される関数を定義します。この関数は、キャプチャ・フェーズまたはバブリング・フェーズでイベントがまだ使用されていない場合にのみ呼び出されます。public final ObjectProperty<EventHandler<? super KeyEvent>> onKeyReleasedProperty()
Node
またはその子Node
に入力フォーカスがあり、キーが放されたときに呼び出される関数を定義します。この関数は、キャプチャ・フェーズまたはバブリング・フェーズでイベントがまだ使用されていない場合にのみ呼び出されます。public final void setOnKeyTyped(EventHandler<? super KeyEvent> value)
Node
またはその子Node
に入力フォーカスがあり、キーが入力されたときに呼び出される関数を定義します。この関数は、キャプチャ・フェーズまたはバブリング・フェーズでイベントがまだ使用されていない場合にのみ呼び出されます。public final EventHandler<? super KeyEvent> getOnKeyTyped()
Node
またはその子Node
に入力フォーカスがあり、キーが入力されたときに呼び出される関数を定義します。この関数は、キャプチャ・フェーズまたはバブリング・フェーズでイベントがまだ使用されていない場合にのみ呼び出されます。public final ObjectProperty<EventHandler<? super KeyEvent>> onKeyTypedProperty()
Node
またはその子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 void setInputMethodRequests(InputMethodRequests value)
public final InputMethodRequests getInputMethodRequests()
public final ObjectProperty<InputMethodRequests> inputMethodRequestsProperty()
protected final void setFocused(boolean value)
Node
に入力フォーカスがあるかどうかを示します。入力フォーカスを設定するには、ノードがScene
のフォーカス所有者であり、可視かつアクティブなStage
にそのシーンが存在する必要があります。詳細は、requestFocus()
を参照してください。public final boolean isFocused()
Node
に入力フォーカスがあるかどうかを示します。入力フォーカスを設定するには、ノードがScene
のフォーカス所有者であり、可視かつアクティブなStage
にそのシーンが存在する必要があります。詳細は、requestFocus()
を参照してください。public final ReadOnlyBooleanProperty focusedProperty()
Node
に入力フォーカスがあるかどうかを示します。入力フォーカスを設定するには、ノードがScene
のフォーカス所有者であり、可視かつアクティブなStage
にそのシーンが存在する必要があります。詳細は、requestFocus()
を参照してください。isFocused()
、setFocused(boolean)
public final void setFocusTraversable(boolean value)
Node
は、フォーカス・トラバーサル・サイクルの一部である必要があります。このプロパティがtrue
の場合、標準のフォーカス・トラバーサル・キーを使用して、このNode
に、またはこのNode
からフォーカスを移すことができます。デスクトップでは、通常、フォーカスを前方に移す場合は[TAB]
キーを使用し、フォーカスを後方に移す場合は[SHIFT] + [TAB]
キーを使用します。Scene
が作成されると、フォーカスの対象としてfocusTraversable
変数がtrueに設定されているNode
に自動的にフォーカスが設定されます。ただし、requestFocus()
を呼び出してフォーカスを明示的に設定している場合を除きます。public final boolean isFocusTraversable()
Node
は、フォーカス・トラバーサル・サイクルの一部である必要があります。このプロパティがtrue
の場合、標準のフォーカス・トラバーサル・キーを使用して、このNode
に、またはこのNode
からフォーカスを移すことができます。デスクトップでは、通常、フォーカスを前方に移す場合は[TAB]
キーを使用し、フォーカスを後方に移す場合は[SHIFT] + [TAB]
キーを使用します。Scene
が作成されると、フォーカスの対象としてfocusTraversable
変数がtrueに設定されているNode
に自動的にフォーカスが設定されます。ただし、requestFocus()
を呼び出してフォーカスを明示的に設定している場合を除きます。public final BooleanProperty focusTraversableProperty()
Node
は、フォーカス・トラバーサル・サイクルの一部である必要があります。このプロパティがtrue
の場合、標準のフォーカス・トラバーサル・キーを使用して、このNode
に、またはこのNode
からフォーカスを移すことができます。デスクトップでは、通常、フォーカスを前方に移す場合は[TAB]
キーを使用し、フォーカスを後方に移す場合は[SHIFT] + [TAB]
キーを使用します。Scene
が作成されると、フォーカスの対象としてfocusTraversable
変数がtrueに設定されているNode
に自動的にフォーカスが設定されます。ただし、requestFocus()
を呼び出してフォーカスを明示的に設定している場合を除きます。isFocusTraversable()
、setFocusTraversable(boolean)
public void requestFocus()
Node
が入力フォーカスを取得すること、およびこのNode
のトップ・レベルの祖先がフォーカスされたウィンドウになることを要求します。ノードにフォーカスを移すためには、ノードがシーンに含まれていること、その祖先がすべて可視であること、およびノードが無効化されていないことが条件となります。ノードがフォーカスの対象となる場合、この関数によりそのノードがこのScene
のフォーカス所有者として指定されます。シーンごとに最大で1個のフォーカス所有者ノードがあります。ただし、可視かつアクティブなStage
にシーンが属していないかぎり、フォーカス所有者に実際に入力フォーカスが移されることはありません。public String toString()
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)
addEventHandler(javafx.event.EventType, javafx.event.EventHandler)
を使用して追加されたハンドラの後に最後のハンドラとして呼び出されます。これは、ユーザー定義のonFooイベント・ハンドラを登録するために使用されます。T
- ハンドラの特定のイベント・クラスeventType
- 指定のeventHandlerに関連付けるイベント・タイプeventHandler
- 登録するハンドラ、または登録解除する場合はnullNullPointerException
- イベント・タイプがnullの場合public EventDispatchChain buildEventDispatchChain(EventDispatchChain tail)
buildEventDispatchChain
、インタフェース: EventTarget
tail
- 構築元となる初期チェーンpublic final void fireEvent(Event event)
このメソッドは、FXユーザー・スレッドで呼び出される必要があります。
event
- 起動するイベントpublic String getTypeSelector()
Styleable
の型。これはHTMLの要素に似ています(CSSタイプ・セレクタ)。getTypeSelector
、インタフェース: Styleable
getClass().getName()
public Styleable getStyleableParent()
getStyleableParent
、インタフェース: Styleable
getParent()
public static List<CssMetaData<? extends Styleable,?>> getClassCssMetaData()
public List<CssMetaData<? extends Styleable,?>> getCssMetaData()
getClassCssMetaData()
に委任する必要があります。getCssMetaData
、インタフェース: Styleable
public final void pseudoClassStateChanged(PseudoClass pseudoClass, boolean active)
invalidated
メソッドから呼び出されます。例:
private static final PseudoClass MY_PSEUDO_CLASS_STATE = PseudoClass.getPseudoClass("my-state");
BooleanProperty myPseudoClassState = new BooleanPropertyBase(false) {
@Override public void invalidated() {
pseudoClassStateChanged(MY_PSEUDO_CLASS_STATE, get());
}
@Override public Object getBean() {
return MyControl.this;
}
@Override public String getName() {
return "myPseudoClassState";
}
};
pseudoClass
- 状態が変更された擬似クラスactive
- 状態がアクティブかどうかpublic final ObservableSet<PseudoClass> getPseudoClassStates()
Styleable
getPseudoClassStates
、インタフェース: Styleable
public final void applyCss()
Scene
がStage
内にない場合に、Parent.layout()
と組み合せて使用できます。
NodeのScene
がnullでない場合、このNodeのCSS状態がcleanであるかどうかにかかわらず、CSSがこのNodeに適用されます。CSSスタイルは、CSS状態がclean以外であるこのNodeの最上位の親から適用され、これが他のノードのスタイル設定に影響を与えることがあります。NodeがScene内にない場合、このメソッドは何も処理しません。SceneがStage内にある必要はありません。
このメソッドはParent.layout()
メソッドを呼び出しません。通常、呼出し側は次の一連の操作を使用します。
parentNode.applyCss();
parentNode.layout();
より詳細な例として、次のコードでは、applyCss()
およびlayout()
を使用して、Stageが表示される前にButtonの幅と高さを調べています。applyCss()
またはlayout()
のいずれかのコールがコメント・アウトされると、(Stageが表示されてからしばらくの間) getWidth()
およびgetHeight()
のコールはゼロを返します。
@Override
public void start(Stage stage) throws Exception {
Group root = new Group();
Scene scene = new Scene(root);
Button button = new Button("Hello World");
root.getChildren().add(button);
root.applyCss();
root.layout();
double width = button.getWidth();
double height = button.getHeight();
System.out.println(width + ", " + height);
stage.setScene(scene);
stage.show();
}
public final void setAccessibleRole(AccessibleRole value)
Node
のアクセス可能な役割。
スクリーン・リーダーはノードの役割を使用して、サポートされている属性およびアクションを判別します。
AccessibleRole.NODE
public final AccessibleRole getAccessibleRole()
Node
のアクセス可能な役割。
スクリーン・リーダーはノードの役割を使用して、サポートされている属性およびアクションを判別します。
AccessibleRole.NODE
public final ObjectProperty<AccessibleRole> accessibleRoleProperty()
Node
のアクセス可能な役割。
スクリーン・リーダーはノードの役割を使用して、サポートされている属性およびアクションを判別します。
AccessibleRole.NODE
getAccessibleRole()
、setAccessibleRole(AccessibleRole)
public final void setAccessibleRoleDescription(String value)
Node
のロール説明。
通常、ノードに対して役割が提供されている場合、スクリーン・リーダーはノードのコンテンツおよび役割を読み上げます。この値が設定されている場合、デフォルトをオーバーライドすることが可能です。これは、役割のセットが事前定義されているため便利です。たとえば、ノードの役割をボタンに設定し、役割説明を任意のテキストにすることができます。
public final String getAccessibleRoleDescription()
Node
のロール説明。
通常、ノードに対して役割が提供されている場合、スクリーン・リーダーはノードのコンテンツおよび役割を読み上げます。この値が設定されている場合、デフォルトをオーバーライドすることが可能です。これは、役割のセットが事前定義されているため便利です。たとえば、ノードの役割をボタンに設定し、役割説明を任意のテキストにすることができます。
public final ObjectProperty<String> accessibleRoleDescriptionProperty()
Node
のロール説明。
通常、ノードに対して役割が提供されている場合、スクリーン・リーダーはノードのコンテンツおよび役割を読み上げます。この値が設定されている場合、デフォルトをオーバーライドすることが可能です。これは、役割のセットが事前定義されているため便利です。たとえば、ノードの役割をボタンに設定し、役割説明を任意のテキストにすることができます。
getAccessibleRoleDescription()
、setAccessibleRoleDescription(String)
public final void setAccessibleText(String value)
Node
のアクセス可能なテキスト。
このプロパティは、スクリーン・リーダーが読み上げるテキストを設定するために使用します。ノードが通常テキストを読み上げる場合、そのテキストはオーバーライドされます。たとえば、ボタンは通常、コントロール内のテキストを使用して読み上げますが、この値が設定されると、この動作を停止します。
public final String getAccessibleText()
Node
のアクセス可能なテキスト。
このプロパティは、スクリーン・リーダーが読み上げるテキストを設定するために使用します。ノードが通常テキストを読み上げる場合、そのテキストはオーバーライドされます。たとえば、ボタンは通常、コントロール内のテキストを使用して読み上げますが、この値が設定されると、この動作を停止します。
public final ObjectProperty<String> accessibleTextProperty()
Node
のアクセス可能なテキスト。
このプロパティは、スクリーン・リーダーが読み上げるテキストを設定するために使用します。ノードが通常テキストを読み上げる場合、そのテキストはオーバーライドされます。たとえば、ボタンは通常、コントロール内のテキストを使用して読み上げますが、この値が設定されると、この動作を停止します。
getAccessibleText()
、setAccessibleText(String)
public final void setAccessibleHelp(String value)
Node
のアクセス可能なヘルプ・テキスト。
ヘルプ・テキストは、ノードのアクセス可能なテキストの詳細な説明を提供します。デフォルトでは、ノードにツール・チップがある場合、このテキストが使用されます。
public final String getAccessibleHelp()
Node
のアクセス可能なヘルプ・テキスト。
ヘルプ・テキストは、ノードのアクセス可能なテキストの詳細な説明を提供します。デフォルトでは、ノードにツール・チップがある場合、このテキストが使用されます。
public final ObjectProperty<String> accessibleHelpProperty()
Node
のアクセス可能なヘルプ・テキスト。
ヘルプ・テキストは、ノードのアクセス可能なテキストの詳細な説明を提供します。デフォルトでは、ノードにツール・チップがある場合、このテキストが使用されます。
getAccessibleHelp()
、setAccessibleHelp(String)
public Object queryAccessibleAttribute(AccessibleAttribute attribute, Object... parameters)
このメソッドは一般に、特定の役割に必要な属性を実装するためにサブクラスによってオーバーライドされます。
特定の属性が処理されない場合、スーパー・クラス実装を呼び出す必要があります。
attribute
- リクエストされた属性parameters
- オプションのパラメータ・リストAccessibleAttribute
public void executeAccessibleAction(AccessibleAction action, Object... parameters)
このメソッドは一般に、特定の役割に必要なアクションを実装するためにサブクラスによってオーバーライドされます。
特定のアクションが処理されない場合、スーパー・クラス実装を呼び出す必要があります。
action
- 実行するアクションparameters
- オプションのパラメータ・リスト「AccessibleAction」
public final void notifyAccessibleAttributeChanged(AccessibleAttribute attributes)
notification
- 値が変更された属性AccessibleAttribute
Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.