- java.lang.Object
-
- javafx.scene.Node
-
- javafx.scene.Parent
-
- javafx.scene.layout.Region
-
- javafx.scene.layout.Pane
-
- javafx.scene.control.DialogPane
-
- すべての実装されたインタフェース:
Styleable
,EventTarget
@DefaultProperty("buttonTypes") public class DialogPane extends Pane
DialogPaneは、Dialog
インスタンス内に表示されるルート・ノードとみなされる必要があります。 この役割において、DialogPaneはheaders
、graphics
、content
およびbuttons
を配置します。 DialogPane (つまり、DialogPaneクラスそのもの)のデフォルト実装では、標準のlayoutChildren()
メソッドを介してレイアウトが処理されます。 このメソッドは、別の方法でレイアウトを処理するためにサブクラスによってオーバーライドされることがあります。header
およびcontent
プロパティに加えて、header text
およびcontent text
プロパティも存在します。 *TextプロパティはNodeプロパティよりも優先度は下ですが、開発者は文字列値をDialogPaneのヘッダー領域やコンテンツ領域に設定するだけのことが多いため、一般的に開発者にとっての便宜性ははるかに高いといえます。header
およびheaderText
プロパティ内に非null値を設定する意味を理解することが重要です。 重要な点は次のとおりです。header
プロパティはheaderText
プロパティよりも優先されるため、両方が非null値に設定されている場合はheader
が使用され、headerText
は無視されます。headerText
が非null値に設定されており、graphic
も設定されている場合、グラフィックのデフォルト位置はコンテンツ領域の左側からヘッダー・テキストの右側に変更されます。header
が非null値に設定されており、graphic
も設定されている場合、グラフィックはそのデフォルト位置(コンテンツ領域の左側)から削除されますが、カスタム・ヘッダー・ノードの右側には配置されません。 グラフィックが必要な場合は、カスタム・ヘッダー・ノードのレイアウトに手動で追加する必要があります。
DialogPaneは
ButtonType
の概念に基づいて機能します。 ButtonTypeは、DialogPane内に表示する必要がある単一ボタンの記述子です。 そのため、DialogPaneを作成する開発者は、getButtonTypes()
メソッドを介して表示するボタン・タイプを指定する必要があります。このメソッドは、ユーザーが必要に応じて追加および削除できる変更可能なObservableList
を返します。ButtonType
クラスは、いくつかの事前定義済のボタン・タイプ(ButtonType.OK
、ButtonType.CANCEL
など)を定義します。 これらの事前定義済のボタン・タイプは、default
およびcancel
ボタンのサポートが組み込まれているうえ、JavaFXの変換先のすべての言語に文字列を変換できるという利点があるため、JavaFX dialogs APIの多くのユーザーのニーズを満たします。 (通常はカスタム・テキストを含むボタンを定義するために)独自のButtonType
を定義しようとするユーザーは、ButtonType
クラスで使用可能なコンストラクタを介してこれを定義できます。ButtonType
クラスを使用した場合、開発者が構成できる範囲は多くありません。 これは意図されたことですが、ButtonType
で作成した指定のボタンを開発者が変更できないということではありません。 変更するには、開発者はlookupButton(ButtonType)
メソッドをButtonTypeとともに呼び出すだけです(getButtonTypes()
リストですでに設定されている場合)。 返されるNodeは通常はButton
型ですが、createButton(ButtonType)
メソッドがオーバーライドされているかどうかによって異なります。DialogPaneクラスは、サブクラスによってオーバーライドできるいくつかのメソッドを提供しているため、より簡単にカスタム機能を有効にできます。 このようなメソッドには、次のようなものがあります。
これらのメソッドはドキュメント化されているため、これらのメソッドを独自の機能でオーバーラードしようとする開発者に対して期待される内容に注意してください。
- 導入されたバージョン:
- JavaFX 8u40
- 関連項目:
Dialog
-
-
プロパティのサマリー
プロパティ Type プロパティ 説明 ObjectProperty<Node>
content
ダイアログのコンテンツ領域を表すプロパティ。StringProperty
contentText
ダイアログ・ペインのコンテンツ・テキストを表すプロパティ。ObjectProperty<Node>
expandableContent
ダイアログの展開が可能なコンテンツ領域を表すプロパティ。BooleanProperty
expanded
dialogPaneが展開されているかどうかを表します。ObjectProperty<Node>
graphic
ヘッダー(ヘッダーが表示されている場合)またはcontent
の左側に表示されるダイアログ・グラフィック。ObjectProperty<Node>
header
ダイアログ・ペインのヘッダー領域を表すプロパティ。StringProperty
headerText
ダイアログ・ペインのヘッダー・テキストを表すプロパティ。-
クラス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
-
-
フィールドのサマリー
-
クラスjavafx.scene.Nodeから継承されたフィールド
BASELINE_OFFSET_SAME_AS_HEIGHT
-
クラス javafx.scene.layout.Regionから継承されたフィールド
USE_COMPUTED_SIZE、USE_PREF_SIZE
-
-
コンストラクタのサマリー
コンストラクタ コンストラクタ 説明 DialogPane()
スタイル・クラス'dialog-pane'を使用して新しいDialogPaneインスタンスを作成します。
-
メソッドのサマリー
すべてのメソッド 静的メソッド インスタンス・メソッド 具象メソッド 修飾子と型 メソッド 説明 protected double
computeMinHeight(double width)
このリージョンの最小高を計算します。protected double
computeMinWidth(double height)
このリージョンの最小幅を計算します。protected double
computePrefHeight(double width)
指定された幅に対するこのリージョンの優先高を計算します。Regionのサブクラスでは、このメソッドをオーバーライドして、そのコンテンツおよびレイアウト手法に基づいて適切な値を返す必要があります。protected double
computePrefWidth(double height)
指定された高さに対するこのリージョンの優先幅を計算します。ObjectProperty<Node>
contentProperty()
ダイアログのコンテンツ領域を表すプロパティ。StringProperty
contentTextProperty()
ダイアログ・ペインのコンテンツ・テキストを表すプロパティ。protected Node
createButton(ButtonType buttonType)
このメソッドは、(createButtonBar()
メソッドを介して作成した) DialogPaneボタン領域(一般にはButtonBar
のインスタンス)に後から挿入されるカスタム・ボタンを作成するためにサブクラスによってオーバーライドできます。protected Node
createButtonBar()
このメソッドは、ボタン・バーを提供するためにサブクラスによってオーバーライドされることがあります。protected Node
createDetailsButton()
このメソッドは、カスタム詳細ボタンを作成するためにサブクラスによってオーバーライドされることがあります。ObjectProperty<Node>
expandableContentProperty()
ダイアログの展開が可能なコンテンツ領域を表すプロパティ。BooleanProperty
expandedProperty()
dialogPaneが展開されているかどうかを表します。ObservableList<ButtonType>
getButtonTypes()
(createButtonBar()
メソッドを介して作成された)ダイアログ・ボタン・バー領域に使用されるボタン・タイプの監視可能なリスト。static List<CssMetaData<? extends Styleable,?>>
getClassCssMetaData()
Node
getContent()
ダイアログ・コンテンツをNodeとして返します(setContentText(String)
を使用してStringとして設定された場合も、これは単にNode
に変換されています(おそらくはLabel
)。String
getContentText()
このDialogPaneに現在設定されているコンテンツ・テキストを返します。List<CssMetaData<? extends Styleable,?>>
getCssMetaData()
NodeのCssMetaDataがリフレクションなしでアクセス可能になるように、このメソッドはNode.getClassCssMetaData()
に委任する必要があります。Node
getExpandableContent()
設定されている場合はダイアログの展開が可能なコンテンツ・ノードを、そうでない場合はnullを返します。Node
getGraphic()
プロパティgraphicの値を取得します。Node
getHeader()
ダイアログ・ペイン・ヘッダーとして動作するノード。String
getHeaderText()
このDialogPaneに現在設定されているヘッダー・テキストを返します。ObjectProperty<Node>
graphicProperty()
ヘッダー(ヘッダーが表示されている場合)またはcontent
の左側に表示されるダイアログ・グラフィック。ObjectProperty<Node>
headerProperty()
ダイアログ・ペインのヘッダー領域を表すプロパティ。StringProperty
headerTextProperty()
ダイアログ・ペインのヘッダー・テキストを表すプロパティ。boolean
isExpanded()
dialogPaneが展開されているかどうかを返します。protected void
layoutChildren()
このParent
の子をレイアウトするレイアウト・パス中に起動されます。Node
lookupButton(ButtonType buttonType)
このメソッドは、開発者が指定されたButtonType
の実際のNodeを取得するための方法を提供します(これがbutton types
リストに含まれている場合)。void
setContent(Node content)
ダイアログ・コンテンツを割り当てます。void
setContentText(String contentText)
ダイアログのコンテンツ領域に表示する文字列を設定します。void
setExpandableContent(Node content)
ダイアログの展開が可能なコンテンツ・ノードか、展開可能なコンテンツを表示する必要がない場合はnullを設定します。void
setExpanded(boolean value)
dialogPaneが展開されるかどうかを設定します。void
setGraphic(Node graphic)
ヘッダー(ヘッダーが表示されている場合)またはcontent
の左側に表示されるダイアログ・グラフィックを設定します。void
setHeader(Node header)
ダイアログ・ペイン・ヘッダーを割り当てます。void
setHeaderText(String headerText)
ダイアログのヘッダー領域に表示する文字列を設定します。-
クラス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, getClip, getContentBias, 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, 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.layout.Paneから継承されたメソッド
getChildren
-
クラス javafx.scene.Parentから継承されたメソッド
getBaselineOffset、getChildrenUnmodifiable、getManagedChildren、getStylesheets、isNeedsLayout、layout、lookup、needsLayoutProperty、queryAccessibleAttribute、requestLayout、requestParentLayout、setNeedsLayout、updateBounds
-
クラス javafx.scene.layout.Regionから継承されたメソッド
backgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, computeMaxHeight, computeMaxWidth, getBackground, getBorder, getHeight, getInsets, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOpaqueInsets, getPadding, getPrefHeight, getPrefWidth, getShape, getUserAgentStylesheet, getWidth, heightProperty, insetsProperty, isCacheShape, isCenterShape, isResizable, 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
-
-
-
-
プロパティの詳細
-
graphic
public final ObjectProperty<Node> graphicProperty
ヘッダー(ヘッダーが表示されている場合)またはcontent
の左側に表示されるダイアログ・グラフィック。- 関連項目:
getGraphic()
、setGraphic(Node)
-
header
public final ObjectProperty<Node> headerProperty
ダイアログ・ペインのヘッダー領域を表すプロパティ。 このヘッダーが非null値に設定されている場合、DialogPaneの上部領域全体を占有することに注意してください。 また、DialogPane
クラスのjavadocで概説しているように、DialogPaneのレイアウトが'ヘッダー'レイアウトに切り替わります。- 関連項目:
getHeader()
、setHeader(Node)
-
headerText
public final StringProperty headerTextProperty
ダイアログ・ペインのヘッダー・テキストを表すプロパティ。 ヘッダー・テキストの優先順位はheader node
よりも低いため、ヘッダー・ノードとheaderTextプロパティの両方が設定されている場合、デフォルトのDialogPaneインスタンスではヘッダー・テキストは表示されません。headerTextが非null値に設定されると、
DialogPane
クラスのjavadocで概説しているように、DialogPaneのレイアウトが'ヘッダー'レイアウトに切り替わります。
-
content
public final ObjectProperty<Node> contentProperty
ダイアログのコンテンツ領域を表すプロパティ。- 関連項目:
getContent()
、setContent(Node)
-
contentText
public final StringProperty contentTextProperty
ダイアログ・ペインのコンテンツ・テキストを表すプロパティ。 コンテンツ・テキストの優先順位はcontent node
よりも低いため、コンテンツ・ノードとcontentTextプロパティの両方が設定されている場合、デフォルトのDialogPaneインスタンスではコンテンツ・テキストは表示されません。
-
expandableContent
public final ObjectProperty<Node> expandableContentProperty
ダイアログの展開が可能なコンテンツ領域を表すプロパティ。 この領域には任意のNodeを配置できますが、そのNodeはユーザーが展開可能な'Show Details'ボタンをクリックしたときにのみ表示されます。 展開可能なコンテンツ・プロパティがnullでない場合、このボタンは自動的に追加されます。
-
expanded
public final BooleanProperty expandedProperty
dialogPaneが展開されているかどうかを表します。
-
-
メソッドの詳細
-
graphicProperty
public final ObjectProperty<Node> graphicProperty()
ヘッダー(ヘッダーが表示されている場合)またはcontent
の左側に表示されるダイアログ・グラフィック。- 関連項目:
getGraphic()
、setGraphic(Node)
-
getGraphic
public final Node getGraphic()
プロパティgraphicの値を取得します。- プロパティの説明:
- ヘッダー(ヘッダーが表示されている場合)または
content
の左側に表示されるダイアログ・グラフィック。
-
setGraphic
public final void setGraphic(Node graphic)
ヘッダー(ヘッダーが表示されている場合)またはcontent
の左側に表示されるダイアログ・グラフィックを設定します。- パラメータ:
graphic
- 新しいダイアログ・グラフィックか、グラフィックを表示しない場合はnull。
-
getHeader
public final Node getHeader()
ダイアログ・ペイン・ヘッダーとして動作するノード。- 戻り値:
- ダイアログ・ペインのヘッダー。
-
setHeader
public final void setHeader(Node header)
ダイアログ・ペイン・ヘッダーを割り当てます。 任意のNodeを使用できます。- パラメータ:
header
- DialogPaneの新しいヘッダー。
-
headerProperty
public final ObjectProperty<Node> headerProperty()
ダイアログ・ペインのヘッダー領域を表すプロパティ。 このヘッダーが非null値に設定されている場合、DialogPaneの上部領域全体を占有することに注意してください。 また、DialogPane
クラスのjavadocで概説しているように、DialogPaneのレイアウトが'ヘッダー'レイアウトに切り替わります。- 関連項目:
getHeader()
、setHeader(Node)
-
setHeaderText
public final void setHeaderText(String headerText)
ダイアログのヘッダー領域に表示する文字列を設定します。 ヘッダー・テキストの優先順位はheader node
よりも低いため、ヘッダー・ノードとheaderTextプロパティの両方が設定されている場合、デフォルトのDialogPaneインスタンスではヘッダー・テキストは表示されないことに注意してください。headerTextが非null値に設定されると、
DialogPane
クラスのjavadocで概説しているように、DialogPaneのレイアウトが'ヘッダー'レイアウトに切り替わります。- パラメータ:
headerText
- ダイアログ・ヘッダー領域に表示する文字列
-
getHeaderText
public final String getHeaderText()
このDialogPaneに現在設定されているヘッダー・テキストを返します。- 戻り値:
- このDialogPaneの現在設定されているヘッダー・テキスト
-
headerTextProperty
public final StringProperty headerTextProperty()
ダイアログ・ペインのヘッダー・テキストを表すプロパティ。 ヘッダー・テキストの優先順位はheader node
よりも低いため、ヘッダー・ノードとheaderTextプロパティの両方が設定されている場合、デフォルトのDialogPaneインスタンスではヘッダー・テキストは表示されません。headerTextが非null値に設定されると、
DialogPane
クラスのjavadocで概説しているように、DialogPaneのレイアウトが'ヘッダー'レイアウトに切り替わります。
-
getContent
public final Node getContent()
ダイアログ・コンテンツをNodeとして返します(setContentText(String)
を使用してStringとして設定された場合も、これは単にNode
に変換されています(おそらくはLabel
)。- 戻り値:
- ダイアログのコンテンツ
-
setContent
public final void setContent(Node content)
ダイアログ・コンテンツを割り当てます。 任意のNodeを使用できます。- パラメータ:
content
- ダイアログのコンテンツ
-
contentProperty
public final ObjectProperty<Node> contentProperty()
ダイアログのコンテンツ領域を表すプロパティ。- 関連項目:
getContent()
、setContent(Node)
-
setContentText
public final void setContentText(String contentText)
ダイアログのコンテンツ領域に表示する文字列を設定します。 コンテンツ・テキストの優先順位はcontent node
よりも低いため、コンテンツ・ノードとcontentTextプロパティの両方が設定されている場合、デフォルトのDialogPaneインスタンスではコンテンツ・テキストは表示されないことに注意してください。- パラメータ:
contentText
- ダイアログ・コンテンツ領域に表示する文字列
-
getContentText
public final String getContentText()
このDialogPaneに現在設定されているコンテンツ・テキストを返します。- 戻り値:
- このDialogPaneの現在設定されているコンテンツ・テキスト
-
contentTextProperty
public final StringProperty contentTextProperty()
ダイアログ・ペインのコンテンツ・テキストを表すプロパティ。 コンテンツ・テキストの優先順位はcontent node
よりも低いため、コンテンツ・ノードとcontentTextプロパティの両方が設定されている場合、デフォルトのDialogPaneインスタンスではコンテンツ・テキストは表示されません。
-
expandableContentProperty
public final ObjectProperty<Node> expandableContentProperty()
ダイアログの展開が可能なコンテンツ領域を表すプロパティ。 この領域には任意のNodeを配置できますが、そのNodeはユーザーが展開可能な'Show Details'ボタンをクリックしたときにのみ表示されます。 展開可能なコンテンツ・プロパティがnullでない場合、このボタンは自動的に追加されます。
-
getExpandableContent
public final Node getExpandableContent()
設定されている場合はダイアログの展開が可能なコンテンツ・ノードを、そうでない場合はnullを返します。- 戻り値:
- ダイアログの展開可能なコンテンツ・ノード
-
setExpandableContent
public final void setExpandableContent(Node content)
ダイアログの展開が可能なコンテンツ・ノードか、展開可能なコンテンツを表示する必要がない場合はnullを設定します。- パラメータ:
content
- ダイアログの展開可能なコンテンツ・ノード
-
expandedProperty
public final BooleanProperty expandedProperty()
dialogPaneが展開されているかどうかを表します。
-
isExpanded
public final boolean isExpanded()
dialogPaneが展開されているかどうかを返します。- 戻り値:
- dialogPaneが展開されている場合は、true。
-
setExpanded
public final void setExpanded(boolean value)
dialogPaneが展開されるかどうかを設定します。 これは、表示するexpandable content
が存在する場合にのみ有効です。- パラメータ:
value
- dialogPaneを展開する必要がある場合は、true。
-
getButtonTypes
public final ObservableList<ButtonType> getButtonTypes()
(createButtonBar()
メソッドを介して作成された)ダイアログ・ボタン・バー領域に使用されるボタン・タイプの監視可能なリスト。 このリストのコンテンツを変更すると、ダイアログ・ペインでユーザーに対して表示されるボタンが即時に変更されます。- 戻り値:
- ユーザーが使用できる
button types
のObservableList
。
-
lookupButton
public final Node lookupButton(ButtonType buttonType)
このメソッドは、開発者が指定されたButtonType
の実際のNodeを取得するための方法を提供します(これがbutton types
リストに含まれている場合)。- パラメータ:
buttonType
- Node表示をリクエストするButtonType
。- 戻り値:
- ボタン・タイプが
button types
リストに含まれる場合のみ、createButton(ButtonType)
により作成されたボタン・タイプを表すために使用されるNode。そうでない場合はnull。
-
createButtonBar
protected Node createButtonBar()
このメソッドは、ボタン・バーを提供するためにサブクラスによってオーバーライドされることがあります。 このメソッドをオーバーライドすることにより、開発者は次のようないくつかの責務を負う必要があります。- 開発者は即時にすべての
button types
を繰り返し処理し、それぞれについてcreateButton(ButtonType)
を呼び出す必要があります。 - 開発者は、リスナーを
button types
リストに追加し、このリストが変更されたらボタン・バーを適宜更新する必要があります。 - 同様に、開発者は
expandable content
プロパティに対する変更を監視し、(createDetailsButton()
メソッドを介して作成した) detailsボタンを追加および削除する必要があります。
このメソッドのデフォルト実装では、新しい
ButtonBar
インスタンスが作成されて返されます。- 戻り値:
- 作成されたボタン・バー
- 開発者は即時にすべての
-
createButton
protected Node createButton(ButtonType buttonType)
このメソッドは、(createButtonBar()
メソッドを介して作成した) DialogPaneボタン領域(一般にはButtonBar
のインスタンス)に後から挿入されるカスタム・ボタンを作成するためにサブクラスによってオーバーライドできます。- パラメータ:
buttonType
- 作成するボタンの基礎となるButtonType
。- 戻り値:
- 指定された
ButtonType
を表すJavaFXNode
(一般にはButton
のインスタンス)。
-
createDetailsButton
protected Node createDetailsButton()
このメソッドは、カスタム詳細ボタンを作成するためにサブクラスによってオーバーライドされることがあります。このメソッドをオーバーライドするには、次の2つの操作を実行する必要があります。
- 戻り値:
- 作成された詳細ボタン
-
layoutChildren
protected void layoutChildren()
このParent
の子をレイアウトするレイアウト・パス中に起動されます。 デフォルトでは、管理対象のサイズ変更可能なコンテンツのサイズをその優先サイズに合せて設定するのみで、ノードの配置は行われません。サブクラスは必要に応じてこの関数をオーバーライドし、コンテンツをレイアウトする必要があります。
- オーバーライド:
layoutChildren
、クラス:Parent
-
computeMinWidth
protected double computeMinWidth(double height)
このリージョンの最小幅を計算します。 デフォルトでは、左枠と右枠の合計を返します。regionのサブクラスでは、このメソッドをオーバーライドして、そのコンテンツおよびレイアウト手法に基づいて適切な値を返す必要があります。 サブクラスにVERTICALコンテンツ・バイアスがない場合は、heightパラメータを無視できます。- オーバーライド:
computeMinWidth
、クラス:Region
- パラメータ:
height
- 最小幅が高さに依存する場合に使用する必要がある高さ- 戻り値:
- このリージョンの計算された最小幅
-
computeMinHeight
protected double computeMinHeight(double width)
このリージョンの最小高を計算します。 デフォルトでは、上枠と下枠の合計を返します。 Regionのサブクラスでは、このメソッドをオーバーライドして、そのコンテンツおよびレイアウト手法に基づいて適切な値を返す必要があります。 サブクラスにHORIZONTALコンテンツ・バイアスがない場合は、widthパラメータを無視できます。- オーバーライド:
computeMinHeight
、クラス:Region
- パラメータ:
width
- 最小高が幅に依存する場合に使用する必要がある幅- 戻り値:
- このリージョンの計算された最小高
-
computePrefWidth
protected double computePrefWidth(double height)
指定された高さに対するこのリージョンの優先幅を計算します。 Regionのサブクラスでは、このメソッドをオーバーライドして、そのコンテンツおよびレイアウト手法に基づいて適切な値を返す必要があります。 サブクラスにVERTICALコンテンツ・バイアスがない場合は、heightパラメータを無視できます。- オーバーライド:
computePrefWidth
、クラス:Region
- パラメータ:
height
- 推奨される幅がそれに依存する場合に使用する必要がある高さ- 戻り値:
- このリージョンの計算された優先幅
-
computePrefHeight
protected double computePrefHeight(double width)
指定された幅に対するこのリージョンの優先高を計算します。Regionのサブクラスでは、このメソッドをオーバーライドして、そのコンテンツおよびレイアウト手法に基づいて適切な値を返す必要があります。 サブクラスにHORIZONTALコンテンツ・バイアスがない場合は、widthパラメータを無視できます。- オーバーライド:
computePrefHeight
、クラス:Region
- パラメータ:
width
- 推奨される高さがそれに依存する場合に使用する必要がある幅- 戻り値:
- このリージョンの計算された優先高
-
getClassCssMetaData
public static List<CssMetaData<? extends Styleable,?>> getClassCssMetaData()
- 戻り値:
- このクラスに関連付けられたCssMetaData。スーパークラスのCssMetaDataを含むことがあります。
-
getCssMetaData
public List<CssMetaData<? extends Styleable,?>> getCssMetaData()
NodeのCssMetaDataがリフレクションなしでアクセス可能になるように、このメソッドはNode.getClassCssMetaData()
に委任する必要があります。- 定義:
getCssMetaData
、インタフェース:Styleable
- オーバーライド:
getCssMetaData
、クラス:Region
- 戻り値:
- このノードに関連付けられたCssMetaData。スーパークラスのCssMetaDataを含むことがあります。
-
-