void (final XmlWriter writer, final RadContainer radContainer) { final AbstractLayout layout = (AbstractLayout)radContainer.getLayout(); // It has sense to save hpap and vgap even for XY layout. The reason is // that XY was previously GRID with non default gaps, so when the user // compose XY into the grid again then he will get the same non default gaps. writer.addAttribute(UIFormXmlConstants.ATTRIBUTE_HGAP, layout.getHGap()); writer.addAttribute(UIFormXmlConstants.ATTRIBUTE_VGAP, layout.getVGap()); // Margins final Insets margin = layout.getMargin(); writer.startElement("margin"); try { writer.writeInsets(margin); } finally { writer.endElement(); // margin } }