30 import java.util.List;
31 import javafx.beans.property.BooleanProperty;
32 import javafx.beans.property.DoubleProperty;
33 import javafx.beans.property.ObjectProperty;
34 import javafx.collections.ListChangeListener.Change;
35 import javafx.collections.ObservableList;
36 import javafx.geometry.HPos;
37 import javafx.geometry.Insets;
38 import javafx.geometry.Orientation;
39 import javafx.geometry.Pos;
40 import javafx.geometry.VPos;
41 import javafx.scene.Group;
42 import javafx.scene.Node;
43 import javafx.scene.paint.Color;
44 import javafx.scene.shape.Line;
45 import com.sun.javafx.collections.TrackableObservableList;
46 import javafx.css.StyleableBooleanProperty;
47 import javafx.css.StyleableDoubleProperty;
48 import javafx.css.StyleableObjectProperty;
49 import javafx.css.CssMetaData;
50 import com.sun.javafx.css.converters.BooleanConverter;
51 import com.sun.javafx.css.converters.EnumConverter;
52 import com.sun.javafx.css.converters.SizeConverter;
53 import java.util.Arrays;
54 import java.util.BitSet;
55 import java.util.Iterator;
56 import java.util.Map.Entry;
57 import java.util.Set;
58 import java.util.SortedMap;
59 import java.util.TreeMap;
60 import java.util.TreeSet;
61 import java.util.function.Function;
62 import javafx.beans.InvalidationListener;
63 import javafx.beans.Observable;
64 import javafx.css.Styleable;
65 import javafx.css.StyleableProperty;
66 import javafx.geometry.BoundingBox;
67 import javafx.geometry.Bounds;
68 import static javafx.scene.layout.Priority.ALWAYS;
69 import static javafx.scene.layout.Priority.SOMETIMES;
70 import static javafx.scene.layout.Region.USE_COMPUTED_SIZE;
71 import static javafx.scene.layout.Region.boundedSize;
72 import javafx.util.Callback;
73
74
75
76 /**
77 * GridPane lays out its children within a flexible grid of rows and columns.
78 * If a border and/or padding is set, then its content will be layed out within
79 * those insets.
80 * <p>
81 * A child may be placed anywhere within the grid and may span multiple
82 * rows/columns. Children may freely overlap within rows/columns and their
83 * stacking order will be defined by the order of the gridpane's children list
84 * (0th node in back, last node in front).
85 * <p>
86 * GridPane may be styled with backgrounds and borders using CSS. See
87 * {@link javafx.scene.layout.Region Region} superclass for details.</p>
88 *
89 * <h4>Grid Constraints</h4>
90 * <p>
91 * A child's placement within the grid is defined by it's layout constraints:
|
30 import java.util.List;
31 import javafx.beans.property.BooleanProperty;
32 import javafx.beans.property.DoubleProperty;
33 import javafx.beans.property.ObjectProperty;
34 import javafx.collections.ListChangeListener.Change;
35 import javafx.collections.ObservableList;
36 import javafx.geometry.HPos;
37 import javafx.geometry.Insets;
38 import javafx.geometry.Orientation;
39 import javafx.geometry.Pos;
40 import javafx.geometry.VPos;
41 import javafx.scene.Group;
42 import javafx.scene.Node;
43 import javafx.scene.paint.Color;
44 import javafx.scene.shape.Line;
45 import com.sun.javafx.collections.TrackableObservableList;
46 import javafx.css.StyleableBooleanProperty;
47 import javafx.css.StyleableDoubleProperty;
48 import javafx.css.StyleableObjectProperty;
49 import javafx.css.CssMetaData;
50 import javafx.css.converter.BooleanConverter;
51 import javafx.css.converter.EnumConverter;
52 import javafx.css.converter.SizeConverter;
53 import java.util.Arrays;
54 import java.util.BitSet;
55 import java.util.Iterator;
56 import java.util.Map.Entry;
57 import java.util.Set;
58 import java.util.SortedMap;
59 import java.util.TreeMap;
60 import java.util.TreeSet;
61
62 import javafx.beans.Observable;
63 import javafx.css.Styleable;
64 import javafx.css.StyleableProperty;
65 import javafx.geometry.BoundingBox;
66 import javafx.geometry.Bounds;
67 import javafx.util.Callback;
68
69
70
71 /**
72 * GridPane lays out its children within a flexible grid of rows and columns.
73 * If a border and/or padding is set, then its content will be layed out within
74 * those insets.
75 * <p>
76 * A child may be placed anywhere within the grid and may span multiple
77 * rows/columns. Children may freely overlap within rows/columns and their
78 * stacking order will be defined by the order of the gridpane's children list
79 * (0th node in back, last node in front).
80 * <p>
81 * GridPane may be styled with backgrounds and borders using CSS. See
82 * {@link javafx.scene.layout.Region Region} superclass for details.</p>
83 *
84 * <h4>Grid Constraints</h4>
85 * <p>
86 * A child's placement within the grid is defined by it's layout constraints:
|