@DefaultProperty(value="children") public class Group extends Parent
Groupノードには、このノードがレンダリングされるたびに順番にレンダリングされる子のObservableListが含まれます。
Groupは、その子の集合の境界となり、直接サイズを変更することはできません。
Groupに適用されたすべての変換、効果または状態は、そのグループのすべての子に適用されます。 そのような変換および効果はこのグループのレイアウト境界には含まれませんが、このグループの子に変換および効果が直接設定されている場合、それらはこのグループのレイアウト境界に含まれます。
デフォルトでは、リージョンとコントロールがその状態の変化に伴って適切にサイズ変更されるように、レイアウト・パス中に、Groupによって管理されているサイズ変更可能な子が優先サイズに自動的にサイズ変更されます。 この自動サイズ設定の動作を無効にする必要があるアプリケーションでは、autoSizeChildrenをfalseに設定する必要があり、かつ、子の優先サイズが変更された場合に子が自動的にサイズ変更されないことを認識する必要があります(このため、慎重に使用してください)。
Groupの例:
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);
}
| Type | プロパティと説明 |
|---|---|
BooleanProperty |
autoSizeChildren
この
Groupでレイアウト・パス中に管理されているサイズ変更可能な子を優先サイズに自動的にサイズ変更するかどうかを制御します。 |
needsLayoutaccessibleHelp, 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| コンストラクタと説明 |
|---|
Group()
グループを構築します。
|
Group(Collection<Node> children)
特定の子で構成されるグループを構築します。
|
Group(Node... children)
子で構成されるグループを構築します。
|
| 修飾子と型 | メソッドと説明 |
|---|---|
BooleanProperty |
autoSizeChildrenProperty()
この
Groupでレイアウト・パス中に管理されているサイズ変更可能な子を優先サイズに自動的にサイズ変更するかどうかを制御します。 |
ObservableList<Node> |
getChildren()
この
Groupの子のリストを取得します。 |
boolean |
isAutoSizeChildren()
プロパティautoSizeChildrenの値を取得します。
|
protected void |
layoutChildren()
子がサイズ変更可能な場合にそれぞれの子がその優先サイズに合せてサイズ変更されるように、GroupではlayoutChildrenを実装しています。
|
double |
minHeight(double width)
レイアウト計算に使用するノードの最小高を返します。
|
double |
minWidth(double height)
レイアウト計算に使用するノードの最小幅を返します。
|
double |
prefHeight(double width)
グループで、単にそのレイアウト境界の高さとなる優先高が定義され、そのレイアウト境界の高さは単にそのすべての子の位置と高さの合計となります。
|
double |
prefWidth(double height)
グループで、単にそのレイアウト境界の幅となる優先幅が定義され、そのレイアウト境界の幅は単にそのすべての子の位置と幅の合計となります。
|
void |
setAutoSizeChildren(boolean value)
プロパティautoSizeChildrenの値を設定します。
|
computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, getBaselineOffset, getChildrenUnmodifiable, getManagedChildren, getStylesheets, isNeedsLayout, layout, lookup, needsLayoutProperty, queryAccessibleAttribute, requestLayout, requestParentLayout, setNeedsLayout, updateBoundsaccessibleHelpProperty, 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, 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, lookupAll, managedProperty, maxHeight, maxWidth, 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, 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 BooleanProperty autoSizeChildrenProperty
Groupでレイアウト・パス中に管理されているサイズ変更可能な子を優先サイズに自動的にサイズ変更するかどうかを制御します。 falseに設定されている場合、このグループのサイズ変更可能な子についてはアプリケーションでサイズを設定し、設定しないと、そのようなノードの幅および高さがゼロになって表示されない可能性があります。 この変数には、サイズ変更可能でないコンテンツ・ノード(図形やテキストなど)に対する効果はありません。 isAutoSizeChildren()、setAutoSizeChildren(boolean)public Group()
public Group(Node... children)
children - 子。public Group(Collection<Node> children)
children - グループの子NullPointerException - 指定されたコレクションがnullである場合public final void setAutoSizeChildren(boolean value)
Groupでレイアウト・パス中に管理されているサイズ変更可能な子を優先サイズに自動的にサイズ変更するかどうかを制御します。 falseに設定されている場合、このグループのサイズ変更可能な子についてはアプリケーションでサイズを設定し、設定しないと、そのようなノードの幅および高さがゼロになって表示されない可能性があります。 この変数には、サイズ変更可能でないコンテンツ・ノード(図形やテキストなど)に対する効果はありません。 public final boolean isAutoSizeChildren()
Groupでレイアウト・パス中に管理されているサイズ変更可能な子を優先サイズに自動的にサイズ変更するかどうかを制御します。 falseに設定されている場合、このグループのサイズ変更可能な子についてはアプリケーションでサイズを設定し、設定しないと、そのようなノードの幅および高さがゼロになって表示されない可能性があります。 この変数には、サイズ変更可能でないコンテンツ・ノード(図形やテキストなど)に対する効果はありません。 public final BooleanProperty autoSizeChildrenProperty()
Groupでレイアウト・パス中に管理されているサイズ変更可能な子を優先サイズに自動的にサイズ変更するかどうかを制御します。 falseに設定されている場合、このグループのサイズ変更可能な子についてはアプリケーションでサイズを設定し、設定しないと、そのようなノードの幅および高さがゼロになって表示されない可能性があります。 この変数には、サイズ変更可能でないコンテンツ・ノード(図形やテキストなど)に対する効果はありません。 isAutoSizeChildren()、setAutoSizeChildren(boolean)public ObservableList<Node> getChildren()
Groupの子のリストを取得します。getChildren、クラスParentGroupの子のリスト。public double prefWidth(double height)
prefWidth、クラスParentheight - このパラメータはGroupによって無視されます。Node.isResizable()、Node.getContentBias()、Node.autosize()public double prefHeight(double width)
prefHeight、クラスParentwidth - このパラメータはGroupによって無視されます。Node.getContentBias()、Node.autosize()public double minHeight(double width)
Nodeこのメソッドを呼び出すレイアウト・コードで、ノードのコンテンツ・バイアスを最初にチェックする必要があります。 ノードに水平方向のコンテンツ・バイアスがある場合は、呼出し元が最小高の基になる幅の値を渡す必要があります。 ノードに垂直方向またはnullのコンテンツ・バイアスがある場合は、呼出し元が-1を渡す必要があります。
水平方向のコンテンツ・バイアスがあるノードのサブクラスでは、-1または正の値のwidthパラメータが必要です。 他のすべてのサブクラスではwidthパラメータ(-1の可能性が高い)が無視されることがあります。
ノードのNode.maxHeight(double)がこの数値よりも低い場合は、minHeightが優先されます。 これは、ノードがminHeightよりも小さくサイズ変更できないことを意味します。
minHeight、クラスParentwidth - 最小高さがそれに依存する場合に使用する必要がある幅Node.isResizable()、Node.getContentBias()public double minWidth(double height)
Nodeこのメソッドを呼び出すレイアウト・コードで、ノードのコンテンツ・バイアスを最初にチェックする必要があります。 ノードに垂直方向のコンテンツ・バイアスがある場合は、呼出し元が最小幅の基になる高さの値を渡す必要があります。 ノードに水平方向またはnullのコンテンツ・バイアスがある場合は、呼出し元が-1を渡す必要があります。
垂直方向のコンテンツ・バイアスがあるノードのサブクラスでは、-1または正の値のheightパラメータが必要です。 他のすべてのサブクラスではheightパラメータ(-1の可能性が高い)が無視されることがあります。
ノードのNode.maxWidth(double)がこの数値よりも低い場合は、minWidthが優先されます。 これは、ノードがminWidthよりも小さくサイズ変更できないことを意味します。
minWidth、クラスParentheight - 最小幅がそれに依存する場合に使用する必要がある高さNode.isResizable()、Node.getContentBias()protected void layoutChildren()
autoSizeChildrenがfalseの場合、Groupではこのメソッドで何も行いません。 layoutChildren、クラスParentCopyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.