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, visibleBASELINE_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, visiblePropertypublic 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.