Home | History | Annotate | Download | only in selection

Lines Matching refs:Limits

405         // List of limits along the x-axis (columns).
407 private final List<GridModel.Limits> mColumnBounds = new ArrayList<>();
409 // List of limits along the y-axis (rows). Note that this list only contains items which
411 private final List<GridModel.Limits> mRowBounds = new ArrayList<>();
537 * Updates the limits lists and column map with the given item metadata.
543 // If not all x-limits have been recorded, record this one.
545 mColumnBounds, new Limits(absoluteChildRect.left, absoluteChildRect.right));
548 recordLimits(mRowBounds, new Limits(absoluteChildRect.top, absoluteChildRect.bottom));
559 * Ensures limits exists within the sorted list limitsList, and adds it to the list if it
562 private void recordLimits(List<GridModel.Limits> limitsList, GridModel.Limits limits) {
563 int index = Collections.binarySearch(limitsList, limits);
565 limitsList.add(~index, limits);
612 Collections.binarySearch(mColumnBounds, new Limits(rect.left, rect.left));
621 int rowStart = Collections.binarySearch(mRowBounds, new Limits(rect.top, rect.top));
732 * Limits of a view item. For example, if an item's left side is at x-value 5 and its right side
733 * is at x-value 10, the limits would be from 5 to 10. Used to record the left- and right sides
737 private static class Limits implements Comparable<GridModel.Limits> {
741 Limits(int lowerLimit, int upperLimit) {
747 public int compareTo(GridModel.Limits other) {
753 if (!(other instanceof GridModel.Limits)) {
757 return ((GridModel.Limits) other).lowerLimit == lowerLimit &&
758 ((GridModel.Limits) other).upperLimit == upperLimit;
776 * advantage of tying the value to the Limits of items along that axis. This allows easy
777 * selection of items within those Limits as opposed to a search through every item to see if a
778 * given coordinate value falls within those Limits.
798 * Location describing points within the limits of one item.
809 * The limits before the coordinate; only populated when type == WITHIN_LIMITS or type ==
812 GridModel.Limits limitsBeforeCoordinate;
815 * The limits after the coordinate; only populated when type == BETWEEN_TWO_ITEMS.
817 GridModel.Limits limitsAfterCoordinate;
819 // Limits of the first known item; only populated when type == BEFORE_FIRST_ITEM.
820 GridModel.Limits mFirstKnownItem;
821 // Limits
822 GridModel.Limits mLastKnownItem;
825 * @param limitsList The sorted limits list for the coordinate type. If this
830 RelativeCoordinate(List<GridModel.Limits> limitsList, int value) {
831 int index = Collections.binarySearch(limitsList, new Limits(value, value));
840 GridModel.Limits lastLimits = limitsList.get(limitsList.size() - 1);
849 GridModel.Limits limitsBeforeIndex = limitsList.get(~index - 1);
890 * The location of a point relative to the Limits of nearby items; consists of both an x- and
975 List<GridModel.Limits> limitsList, boolean isStartOfRange) {