Lines Matching refs:grid
54 import com.android.ide.common.layout.grid.GridDropHandler;
55 import com.android.ide.common.layout.grid.GridLayoutPainter;
56 import com.android.ide.common.layout.grid.GridModel;
57 import com.android.ide.common.layout.grid.GridModel.ViewData;
84 * The size of the visual regular grid that we snap to (if {@link #sSnapToGrid} is set
98 * grid mode)
133 * Whether the IDE should show diagnostics for debugging the grid layout - including
138 /** Whether the structure (grid model) should be displayed persistently to the user */
141 /** Whether the drop positions should snap to a regular grid */
145 * Whether the grid is edited in "grid mode" where the operations are row/column based
210 GridModel grid = GridModel.get(mRulesEngine, parentNode, null);
212 grid.addRow(children);
214 grid.removeRows(children);
216 grid.addColumn(children);
218 grid.removeColumns(children);
228 actions.add(RuleAction.createToggle(ACTION_GRID_MODE, "Grid Model Mode",
231 // Add and Remove Column actions only apply in Grid Mode
258 // Snap to Grid and Show Structure are only relevant in free form mode
259 actions.add(RuleAction.createToggle(ACTION_SNAP, "Snap to Grid",
384 * preference when added to a grid layout
419 GridModel grid = GridModel.get(mRulesEngine, parent, null);
420 grid.onDeleted(deleted);
427 GridModel grid = getGrid(state);
428 GridLayoutPainter.paintResizeFeedback(gc, state.layout, grid);
434 GridModel grid = getGrid(state);
435 int startColumn = grid.getColumn(state.bounds.x);
436 int endColumn = grid.getColumn(state.bounds.x2());
439 int startRow = grid.getRow(state.bounds.y);
440 int endRow = grid.getRow(state.bounds.y2());
443 Rect cellBounds = grid.getCellBounds(startRow, startColumn, rowSpan, columnSpan);
449 /** Returns the grid size cached on the given {@link ResizeState} object */
451 GridModel grid = (GridModel) resizeState.clientData;
452 if (grid == null) {
453 grid = GridModel.get(mRulesEngine, resizeState.layout, resizeState.layoutView);
454 resizeState.clientData = grid;
457 return grid;
466 GridModel grid = getGrid(state);
467 ViewData view = grid.getView(node);
469 String gravityString = grid.getGridAttribute(view.node, ATTR_LAYOUT_GRAVITY);
490 grid.setGridAttribute(view.node, ATTR_LAYOUT_GRAVITY, gravityString);
500 GridModel grid = getGrid(state);
501 grid.setColumnSpanAttribute(node, columnSpan);
502 grid.setRowSpanAttribute(node, rowSpan);
504 ViewData view = grid.getView(node);
506 String gravityString = grid.getGridAttribute(view.node, ATTR_LAYOUT_GRAVITY);
517 grid.setGridAttribute(view.node, ATTR_LAYOUT_GRAVITY, gravityString);
563 GridModel grid = getGrid(state);
565 int startColumn = grid.getColumn(state.bounds.x);
566 int endColumn = grid.getColumn(state.bounds.x2());
569 int startRow = grid.getRow(state.bounds.y);
570 int endRow = grid.getRow(state.bounds.y2());
591 // TODO: Cache the grid
601 GridLayoutPainter.paintStructure(DrawingStyle.GRID,
606 // for for example tweaking the rowspan/colspan of a cell? (but only in grid mode)
615 * into the current grid. This might mean "overwriting" (sitting on top of)
617 * <li> Fill available "holes" in the grid.
661 // grid layout being copied from
663 GridModel grid = handler.getGrid();
664 grid.setGridAttribute(newChild, ATTR_LAYOUT_COLUMN, null);
665 grid.setGridAttribute(newChild, ATTR_LAYOUT_ROW, null);