Home | History | Annotate | Download | only in widget

Lines Matching refs:Spec

69  * Each spec defines the set of rows or columns that are to be
665 Spec spec = horizontal ? p.columnSpec : p.rowSpec;
667 Interval span = spec.span;
689 Spec spec = horizontal ? lp.columnSpec : lp.rowSpec;
690 int index = leading ? spec.span.min : spec.span.max;
744 final Spec majorSpec = horizontal ? lp.rowSpec : lp.columnSpec;
752 final Spec minorSpec = horizontal ? lp.columnSpec : lp.rowSpec;
828 Spec spec = horizontal ? lp.columnSpec : lp.rowSpec;
829 Interval span = spec.span;
1016 Spec spec = horizontal ? lp.columnSpec : lp.rowSpec;
1017 if (spec.getAbsoluteAlignment(horizontal) == FILL) {
1018 Interval span = spec.span;
1129 Spec columnSpec = lp.columnSpec;
1130 Spec rowSpec = lp.rowSpec;
1208 PackedMap<Spec, Bounds> groupBounds;
1248 Spec spec = horizontal ? params.columnSpec : params.rowSpec;
1249 Interval span = spec.span;
1286 private PackedMap<Spec, Bounds> createGroupBounds() {
1287 Assoc<Spec, Bounds> assoc = Assoc.of(Spec.class, Bounds.class);
1292 Spec spec = horizontal ? lp.columnSpec : lp.rowSpec;
1293 Bounds bounds = spec.getAbsoluteAlignment(horizontal).getBounds();
1294 assoc.put(spec, bounds);
1308 Spec spec = horizontal ? lp.columnSpec : lp.rowSpec;
1310 ((spec.weight == 0) ? 0 : getDeltas()[i]);
1311 groupBounds.getValue(i).include(GridLayout.this, c, spec, this, size);
1315 public PackedMap<Spec, Bounds> getGroupBounds() {
1329 Spec[] keys = getGroupBounds().keys;
1661 Spec spec = horizontal ? lp.columnSpec : lp.rowSpec;
1662 Interval span = spec.span;
1703 Spec spec = horizontal ? lp.columnSpec : lp.rowSpec;
1704 if (spec.weight != 0) {
1734 Spec spec = horizontal ? lp.columnSpec : lp.rowSpec;
1735 float weight = spec.weight;
1790 Spec spec = horizontal ? lp.columnSpec : lp.rowSpec;
1791 totalWeight += spec.weight;
1910 * {@link GridLayout.Spec Specs} are immutable structures
1921 * The weight property is also included in Spec and specifies the proportion of any
2016 * The spec that defines the vertical characteristics of the cell group
2027 public Spec rowSpec = Spec.UNDEFINED;
2030 * The spec that defines the horizontal characteristics of the cell group
2041 public Spec columnSpec = Spec.UNDEFINED;
2048 Spec rowSpec, Spec columnSpec) {
2063 public LayoutParams(Spec rowSpec, Spec columnSpec) {
2073 this(Spec.UNDEFINED, Spec.UNDEFINED);
2093 * Copy constructor. Clones the width, height, margin values, row spec,
2094 * and column spec of the source.
2152 float colWeight = a.getFloat(COLUMN_WEIGHT, Spec.DEFAULT_WEIGHT);
2153 this.columnSpec = spec(column, colSpan, getAlignment(gravity, true), colWeight);
2157 float rowWeight = a.getFloat(ROW_WEIGHT, Spec.DEFAULT_WEIGHT);
2158 this.rowSpec = spec(row, rowSpan, getAlignment(gravity, false), rowWeight);
2393 protected final void include(GridLayout gl, View c, Spec spec, Axis axis, int size) {
2394 this.flexibility &= spec.getFlexibility();
2396 Alignment alignment = spec.getAbsoluteAlignment(axis.horizontal);
2502 * A Spec defines the horizontal or vertical characteristics of a group of
2503 * cells. Each spec. defines the <em>grid indices</em> and <em>alignment</em>
2516 * <li>{@link #spec(int)}</li>
2517 * <li>{@link #spec(int, int)}</li>
2518 * <li>{@link #spec(int, Alignment)}</li>
2519 * <li>{@link #spec(int, int, Alignment)}</li>
2520 * <li>{@link #spec(int, float)}</li>
2521 * <li>{@link #spec(int, int, float)}</li>
2522 * <li>{@link #spec(int, Alignment, float)}</li>
2523 * <li>{@link #spec(int, int, Alignment, float)}</li>
2527 public static class Spec {
2528 static final Spec UNDEFINED = spec(GridLayout.UNDEFINED);
2536 private Spec(boolean startDefined, Interval span, Alignment alignment, float weight) {
2543 private Spec(boolean startDefined, int start, int size, Alignment alignment, float weight) {
2557 final Spec copyWriteSpan(Interval span) {
2558 return new Spec(startDefined, span, alignment, weight);
2561 final Spec copyWriteAlignment(Alignment alignment) {
2562 return new Spec(startDefined, span, alignment, weight);
2571 * properties of this Spec and the supplied parameter are pairwise equal,
2574 * @param that the object to compare this spec with
2577 * {@code Spec}; {@code false} otherwise
2588 Spec spec = (Spec) that;
2590 if (!alignment.equals(spec.alignment)) {
2594 if (!span.equals(spec.span)) {
2610 * Return a Spec, {@code spec}, where:
2612 * <li> {@code spec.span = [start, start + size]} </li>
2613 * <li> {@code spec.alignment = alignment} </li>
2614 * <li> {@code spec.weight = weight} </li>
2624 public static Spec spec(int start, int size, Alignment alignment, float weight) {
2625 return new Spec(start != UNDEFINED, start, size, alignment, weight);
2629 * Equivalent to: {@code spec(start, 1, alignment, weight)}.
2635 public static Spec spec(int start, Alignment alignment, float weight) {
2636 return spec(start, 1, alignment, weight);
2640 * Equivalent to: {@code spec(start, 1, default_alignment, weight)} -
2648 public static Spec spec(int start, int size, float weight) {
2649 return spec(start, size, UNDEFINED_ALIGNMENT, weight);
2653 * Equivalent to: {@code spec(start, 1, weight)}.
2658 public static Spec spec(int start, float weight) {
2659 return spec(start, 1, weight);
2663 * Equivalent to: {@code spec(start, size, alignment, 0f)}.
2669 public static Spec spec(int start, int size, Alignment alignment) {
2670 return spec(start, size, alignment, Spec.DEFAULT_WEIGHT);
2674 * Return a Spec, {@code spec}, where:
2676 * <li> {@code spec.span = [start, start + 1]} </li>
2677 * <li> {@code spec.alignment = alignment} </li>
2685 * @see #spec(int, int, Alignment)
2687 public static Spec spec(int start, Alignment alignment) {
2688 return spec(start, 1, alignment);
2692 * Return a Spec, {@code spec}, where:
2694 * <li> {@code spec.span = [start, start + size]} </li>
2702 * @see #spec(int, Alignment)
2704 public static Spec spec(int start, int size) {
2705 return spec(start, size, UNDEFINED_ALIGNMENT);
2709 * Return a Spec, {@code spec}, where:
2711 * <li> {@code spec.span = [start, start + 1]} </li>
2718 * @see #spec(int, int)
2720 public static Spec spec(int start) {
2721 return spec(start, 1);