public String serialize(IVkWidget widget)
{
StringBuffer buffer = new StringBuffer("{");
buffer.append("widgetName:'").append(widget.getWidgetName()).append("'");
buffer.append(",style:'").append(VkDesignerUtil.getCssText((Widget) widget)).append("'");
TabBar tabBar = (VkDecoratedTabBar)widget;
serializeAttributes(buffer, tabBar);
buffer.append(",tabs:[");
for(int i = 0; i < tabBar.getTabCount(); i++)
{
buffer.append("{html:").append("'").append(tabBar.getTabHTML(i)).append("',");
buffer.append("enabled:").append(tabBar.isTabEnabled(i)).append("},");
}
if(buffer.charAt(buffer.length() - 1) == ',')
buffer.deleteCharAt(buffer.length() - 1);
buffer.append("]").append(",selectedTab:").append(tabBar.getSelectedTab());
buffer.append(",children:[").append("]}");
return buffer.toString();
}