- java.lang.Object
-
- javafx.scene.Node
-
- javafx.scene.Parent
-
- javafx.scene.layout.Region
-
- javafx.scene.control.Control
-
- javafx.scene.control.SplitPane
-
- すべての実装されたインタフェース:
Styleable
,EventTarget
,Skinnable
@DefaultProperty("items") public class SplitPane extends Control
それぞれが区切り線で分割されている2つ以上のサイドを持つコントロールは、ユーザーがドラッグしてサイドの片側の領域を増やし、その分他方の領域を減らすことができます。
Nodes
は、水平に並べるか、または垂直に積み重ねて配置できます。 これは、orientationProperty()
の設定によって制御できます。SplitPaneのディバイダの動作は次のとおりです。
- ディバイダを別のディバイダに重ねることはできません。
- ディバイダをノードに重ねることはできません。
- 左/上に移動するディバイダは、ノードのminサイズに達すると停止します。
- 右/下に移動するディバイダは、ノードのmaxサイズに達すると停止します。
ノードは、レイアウト・コンテナ内に配置してからSplitPaneに追加する必要があります。 ノードがレイアウト・コンテナ内にない場合、ディバイダの最大および最小の位置がコンテンツの最大および最小のサイズになります。
ディバイダの位置の範囲は0から1.0までです。 位置が0の場合、ディバイダはSplitPaneの左端/上端にノードの最小サイズを加えた位置に配置されます。 位置が1.0の場合、ディバイダはSplitPaneの右端/下端からノードの最小サイズを引いた位置に配置されます。 ディバイダの位置が0.5の場合、ディバイダはSplitPaneの中央に配置されます。 ディバイダの位置をノードの最大サイズの位置より大きい値に設定すると、ディバイダはノードの最大サイズの位置に設定されます。 ディバイダの位置をノードの最小サイズの位置より小さい値に設定すると、ディバイダはノードの最小サイズの位置に設定されます。 したがって、
setDividerPosition(int, double)
およびsetDividerPositions(double...)
で設定された値がgetDividerPositions()
によって返された値と等しくない場合があります。SplitPaneに3つ以上のノードがあり、ディバイダ位置の設定によりディバイダがノードに収まらない場合、ディバイダはSplitPaneによって自動的に調整されます。
たとえば、サイズおよびディバイダ位置が次のような3つのノードがあります。
Node 1: min 25 max 100 Node 2: min 100 max 200 Node 3: min 25 max 50 divider 1: 0.40 divider 2: 0.45
この結果として、Node 1のサイズはその優先サイズになり、divider 1は0.40に配置され、Node 2のサイズはその最小サイズになり、divider 2の位置はNode 2の最小サイズにdivider 1の位置を加えたものになり、残りのスペースがNode 3に割り当てられます。
SplitPaneはfocusTraversableをfalseに設定します。
例:
SplitPane sp = new SplitPane(); final StackPane sp1 = new StackPane(); sp1.getItems().add(new Button("Button One")); final StackPane sp2 = new StackPane(); sp2.getItems().add(new Button("Button Two")); final StackPane sp3 = new StackPane(); sp3.getItems().add(new Button("Button Three")); sp.getItems().addAll(sp1, sp2, sp3); sp.setDividerPositions(0.3f, 0.6f, 0.9f);
- 導入されたバージョン:
- JavaFX 2.0
-
-
プロパティのサマリー
プロパティ Type プロパティ 説明 ObjectProperty<Orientation>
orientation
SplitPaneの向き。-
クラス javafx.scene.control.Controlから継承されたプロパティ
contextMenu、skin、tooltip
-
クラス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.layout.Regionから継承されたプロパティ
background、border、cacheShape、centerShape、height、insets、maxHeight、maxWidth、minHeight、minWidth、opaqueInsets、padding、prefHeight、prefWidth、scaleShape、shape、snapToPixel、width
-
-
ネストされたクラスのサマリー
ネストされたクラス 修飾子と型 クラス 説明 static class
SplitPane.Divider
SplitPaneの単一のディバイダを表します。
-
フィールドのサマリー
-
クラスjavafx.scene.Nodeから継承されたフィールド
BASELINE_OFFSET_SAME_AS_HEIGHT
-
クラス javafx.scene.layout.Regionから継承されたフィールド
USE_COMPUTED_SIZE、USE_PREF_SIZE
-
-
メソッドのサマリー
すべてのメソッド 静的メソッド インスタンス・メソッド 具象メソッド 修飾子と型 メソッド 説明 protected Skin<?>
createDefaultSkin()
このコントロールのデフォルト・スキンの新しいインスタンスを作成します。static List<CssMetaData<? extends Styleable,?>>
getClassCssMetaData()
List<CssMetaData<? extends Styleable,?>>
getControlCssMetaData()
double[]
getDividerPositions()
各ディバイダの位置を含む倍精度浮動小数点の配列を返します。ObservableList<SplitPane.Divider>
getDividers()
このSplitPaneのすべてのディバイダの変更不可能なリストを返します。protected Boolean
getInitialFocusTraversable()
このコントロールの初期フォーカス・トラバーサブル状態を返します。これは、JavaFX CSSエンジンが初期値を正しく設定するために使用します。ObservableList<Node>
getItems()
SplitPaneのコンテンツの変更に使用可能なObservableListを返します。Orientation
getOrientation()
SplitPaneの向き。static Boolean
isResizableWithParent(Node node)
親コンテナがサイズ変更された場合にノードがサイズ変更可能な場合はtrueを返し、そうでない場合はfalseを返します。ObjectProperty<Orientation>
orientationProperty()
SplitPaneの向き。void
setDividerPosition(int dividerIndex, double position)
指定されたディバイダ・インデックスにディバイダの位置を設定します。void
setDividerPositions(double... positions)
ディバイダの位置を設定します。void
setOrientation(Orientation value)
このプロパティは、SplitPaneをユーザーに表示する方法を制御します。static void
setResizableWithParent(Node node, Boolean value)
SplitPaneがサイズ変更された場合に、SplitPaneのノードをサイズ変更可能に設定するか、サイズ変更不可に設定します。-
クラス javafx.scene.control.Controlから継承されたメソッド
computeMaxHeight、computeMaxWidth、computeMinHeight、computeMinWidth、computePrefHeight、computePrefWidth、contextMenuProperty、executeAccessibleAction、getBaselineOffset、getContextMenu、getCssMetaData、getSkin、getTooltip、isResizable、layoutChildren、queryAccessibleAttribute、setContextMenu、setSkin、setTooltip、skinProperty、tooltipProperty
-
クラス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, fireEvent, focusedProperty, focusTraversableProperty, getAccessibleHelp, getAccessibleRole, getAccessibleRoleDescription, getAccessibleText, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClip, getContentBias, getCursor, getDepthTest, getEffect, getEffectiveNodeOrientation, getEventDispatcher, getId, getInitialCursor, 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, getViewOrder, hasProperties, hoverProperty, idProperty, inputMethodRequestsProperty, intersects, intersects, isCache, isDisable, isDisabled, isFocused, isFocusTraversable, isHover, isManaged, isMouseTransparent, isPickOnBounds, isPressed, 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, 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, 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から継承されたメソッド
getChildren、getChildrenUnmodifiable、getManagedChildren、getStylesheets、isNeedsLayout、layout、lookup、needsLayoutProperty、requestLayout、requestParentLayout、setNeedsLayout、updateBounds
-
クラス javafx.scene.layout.Regionから継承されたメソッド
backgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, getBackground, getBorder, getHeight, getInsets, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOpaqueInsets, getPadding, getPrefHeight, getPrefWidth, getShape, getUserAgentStylesheet, getWidth, heightProperty, insetsProperty, isCacheShape, isCenterShape, isScaleShape, isSnapToPixel, layoutInArea, layoutInArea, layoutInArea, layoutInArea, maxHeight, maxHeightProperty, maxWidth, maxWidthProperty, minHeight, minHeightProperty, minWidth, minWidthProperty, opaqueInsetsProperty, paddingProperty, positionInArea, positionInArea, prefHeight, prefHeightProperty, prefWidth, prefWidthProperty, resize, scaleShapeProperty, setBackground, setBorder, setCacheShape, setCenterShape, setHeight, setMaxHeight, setMaxSize, setMaxWidth, setMinHeight, setMinSize, setMinWidth, setOpaqueInsets, setPadding, setPrefHeight, setPrefSize, setPrefWidth, setScaleShape, setShape, setSnapToPixel, setWidth, shapeProperty, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPosition, snapPositionX, snapPositionY, snapSize, snapSizeX, snapSizeY, snapSpace, snapSpaceX, snapSpaceY, snapToPixelProperty, widthProperty
-
インタフェース javafx.css.Styleableから継承されたメソッド
getStyleableNode
-
-
-
-
プロパティの詳細
-
orientation
public final ObjectProperty<Orientation> orientationProperty
SplitPaneの向き。- 戻り値:
- SplitPaneのorientationプロパティ
-
-
コンストラクタの詳細
-
SplitPane
public SplitPane()
コンテンツのない新しいSplitPaneを作成します。
-
SplitPane
public SplitPane(Node... items)
指定されたアイテムが1つ以上の区切り間を分割するコンテンツとして設定された、新しいSplitPaneを作成します。- パラメータ:
items
- SplitPane内に配置するアイテム。- 導入されたバージョン:
- JavaFX 8u40
-
-
メソッドの詳細
-
setResizableWithParent
public static void setResizableWithParent(Node node, Boolean value)
SplitPaneがサイズ変更された場合に、SplitPaneのノードをサイズ変更可能に設定するか、サイズ変更不可に設定します。 デフォルトでは、すべてのノードはサイズ変更可能です。 値をfalseに設定すると、ノードはサイズ変更できなくなります。- パラメータ:
node
- SplitPane内のノード。value
- ノードがサイズ変更可能な場合はtrue、サイズ変更できない場合はfalse。- 導入されたバージョン:
- JavaFX 2.1
-
isResizableWithParent
public static Boolean isResizableWithParent(Node node)
親コンテナがサイズ変更された場合にノードがサイズ変更可能な場合はtrueを返し、そうでない場合はfalseを返します。- デフォルト値:
- true
- パラメータ:
node
- SplitPane内のノード。- 戻り値:
- ノードがサイズ変更可能な場合はtrue、それ以外の場合はfalse。
- 導入されたバージョン:
- JavaFX 2.1
-
setOrientation
public final void setOrientation(Orientation value)
このプロパティは、SplitPaneをユーザーに表示する方法を制御します。
Orientation.HORIZONTAL
を設定すると2つ(以上)のノードが横並びに配置され、Orientation.VERTICAL
を設定するとノードが縦並びに配置されます。- パラメータ:
value
- 方向値
-
getOrientation
public final Orientation getOrientation()
SplitPaneの向き。- 戻り値:
- SplitPaneの向き。
-
orientationProperty
public final ObjectProperty<Orientation> orientationProperty()
SplitPaneの向き。- 戻り値:
- SplitPaneのorientationプロパティ
-
getItems
public ObservableList<Node> getItems()
SplitPaneのコンテンツの変更に使用可能なObservableListを返します。 ノードがこのリストに配置される順序は、SplitPane内の順序と同じです。- 戻り値:
- このSplitPane内のアイテムのリスト。
-
getDividers
public ObservableList<SplitPane.Divider> getDividers()
このSplitPaneのすべてのディバイダの変更不可能なリストを返します。- 戻り値:
- ディバイダのリスト。
-
setDividerPosition
public void setDividerPosition(int dividerIndex, double position)
指定されたディバイダ・インデックスにディバイダの位置を設定します。- パラメータ:
dividerIndex
- ディバイダのインデックス。position
- 0.0から1.0までの間のディバイダの位置。
-
setDividerPositions
public void setDividerPositions(double... positions)
ディバイダの位置を設定します。- パラメータ:
positions
- 0.0から1.0までの間のディバイダの位置。
-
getDividerPositions
public double[] getDividerPositions()
各ディバイダの位置を含む倍精度浮動小数点の配列を返します。- 戻り値:
- 各ディバイダの位置を含む倍精度浮動小数点の配列。
-
createDefaultSkin
protected Skin<?> createDefaultSkin()
このコントロールのデフォルト・スキンの新しいインスタンスを作成します。 これは、CSS-fx-skin
を介してスキンが提供されていない場合にコントロール用のスキンを作成するために、またはsetSkin(...)
を使用してサブクラスで明示的に設定するために呼び出されます。- オーバーライド:
createDefaultSkin
、クラス:Control
- 戻り値:
- このコントロールのデフォルト・スキンの新しいインスタンス。 nullの場合、コントロールにはスキンがありません(Cssで提供されている場合を除く)。
-
getClassCssMetaData
public static List<CssMetaData<? extends Styleable,?>> getClassCssMetaData()
- 戻り値:
- このクラスに関連付けられたCssMetaData。スーパークラスのCssMetaDataを含むことがあります。
- 導入されたバージョン:
- JavaFX 8.0
-
getControlCssMetaData
public List<CssMetaData<? extends Styleable,?>> getControlCssMetaData()
- オーバーライド:
getControlCssMetaData
、クラス:Control
- 戻り値:
- コントロールのCSSでスタイル設定可能なプロパティの変更不可能なリスト
- 導入されたバージョン:
- JavaFX 8.0
-
getInitialFocusTraversable
protected Boolean getInitialFocusTraversable()
このコントロールの初期フォーカス・トラバーサブル状態を返します。これは、JavaFX CSSエンジンが初期値を正しく設定するために使用します。 このメソッドはオーバーライドされます。既定のUIコントロールでは、フォーカス・トラバーサルがtrueに設定されていますが、このコントロールには適切ではありません。- オーバーライド:
- クラス
Control
のgetInitialFocusTraversable
- 戻り値:
- このコントロールの最初のフォーカス・トラバーサル状態
- 導入されたバージョン:
- 9
-
-