LayoutInfo
Inherits from: LayoutInfoBase
Overview
Defines a set of common layout variables that can be used to specify how a particular node should be layed out within the layout space allocated to it by its parent container.
All of the container classes provided in
javafx.scene.layout support
LayoutInfo, however setting
layoutInfo on a node which is inside one of these containers is only required when the application needs to override the default layout behavior of that container. For example, to override the preferred sizes of a button so it will always be 100 wide:
HBox {
content: [
Button {
layoutInfo: LayoutInfo { minWidth: 100 width: 100 maxWidth: 100 }
}
// ..other nodes in hbox
]
}
Profile: common
Variable Summary
| name | type | Default Value | description |
|---|---|---|---|
| minWidth | Number |
If set, will override a resizable node's minimum width. If the node is not resizable, will be ignored. | |
| minHeight | Number |
If set, will override a resizable node's minimum height. If the node is not resizable, will be ignored. | |
| width | Number |
If set, will override a resizable node's preferred width. If the node is not resizable, will be ignored. | |
| height | Number |
If set, will override a resizable node's preferred height. If the node is not resizable, will be ignored. | |
| maxWidth | Number |
If set, will override a resizable node's maximum width. If the node is not resizable, will be ignored. | |
| maxHeight | Number |
If set, will override a resizable node's maximum height. If the node is not resizable, will be ignored. | |
| hfill | Boolean |
If set, indicates that resizable node's width should be resized beyond its preferred width (up to its maximum) to fill it's allocated layout area. If the node is not resizable, will be ignored. | |
| vfill | Boolean |
If set, indicates that resizable node's height should be resized beyond its preferred height (up to its maximum) to fill it's allocated layout area. If the node is not resizable, will be ignored. | |
| hpos | HPos |
If set, will define how the node should be horizontally positioned relative to its allocated layout area. | |
| vpos | VPos |
If set, will define how the node should be vertically positioned relative to its allocated layout area. | |
| hgrow | Priority |
If set, will define the horizontal grow priority for the node's layout area. This constraint controls how a container allocates additional horizontal space to the node's layout area if the container is resized larger than its preferred width and multiple nodes are competing for horizontal space. If
If
If
| |
| vgrow | Priority |
If set, will define the vertical grow priority for the node's layout area. This constraint controls how a container allocates additional vertical space to the node's layout area if the container is resized larger than its preferred height and multiple nodes are competing for vertical space. If
If
If
| |
| hshrink | Priority |
If set, will define the horizontal shrink priority for the node's layout area. This constraint controls how a container subtracts horizontal space from the node's layout area if the container is resized smaller than its preferred width and multiple nodes are competing for horizontal space. If
If
If
| |
| vshrink | Priority |
If set, will define the vertical shrink priority for the node's layout area. This constraint controls how a container subtracts vertical space from the node's layout area if the container is resized smaller than its preferred height and multiple nodes are competing for vertical space. If
If
If
| |
| margin | Insets |
If set, will define a margin of space that should be allocated around the outside of the node's layout bounds during layout. |
