Package com.salas.bb.domain.prefs

Examples of com.salas.bb.domain.prefs.UserPreferences


     *
     * @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;
    }
View Full Code Here


    {
        if (feed == null || feed.getID() == -1 || !(feed instanceof DirectFeed)) return;
        DirectFeed dFeed = (DirectFeed)feed;

        GlobalModel model = GlobalModel.SINGLETON;
        UserPreferences preferences = model.getUserPreferences();
        BrowserLauncher.showDocument(dFeed.getSiteURL(), preferences.getInternetBrowser());
    }
View Full Code Here

        Dimension size = new Dimension(400, 300);
        text.setMinimumSize(size);
        text.setMaximumSize(size);
        text.setPreferredSize(size);

        final UserPreferences preferences = GlobalModel.SINGLETON.getUserPreferences();
        text.addHyperlinkListener(new BrowserLauncher.LinkListener(preferences));

        panel.add(new JScrollPane(text), BorderLayout.CENTER);

        String tutS = ResourceUtils.getString(ResourceID.URL_ABOUT);
View Full Code Here

     * Invoked when user clicks on the link.
     */
    protected void doAction()
    {
        URL aLink = getLink();
        UserPreferences prefs = GlobalModel.SINGLETON.getUserPreferences();
        if (aLink != null) BrowserLauncher.showDocument(aLink, prefs.getInternetBrowser());
    }
View Full Code Here

        display.addListener(new FeedDisplayListener());

        GlobalModel model = GlobalModel.SINGLETON;
        if (model != null)
        {
            UserPreferences prefs = model.getUserPreferences();
            initMarker(aDisplay, prefs);
        }
    }
View Full Code Here

         */
        private void checkForNewVersion()
        {
            if (!ApplicationLauncher.isAutoUpdatesEnabled()) return;

            UserPreferences prefs = model.getUserPreferences();
            boolean checkForUpdateOnStartup = prefs.isCheckingForUpdatesOnStartup();
            if (checkForUpdateOnStartup)
            {
                // Check for updates as soon as the service becomes available
                ConnectionState connectionState = getConnectionState();
                connectionState.callWhenServiceIsAvailable(new CheckForNewVersionTask());
View Full Code Here

                public void run()
                {
                    final TagsRepository repository = TagsRepository.getInstance();
                    repository.loadFromGuidesSet(aGuidesSet);

                    UserPreferences prefs = model.getUserPreferences();
                    final String user = prefs.getTagsDeliciousUser();
                    final String password = prefs.getTagsDeliciousPassword();

                    if (StringUtils.isNotEmpty(user) && StringUtils.isNotEmpty(password))
                    {
                        try
                        {
View Full Code Here

    /**
     * Invoked when user changes the setup.
     */
    private void onSetupChange()
    {
        UserPreferences prefs = GlobalModel.SINGLETON.getUserPreferences();

        // Find the target guide
        IGuide guide = null;
        String title = prefs.getWhTargetGuide();
        if (StringUtils.isNotEmpty(title))
        {
            Collection<IGuide> guides = guidesSet.findGuidesByTitle(title);
            if (guides.size() > 0) guide = guides.iterator().next();
        }

        model.setSetup(prefs.getWhIgnore(), prefs.isWhNoSelfLinks(), prefs.isWhSuppressSameSourceLinks(), guide);
    }
View Full Code Here

     * @param full              TRUE to perform full initialization. FALSE to create only
     *                          this model object.
     */
    public GlobalModel(ScoresCalculator scoresCalculator, boolean full)
    {
        userPreferences = new UserPreferences();
        servicePreferences = new ServicePreferences();
        starzPreferences = new StarzPreferences();
        globalRenderingSettings = new FeedRenderingSettings();
        globalRenderingSettings.setParent(new DefaultFRS());

View Full Code Here

     *
     * @param e action event details object.
     */
    public void actionPerformed(ActionEvent e)
    {
        UserPreferences preferences = GlobalModel.SINGLETON.getUserPreferences();
        BrowserLauncher.showDocument(link, preferences.getInternetBrowser());
    }
View Full Code Here

TOP

Related Classes of com.salas.bb.domain.prefs.UserPreferences

Copyright © 2018 www.massapicom. 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.