- java.lang.Object
-
- javafx.scene.Node
-
- javafx.scene.Parent
-
- javafx.scene.Group
-
- すべての実装されたインタフェース:
Styleable
,EventTarget
@DefaultProperty("children") public class Group extends Parent
Group
ノードには、このノードがレンダリングされるたびに順番にレンダリングされる子のObservableListが含まれます。Group
は、その子の集合の境界となり、直接サイズを変更することはできません。Group
に適用されたすべての変換、効果または状態は、そのグループのすべての子に適用されます。 そのような変換および効果はこのグループのレイアウト境界には含まれませんが、このグループの子に変換および効果が直接設定されている場合、それらはこのグループのレイアウト境界に含まれます。デフォルトでは、リージョンとコントロールがその状態の変化に伴って適切にサイズ変更されるように、レイアウト・パス中に、
Group
によって管理されているサイズ変更可能な子が優先サイズに自動的にサイズ変更されます。 この自動サイズ設定の動作を無効にする必要があるアプリケーションでは、autoSizeChildren
をfalse
に設定する必要があり、かつ、子の優先サイズが変更された場合に子が自動的にサイズ変更されないことを認識する必要があります(このため、慎重に使用してください)。グループの例:
import javafx.scene.*; import javafx.scene.paint.*; import javafx.scene.shape.*; import java.lang.Math; Group g = new Group(); for (int i = 0; i < 5; i++) { Rectangle r = new Rectangle(); r.setY(i * 20); r.setWidth(100); r.setHeight(10); r.setFill(Color.RED); g.getChildren().add(r); }
- 導入されたバージョン:
- JavaFX 2.0
-
-
プロパティのサマリー
プロパティ 型 プロパティ 説明 BooleanProperty
autoSizeChildren
このGroup
でレイアウト・パス中に管理されているサイズ変更可能な子を優先サイズに自動的にサイズ変更するかどうかを制御します。-
クラス javafx.scene.Nodeで宣言されたプロパティ
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, viewOrder, visible
-
クラス javafx.scene.Parentで宣言されたプロパティ
needsLayout
-
-
フィールドのサマリー
-
クラス javafx.scene.Nodeで宣言されたフィールド
BASELINE_OFFSET_SAME_AS_HEIGHT
-
-
メソッドのサマリー
すべてのメソッド インスタンス・メソッド 具象メソッド 修飾子と型 メソッド 説明 BooleanProperty
autoSizeChildrenProperty()
このGroup
でレイアウト・パス中に管理されているサイズ変更可能な子を優先サイズに自動的にサイズ変更するかどうかを制御します。ObservableList<Node>
getChildren()
このGroup
の子のリストを取得します。boolean
isAutoSizeChildren()
プロパティautoSizeChildrenの値を取得します。protected void
layoutChildren()
子がサイズ変更可能な場合にそれぞれの子がその優先サイズに合せてサイズ変更されるように、GroupではlayoutChildrenを実装しています。double
prefHeight(double width)
グループは、単純にそのレイアウト境界の高さであるとして優先度を定義します。これは、単にすべての子のレイアウト境界の和集合です。double
prefWidth(double height)
グループは、単純にレイアウト境界の幅であるとして優先幅を定義します。これは、すべての子のレイアウト境界の単なる集合です。void
setAutoSizeChildren(boolean value)
プロパティautoSizeChildrenの値を設定します。-
クラス javafx.scene.Nodeで宣言されたメソッド
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, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClassCssMetaData, getClip, getContentBias, getCssMetaData, getCursor, getDepthTest, getEffect, getEffectiveNodeOrientation, getEventDispatcher, getId, getInitialCursor, getInitialFocusTraversable, 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, getTransforms, getTranslateX, getTranslateY, getTranslateZ, getTypeSelector, getUserData, getViewOrder, 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, 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, setViewOrder, setVisible, snapshot, snapshot, startDragAndDrop, startFullDrag, styleProperty, toBack, toFront, toString, translateXProperty, translateYProperty, translateZProperty, usesMirroring, viewOrderProperty, visibleProperty
-
クラス java.lang.Objectで宣言されたメソッド
clone、equals、finalize、getClass、hashCode、notify、notifyAll、wait、wait、wait
-
クラス javafx.scene.Parentで宣言されたメソッド
computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, getBaselineOffset, getChildrenUnmodifiable, getManagedChildren, getStylesheets, isNeedsLayout, layout, needsLayoutProperty, requestLayout, requestParentLayout, setNeedsLayout, updateBounds
-
インタフェース javafx.css.Styleableで宣言されたメソッド
getStyleableNode, getStyleClass
-
-
-
-
プロパティの詳細
-
autoSizeChildren
public final BooleanProperty autoSizeChildrenProperty
このGroup
でレイアウト・パス中に管理されているサイズ変更可能な子を優先サイズに自動的にサイズ変更するかどうかを制御します。false
に設定されている場合、このグループのサイズ変更可能な子についてはアプリケーションでサイズを設定し、設定しないと、そのようなノードの幅および高さがゼロになって表示されない可能性があります。 この変数には、サイズ変更可能でないコンテンツ・ノード(図形やテキストなど)に対する効果はありません。- デフォルト値:
- true
- 関連項目:
isAutoSizeChildren()
、setAutoSizeChildren(boolean)
-
-
コンストラクタの詳細
-
Group
public Group()
グループを構築します。
-
Group
public Group(Node... children)
子で構成されるグループを構築します。- パラメータ:
children
- 子。
-
Group
public Group(Collection<Node> children)
特定の子で構成されるグループを構築します。- パラメータ:
children
- グループの子- 例外:
NullPointerException
- 指定されたコレクションがnullである場合- 導入されたバージョン:
- JavaFX 8.0
-
-
メソッドの詳細
-
setAutoSizeChildren
public final void setAutoSizeChildren(boolean value)
プロパティautoSizeChildrenの値を設定します。- プロパティの説明:
- この
Group
でレイアウト・パス中に管理されているサイズ変更可能な子を優先サイズに自動的にサイズ変更するかどうかを制御します。false
に設定されている場合、このグループのサイズ変更可能な子についてはアプリケーションでサイズを設定し、設定しないと、そのようなノードの幅および高さがゼロになって表示されない可能性があります。 この変数には、サイズ変更可能でないコンテンツ・ノード(図形やテキストなど)に対する効果はありません。 - デフォルト値:
- true
-
isAutoSizeChildren
public final boolean isAutoSizeChildren()
プロパティautoSizeChildrenの値を取得します。- プロパティの説明:
- この
Group
でレイアウト・パス中に管理されているサイズ変更可能な子を優先サイズに自動的にサイズ変更するかどうかを制御します。false
に設定されている場合、このグループのサイズ変更可能な子についてはアプリケーションでサイズを設定し、設定しないと、そのようなノードの幅および高さがゼロになって表示されない可能性があります。 この変数には、サイズ変更可能でないコンテンツ・ノード(図形やテキストなど)に対する効果はありません。 - デフォルト値:
- true
-
autoSizeChildrenProperty
public final BooleanProperty autoSizeChildrenProperty()
このGroup
でレイアウト・パス中に管理されているサイズ変更可能な子を優先サイズに自動的にサイズ変更するかどうかを制御します。false
に設定されている場合、このグループのサイズ変更可能な子についてはアプリケーションでサイズを設定し、設定しないと、そのようなノードの幅および高さがゼロになって表示されない可能性があります。 この変数には、サイズ変更可能でないコンテンツ・ノード(図形やテキストなど)に対する効果はありません。- デフォルト値:
- true
- 関連項目:
isAutoSizeChildren()
、setAutoSizeChildren(boolean)
-
getChildren
public ObservableList<Node> getChildren()
このGroup
の子のリストを取得します。- オーバーライド:
getChildren
、クラス:Parent
- 戻り値:
- この
Group
の子のリスト。
-
prefWidth
public double prefWidth(double height)
グループは、単純にレイアウト境界の幅であるとして優先幅を定義します。これは、すべての子のレイアウト境界の単なる集合です。 つまり、グループはサイズ変更できないため、優先幅はその設定のものになります。 注意: autosizeグループのレイアウト境界はすでにレイアウトされたグループに依存するため、必要に応じてこの呼出しによってグループのレイアウトを実行します。- オーバーライド:
prefWidth
、クラス:Node
- パラメータ:
height
- このパラメータはGroupによって無視されます。- 戻り値:
- レイアウト境界の幅
- 関連項目:
Node.isResizable()
、Node.getContentBias()
、Node.autosize()
-
prefHeight
public double prefHeight(double width)
グループは、単純にそのレイアウト境界の高さであるとして優先度を定義します。これは、単にすべての子のレイアウト境界の和集合です。 つまり、グループはサイズ変更できないため、優先高はその設定のものになります。 注意: autosizeグループのレイアウト境界はすでにレイアウトされたグループに依存するため、必要に応じてこの呼出しによってグループのレイアウトを実行します。- オーバーライド:
prefHeight
、クラス:Node
- パラメータ:
width
- このパラメータはGroupによって無視されます。- 戻り値:
- レイアウト境界の高さ
- 関連項目:
Node.getContentBias()
、Node.autosize()
-
layoutChildren
protected void layoutChildren()
子がサイズ変更可能な場合にそれぞれの子がその優先サイズに合せてサイズ変更されるように、GroupではlayoutChildrenを実装しています。 サイズ変更できない子は単にそのまま残ります。autoSizeChildren
がfalseの場合、Groupではこのメソッドで何も行いません。- オーバーライド:
layoutChildren
、クラス:Parent
-
-