void (final XmlWriter writer) { writer.startElement(UIFormXmlConstants.ELEMENT_BORDER); try { writer.addAttribute(UIFormXmlConstants.ATTRIBUTE_TYPE, getBorderType().getId()); if (getBorderTitle() != null) { final StringDescriptor descriptor = getBorderTitle(); writer.writeStringDescriptor(descriptor, UIFormXmlConstants.ATTRIBUTE_TITLE, UIFormXmlConstants.ATTRIBUTE_TITLE_RESOURCE_BUNDLE, UIFormXmlConstants.ATTRIBUTE_TITLE_KEY); } if (myBorderTitleJustification != 0) { writer.addAttribute(UIFormXmlConstants.ATTRIBUTE_TITLE_JUSTIFICATION, myBorderTitleJustification); } if (myBorderTitlePosition != 0) { writer.addAttribute(UIFormXmlConstants.ATTRIBUTE_TITLE_POSITION, myBorderTitlePosition); } if (myBorderTitleFont != null) { writer.startElement(UIFormXmlConstants.ELEMENT_FONT); writer.writeFontDescriptor(myBorderTitleFont); writer.endElement(); } if (myBorderTitleColor != null) { writer.startElement(UIFormXmlConstants.ELEMENT_TITLE_COLOR); writer.writeColorDescriptor(myBorderTitleColor); writer.endElement(); } if (myBorderSize != null) { writer.startElement(UIFormXmlConstants.ELEMENT_SIZE); writer.writeInsets(myBorderSize); writer.endElement(); } if (myBorderColor != null) { writer.startElement(UIFormXmlConstants.ELEMENT_COLOR); writer.writeColorDescriptor(myBorderColor); writer.endElement(); } } finally { writer.endElement(); // border } }