Home | History | Annotate | Download | only in widget

Lines Matching defs:Cell

102     private final ArrayList<Cell> mPattern = new ArrayList<Cell>(9);
152 * Represents a cell in the 3 X 3 matrix of the unlock pattern view.
154 public static final class Cell {
159 private static final Cell[][] sCells = createCells();
161 private static Cell[][] createCells() {
162 Cell[][] res = new Cell[3][3];
165 res[i][j] = new Cell(i, j);
172 * @param row The row of the cell.
173 * @param column The column of the cell.
175 private Cell(int row, int column) {
189 public static Cell of(int row, int column) {
262 * The user extended the pattern currently being drawn by one cell.
263 * @param pattern The pattern with newly added cell.
265 void onPatternCellAdded(List<Cell> pattern);
271 void onPatternDetected(List<Cell> pattern);
402 public void setPattern(DisplayMode displayMode, List<Cell> pattern) {
406 for (Cell cell : pattern) {
407 mPatternDrawLookup[cell.getRow()][cell.getColumn()] = true;
427 final Cell first = mPattern.get(0);
547 if (DEBUG_A11Y) Log.v(TAG, "ivnalidating root because cell was added.");
682 * pattern (in addition to finding the cell, also makes heuristic choices
687 private Cell detectAndAddHit(float x, float y) {
688 final Cell cell = checkForNewHit(x, y);
689 if (cell != null) {
692 Cell fillInGapCell = null;
693 final ArrayList<Cell> pattern = mPattern;
695 final Cell lastCell = pattern.get(pattern.size() - 1);
696 int dRow = cell.row - lastCell.row;
697 int dColumn = cell.column - lastCell.column;
710 fillInGapCell = Cell.of(fillInRow, fillInColumn);
717 addCellToPattern(cell);
723 return cell;
728 private void addCellToPattern(Cell newCell) {
737 private void startCellActivatedAnimation(Cell cell) {
738 final CellState cellState = mCellStates[cell.row][cell.column];
749 getCenterXForColumn(cell.column), getCenterYForRow(cell.row));
799 // helper method to find which cell a point maps to
800 private Cell checkForNewHit(float x, float y) {
814 return Cell.of(rowHit, columnHit);
927 Cell hitCell = detectAndAddHit(x, y);
941 final ArrayList<Cell> pattern = mPattern;
942 final Cell lastCell = pattern.get(patternSize - 1);
946 // Adjust for drawn segment from last cell to (x,y). Radius accounts for line width.
952 // Invalidate between the pattern's new cell and the pattern's previous cell
965 // Invalidate between the pattern's last cell and the previous location
1017 final Cell hitCell = detectAndAddHit(x, y);
1056 final ArrayList<Cell> pattern = mPattern;
1072 final Cell cell = pattern.get(i);
1073 drawLookup[cell.getRow()][cell.getColumn()] = true;
1086 final Cell currentCell = pattern.get(numCircles - 1);
1090 final Cell nextCell = pattern.get(numCircles);
1128 // TODO: the path should be created and cached every time we hit-detect a cell
1140 Cell cell = pattern.get(i);
1145 if (!drawLookup[cell.row][cell.column]) {
1150 float centerX = getCenterXForColumn(cell.column);
1151 float centerY = getCenterYForRow(cell.row);
1153 CellState state = mCellStates[cell.row][cell.column];
1476 final CellState cell = mCellStates[row][col];
1495 * Helper method to find which cell a point maps to