void (final XmlWriter writer, final RadComponent child) { writer.startElement(UIFormXmlConstants.ELEMENT_TABBEDPANE); try{ final JComponent delegee = child.getDelegee(); final JTabbedPane tabbedPane = getTabbedPane(); final int i = tabbedPane.indexOfComponent(delegee); if (i == -1) { throw new IllegalArgumentException("cannot find tab for " + child); } final HashMap<String, LwTabbedPane.Constraints> id2Constraints = getId2Constraints(RadTabbedPane.this); final LwTabbedPane.Constraints tabTitleConstraints = id2Constraints.get(child.getId()); if (tabTitleConstraints != null) { writer.writeStringDescriptor(tabTitleConstraints.myTitle, UIFormXmlConstants.ATTRIBUTE_TITLE, UIFormXmlConstants.ATTRIBUTE_TITLE_RESOURCE_BUNDLE, UIFormXmlConstants.ATTRIBUTE_TITLE_KEY); if (tabTitleConstraints.myIcon != null) { writer.addAttribute(UIFormXmlConstants.ATTRIBUTE_ICON, tabTitleConstraints.myIcon.getIconPath()); } if (tabTitleConstraints.myDisabledIcon != null) { writer.addAttribute(UIFormXmlConstants.ATTRIBUTE_DISABLED_ICON, tabTitleConstraints.myDisabledIcon.getIconPath()); } if (!tabTitleConstraints.myEnabled) { writer.addAttribute(UIFormXmlConstants.ATTRIBUTE_ENABLED, false); } if (tabTitleConstraints.myToolTip != null) { writer.startElement(UIFormXmlConstants.ELEMENT_TOOLTIP); writer.writeStringDescriptor(tabTitleConstraints.myToolTip, UIFormXmlConstants.ATTRIBUTE_VALUE, UIFormXmlConstants.ATTRIBUTE_RESOURCE_BUNDLE, UIFormXmlConstants.ATTRIBUTE_KEY); writer.endElement(); } } else { final String title = tabbedPane.getTitleAt(i); writer.addAttribute(UIFormXmlConstants.ATTRIBUTE_TITLE, title != null ? title : ""); } } finally{ writer.endElement(); } }