modules/graphics/src/main/java/javafx/scene/layout/FlowPane.java

Print this page
rev 9240 : 8076423: JEP 253: Prepare JavaFX UI Controls & CSS APIs for Modularization


  24  */
  25 
  26 package javafx.scene.layout;
  27 
  28 import java.util.ArrayList;
  29 import java.util.Collections;
  30 import java.util.List;
  31 import javafx.beans.property.DoubleProperty;
  32 import javafx.beans.property.DoublePropertyBase;
  33 import javafx.beans.property.ObjectProperty;
  34 import javafx.css.CssMetaData;
  35 import javafx.css.StyleableDoubleProperty;
  36 import javafx.css.StyleableObjectProperty;
  37 import javafx.css.StyleableProperty;
  38 import javafx.geometry.HPos;
  39 import javafx.geometry.Insets;
  40 import javafx.geometry.Orientation;
  41 import javafx.geometry.Pos;
  42 import javafx.geometry.VPos;
  43 import javafx.scene.Node;
  44 import com.sun.javafx.css.converters.EnumConverter;
  45 import com.sun.javafx.css.converters.SizeConverter;
  46 import java.util.function.Function;
  47 import javafx.css.Styleable;
  48 
  49 import static javafx.geometry.Orientation.*;
  50 import javafx.util.Callback;
  51 
  52 /**
  53  * FlowPane lays out its children in a flow that wraps at the flowpane's boundary.
  54  * <p>
  55  * A horizontal flowpane (the default) will layout nodes in rows, wrapping at the
  56  * flowpane's width.  A vertical flowpane lays out nodes in columns,
  57  * wrapping at the flowpane's height.  If the flowpane has a border and/or padding set,
  58  * the content will be flowed within those insets.
  59  * <p>
  60  * FlowPane's prefWrapLength property establishes it's preferred width
  61  * (for horizontal) or preferred height (for vertical). Applications should set
  62  * prefWrapLength if the default value (400) doesn't suffice.  Note that prefWrapLength
  63  * is used only for calculating the preferred size and may not reflect the actual
  64  * wrapping dimension, which tracks the actual size of the flowpane.
  65  * <p>
  66  * The alignment property controls how the rows and columns are aligned




  24  */
  25 
  26 package javafx.scene.layout;
  27 
  28 import java.util.ArrayList;
  29 import java.util.Collections;
  30 import java.util.List;
  31 import javafx.beans.property.DoubleProperty;
  32 import javafx.beans.property.DoublePropertyBase;
  33 import javafx.beans.property.ObjectProperty;
  34 import javafx.css.CssMetaData;
  35 import javafx.css.StyleableDoubleProperty;
  36 import javafx.css.StyleableObjectProperty;
  37 import javafx.css.StyleableProperty;
  38 import javafx.geometry.HPos;
  39 import javafx.geometry.Insets;
  40 import javafx.geometry.Orientation;
  41 import javafx.geometry.Pos;
  42 import javafx.geometry.VPos;
  43 import javafx.scene.Node;
  44 import javafx.css.converter.EnumConverter;
  45 import javafx.css.converter.SizeConverter;

  46 import javafx.css.Styleable;
  47 
  48 import static javafx.geometry.Orientation.*;
  49 import javafx.util.Callback;
  50 
  51 /**
  52  * FlowPane lays out its children in a flow that wraps at the flowpane's boundary.
  53  * <p>
  54  * A horizontal flowpane (the default) will layout nodes in rows, wrapping at the
  55  * flowpane's width.  A vertical flowpane lays out nodes in columns,
  56  * wrapping at the flowpane's height.  If the flowpane has a border and/or padding set,
  57  * the content will be flowed within those insets.
  58  * <p>
  59  * FlowPane's prefWrapLength property establishes it's preferred width
  60  * (for horizontal) or preferred height (for vertical). Applications should set
  61  * prefWrapLength if the default value (400) doesn't suffice.  Note that prefWrapLength
  62  * is used only for calculating the preferred size and may not reflect the actual
  63  * wrapping dimension, which tracks the actual size of the flowpane.
  64  * <p>
  65  * The alignment property controls how the rows and columns are aligned