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
]
}
Variable Summary
access | name | type | Can Read | Can Init | Can Write | Default Value | description |
---|---|---|---|---|---|---|---|
public | height | Number |
If set, will override a resizable node's preferred height. If set, will override a resizable node's preferred height. If the node is not resizable, will be ignored. |
||||
public | hpos | HPos |
If set, will define how the node should be horizontally positioned within its allocated layout space. |
||||
public | maxHeight | Number |
If set, will override a resizable node's maximum height. If set, will override a resizable node's maximum height. If the node is not resizable, will be ignored. |
||||
public | maxWidth | Number |
If set, will override a resizable node's maximum width. If set, will override a resizable node's maximum width. If the node is not resizable, will be ignored. |
||||
public | minHeight | Number |
If set, will override a resizable node's minimum height. If set, will override a resizable node's minimum height. If the node is not resizable, will be ignored. |
||||
public | minWidth | Number |
If set, will override a resizable node's minimum width. If set, will override a resizable node's minimum width. If the node is not resizable, will be ignored. |
||||
public | vpos | VPos |
If set, will define how the node should be vertically positioned within its allocated layout space. |
||||
public | width | Number |
If set, will override a resizable node's preferred width. If set, will override a resizable node's preferred width. If the node is not resizable, will be ignored. |
Inherited Variables
javafx.scene.layout.LayoutInfoBase
access | name | type | Can Read | Can Init | Can Write | Default Value | description |
---|---|---|---|---|---|---|---|
public | managed | Boolean | true |
Defines whether the node(s) referencing this layout info should have their layout managed by their parent container. |