Examples of BufferedValueModel


Examples of com.jgoodies.binding.value.BufferedValueModel

        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)
View Full Code Here

Examples of com.jgoodies.binding.value.BufferedValueModel

    {
        PropertyAdapter propCheck, propCount;
        propCheck = new PropertyAdapter(settings, UserPreferences.PROP_PRESERVE_UNREAD);
        propCount = new PropertyAdapter(settings, "purgeCountString");

        BufferedValueModel modelCheck = null, modelCount;

        // The order of initialization dictates the order of events upon change.
        // We need checkbox event to be fired before the count when it wasn't selected initially,
        // and vice versa when it was.
        if (!settings.isPreserveUnread()) modelCheck = new BufferedValueModel(propCheck, triggerChannel);
        modelCount = new BufferedValueModel(propCount, triggerChannel);
        if (settings.isPreserveUnread()) modelCheck = new BufferedValueModel(propCheck, triggerChannel);

        chDoNotRemoveUnread = ComponentsFactory.createCheckBox(
            Strings.message("userprefs.tab.general.do.not.purge.unread.articles"),
            new ToggleButtonAdapter(modelCheck));
View Full Code Here

Examples of com.jgoodies.binding.value.BufferedValueModel

        tfSyncPeriod.setEnabled(false);

        chFeedList = ComponentsFactory.createCheckBox(
            Strings.message("service.sync.feed.list"),
            new ToggleButtonAdapter(new BufferedValueModel(new PropertyAdapter(servicePrefs,
                ServicePreferences.PROP_SYNC_FEEDS), triggerChannel)));
        chFeedList.addActionListener(new FullSyncEnabled());

        chPreferences = ComponentsFactory.createCheckBox(
            Strings.message("service.sync.preferences"),
            new ToggleButtonAdapter(new BufferedValueModel(new PropertyAdapter(servicePrefs,
                ServicePreferences.PROP_SYNC_PREFERENCES), triggerChannel)));

        new MandatoryCheckBoxController(chFeedList, chPreferences);
       
        tfEmail.setDocument(new DocumentAdapter(new BufferedValueModel(
                new PropertyAdapter(servicePrefs, "email"), triggerChannel)));

        tfPassword.setDocument(new DocumentAdapter(new BufferedValueModel(
                new PropertyAdapter(servicePrefs, "password"), triggerChannel)));

        tfSyncPeriod.setDocument(new DocumentAdapter(new BufferedValueModel(
                new PropertyAdapter(new ServicePreferencesWrapper(servicePrefs), "syncPeriod"),
                triggerChannel)));

        updateFullSyncButton();
        updateSyncDatesView();
View Full Code Here

Examples of com.jgoodies.binding.value.BufferedValueModel

        g1.add(rbUpdateManually);
        g1.add(rbUpdatePeriodically);

        setUpdatePeriodState();

        PeriodMonitor monitor = new PeriodMonitor(new BufferedValueModel(
            new PropertyAdapter(prefs, UserPreferences.PROP_READING_LIST_UPDATE_PERIOD),
            triggerChannel));

        rbUpdateManually.addChangeListener(monitor);
        rbUpdatePeriodically.addChangeListener(monitor);
        cbUpdatePeriod.addItemListener(monitor);

        ValueModel updatesModel = new BufferedValueModel(
            new PropertyAdapter(prefs, UserPreferences.PROP_ON_READING_LIST_UPDATE_ACTIONS),
            triggerChannel);

        // Applying changes
        rbChangeSilently = ComponentsFactory.createRadioButton(
            Strings.message("userprefs.tab.readinglists.action.accept.silently"),
            new RadioButtonAdapter(updatesModel,
            new Integer(UserPreferences.RL_UPDATE_NONE)));
        rbChangeWithNotification = ComponentsFactory.createRadioButton(
            Strings.message("userprefs.tab.readinglists.action.notify"),
            new RadioButtonAdapter(updatesModel,
            new Integer(UserPreferences.RL_UPDATE_NOTIFY)));
        rbChangeWithConfirmation = ComponentsFactory.createRadioButton(
            Strings.message("userprefs.tab.readinglists.action.confirm"),
            new RadioButtonAdapter(updatesModel,
            new Integer(UserPreferences.RL_UPDATE_CONFIRM)));

        // Get Latest command actions
        chUpdateFeeds = ComponentsFactory.createCheckBox(
            Strings.message("userprefs.tab.readinglists.command.latest.articles"),
            new ToggleButtonAdapter(new BufferedValueModel(new PropertyAdapter(prefs,
                UserPreferences.PROP_UPDATE_FEEDS), triggerChannel)));
        chUpdateReadingLists = ComponentsFactory.createCheckBox(
            Strings.message("userprefs.tab.readinglists.command.lists.changes"),
            new ToggleButtonAdapter(new BufferedValueModel(new PropertyAdapter(prefs,
                UserPreferences.PROP_UPDATE_READING_LISTS), triggerChannel)));

        new MandatoryCheckBoxController(chUpdateFeeds, chUpdateReadingLists);
    }
