Lines Matching refs:mGrid
56 private final GridModel mGrid;
69 mGrid = new GridModel(mRule.getRulesEngine(), layout, view);
83 Rect bounds = mGrid.layout.getBounds();
115 int row = (mGrid.getViewCount() == 0) ? 0 : mGrid.getClosestRow(y1);
116 int rowY = mGrid.getRowY(row);
143 columnMatches.add(new GridMatch(SegmentType.LEFT, 0, x1, mGrid.getColumn(x1),
147 rowMatches.add(new GridMatch(SegmentType.TOP, 0, y1, mGrid.getRow(y1),
161 columnDescription = mColumnMatch.getDisplayName(mGrid.layout);
165 rowDescription = mRowMatch.getDisplayName(mGrid.layout);
178 int column = mGrid.getColumn(x1);
179 int row = mGrid.getRow(y1);
181 int leftDistance = mGrid.getColumnDistance(column, x1);
182 int rightDistance = mGrid.getColumnDistance(column + 1, x1);
183 int topDistance = mGrid.getRowDistance(row, y1);
184 int bottomDistance = mGrid.getRowDistance(row + 1, y1);
209 int column = (mGrid.getViewCount() == 0) ? 0 : mGrid.getClosestColumn(x1);
210 int columnX = mGrid.getColumnX(column);
224 int columnRight = (mGrid.getViewCount() == 0) ? 0 : mGrid.getClosestColumn(x2);
225 int rightDistance = mGrid.getColumnDistance(columnRight, x2);
227 int columnX = mGrid.getColumnX(columnRight);
228 if (columnX > mGrid.layout.getBounds().x) {
240 Collection<INode> intersectsRow = mGrid.getIntersectsRow(y1, y2);
257 int distance = mGrid.getRowDistance(row, y1);
268 int rowBottom = (mGrid.getViewCount() == 0) ? 0 : mGrid.getClosestRow(y2);
269 int distance = mGrid.getRowDistance(rowBottom, y2);
271 int rowY = mGrid.getRowY(rowBottom);
272 if (rowY > mGrid.layout.getBounds().y) {
285 int rowBaseline = mGrid.getBaseline(row);
306 boolean createCell = mGrid.getColumnX(mGrid.getColumn(matchedLine)) != matchedLine;
315 //boolean createCell = mGrid.getColumnX(mGrid.getColumn(matchedLine)) != matchedLine;
317 // mGrid.actualColumnCount - 1, createCell, MARGIN_SIZE));
320 int columnRight = mGrid.getColumn(x1 - SHORT_GAP_DP);
321 int columnX = mGrid.getColumnMaxX(columnRight);
325 boolean createCell = mGrid.getColumnX(mGrid.getColumn(matchedLine)) != matchedLine;
331 columnRight = mGrid.getColumn(x1);
332 columnX = mGrid.getColumnMaxX(columnRight);
351 boolean createCell = mGrid.getColumnX(mGrid.getColumn(matchedLine)) != matchedLine;
367 boolean createCell = mGrid.getRowY(mGrid.getRow(matchedLine)) != matchedLine;
376 //boolean createCell = mGrid.getRowY(mGrid.getRow(matchedLine)) != matchedLine;
378 // mGrid.actualRowCount - 1, createCell, MARGIN_SIZE));
381 int rowBottom = mGrid.getRow(y1 - SHORT_GAP_DP);
382 int rowY = mGrid.getRowMaxY(rowBottom);
386 boolean createCell = mGrid.getRowY(mGrid.getRow(matchedLine)) != matchedLine;
392 rowBottom = mGrid.getRow(y1);
393 rowY = mGrid.getRowMaxY(rowBottom);
398 boolean createCell = mGrid.getRowY(mGrid.getRow(matchedLine)) != matchedLine;
479 //int columnX = mGrid.getColumnX(column);
480 //int rowY = mGrid.getRowY(row);
482 mGrid.setGridAttribute(targetNode, ATTR_COLUMN_COUNT, 2);
483 //mGrid.setGridAttribute(targetNode, ATTR_COLUMN_COUNT, 3);
489 //mGrid.setGridAttribute(sc1, ATTR_LAYOUT_GRAVITY, VALUE_FILL_HORIZONTAL);
490 //mGrid.setGridAttribute(sr1, ATTR_LAYOUT_GRAVITY, VALUE_FILL_VERTICAL);
492 //mGrid.loadFromXml();
493 //column = mGrid.getColumn(columnX);
494 //row = mGrid.getRow(rowY);
501 column = mGrid.getColumn(startX);
510 row = mGrid.getRow(startY);
519 int endColumn = mGrid.getColumn(endX);
520 int endRow = mGrid.getRow(endY);
531 if (!mRowMatch.createCell && bounds.h <= MAX_CELL_DIFFERENCE * mGrid.getRowHeight(
538 if (!mColumnMatch.createCell && bounds.w <= MAX_CELL_DIFFERENCE * mGrid.getColumnWidth(
548 columnSpan = mGrid.actualColumnCount;
552 mGrid.applyPositionAttributes();
556 int columnWidthPx = mGrid.getColumnDistance(column, mColumnMatch.matchedLine);
560 int maxX = mGrid.getColumnMaxX(column);
587 mGrid.splitColumn(column, insertMarginColumn, columnWidthDp, mColumnMatch.matchedLine);
593 mGrid.loadFromXml();
598 int rowHeightPx = mGrid.getRowDistance(row, mRowMatch.matchedLine);
602 int maxY = mGrid.getRowMaxY(row);
627 mGrid.splitRow(row, insertMarginRow, rowHeightDp, mRowMatch.matchedLine);
631 mGrid.loadFromXml();
636 int index = mGrid.getInsertIndex(row, column);
641 GridModel.ViewData next = mGrid.getView(index);
654 mGrid.setGridAttribute(newChild, ATTR_LAYOUT_GRAVITY, VALUE_RIGHT);
656 mGrid.setGridAttribute(newChild, ATTR_LAYOUT_GRAVITY, VALUE_CENTER_HORIZONTAL);
658 mGrid.setGridAttribute(newChild, ATTR_LAYOUT_COLUMN, column);
666 mGrid.setGridAttribute(newChild, ATTR_LAYOUT_GRAVITY, value);
668 mGrid.setGridAttribute(newChild, ATTR_LAYOUT_ROW, row);
672 mGrid.setGridAttribute(newChild, ATTR_LAYOUT_COLUMN_SPAN, columnSpan);
675 mGrid.setGridAttribute(newChild, ATTR_LAYOUT_ROW_SPAN, rowSpan);
679 if (mGrid.actualColumnCount == 0) {
680 mGrid.setGridAttribute(mGrid.layout, ATTR_COLUMN_COUNT, Math.max(1, column + 1));
699 mGrid.addColumn(mColumnMatch.cellIndex,
703 mGrid.loadFromXml();
704 mGrid.addRow(mRowMatch.cellIndex, newChild, UNDEFINED, false, UNDEFINED, UNDEFINED);
707 mGrid.setGridAttribute(newChild, ATTR_LAYOUT_COLUMN, mColumnMatch.cellIndex);
708 mGrid.setGridAttribute(newChild, ATTR_LAYOUT_ROW, mRowMatch.cellIndex);
737 return mGrid;