private void initComponents(UserPreferences settings, FeedRenderingSettings frs,
ValueModel triggerChannel)
{
chReadOnChanChange = ComponentsFactory.createCheckBox(
Strings.message("userprefs.tab.general.when.changing.feeds.mark.all.articles.read"),
new ToggleButtonAdapter(
new BufferedValueModel(new PropertyAdapter(settings,
UserPreferences.PROP_MARK_READ_WHEN_CHANGING_CHANNELS), triggerChannel)));
chReadOnGuideChange = ComponentsFactory.createCheckBox(
Strings.message("userprefs.tab.general.when.changing.guides.mark.all.articles.read"),
new ToggleButtonAdapter(
new BufferedValueModel(new PropertyAdapter(settings,
UserPreferences.PROP_MARK_READ_WHEN_CHANGING_GUIDES), triggerChannel)));
chReadOnDelay = ComponentsFactory.createCheckBox(
Strings.message("userprefs.tab.general.mark.article.as.read.on.delay"),
new ToggleButtonAdapter(
new BufferedValueModel(new PropertyAdapter(settings,
UserPreferences.PROP_MARK_READ_AFTER_DELAY), triggerChannel)));
tfReadOnDelaySeconds = new JTextField();
tfReadOnDelaySeconds.setDocument(new DocumentAdapter(new BufferedValueModel(
new PropertyAdapter(settings, "markReadAfterSecondsString"), triggerChannel)));
configurePurgeControls(settings, triggerChannel);
rssPollInterval = new JTextField();
rssPollInterval.setDocument(new DocumentAdapter(new BufferedValueModel(
new PropertyAdapter(settings, "rssPollIntervalString"), triggerChannel)));
cbTheme = new JComboBox();
ValueModel valueModel = new BufferedValueModel(
new PropertyAdapter(frs, RenderingSettingsNames.THEME), triggerChannel);
cbTheme.setModel(new ThemeListModel(valueModel));
cbFontFamilies = new JComboBox();
final BufferedValueModel vmMainFont = new BufferedValueModel(
new MainFontFamilyValueModel(frs), triggerChannel);
cbFontFamilies.setModel(new FontFamiliesListModel(vmMainFont));
valueModel.addValueChangeListener(new PropertyChangeListener()
{
public void propertyChange(PropertyChangeEvent evt)
{
Theme theme = (Theme)evt.getNewValue();
Font newFont = theme.getMainFontDirect();
vmMainFont.setValue(newFont.getFamily());
}
});
chShowToolbar = ComponentsFactory.createCheckBox(
Strings.message("userprefs.tab.general.show.toolbar"),
new ToggleButtonAdapter(new BufferedValueModel(new PropertyAdapter(settings,
UserPreferences.PROP_SHOW_TOOLBAR), triggerChannel)));
chShowToolbarLabels = ComponentsFactory.createCheckBox(
Strings.message("userprefs.tab.general.show.toolbar.labels"),
new ToggleButtonAdapter(new BufferedValueModel(new PropertyAdapter(settings,
UserPreferences.PROP_SHOW_TOOLBAR_LABELS), triggerChannel)));
chShowToolbar.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)