The container manages three possible child nodes, identified as item1, item2, and item3. The layout updates dynamically whenever the nodes or properties such as orientation or spacing are modified.
Features include: - Dynamic management of child nodes: up to three nodes can be added and arranged. - Adjustable orientation: supports horizontal and vertical alignment through the orientation property. - Customizable spacing: allows setting the spacing between child nodes.
Override methods provide computed sizes for use during layouts, including preferred, minimum, and maximum widths and heights.
| Modifier and Type | Field and Description |
|---|---|
| private Orientation | |
| private boolean | |
| private final ObjectProperty | |
| private final ObjectProperty | |
| private final ObjectProperty | |
| private final ObjectProperty | |
| private final DoubleProperty |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected double | computeMaxHeight(double width)
Overrides javafx. Computes the maximum height of this region. |
| protected double | computeMaxWidth(double height)
Overrides javafx. Computes the maximum width for this region. |
| protected double | computeMinHeight(double width)
Overrides javafx. Computes the minimum height of this region. |
| protected double | computeMinWidth(double height)
Overrides javafx. Computes the minimum width of this region. |
| protected double | computePrefHeight(double width)
Overrides javafx. Computes the preferred height of this region for the given width; Region subclasses should override this method to return an appropriate value based on their content and layout strategy. |
| protected double | computePrefWidth(double height)
Overrides javafx. Computes the preferred width of this region for the given height. |
| public Orientation | Returns: null unless one of its children has a content bias.Overrides javafx. Returns the orientation of a node's resizing bias for layout purposes. |
| public final Node | |
| public final Node | |
| public final Node | |
| public final Orientation | |
| public final double | |
| public final ObjectProperty | Returns: the property object representing the first item NodeReturns the property object for the first item in the ThreeItemsPane. |
| public final ObjectProperty | Returns: the property object representing the second item NodeReturns the property object for the second item in the ThreeItemsPane. |
| public final ObjectProperty | Returns: the property object representing the first item NodeReturns the property object for the third item in the ThreeItemsPane. |
| protected void | layoutChildren()
Overrides javafx. Invoked during the layout pass to layout the children in this
|
| private void | layoutChildrenHorizontally(Insets insets, double width, double height, Node item1, Node item2, Node item3)
|
| private void | layoutChildrenVertically(Insets insets, double width, double height, Node item1, Node item2, Node item3)
|
| public final ObjectProperty | Returns: the orientation propertyReturns the property object for the orientation of the ThreeItemsPane. |
| public void | requestLayout()
Overrides javafx. Requests a layout pass to be performed before the next scene is rendered. |
| public final void | |
| public final void | |
| public final void | |
| public void | |
| public final void | |
| public final DoubleProperty | |
| private void |
| bias | back to summary |
|---|---|
| private Orientation bias | |
| biasDirty | back to summary |
|---|---|
| private boolean biasDirty | |
| item1 | back to summary |
|---|---|
| private final ObjectProperty<Node> item1 | |
| item2 | back to summary |
|---|---|
| private final ObjectProperty<Node> item2 | |
| item3 | back to summary |
|---|---|
| private final ObjectProperty<Node> item3 | |
| orientation | back to summary |
|---|---|
| private final ObjectProperty<Orientation> orientation | |
| spacing | back to summary |
|---|---|
| private final DoubleProperty spacing | |
| ThreeItemsPane | back to summary |
|---|---|
| public ThreeItemsPane() Constructs a new instance of the ThreeItemsPane class. | |
| computeMaxHeight | back to summary |
|---|---|
| protected double computeMaxHeight(double width) Overrides javafx. Doc from javafx. Computes the maximum height of this region. Returns Double.MAX_VALUE by default. Region subclasses may override this method to return a different value based on their content and layout strategy. If the subclass doesn't have a HORIZONTAL content bias, then the width parameter can be ignored.
| |
| computeMaxWidth | back to summary |
|---|---|
| protected double computeMaxWidth(double height) Overrides javafx. Doc from javafx. Computes the maximum width for this region. Returns Double.MAX_VALUE by default. Region subclasses may override this method to return an different value based on their content and layout strategy. If the subclass doesn't have a VERTICAL content bias, then the height parameter can be ignored.
| |
| computeMinHeight | back to summary |
|---|---|
| protected double computeMinHeight(double width) Overrides javafx. Doc from javafx. Computes the minimum height of this region. Returns the sum of the top and bottom insets by default. Region subclasses should override this method to return an appropriate value based on their content and layout strategy. If the subclass doesn't have a HORIZONTAL content bias, then the width parameter can be ignored.
| |
| computeMinWidth | back to summary |
|---|---|
| protected double computeMinWidth(double height) Overrides javafx. Doc from javafx. Computes the minimum width of this region. Returns the sum of the left and right insets by default. region subclasses should override this method to return an appropriate value based on their content and layout strategy. If the subclass doesn't have a VERTICAL content bias, then the height parameter can be ignored.
| |
| computePrefHeight | back to summary |
|---|---|
| protected double computePrefHeight(double width) Overrides javafx. Doc from javafx. Computes the preferred height of this region for the given width; Region subclasses should override this method to return an appropriate value based on their content and layout strategy. If the subclass doesn't have a HORIZONTAL content bias, then the width parameter can be ignored.
| |
| computePrefWidth | back to summary |
|---|---|
| protected double computePrefWidth(double height) Overrides javafx. Doc from javafx. Computes the preferred width of this region for the given height. Region subclasses should override this method to return an appropriate value based on their content and layout strategy. If the subclass doesn't have a VERTICAL content bias, then the height parameter can be ignored.
| |
| getContentBias | back to summary |
|---|---|
| public Orientation getContentBias() Overrides javafx. Doc from javafx. Returns the orientation of a node's resizing bias for layout purposes. If the node type has no bias, returns null. If the node is resizable and it's height depends on its width, returns HORIZONTAL, else if its width depends on its height, returns VERTICAL. Resizable subclasses should override this method to return an appropriate value.
| |
| getItem1 | back to summary |
|---|---|
| public final Node getItem1() | |
| getItem2 | back to summary |
|---|---|
| public final Node getItem2() | |
| getItem3 | back to summary |
|---|---|
| public final Node getItem3() | |
| getOrientation | back to summary |
|---|---|
| public final Orientation getOrientation() | |
| getSpacing | back to summary |
|---|---|
| public final double getSpacing() | |
| item1Property | back to summary |
|---|---|
| public final ObjectProperty Returns the property object for the first item in the ThreeItemsPane. This property represents the first Node managed by the pane.
| |
| item2Property | back to summary |
|---|---|
| public final ObjectProperty Returns the property object for the second item in the ThreeItemsPane. This property represents the second Node managed by the pane.
| |
| item3Property | back to summary |
|---|---|
| public final ObjectProperty Returns the property object for the third item in the ThreeItemsPane. This property represents the third Node managed by the pane.
| |
| layoutChildren | back to summary |
|---|---|
| protected void layoutChildren() Overrides javafx. Doc from javafx. Invoked during the layout pass to layout the children in this
Subclasses should override this function to layout content as needed.
| |
| layoutChildrenHorizontally | back to summary |
|---|---|
| private void layoutChildrenHorizontally(Insets insets, double width, double height, Node item1, Node item2, Node item3) | |
| layoutChildrenVertically | back to summary |
|---|---|
| private void layoutChildrenVertically(Insets insets, double width, double height, Node item1, Node item2, Node item3) | |
| orientationProperty | back to summary |
|---|---|
| public final ObjectProperty Returns the property object for the orientation of the ThreeItemsPane. This property determines whether the layout of the items is horizontal or vertical.
| |
| requestLayout | back to summary |
|---|---|
| public void requestLayout() Overrides javafx. Doc from javafx. Requests a layout pass to be performed before the next scene is rendered. This is batched up asynchronously to happen once per "pulse", or frame of animation. If this parent is either a layout root or unmanaged, then it will be added directly to the scene's dirty layout list, otherwise requestParentLayout will be invoked.
| |
| setItem1 | back to summary |
|---|---|
| public final void setItem1(Node item1) | |
| setItem2 | back to summary |
|---|---|
| public final void setItem2(Node item2) | |
| setItem3 | back to summary |
|---|---|
| public final void setItem3(Node item3) | |
| setOrientation | back to summary |
|---|---|
| public void setOrientation(Orientation orientation) | |
| setSpacing | back to summary |
|---|---|
| public final void setSpacing(double spacing) | |
| spacingProperty | back to summary |
|---|---|
| public final DoubleProperty spacingProperty() | |
| updateChildren | back to summary |
|---|---|
| private void updateChildren() | |