Spec-Zone .ru
спецификации, руководства, описания, API

JavaFX: Bringing Rich Experiences To All the Screens Of Your Life

expand all

Profile: desktop, common

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 area 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

accessnametypeCan ReadCan InitCan WriteDefault Valuedescription
publicheightNumber

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.

 
publichfillBoolean

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 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.

 
publichgrowPriority

If set, will define the horizontal grow priority for the node's layout area.

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 ALWAYS, the node's layout area will always grow horizontally if there is additional space, sharing the increase with other nodes that have an hgrow of ALWAYS. The node's layout area will never be grown beyond the node's maximum width.

If SOMETIMES, the node's layout area will only grow horizontally if either no other node has specified ALWAYS, or the additional space was not completely allocated to nodes specifying ALWAYS because of their maximum size limits.

If NEVER, the node's layout area will never be grown horizontally if there is additional space.

 
publichposHPos

If set, will define how the node should be horizontally positioned relative to its allocated layout area.

publichshrinkPriority

If set, will define the horizontal shrink priority for the node's layout area.

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 ALWAYS, the node's layout area will always shrink horizontally if there is less space, sharing the decrease with other nodes that have an hshrink of ALWAYS. The node's layout area will never be sized smaller than the node's minimum width.

If SOMETIMES, the node's layout area will only shrink horizontally if either no other node has specified ALWAYS, or the reduced space was not completely distributed to nodes specifying ALWAYS because of their minimum size limits.

If NEVER, the node's layout area will never be shrunken horizontally if there is reduced space.

 
publicmarginInsets

If set, will define a margin of space that should be allocated around the outside of the node's layout bounds during layout.

publicmaxHeightNumber

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.

 
publicmaxWidthNumber

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.

 
publicminHeightNumber

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.

 
publicminWidthNumber

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.

 
publicvfillBoolean

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 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.

 
publicvgrowPriority

If set, will define the vertical grow priority for the node's layout area.

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 ALWAYS, the node's layout area will always grow vertically if there is additional space, sharing the increase with other nodes that have a vgrow of ALWAYS. The node's layout area will never be grown beyond the node's maximum height.

If SOMETIMES, the node's layout area will only grow vertically if either no other node has specified ALWAYS, or the additional space was not completely allocated to nodes specifying ALWAYS because of their maximum size limits.

If NEVER, the node's layout area will never be grown vertically if there is additional space.

 
publicvposVPos

If set, will define how the node should be vertically positioned relative to its allocated layout area.

publicvshrinkPriority

If set, will define the vertical shrink priority for the node's layout area.

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 ALWAYS, the node's layout area will always shrink vertically if there is less space, sharing the decrease with other nodes that have a vshrink of ALWAYS. The node's layout area will never be sized smaller than the node's minimum height.

If SOMETIMES, the node's layout area will only shrink vertically if either no other node has specified ALWAYS, or the reduced space was not completely distributed to nodes specifying ALWAYS because of their minimum size limits.

If NEVER, the node's layout area will never be shrunken vertically if there is reduced space.

 
publicwidthNumber

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

Inherited Functions

javafx.scene.layout.LayoutInfoBase

protected requestLayout() : Void