FlowPane lays out each managed child regardless of the child's visible property value; unmanaged children are ignored for all layout calculations.

FlowPane may be styled with backgrounds and borders using CSS. See Region superclass for details.

Resizable Range

A flowpane's parent will resize the flowpane within the flowpane's resizable range during layout. By default the flowpane computes this range based on its content as outlined in the tables below.

horizontal:

width

height

minimum

left/right insets plus largest of children's pref widths

top/bottom insets plus height required to display all children at their preferred heights when wrapped at a specified width

preferred

left/right insets plus prefWrapLength

top/bottom insets plus height required to display all children at their pref heights when wrapped at a specified width

maximum

Double.MAX_VALUE

Double.MAX_VALUE

vertical:

width

height

minimum

left/right insets plus width required to display all children at their preferred widths when wrapped at a specified height

top/bottom insets plus largest of children's pref heights

preferred

left/right insets plus width required to display all children at their pref widths when wrapped at the specified height

top/bottom insets plus prefWrapLength

maximum

Double.MAX_VALUE

Double.MAX_VALUE

A flowpane's unbounded maximum width and height are an indication to the parent that it may be resized beyond its preferred size to fill whatever space is assigned to it.

FlowPane provides properties for setting the size range directly. These properties default to the sentinel value Region.USE_COMPUTED_SIZE, however the application may set them to other values as needed:

flowpane.setMaxWidth(500);

Applications may restore the computed values by setting these properties back to Region.USE_COMPUTED_SIZE.

FlowPane does not clip its content by default, so it is possible that childrens' bounds may extend outside its own bounds if a child's pref size is larger than the space flowpane has to allocate for it.

Methods inherited from class java.lang.Object

Property Detail

orientation

The orientation of this flowpane. A horizontal flowpane lays out children left to right, wrapping at the flowpane's width boundary. A vertical flowpane lays out children top to bottom, wrapping at the flowpane's height. The default is horizontal.

prefWrapLength

The preferred width where content should wrap in a horizontal flowpane or the preferred height where content should wrap in a vertical flowpane.

This value is used only to compute the preferred size of the flowpane and may not reflect the actual width or height, which may change if the flowpane is resized to something other than its preferred size.

Applications should initialize this value to define a reasonable span for wrapping the content.

alignment

The overall alignment of the flowpane's content within its width and height.

For a horizontal flowpane, each row will be aligned within the flowpane's width using the alignment's hpos value, and the rows will be aligned within the flowpane's height using the alignment's vpos value.

For a vertical flowpane, each column will be aligned within the flowpane's height using the alignment's vpos value, and the columns will be aligned within the flowpane's width using the alignment's hpos value.

rowValignment

The vertical alignment of nodes within each row of a horizontal flowpane. If this property is set to VPos.BASELINE, then the flowpane will always resize children to their preferred heights, rather than expanding heights to fill the row height. The property is ignored for vertical flowpanes.

orientationProperty

The orientation of this flowpane. A horizontal flowpane lays out children left to right, wrapping at the flowpane's width boundary. A vertical flowpane lays out children top to bottom, wrapping at the flowpane's height. The default is horizontal.

setOrientation

The orientation of this flowpane. A horizontal flowpane lays out children left to right, wrapping at the flowpane's width boundary. A vertical flowpane lays out children top to bottom, wrapping at the flowpane's height. The default is horizontal.

getOrientation

The orientation of this flowpane. A horizontal flowpane lays out children left to right, wrapping at the flowpane's width boundary. A vertical flowpane lays out children top to bottom, wrapping at the flowpane's height. The default is horizontal.

prefWrapLengthProperty

The preferred width where content should wrap in a horizontal flowpane or the preferred height where content should wrap in a vertical flowpane.

This value is used only to compute the preferred size of the flowpane and may not reflect the actual width or height, which may change if the flowpane is resized to something other than its preferred size.

Applications should initialize this value to define a reasonable span for wrapping the content.

setPrefWrapLength

The preferred width where content should wrap in a horizontal flowpane or the preferred height where content should wrap in a vertical flowpane.

This value is used only to compute the preferred size of the flowpane and may not reflect the actual width or height, which may change if the flowpane is resized to something other than its preferred size.

Applications should initialize this value to define a reasonable span for wrapping the content.

getPrefWrapLength

The preferred width where content should wrap in a horizontal flowpane or the preferred height where content should wrap in a vertical flowpane.

This value is used only to compute the preferred size of the flowpane and may not reflect the actual width or height, which may change if the flowpane is resized to something other than its preferred size.

Applications should initialize this value to define a reasonable span for wrapping the content.

alignmentProperty

The overall alignment of the flowpane's content within its width and height.

For a horizontal flowpane, each row will be aligned within the flowpane's width using the alignment's hpos value, and the rows will be aligned within the flowpane's height using the alignment's vpos value.

For a vertical flowpane, each column will be aligned within the flowpane's height using the alignment's vpos value, and the columns will be aligned within the flowpane's width using the alignment's hpos value.

setAlignment

The overall alignment of the flowpane's content within its width and height.

For a horizontal flowpane, each row will be aligned within the flowpane's width using the alignment's hpos value, and the rows will be aligned within the flowpane's height using the alignment's vpos value.

For a vertical flowpane, each column will be aligned within the flowpane's height using the alignment's vpos value, and the columns will be aligned within the flowpane's width using the alignment's hpos value.

getAlignment

The overall alignment of the flowpane's content within its width and height.

For a horizontal flowpane, each row will be aligned within the flowpane's width using the alignment's hpos value, and the rows will be aligned within the flowpane's height using the alignment's vpos value.

For a vertical flowpane, each column will be aligned within the flowpane's height using the alignment's vpos value, and the columns will be aligned within the flowpane's width using the alignment's hpos value.

rowValignmentProperty

The vertical alignment of nodes within each row of a horizontal flowpane. If this property is set to VPos.BASELINE, then the flowpane will always resize children to their preferred heights, rather than expanding heights to fill the row height. The property is ignored for vertical flowpanes.

setRowValignment

The vertical alignment of nodes within each row of a horizontal flowpane. If this property is set to VPos.BASELINE, then the flowpane will always resize children to their preferred heights, rather than expanding heights to fill the row height. The property is ignored for vertical flowpanes.

getRowValignment

The vertical alignment of nodes within each row of a horizontal flowpane. If this property is set to VPos.BASELINE, then the flowpane will always resize children to their preferred heights, rather than expanding heights to fill the row height. The property is ignored for vertical flowpanes.

getContentBias

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.

computeMinWidth

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.

computeMinHeight

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.

computePrefWidth

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.

computePrefHeight

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.