Package com.salas.bb.domain

Examples of com.salas.bb.domain.IFeed


            return "HC";
        }

        protected Object calculate(Object key)
        {
            final IFeed feed = (IFeed)key;

            CompositeValue value = new CompositeValue();
            int highlights = 0;
            int articlesWithHighlights = 0;

            IArticle[] articles = feed.getArticles();
            for (int i = 0; i < articles.length; i++)
            {
                IArticle article = articles[i];
                int highlightsInArticle = getHighlightsCount(article.getPlainText());
View Full Code Here


     *                                                             
     * @return destination for "Next" command.
     */
    private synchronized Destination recalcNext(boolean unreadOnly)
    {
        IFeed destFeed = null;
        IFeed feed;
        IGuide guide;
        GuideModel model;

        feed = selectedFeed;
        guide = selectedGuide;
View Full Code Here

     *
     * @return destination for "Previous" command.
     */
    private synchronized Destination recalcPrev(boolean unreadOnly)
    {
        IFeed destFeed = null;
        IFeed feed;
        IGuide guide;
        GuideModel model;

        feed = selectedFeed;
        guide = selectedGuide;
View Full Code Here

    IFeed getNextInGuide(GuideModel model, IFeed currentFeed, boolean unreadOnly)
    {
        int size = model.getSize();
        int index = currentFeed == null ? -1 : model.indexOf(currentFeed);

        IFeed next = null;

        if (currentFeed != null && index == -1)
        {
            LOG.log(Level.SEVERE, MessageFormat.format(Strings.error("feed.does.not.belong.to.model.feed"),
                currentFeed));
View Full Code Here

    IFeed getPrevInGuide(GuideModel model, IFeed currentFeed, boolean unreadOnly)
    {
        int size = model.getSize();
        int index = currentFeed == null ? size : model.indexOf(currentFeed);

        IFeed prev = null;

        if (currentFeed != null && index == -1)
        {
            LOG.log(Level.SEVERE, MessageFormat.format(Strings.error("feed.does.not.belong.to.model.feed"),
                currentFeed));
View Full Code Here

    static void replaceFeedsWithShares(GuidesSet set, IGuide guide)
    {
        IFeed[] feeds = guide.getFeeds();
        for (IFeed feed : feeds)
        {
            IFeed existing = set.findFeed(feed);
            if (existing != null && existing != feed)
            {
                GuidesSet.replaceFeed(feed, existing);
            }
        }
View Full Code Here

     *
     * @param e action event details object.
     */
    public void actionPerformed(ActionEvent e)
    {
        final IFeed feed = GlobalModel.SINGLETON.getSelectedFeed();
        final IGuide guide = GlobalModel.SINGLETON.getSelectedGuide();

        // Reorderings are allowed only for standard guides
        if (!(guide instanceof StandardGuide)) return;

        StandardGuide sguide = (StandardGuide)guide;

        final GuideModel model = GlobalModel.SINGLETON.getGuideModel();

        // Move channel up one step if it's not already top-most.
        final int index = model.indexOf(feed);
        if (feed != null && index > 0)
        {
            // Get real index
            IFeed entry = (IFeed)model.getElementAt(index - 1);
            int realIndex = guide.indexOf(entry);

            // This selection clearing is mandatory. When we kill the last channel in the list
            // by moving it up selection moves out of bounds. To prevent this error we
            // need to disable selection prior to moving channel.
View Full Code Here

        String articleTitle = article.getTitle();
        String articleText = article.getHtmlText();
        String articleAuthor = article.getAuthor();
        String articleLink = toString(article.getLink());

        IFeed feed = article.getFeed();
        String feedTitle, feedAuthor, feedLink;
        feedTitle = feed == null ? "Unknown" : feed.getTitle();
        feedAuthor = (feed instanceof DirectFeed) ? ((DirectFeed)feed).getAuthor() : "";
        feedLink = (feed instanceof NetworkFeed) ? toString(((NetworkFeed)feed).getXmlURL()) : "";

        String stylesheetTag = "<link rel=\"stylesheet\" type=\"text/css\" href=\"" + folder + "style.css\" />";
View Full Code Here

            URL url = article.getLink();

            if (url != null)
            {
                // Register clickthrough
                IFeed feed = article.getFeed();
                if (feed != null) feed.setClickthroughs(feed.getClickthroughs() + 1);

                final UserPreferences preferences = model.getUserPreferences();
                BrowserLauncher.showDocument(url, preferences.getInternetBrowser());
            }
        }
View Full Code Here

    public void actionPerformed(ActionEvent e)
    {
        IFeed[] selectedFeeds = GlobalController.SINGLETON.getSelectedFeeds();
        for (int i = 0; i < selectedFeeds.length; i++)
        {
            IFeed selectedFeed = selectedFeeds[i];
            GlobalController.SINGLETON.updateFeed(selectedFeed);
        }
    }
View Full Code Here

TOP

Related Classes of com.salas.bb.domain.IFeed

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.