taDescription = ComponentsFactory.createInstructionsArea("");
loadCategoriesLookup();
ValueModel mdlDefaultCategory = new PropertyAdapter(proxy, TargetBlog.PROP_DEFAULT_CATEGORY, true);
ComboBoxAdapter adapter = new ComboBoxAdapter((ListModel)lmdlCategories, mdlDefaultCategory);
cbDefaultCategory = new JComboBox(adapter);
ValueModel mdlBlog = new PropertyAdapter(proxy, TargetBlog.PROP_BLOG, true);
adapter = new ComboBoxAdapter((ListModel)lmdlBlogs, mdlBlog);
cbBlog = new JComboBox(adapter);
ValueModel mdlDraft = new PropertyAdapter(proxy, TargetBlog.PROP_DRAFT, true);
rbPublic.setModel(new RadioButtonAdapter(mdlDraft, Boolean.FALSE));
rbDraft.setModel(new RadioButtonAdapter(mdlDraft, Boolean.TRUE));
Collection apis = WeblogAPIs.getWeblogAPIs();
ValueModel mdlAPIs = new PropertyAdapter(proxy, TargetBlog.PROP_API_TYPE, true);
vmAPI = new BufferedValueModel(mdlAPIs, trigger);
adapter = new ComboBoxAdapter(apis.toArray(), vmAPI);
cbWeblogAPIType = new JComboBox(adapter);
vmAPI.addPropertyChangeListener(new WeblogTypeChangeListener());
btnSetup = new JButton(new SetupAction(parent));
btnFetchCategories = new JButton();
actFetchCategories = new FetchCategoriesAction(); // It uses btnFetchCategories (hence the order)
btnFetchCategories.setAction(actFetchCategories);
btnFetchBlogs = new JButton();
actFetchBlogs = new FetchBlogsAction(); // It uses btnFetchBlogs (hence the order)
btnFetchBlogs.setAction(actFetchBlogs);
// Templates
Set<String> templateNames = Templates.getUserTemplates().keySet();
lmTemplateNames = new ArrayListModel(templateNames);
ValueModel mdlTemplates = new PropertyAdapter(proxy, TargetBlog.PROP_TEMPLATE_NAME, true);
cbTemplate = new JComboBox(new ComboBoxAdapter((ListModel)lmTemplateNames, mdlTemplates));
btnTemplateEditor = new JButton(new TemplateEditorAction());
proxy.addPropertyChangeListener(TargetBlogProxy.PROP_BLOG_PREFERENCES, this);
updateViewState();