View Full Code Here

Examples of com.jgoodies.binding.value.BufferedValueModel

    private void initComponents(ValueModel triggerChannel)
    {
        chShowTipsBox = ComponentsFactory.createCheckBox(
            Strings.message("userprefs.tab.general.show.tip.of.the.day"),
            new ToggleButtonAdapter(new BufferedValueModel(TipOfTheDayDialog.showingTipsModel(),
                triggerChannel)));

        String msg = Strings.message("userprefs.tab.general.check.for.new.versions");
        if (ApplicationLauncher.isAutoUpdatesEnabled())
        {
            chDoUpdatesCheck = ComponentsFactory.createCheckBox(
                msg, new ToggleButtonAdapter(new BufferedValueModel(new PropertyAdapter(userPrefs,
                    UserPreferences.PROP_CHECKING_FOR_UPDATES_ON_STARTUP),
                    triggerChannel)));
        } else
        {
            msg = msg.replaceAll("&", "");
            chDoUpdatesCheck = new JCheckBox(msg);
            chDoUpdatesCheck.setSelected(true);
            chDoUpdatesCheck.setEnabled(false);
        }

        chAlwaysUseEnglish = ComponentsFactory.createCheckBox(
            Strings.message("userprefs.tab.advanced.always.use.english"),
            new ToggleButtonAdapter(new BufferedValueModel(new PropertyAdapter(userPrefs,
                UserPreferences.PROP_ALWAYS_USE_ENGLISH),
                triggerChannel)));
       
        tfInternetBrowser = new JTextField();
        tfInternetBrowser.setDocument(new DocumentAdapter(new BufferedValueModel(
            new PropertyAdapter(userPrefs, UserPreferences.PROP_INTERNET_BROWSER),
            triggerChannel)));

        if (BrowserLauncher.isUsingJWSBrowser())
        {
            tfInternetBrowser.setEnabled(false);
            tfInternetBrowser.setToolTipText(Strings.message("userprefs.tab.advanced.browser.tooltip.disabled"));
        } else
        {
            tfInternetBrowser.setEnabled(true);
            tfInternetBrowser.setToolTipText(Strings.message("userprefs.tab.advanced.browser.tooltip.enabled"));
        }

        initProxyComponents(triggerChannel);

        SpinnerModelAdapter spinModelFeedSelectionDelay = new SpinnerModelAdapter(
            new BoundedRangeAdapter(new BufferedValueModel(new PropertyAdapter(userPrefs,
                UserPreferences.PROP_FEED_SELECTION_DELAY), triggerChannel), 0, 0, 1000));
        spinModelFeedSelectionDelay.setStepSize(100);

        chAAText = createCheckBox(userPrefs, Strings.message("userprefs.tab.advanced.antialiased.fonts"),
            UserPreferences.PROP_AA_TEXT);

        // The following code registers listener on Apply/Accept actions to track down
        // changes in BlogStarz limits. If changes are detected then channel list is
        // repainted.

        saveInitialLimits();
        triggerChannel.addValueChangeListener(new PropertyChangeListener()
        {
            public void propertyChange(PropertyChangeEvent evt)
            {
                if (Boolean.TRUE.equals(evt.getNewValue())) doRepaintChannelList();
            }
        });

        chShowUnreadButtonMenu = createCheckBox(userPrefs,
            Strings.message("userprefs.tab.advanced.show.the.unread.buttons.menu"),
            UserPreferences.PROP_SHOW_UNREAD_BUTTON_MENU);

        SpinnerModelAdapter spinModelFeedImportLimit =
            new SpinnerModelAdapter(new BoundedRangeAdapter(
                new BufferedValueModel(new PropertyAdapter(userPrefs,
                    UserPreferences.PROP_FEED_IMPORT_LIMIT),
                    triggerChannel), 1, 1, UserPreferences.MAX_FEED_IMPORT_LIMITATION));
        spinModelFeedImportLimit.setStepSize(100);
        spinFeedImportLimit = new JSpinner(spinModelFeedImportLimit);

        initGuideComponents(triggerChannel);

        chHideOldArticles = createCheckBox(feedRS,
            Strings.message("userprefs.tab.articles.hide.articles.older.than"), "suppressingOlderThan");
        chDisplayFullTitles = createCheckBox(feedRS,
            Strings.message("userprefs.tab.articles.display.full.titles"), "displayingFullTitles");
        chSortingAscending = createCheckBox(feedRS,
            Strings.message("userprefs.tab.articles.sort.earlier.articles.first"), "sortingAscending");

        tfSuppressOlderThan = new JTextField();
        tfSuppressOlderThan.setDocument(new DocumentAdapter(new BufferedValueModel(
            new PropertyAdapter(feedRS, "suppressOlderThanString"), triggerChannel)));

        chCopyLinksInHREFFormat = createCheckBox(userPrefs,
            Strings.message("userprefs.tab.articles.use.href.format.for.links.copied.to.clipboard"),
            UserPreferences.PROP_COPY_LINKS_IN_HREF_FORMAT);
        chBrowseOnTitleDblClick = createCheckBox(userPrefs,
            Strings.message("userprefs.tab.articles.browse.on.double.click.over.the.title"),
            UserPreferences.PROP_BROWSE_ON_DBL_CLICK);

        chShowAppIconInSystray = createCheckBox(userPrefs,
            Strings.message("userprefs.tab.advanced.show.appicon.in.systray"),
            UserPreferences.PROP_SHOW_APPICON_IN_SYSTRAY);
        chMinimizeToSystray = createCheckBox(userPrefs,
            Strings.message("userprefs.tab.advanced.minimize.to.systray"),
            UserPreferences.PROP_MINIMIZE_TO_SYSTRAY);

        // Dock icon
        ValueModel modeModel = new BufferedValueModel(
            new BIDModeToStringConverter(new PropertyAdapter(userPrefs, UserPreferences.PROP_DIB_MODE)),
            triggerChannel);

        cbBIDMode = new JComboBox(new ComboBoxAdapter(BIDModeToStringConverter.MODES, modeModel));
    }
