public class SubScene extends Node
SubScene
クラスは、シーングラフの内容のコンテナです。SubScene
を使用すると、シーンの各部を分離し、異なるカメラ、奥行きのバッファまたはシーンのアンチエイリアスを使用してレンダリングできます。SubScene
は、メイン・シーンまたは別のサブシーンに埋め込まれます。
アプリケーションは、SubScene
の作成時に深度バッファのサポートまたはシーン・アンチエイリアスのサポートをリクエストすることがあります。3D変換のない2D形状のみが含まれるサブシーンは、深度バッファのサポートもシーン・アンチエイリアスのサポートも必要ありません。3D図形や、3D変換のある2D形状が含まれるサブシーンは、適切な深度でソートしてレンダリングするために深度バッファのサポートが必要になることがあります。深度ファイティング(Zファイティングとも呼ばれる)を回避するには、3D変換のない2D形状に対して深度テストを無効にします。詳細は、「depthTest
」を参照してください。3D形状を含むサブシーンは、シーンのアンチエイリアスを有効にすると、そのレンダリングの質を向上させることができます。
depthBufferフラグとantiAliasingフラグは条件付き機能です。それぞれのデフォルト値は、falseおよびSceneAntialiasing.DISABLED
です。詳細は、ConditionalFeature.SCENE3D
を参照してください。
次のようなユースケースが考えられます。
1つ以上のShape3D
ノードが存在し、かつ光ノードが存在しないサブシーンには、デフォルトのヘッドライトが追加されます。この光源は、Color.WHITE
PointLight
で、カメラの位置に配置されます。
Type | プロパティと説明 |
---|---|
ObjectProperty<Camera> |
camera
この
SubScene をレンダリングするために使用するカメラのタイプを指定します。 |
ObjectProperty<Paint> |
fill
この
SubScene の背景の塗りつぶしを定義します。 |
DoubleProperty |
height
この
SubScene の高さを定義します。 |
ObjectProperty<Parent> |
root
SubScene シーン・グラフのルートNode を定義します。 |
ObjectProperty<String> |
userAgentStylesheet |
DoubleProperty |
width
この
SubScene の幅を定義します。 |
accessibleHelp、accessibleRoleDescription、accessibleRole、accessibleText、blendMode、boundsInLocal、boundsInParent、cacheHint、cache、clip、cursor、depthTest、disabled、disable、effectiveNodeOrientation、effect、eventDispatcher、focused、focusTraversable、hover、id、inputMethodRequests、layoutBounds、layoutX、layoutY、localToParentTransform、localToSceneTransform、managed、mouseTransparent、nodeOrientation、onContextMenuRequested、onDragDetected、onDragDone、onDragDropped、onDragEntered、onDragExited、onDragOver、onInputMethodTextChanged、onKeyPressed、onKeyReleased、onKeyTyped、onMouseClicked、onMouseDragEntered、onMouseDragExited、onMouseDragged、onMouseDragOver、onMouseDragReleased、onMouseEntered、onMouseExited、onMouseMoved、onMousePressed、onMouseReleased、onRotate、onRotationFinished、onRotationStarted、onScrollFinished、onScroll、onScrollStarted、onSwipeDown、onSwipeLeft、onSwipeRight、onSwipeUp、onTouchMoved、onTouchPressed、onTouchReleased、onTouchStationary、onZoomFinished、onZoom、onZoomStarted、opacity、parent、pickOnBounds、pressed、rotate、rotationAxis、scaleX、scaleY、scaleZ、scene、style、translateX、translateY、translateZ、visible
BASELINE_OFFSET_SAME_AS_HEIGHT
コンストラクタと説明 |
---|
SubScene(Parent root, double width, double height)
特定のサイズを使用した特定のルート・ノードの
SubScene を作成します。 |
SubScene(Parent root, double width, double height, boolean depthBuffer, SceneAntialiasing antiAliasing)
幅と高さの寸法を使用したルートで構成される
SubScene を構築し、奥行きのバッファをこのシーンに作成するかどうかを指定し、シーンのアンチエイリアスをリクエストするかどうかを指定します。 |
修飾子と型 | メソッドと説明 |
---|---|
ObjectProperty<Camera> |
cameraProperty()
この
SubScene をレンダリングするために使用するカメラのタイプを指定します。 |
ObjectProperty<Paint> |
fillProperty()
この
SubScene の背景の塗りつぶしを定義します。 |
SceneAntialiasing |
getAntiAliasing()
この
SubScene の定義されたSceneAntialiasing を返します。 |
Camera |
getCamera()
プロパティcameraの値を取得します。
|
Paint |
getFill()
プロパティfillの値を取得します。
|
double |
getHeight()
プロパティheightの値を取得します。
|
Parent |
getRoot()
プロパティrootの値を取得します。
|
String |
getUserAgentStylesheet()
このSubSceneで使用されるユーザー・エージェント・スタイルシートのURLを取得します。
|
double |
getWidth()
プロパティwidthの値を取得します。
|
DoubleProperty |
heightProperty()
この
SubScene の高さを定義します。 |
boolean |
isDepthBuffer()
この
SubScene の奥行きバッファ属性を取得します。 |
ObjectProperty<Parent> |
rootProperty()
SubScene シーン・グラフのルートNode を定義します。 |
void |
setCamera(Camera value)
プロパティcameraの値を設定します。
|
void |
setFill(Paint value)
プロパティfillの値を設定します。
|
void |
setHeight(double value)
プロパティheightの値を設定します。
|
void |
setRoot(Parent value)
プロパティrootの値を設定します。
|
void |
setUserAgentStylesheet(String url)
プラットフォーム・デフォルトのユーザー・エージェント・スタイルシートのかわりに、このSubSceneで使用されるユーザー・エージェント・スタイルシートのURLを設定します。
|
void |
setWidth(double value)
プロパティwidthの値を設定します。
|
ObjectProperty<String> |
userAgentStylesheetProperty() |
DoubleProperty |
widthProperty()
この
SubScene の幅を定義します。 |
accessibleHelpProperty、accessibleRoleDescriptionProperty、accessibleRoleProperty、accessibleTextProperty、addEventFilter、addEventHandler、applyCss、autosize、blendModeProperty、boundsInLocalProperty、boundsInParentProperty、buildEventDispatchChain、cacheHintProperty、cacheProperty、clipProperty、computeAreaInScreen、contains、contains、cursorProperty、depthTestProperty、disabledProperty、disableProperty、effectiveNodeOrientationProperty、effectProperty、eventDispatcherProperty、executeAccessibleAction、fireEvent、focusedProperty、focusTraversableProperty、getAccessibleHelp、getAccessibleRole、getAccessibleRoleDescription、getAccessibleText、getBaselineOffset、getBlendMode、getBoundsInLocal、getBoundsInParent、getCacheHint、getClassCssMetaData、getClip、getContentBias、getCssMetaData、getCursor、getDepthTest、getEffect、getEffectiveNodeOrientation、getEventDispatcher、getId、getInputMethodRequests、getLayoutBounds、getLayoutX、getLayoutY、getLocalToParentTransform、getLocalToSceneTransform、getNodeOrientation、getOnContextMenuRequested、getOnDragDetected、getOnDragDone、getOnDragDropped、getOnDragEntered、getOnDragExited、getOnDragOver、getOnInputMethodTextChanged、getOnKeyPressed、getOnKeyReleased、getOnKeyTyped、getOnMouseClicked、getOnMouseDragEntered、getOnMouseDragExited、getOnMouseDragged、getOnMouseDragOver、getOnMouseDragReleased、getOnMouseEntered、getOnMouseExited、getOnMouseMoved、getOnMousePressed、getOnMouseReleased、getOnRotate、getOnRotationFinished、getOnRotationStarted、getOnScroll、getOnScrollFinished、getOnScrollStarted、getOnSwipeDown、getOnSwipeLeft、getOnSwipeRight、getOnSwipeUp、getOnTouchMoved、getOnTouchPressed、getOnTouchReleased、getOnTouchStationary、getOnZoom、getOnZoomFinished、getOnZoomStarted、getOpacity、getParent、getProperties、getPseudoClassStates、getRotate、getRotationAxis、getScaleX、getScaleY、getScaleZ、getScene、getStyle、getStyleableParent、getStyleClass、getTransforms、getTranslateX、getTranslateY、getTranslateZ、getTypeSelector、getUserData、hasProperties、hoverProperty、idProperty、inputMethodRequestsProperty、intersects、intersects、isCache、isDisable、isDisabled、isFocused、isFocusTraversable、isHover、isManaged、isMouseTransparent、isPickOnBounds、isPressed、isResizable、isVisible、layoutBoundsProperty、layoutXProperty、layoutYProperty、localToParent、localToParent、localToParent、localToParent、localToParent、localToParentTransformProperty、localToScene、localToScene、localToScene、localToScene、localToScene、localToScene、localToScene、localToScene、localToScene、localToScene、localToSceneTransformProperty、localToScreen、localToScreen、localToScreen、localToScreen、localToScreen、lookup、lookupAll、managedProperty、maxHeight、maxWidth、minHeight、minWidth、mouseTransparentProperty、nodeOrientationProperty、notifyAccessibleAttributeChanged、onContextMenuRequestedProperty、onDragDetectedProperty、onDragDoneProperty、onDragDroppedProperty、onDragEnteredProperty、onDragExitedProperty、onDragOverProperty、onInputMethodTextChangedProperty、onKeyPressedProperty、onKeyReleasedProperty、onKeyTypedProperty、onMouseClickedProperty、onMouseDragEnteredProperty、onMouseDragExitedProperty、onMouseDraggedProperty、onMouseDragOverProperty、onMouseDragReleasedProperty、onMouseEnteredProperty、onMouseExitedProperty、onMouseMovedProperty、onMousePressedProperty、onMouseReleasedProperty、onRotateProperty、onRotationFinishedProperty、onRotationStartedProperty、onScrollFinishedProperty、onScrollProperty、onScrollStartedProperty、onSwipeDownProperty、onSwipeLeftProperty、onSwipeRightProperty、onSwipeUpProperty、onTouchMovedProperty、onTouchPressedProperty、onTouchReleasedProperty、onTouchStationaryProperty、onZoomFinishedProperty、onZoomProperty、onZoomStartedProperty、opacityProperty、parentProperty、parentToLocal、parentToLocal、parentToLocal、parentToLocal、parentToLocal、pickOnBoundsProperty、prefHeight、prefWidth、pressedProperty、pseudoClassStateChanged、queryAccessibleAttribute、relocate、removeEventFilter、removeEventHandler、requestFocus、resize、resizeRelocate、rotateProperty、rotationAxisProperty、scaleXProperty、scaleYProperty、scaleZProperty、sceneProperty、sceneToLocal、sceneToLocal、sceneToLocal、sceneToLocal、sceneToLocal、sceneToLocal、sceneToLocal、sceneToLocal、screenToLocal、screenToLocal、screenToLocal、setAccessibleHelp、setAccessibleRole、setAccessibleRoleDescription、setAccessibleText、setBlendMode、setCache、setCacheHint、setClip、setCursor、setDepthTest、setDisable、setDisabled、setEffect、setEventDispatcher、setEventHandler、setFocused、setFocusTraversable、setHover、setId、setInputMethodRequests、setLayoutX、setLayoutY、setManaged、setMouseTransparent、setNodeOrientation、setOnContextMenuRequested、setOnDragDetected、setOnDragDone、setOnDragDropped、setOnDragEntered、setOnDragExited、setOnDragOver、setOnInputMethodTextChanged、setOnKeyPressed、setOnKeyReleased、setOnKeyTyped、setOnMouseClicked、setOnMouseDragEntered、setOnMouseDragExited、setOnMouseDragged、setOnMouseDragOver、setOnMouseDragReleased、setOnMouseEntered、setOnMouseExited、setOnMouseMoved、setOnMousePressed、setOnMouseReleased、setOnRotate、setOnRotationFinished、setOnRotationStarted、setOnScroll、setOnScrollFinished、setOnScrollStarted、setOnSwipeDown、setOnSwipeLeft、setOnSwipeRight、setOnSwipeUp、setOnTouchMoved、setOnTouchPressed、setOnTouchReleased、setOnTouchStationary、setOnZoom、setOnZoomFinished、setOnZoomStarted、setOpacity、setPickOnBounds、setPressed、setRotate、setRotationAxis、setScaleX、setScaleY、setScaleZ、setStyle、setTranslateX、setTranslateY、setTranslateZ、setUserData、setVisible、snapshot、snapshot、startDragAndDrop、startFullDrag、styleProperty、toBack、toFront、toString、translateXProperty、translateYProperty、translateZProperty、usesMirroring、visibleProperty
public final ObjectProperty<Parent> rootProperty
SubScene
シーン・グラフのルートNode
を定義します。Group
をルートとして使用する場合は、シーングラフのコンテンツがSubScene
の幅と高さによってクリップされます。SubScene
ではnullのルートは許容されません。getRoot()
、setRoot(Parent)
public final ObjectProperty<Camera> cameraProperty
SubScene
をレンダリングするために使用するカメラのタイプを指定します。camera
がnullである場合、パラレル・カメラがレンダリングに使用されます。別のScene
またはSubScene
に属するカメラの設定は無効です。
注意: これは条件付き機能です。詳細は、ConditionalFeature.SCENE3D
を参照してください。
getCamera()
、setCamera(Camera)
public final DoubleProperty widthProperty
SubScene
の幅を定義します。getWidth()
、setWidth(double)
public final DoubleProperty heightProperty
SubScene
の高さを定義します。getHeight()
、setHeight(double)
public final ObjectProperty<Paint> fillProperty
getFill()
、setFill(Paint)
public final ObjectProperty<String> userAgentStylesheetProperty
getUserAgentStylesheet()
、setUserAgentStylesheet(String)
public SubScene(Parent root, double width, double height)
SubScene
を作成します。root
- シーングラフのルート・ノードwidth
- サブシーンの幅height
- サブシーンの高さNullPointerException
- ルートがnullの場合public SubScene(Parent root, double width, double height, boolean depthBuffer, SceneAntialiasing antiAliasing)
SubScene
を構築し、奥行きのバッファをこのシーンに作成するかどうかを指定し、シーンのアンチエイリアスをリクエストするかどうかを指定します。
3D変換のない2D形状のみが含まれるサブシーンは、深度バッファのサポートもシーン・アンチエイリアスのサポートも必要ありません。3D図形や、3D変換のある2D形状が含まれるサブシーンは、適切な深度でソートしてレンダリングするために深度バッファのサポートが必要になることがあります。深度ファイティング(Zファイティングとも呼ばれる)を回避するには、3D変換のない2D形状に対して深度テストを無効にします。詳細は、「depthTest
」を参照してください。3D形状を含むサブシーンは、シーンのアンチエイリアスを有効にすると、そのレンダリングの質を向上させることができます。
root
- シーングラフのルート・ノードwidth
- サブシーンの幅height
- サブシーンの高さdepthBuffer
- 奥行きのバッファのフラグantiAliasing
- サブシーンのアンチエイリアス属性。値null
はDISABLEDとして扱われます。
depthBufferフラグとantiAliasingフラグは条件付き機能です。それぞれのデフォルト値は、falseおよびSceneAntialiasing.DISABLED
です。詳細は、ConditionalFeature.SCENE3D
を参照してください。
NullPointerException
- ルートがnullの場合Node.setDepthTest(DepthTest)
public final SceneAntialiasing getAntiAliasing()
SubScene
の定義されたSceneAntialiasing
を返します。
注意: これは条件付き機能です。詳細は、ConditionalFeature.SCENE3D
およびSceneAntialiasing
を参照してください。
public final boolean isDepthBuffer()
SubScene
の奥行きバッファ属性を取得します。public final void setRoot(Parent value)
SubScene
シーン・グラフのルートNode
を定義します。Group
をルートとして使用する場合は、シーングラフのコンテンツがSubScene
の幅と高さによってクリップされます。SubScene
ではnullのルートは許容されません。public final Parent getRoot()
SubScene
シーン・グラフのルートNode
を定義します。Group
をルートとして使用する場合は、シーングラフのコンテンツがSubScene
の幅と高さによってクリップされます。SubScene
ではnullのルートは許容されません。public final ObjectProperty<Parent> rootProperty()
SubScene
シーン・グラフのルートNode
を定義します。Group
をルートとして使用する場合は、シーングラフのコンテンツがSubScene
の幅と高さによってクリップされます。SubScene
ではnullのルートは許容されません。getRoot()
、setRoot(Parent)
public final void setCamera(Camera value)
SubScene
をレンダリングするために使用するカメラのタイプを指定します。camera
がnullである場合、パラレル・カメラがレンダリングに使用されます。別のScene
またはSubScene
に属するカメラの設定は無効です。
注意: これは条件付き機能です。詳細は、ConditionalFeature.SCENE3D
を参照してください。
public final Camera getCamera()
SubScene
をレンダリングするために使用するカメラのタイプを指定します。camera
がnullである場合、パラレル・カメラがレンダリングに使用されます。別のScene
またはSubScene
に属するカメラの設定は無効です。
注意: これは条件付き機能です。詳細は、ConditionalFeature.SCENE3D
を参照してください。
public final ObjectProperty<Camera> cameraProperty()
SubScene
をレンダリングするために使用するカメラのタイプを指定します。camera
がnullである場合、パラレル・カメラがレンダリングに使用されます。別のScene
またはSubScene
に属するカメラの設定は無効です。
注意: これは条件付き機能です。詳細は、ConditionalFeature.SCENE3D
を参照してください。
getCamera()
、setCamera(Camera)
public final void setWidth(double value)
SubScene
の幅を定義します。public final double getWidth()
SubScene
の幅を定義します。public final DoubleProperty widthProperty()
SubScene
の幅を定義します。getWidth()
、setWidth(double)
public final void setHeight(double value)
SubScene
の高さを定義します。public final double getHeight()
SubScene
の高さを定義します。public final DoubleProperty heightProperty()
SubScene
の高さを定義します。getHeight()
、setHeight(double)
public final void setFill(Paint value)
SubScene
の背景の塗りつぶしを定義します。null
値は、背景なしの描画および透明なPaint
の両方がサポートされていることを意味します。デフォルト値はNullです。public final Paint getFill()
SubScene
の背景の塗りつぶしを定義します。null
値は、背景なしの描画および透明なPaint
の両方がサポートされていることを意味します。デフォルト値はNullです。public final ObjectProperty<Paint> fillProperty()
getFill()
、setFill(Paint)
public final ObjectProperty<String> userAgentStylesheetProperty()
getUserAgentStylesheet()
、setUserAgentStylesheet(String)
public final String getUserAgentStylesheet()
シーングラフでのCSSの使用の詳細は、「CSSリファレンス・ガイド」を参照してください。
public final void setUserAgentStylesheet(String url)
シーングラフでのCSSの使用の詳細は、「CSSリファレンス・ガイド」を参照してください。
url
- URLは、[scheme:][//authority][path]形式の階層URIです。URLに[scheme:]コンポーネントがない場合、URLは[path]コンポーネントのみとみなされます。[path]の前の「/」文字はすべて無視され、[path]はアプリケーションのクラスパスのルートへの相対パスとして扱われます。Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.