Home | History | Annotate | Download | only in ui

Lines Matching defs:Box

98     // In addition to the focused box (index == 0). We also keep information
132 // The bound of the stable region that the focused box can stay, see the
136 // Constrained frame is a rectangle that the focused box should fit into if
139 // (1) In page mode, if the focused box is constrained, scaling for the
140 // focused box is adjusted to fit into the constrained frame, instead of the
143 // (2) In page mode, if the focused box is constrained, the mPlatform's
149 // Whether the focused box is constrained.
160 // | | Box | | Box | | Box*| | Box | | Box | |
167 // The focused box (Box*) centers at mPlatform's (mCurrentX, mCurrentY)
170 private RangeArray<Box> mBoxes = new RangeArray<Box>(-BOX_MAX, BOX_MAX);
171 // The gap at the right of a Box i is at index i. The gap at the left of a
172 // Box i is at index i - 1.
177 private RangeArray<Box> mTempBoxes = new RangeArray<Box>(-BOX_MAX, BOX_MAX);
219 mBoxes.put(i, new Box());
248 // If the focused box was at minimal scale, we try to make it the
251 Box b = mBoxes.get(0);
272 Box b = mBoxes.get(index);
294 // Returns false if the box size doesn't change.
296 Box b = mBoxes.get(i);
344 Box b = mBoxes.get(0);
392 Box b = mBoxes.get(i);
407 Box a = mBoxes.get(i);
408 Box b = mBoxes.get(i + 1);
424 private int gapToSide(Box b) {
446 Box b = mBoxes.get(i);
472 // Start an animations for the focused box
478 Box b = mBoxes.get(0);
496 Box b = mBoxes.get(0);
503 Box b = mBoxes.get(0);
518 Box b = mBoxes.get(0);
540 // Slide the focused box to the center of the view.
542 Box b = mBoxes.get(0);
546 // Slide the focused box to the center of the view with the capture
548 // the focused box, the specified neighbor box, and the gap between the
551 Box b = mBoxes.get(0);
552 Box n = mBoxes.get(offset); // the neighbor box
566 Box b = mBoxes.get(0);
580 Box b = mBoxes.get(0);
618 Box b = mBoxes.get(0);
653 Box b = mBoxes.get(boxIndex);
660 Box b = mBoxes.get(0);
694 Box b = mBoxes.get(0);
711 // Moves the specified box out of screen. If velocityY is 0, a default
715 Box b = mBoxes.get(boxIndex);
746 // Returns the index of the box which contains the given point (x, y)
748 // one box contains the given point, and we want to give priority to the
765 // If a method changes box positions directly, redraw()
771 // If a method starts an animation to change the position of focused box,
774 // If time advances to change the box position, advanceAnimation() should
827 // Returns the display width of this box.
828 private int widthOf(Box b) {
832 // Returns the display height of this box.
833 private int heightOf(Box b) {
837 // Returns the display width of this box, using the given scale.
838 private int widthOf(Box b, float scale) {
842 // Returns the display height of this box, using the given scale.
843 private int heightOf(Box b, float scale) {
848 // can get the position of each box by getPosition().
850 // Note we go from center-out because each box's X coordinate
851 // is relative to its anchor box (except the focused box).
894 Box b = mBoxes.get(i);
918 // Returns the position of a box.
924 // Box management
935 // Initialize a box to have the size of the view.
937 Box b = mBoxes.get(index);
949 // Initialize a box to a given size.
955 Box b = mBoxes.get(index);
997 // Move the boxes: it may indicate focus change, box deleted, box appearing,
998 // box reordered, etc.
1000 // Each element in the fromIndex array indicates where each box was in the
1002 // means the box is new.
1007 // -2 -1 0 1 2 3 N -- focus goes to the next box
1008 // N -3 -2 -1 0 1 2 -- focuse goes to the previous box
1009 // -3 -2 -1 1 2 3 N -- the focused box was deleted.
1012 // focused box. constrained indicates whether the focused box should be put
1025 Box b = mBoxes.get(i);
1071 // 6. Now give the recycled box a reasonable absolute X position.
1073 // First try to find the first and the last box which the absolute X
1082 // If there is no box has known X position at all, make the focused one
1089 // align to the previous box or the next box with known position. For
1093 // Align to the previous box
1096 Box a = mBoxes.get(i - 1);
1097 Box b = mBoxes.get(i);
1109 // Align to the next box
1112 Box a = mBoxes.get(i + 1);
1113 Box b = mBoxes.get(i);
1133 Box a = mBoxes.get(i);
1134 Box b = mBoxes.get(i + 1);
1145 // 8. calculate the new absolute X coordinates for those box before
1148 Box a = mBoxes.get(i + 1);
1149 Box b = mBoxes.get(i);
1157 Box a = mBoxes.get(i - 1);
1158 Box b = mBoxes.get(i);
1186 Box b = mBoxes.get(0);
1191 Box b = mBoxes.get(0);
1197 Box b = mBoxes.get(0);
1202 Box b = mBoxes.get(0);
1207 Box b = mBoxes.get(0);
1212 Box b = mBoxes.get(0);
1263 private float getMinimalScale(Box b) {
1292 private float getMaximalScale(Box b) {
1320 Box b = mBoxes.get(0);
1322 // The width and height of the box in number of view pixels
1326 // When the edge of the view is aligned with the edge of the box
1356 private float getTargetScale(Box b) {
1450 Box b = mBoxes.get(0);
1467 // box). The position of the focus point on screen (relative the
1554 Box b = mBoxes.get(0);
1594 // Box: represents a rectangular area which shows a picture.
1596 private class Box extends Animatable {
1605 // The minimum and maximum scale we allow for this box.
1608 // The X/Y value indicates where the center of the box is on the view
1615 // The absolute X coordinate of the center of the box. This is only used
1669 // Now starts an animation for the box.