*
* @return pane.
*/
private JComponent buildMainPane()
{
final UserPreferences prefs = model.getUserPreferences();
final StarzPreferences starzPreferences = model.getStarzPreferences();
final FeedRenderingSettings feedRS = model.getGlobalRenderingSettings();
final ValueModel trigger = getTriggerChannel();
GeneralPreferencesPanel generalPanel = new GeneralPreferencesPanel(prefs, feedRS, trigger);
pnlAdvanced = new AdvancedPreferencesPanel(prefs, starzPreferences, feedRS, trigger);
TagsPreferencesPanel tagsPanel = new TagsPreferencesPanel(prefs, model.getServicePreferences(), trigger);
pages.addPage(Strings.message("userprefs.tab.general"), generalPanel);
pages.addPage(Strings.message("userprefs.tab.guides"), new GuidesPanel(feedRS, trigger, guidesFilterChanged));
pages.addPage(Strings.message("userprefs.tab.feeds"), new FeedsPanel(feedRS, prefs, trigger, feedsFilterChanged));
pages.addPage(Strings.message("userprefs.tab.articles"), new ArticlesPanel(prefs, trigger));
pages.addPage(Strings.message("userprefs.tab.tags"), tagsPanel);
pages.addPage(Strings.message("userprefs.tab.readinglists"), new ReadingListsPanel(prefs, trigger));
pages.addPage(Strings.message("userprefs.tab.blogs"),
new BloggingPreferencesPanel(this, trigger, prefs.getBloggingPreferences()));
pages.addPage(Strings.message("userprefs.tab.twitter"),
new TwitterPreferencesPanel(this, trigger, prefs.getTwitterPreferences()));
pages.addPage(Strings.message("userprefs.tab.notifications"), new NotificationsPanel(prefs, trigger));
pages.addPage(Strings.message("userprefs.tab.advanced"), pnlAdvanced);
pages.setBorder(BorderFactory.createEtchedBorder());
// Restore last selected page
if (!pages.selectPageByClass(selectedPanelClass))
{
int i = prefs.getSelectedPrefsPage();
if (i > -1 && i < pages.getSelector().getItemCount()) pages.getSelector().setSelectedIndex(i);
}
return pages;
}