@Override public LayoutManager copyLayout(LayoutManager layout, int rowDelta, int columnDelta) { GridLayoutManager oldLayout = (GridLayoutManager) layout; final GridLayoutManager newLayout = new GridLayoutManager( oldLayout.getRowCount() + rowDelta, oldLayout.getColumnCount() + columnDelta); newLayout.setMargin(oldLayout.getMargin()); newLayout.setHGap(oldLayout.getHGap()); newLayout.setVGap(oldLayout.getVGap()); return newLayout; }
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); }