@Override public boolean canCellGrow(RadContainer container, boolean isRow, int cellIndex) { final GridLayoutManager gridLayoutManager = ((GridLayoutManager) container.getLayout()); int maxSizePolicy = 0; for (int i = 0; i < gridLayoutManager.getCellCount(isRow); i++) { maxSizePolicy = Math.max(maxSizePolicy, gridLayoutManager.getCellSizePolicy(isRow, i)); } return gridLayoutManager.getCellSizePolicy(isRow, cellIndex) == maxSizePolicy; }
public void writeLayout(final XmlWriter writer, final RadContainer radContainer) { GridLayoutManager layout = (GridLayoutManager) radContainer.getLayout(); writer.addAttribute("row-count", layout.getRowCount()); writer.addAttribute("column-count", layout.getColumnCount()); writer.addAttribute( UIFormXmlConstants.ATTRIBUTE_SAME_SIZE_HORIZONTALLY, layout.isSameSizeHorizontally()); writer.addAttribute( UIFormXmlConstants.ATTRIBUTE_SAME_SIZE_VERTICALLY, layout.isSameSizeVertically()); RadXYLayoutManager.INSTANCE.writeLayout(writer, radContainer); }
public int[] getGridCellSizes(RadContainer container, boolean isRow) { GridLayoutManager grid = (GridLayoutManager) container.getLayout(); return isRow ? grid.getHeights() : grid.getWidths(); }
public int[] getGridCellCoords(RadContainer container, boolean isRow) { GridLayoutManager grid = (GridLayoutManager) container.getLayout(); return isRow ? grid.getYs() : grid.getXs(); }
@Override public int[] getVerticalGridLines(RadContainer container) { GridLayoutManager grid = (GridLayoutManager) container.getLayout(); return grid.getVerticalGridLines(); }
@Override public int getGridColumnCount(RadContainer container) { return ((GridLayoutManager) container.getLayout()).getColumnCount(); }