Lines Matching refs:of

6  * You may obtain a copy of the License at
54 * The grid is composed of a set of infinitely thin lines that separate the
58 * through {@code N} inclusive. Regardless of how GridLayout is
59 * configured, grid index {@code 0} is fixed to the leading edge of the
68 * Each spec defines the set of rows or columns that are to be
69 * occupied; and how children should be aligned within the resulting group of cells.
71 * not prevent children being defined to occupy the same cell or group of cells.
77 * If a child does not specify the row and column indices of the cell it
85 * Space between children may be specified either by using instances of the
97 * Each of the margins so defined may be independently overridden by an assignment
100 * but values may change between different releases of the platform.
104 * GridLayout's distribution of excess space accommodates the principle of weight.
106 * flexible if their views specify some form of alignment within their groups.
108 * The flexibility of a view is therefore influenced by its alignment which is,
110 * {@link LayoutParams#setGravity(int) gravity} property of the child's layout parameters.
117 * group is flexible only if <em>all</em> of the components
118 * within it are flexible. Row and column groups that sit either side of a common boundary
119 * are instead considered to act in <em>series</em>. The composite group made of these two
120 * elements is flexible if <em>one</em> of its elements is flexible.
122 * To make a column stretch, make sure all of the components inside it define a
123 * weight or a gravity. To prevent a column from stretching, ensure that one of the components
126 * When the principle of flexibility does not provide complete disambiguation,
128 * and <em>bottom</em> edges. To be more precise, GridLayout treats each of its layout
129 * parameters as a constraint in the a set of variables that define the grid-lines along a
134 * <h4>Interpretation of GONE</h4>
138 * the policy of ignoring views that are marked as GONE outright. If, for example, a gone-marked
143 * These statements apply equally to rows as well as columns, and to groups of rows or columns.
146 * See {@link GridLayout.LayoutParams} for a full description of the
184 * is made between the edges of each component's raw
203 * the bounds of each view are extended outwards, according
204 * to their margins, before the edges of the resulting rectangle are aligned.
321 * The order in which axes are laid out is important if, for example, the height of
322 * one of GridLayout's children is dependent on its width - and its width is, in turn,
323 * dependent on the widths of other components.
328 * orientation as {@code HORIZONTAL} - because {@code TextView} is capable of
331 * Other than the effects above, orientation does not affect the actual layout operation of
333 * the height of the intended layout greatly exceeds its width.
335 * The default value of this property is {@link #HORIZONTAL}.
352 * Returns the current number of rows. This is either the last value that was set
354 * value of each the upper bounds defined in {@link LayoutParams#rowSpec}.
356 * @return the current number of rows
371 * @param rowCount the number of rows
385 * Returns the current number of columns. This is either the last value that was set
387 * value of each the upper bounds defined in {@link LayoutParams#columnSpec}.
389 * @return the current number of columns
404 * @param columnCount the number of columns.
433 * based on the child's visual characteristics. Each of the
437 * When {@code false}, the default value of all margins is zero.
439 * When setting to {@code true}, consider setting the value of the
443 * The default value of this property is {@code false}.
479 * Sets the alignment mode to be used for all of the alignments between the
480 * children of this container.
482 * The default value of this property is {@link #ALIGN_MARGINS}.
501 * @return {@code true} if row boundaries must appear in the order of their indices,
519 * The default value of this property is {@code true}.
522 * of row boundaries
537 * @return {@code true} if column boundaries must appear in the order of their indices,
555 * The default value of this property is {@code true}.
558 * of column boundaries.
877 mPrinter.println("The fields of some layout parameters were modified in between "
934 /** If we have been called by {@link View#measure(int, int)}, one of width or height
997 to the mHorizontalAxis and mVerticalAxis instances of the internal Axis class.
998 Together they compute the locations of the vertical and horizontal lines of
1001 This method is then left with the simpler task of applying margins, gravity
1050 // Gravity offsets: the location of the alignment group relative to its cell group.
1062 // Alignment offsets: the location of the view relative to its alignment group.
1085 This internal class houses the algorithm for computing the locations of grid lines;
1086 along either the horizontal or vertical axis. A GridLayout uses two instances of this class -
1164 "Count must be greater than or equal to the maximum of all grid indices " +
1165 "(and spans) defined in the LayoutParams of each child");
1180 Assoc<Spec, Bounds> assoc = Assoc.of(Spec.class, Bounds.class);
1220 // Add values computed by alignment - taking the max of all alignments in each span
1222 Assoc<Interval, MutableInt> result = Assoc.of(Interval.class, MutableInt.class);
1242 // this effectively takes the max() of the minima and the min() of the maxima
1297 // Group arcs by their first vertex, returning an array of arrays.
1298 // This is linear in the number of arcs.
1300 int N = getCount() + 1; // the number of vertices
1386 // Add the container constraints. Use the version of include that allows
1476 GridLayout converts its requirements into a system of linear constraints of the
1489 This is a special case of the Linear Programming problem that is, in turn,
1499 int N = getCount() + 1; // The number of vertices is the number of columns/rows + 1.
1703 // leading edge of the parent. After this transformation some values may be
1801 * Layout information associated with each of the children of a GridLayout.
1803 * GridLayout supports both row and column spanning and arbitrary forms of alignment within
1808 * and may be shared between the layout parameters of different children.
1811 * and together specify the four grid indices that delimit the cells of this cell group.
1813 * The alignment properties of the row and column specs together specify
1814 * both aspects of alignment within the cell group. It is also possible to specify a child's
1818 * The weight property is also included in Spec and specifies the proportion of any
1823 * Because the default values of the {@link #width} and {@link #height}
1825 * declared in the layout parameters of GridLayout's children. In addition,
1827 * {@link #WRAP_CONTENT}. A component's ability to expand to the size of the parent is
1828 * instead controlled by the principle of <em>flexibility</em>,
1833 * You should not need to use either of the special size values:
1834 * {@code WRAP_CONTENT} or {@code MATCH_PARENT} when configuring the children of
1868 * See {@link GridLayout} for a more complete description of the conventions
1869 * used by GridLayout in the interpretation of the properties of this class.
1912 * The spec that defines the vertical characteristics of the cell group
1917 * must be made to notify GridLayout of the change. GridLayout is normally able
1926 * The spec that defines the horizontal characteristics of the cell group
1931 * must be made to notify GridLayout of the change. GridLayout is normally able
1990 * and column spec of the source.
2020 // point of installation, we do not know how many rows/cols there are and therefore
2109 In place of a HashMap from span to Int, use an array of key/value pairs - stored in Arcs.
2160 public static <K, V> Assoc<K, V> of(Class<K> keyType, Class<V> valueType) {
2182 This data structure is used in place of a Map where we have an index that refers to the order
2184 in arrays of a length that is equal to the number of unique keys. We also maintain an
2185 array of indexes from insertion order to the compacted arrays of keys and values.
2187 Note that behavior differs from that of a LinkedHashMap in that repeated entries
2188 *do* get added multiples times. So the length of index is equals to the number of
2191 This is useful in the GridLayout class where we can rely on the order of children not
2193 rather than using (and storing) an implementation of Map<Key, ?>.
2230 Create a compact array of keys or values using the supplied index.
2246 For each group (with a given alignment) we need to store the amount of space required
2247 before the alignment point and the amount of space required after it. One side of this
2248 calculation is always 0 for START and END alignments but we don't make use of this.
2254 of the values for each View.
2308 * An Interval represents a contiguous range of values that lie between
2312 * It is not necessary to have multiple instances of Intervals which have the same
2315 * Intervals are often written as {@code [min, max]} and represent the set of values
2354 * {@link #min} and {@link #max} properties of this Interval and the
2398 * A Spec defines the horizontal or vertical characteristics of a group of
2402 * The <em>grid indices</em> are the leading and trailing edges of this cell group.
2403 * See {@link GridLayout} for a description of the conventions used by GridLayout
2457 * properties of this Spec and the supplied parameter are pairwise equal,
2615 * and a {@link LayoutParams#columnSpec columnSpec} each of which contains an
2616 * {@code alignment}. Overall placement of the view in the cell
2625 * to return the appropriate value for the type of alignment being defined.
2628 * are the same for all of the views in a group.
2638 * Returns an alignment value. In the case of vertical alignments the value
2639 * returned should indicate the distance from the top of the view to the
2641 * For horizontal alignments measurement is made from the left edge of the component.
2644 * @param viewSize the measured size of the view
2645 * @param mode the basis of alignment: CLIP or OPTICAL
2651 * Returns the size of the view specified by this alignment.
2652 * In the case of vertical alignments this method should return a height; for
2658 * @param viewSize the measured size of the view
2659 * @param cellSize the size of the cell into which this view will be placed
2685 * edges of the other views in its cell group.
2701 * edges of the other views in its cell group.
2717 * edges of the other views in its cell group.
2723 * edges of the other views in its cell group.
2729 * edges of the other views in its cell group.
2735 * edges of the other views in its cell group.
2759 * edges of the other views in its cell group.
2765 * edges of the other views in its cell group.
2788 * of the other views in its cell group.
2814 the sizes. This tracks the maximum size of all the components -
2845 * Indicates that a view should expanded to fit the boundaries of its cell group.