Home | History | Annotate | Download | only in widget

Lines Matching defs:Cell

101     private final ArrayList<Cell> mPattern = new ArrayList<Cell>(9);
147 * Represents a cell in the 3 X 3 matrix of the unlock pattern view.
149 public static final class Cell {
154 private static final Cell[][] sCells = createCells();
156 private static Cell[][] createCells() {
157 Cell[][] res = new Cell[3][3];
160 res[i][j] = new Cell(i, j);
167 * @param row The row of the cell.
168 * @param column The column of the cell.
170 private Cell(int row, int column) {
184 public static Cell of(int row, int column) {
257 * The user extended the pattern currently being drawn by one cell.
258 * @param pattern The pattern with newly added cell.
260 void onPatternCellAdded(List<Cell> pattern);
266 void onPatternDetected(List<Cell> pattern);
393 public void setPattern(DisplayMode displayMode, List<Cell> pattern) {
397 for (Cell cell : pattern) {
398 mPatternDrawLookup[cell.getRow()][cell.getColumn()] = true;
418 final Cell first = mPattern.get(0);
538 if (DEBUG_A11Y) Log.v(TAG, "ivnalidating root because cell was added.");
668 * pattern (in addition to finding the cell, also makes heuristic choices
673 private Cell detectAndAddHit(float x, float y) {
674 final Cell cell = checkForNewHit(x, y);
675 if (cell != null) {
678 Cell fillInGapCell = null;
679 final ArrayList<Cell> pattern = mPattern;
681 final Cell lastCell = pattern.get(pattern.size() - 1);
682 int dRow = cell.row - lastCell.row;
683 int dColumn = cell.column - lastCell.column;
696 fillInGapCell = Cell.of(fillInRow, fillInColumn);
703 addCellToPattern(cell);
709 return cell;
714 private void addCellToPattern(Cell newCell) {
723 private void startCellActivatedAnimation(Cell cell) {
724 final CellState cellState = mCellStates[cell.row][cell.column];
735 getCenterXForColumn(cell.column), getCenterYForRow(cell.row));
785 // helper method to find which cell a point maps to
786 private Cell checkForNewHit(float x, float y) {
800 return Cell.of(rowHit, columnHit);
913 Cell hitCell = detectAndAddHit(x, y);
927 final ArrayList<Cell> pattern = mPattern;
928 final Cell lastCell = pattern.get(patternSize - 1);
932 // Adjust for drawn segment from last cell to (x,y). Radius accounts for line width.
938 // Invalidate between the pattern's new cell and the pattern's previous cell
951 // Invalidate between the pattern's last cell and the previous location
1003 final Cell hitCell = detectAndAddHit(x, y);
1042 final ArrayList<Cell> pattern = mPattern;
1058 final Cell cell = pattern.get(i);
1059 drawLookup[cell.getRow()][cell.getColumn()] = true;
1072 final Cell currentCell = pattern.get(numCircles - 1);
1076 final Cell nextCell = pattern.get(numCircles);
1110 // TODO: the path should be created and cached every time we hit-detect a cell
1122 Cell cell = pattern.get(i);
1127 if (!drawLookup[cell.row][cell.column]) {
1132 float centerX = getCenterXForColumn(cell.column);
1133 float centerY = getCenterYForRow(cell.row);
1135 CellState state = mCellStates[cell.row][cell.column];
1436 final CellState cell = mCellStates[row][col];
1466 * Helper method to find which cell a point maps to