View Full Code Here

Examples of com.jgoodies.binding.value.BufferedValueModel

    }

    private void initGuideComponents(ValueModel triggerChannel)
    {
        // Guide selection mode group
        ValueModel gsmModel = new BufferedValueModel(
            new PropertyAdapter(userPrefs, UserPreferences.PROP_GUIDE_SELECTION_MODE),
            triggerChannel);

        rbGSMFirst = createRadioButton(gsmModel,
            UserPreferences.GSM_FIRST_FEED,
            Strings.message("userprefs.tab.guides.select.first.feed"));
        rbGSMLastSeen = createRadioButton(gsmModel,
            UserPreferences.GSM_LAST_SEEN_FEED,
            Strings.message("userprefs.tab.guides.select.last.seen.feed"));
        rbGSMNoFeed = createRadioButton(gsmModel,
            UserPreferences.GSM_NO_FEED,
            Strings.message("userprefs.tab.guides.select.no.feed"));

        // Publication
        chPing = createCheckBox(userPrefs,
            Strings.message("userprefs.tab.guides.ping.url"),
            UserPreferences.PROP_PING_ON_RL_PUBLICATION);
        chPing.addActionListener(new ActionListener()
        {
            public void actionPerformed(ActionEvent e)
            {
                updatePingURLState();
            }
        });
        tfPingURL = new JTextField();
        tfPingURL.setDocument(new DocumentAdapter(new BufferedValueModel(
            new PropertyAdapter(userPrefs, UserPreferences.PROP_PING_ON_RL_PUBLICATION_URL),
            triggerChannel)));
        updatePingURLState();

        String ttPing = Strings.message("userprefs.tab.guides.ping.wording");
View Full Code Here

Examples of com.jgoodies.binding.value.BufferedValueModel

    {
        chProxyEnabled = createCheckBox(userPrefs, Strings.message("userprefs.tab.advanced.use.proxy"),
            UserPreferences.PROP_PROXY_ENABLED);

        tfProxyHost = new JTextField();
        tfProxyHost.setDocument(new DocumentAdapter(new BufferedValueModel(
            new PropertyAdapter(userPrefs, UserPreferences.PROP_PROXY_HOST), triggerChannel)));

        lbProxyPort = ComponentsFactory.createLabel(Strings.message("userprefs.tab.advanced.use.proxy.port"));
        spinProxyPort = new JSpinner(new SpinnerModelAdapter(new BoundedRangeAdapter(
            new BufferedValueModel(new PropertyAdapter(userPrefs, UserPreferences.PROP_PROXY_PORT),
            triggerChannel), 80, 80, 65536)));
        spinProxyPort.setEditor(new JSpinner.NumberEditor(spinProxyPort, "#"));

        lbProxyExclusions = ComponentsFactory.createLabel(Strings.message("userprefs.tab.advanced.no.proxy.for"));
        tfProxyExclusions = new JTextField();
        tfProxyExclusions.setDocument(new DocumentAdapter(new BufferedValueModel(
            new PropertyAdapter(userPrefs, UserPreferences.PROP_PROXY_EXCLUSIONS), triggerChannel)));

        StateUpdatingToggleListener.install(chProxyEnabled, tfProxyHost, lbProxyPort, spinProxyPort,
            lbProxyExclusions, tfProxyExclusions);
    }
View Full Code Here

Examples of com.jgoodies.binding.value.BufferedValueModel

     * @return new JCheckbox.
     */
    private JCheckBox createCheckBox(Object obj, String label, String propertyName)
    {
        return ComponentsFactory.createCheckBox(label, new ToggleButtonAdapter(
            new BufferedValueModel(new PropertyAdapter(obj, propertyName), triggerChannel)));
    }
View Full Code Here

Examples of com.jgoodies.binding.value.BufferedValueModel

     * @return combo-box.
     */
    private static JComboBox createFilterComboBox(int cl, AbstractDisplayModeManager dmm, AtomicBoolean changed,
                                           ValueModel trigger)
    {
        JComboBox box = new JComboBox(new FilterClassesAdapter(new BufferedValueModel(
                        new DisplayModeModel(cl, dmm, changed),
                        trigger)));

        box.setRenderer(colorListCellRenderer);

View Full Code Here

Examples of com.jgoodies.binding.value.BufferedValueModel

            chSortingEnabled = ComponentsFactory.createCheckBox(
                Strings.message("userprefs.tab.feeds.sort"), aPrefs, UserPreferences.PROP_SORTING_ENABLED, trigger);
            chSortingEnabled.addActionListener(new SortingEnabledListener());

            cbSortClass1 = new JComboBox(new SortClassesAdapter(new BufferedValueModel(
                new PropertyAdapter(aPrefs, UserPreferences.PROP_SORT_BY_CLASS_1), trigger)));
            cbSortClass2 = new JComboBox(new SortClassesAdapter(new BufferedValueModel(
                new PropertyAdapter(aPrefs, UserPreferences.PROP_SORT_BY_CLASS_2), trigger)));
            chReverseSort1 = ComponentsFactory.createCheckBox(
                Strings.message("userprefs.tab.feeds.sort.reverse.1"),
                aPrefs, UserPreferences.PROP_REVERSED_SORT_BY_CLASS_1, trigger);
            chReverseSort2 = ComponentsFactory.createCheckBox(
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.