Examples of IArticle


Examples of com.salas.bb.domain.IArticle

        lbDate.setFont(font);
        add(lbDate, cc.xy(6, 2));

        if (aItem.getObject() instanceof IArticle)
        {
            IArticle article = (IArticle)aItem.getObject();

            lbPin = new ArticlePinControl(article);
            add(lbPin, cc.xy(10, 2));

            lbUnread = new ArticleReadControl(article);
            add(lbUnread, cc.xy(8, 2));

            // Setup the tooltip and delegate the mouse events to the parent (this panel)
            IFeed feed = article.getFeed();
            lbTitle.setToolTipText(feed == null ? null : feed.getTitle());
            DelegatingMouseListener ml = new DelegatingMouseListener(lbTitle, false, 2);
            lbTitle.addMouseListener(ml);
        }
View Full Code Here

Examples of com.salas.bb.domain.IArticle

        if (selectedItem != null)
        {
            Object o = selectedItem.getItem().getObject();
            if (o instanceof IArticle)
            {
                IArticle article = (IArticle)o;

                GlobalController.readArticles(!article.isRead(),
                    null,
                    null,
                    article);
            }
        }
View Full Code Here

Examples of com.salas.bb.domain.IArticle

        if (selectedItem != null)
        {
            Object o = selectedItem.getItem().getObject();
            if (o instanceof IArticle)
            {
                IArticle article = (IArticle)o;
                GlobalController.pinArticles(!article.isPinned(),
                    null,
                    null,
                    article);
            }
        }
View Full Code Here

Examples of com.salas.bb.domain.IArticle

            if (!feed.isVisible() || cnt == 0) return false;

            for (int i = 0; i < cnt; i++)
            {
                IArticle article = feed.getArticleAt(i);
                Date pubdate = article.getPublicationDate();

                // The feed is ineligible when there is an article published
                // after the threshold.
                if (pubdate != null && pubdate.after(threshold)) return false;
            }
View Full Code Here

Examples of com.salas.bb.domain.IArticle

            {
                // Find the date of last publication
                int count = feed.getArticlesCount();
                for (int i = 0; i < count; i++)
                {
                    IArticle article = feed.getArticleAt(i);
                    Date date = article.getPublicationDate();
                    long pd = date == null ? 0 : date.getTime();
                    lastPubDate = Math.max(lastPubDate, pd);
                }
            }
        }
View Full Code Here

Examples of com.salas.bb.domain.IArticle

            long lastUpdateTime = ((IFeed)object).getLastUpdateTime();
            date = lastUpdateTime == -1L ? null : new Date(lastUpdateTime);
            priority = false;
        } else
        {
            IArticle article = (IArticle)object;
            date = article.getPublicationDate();
            priority = article.isPinned();

            IFeed feed = article.getFeed();
            if (feed.getType() == FeedType.IMAGE)
            {
                type = ResultItemType.PICTURE;
            } else
            {
View Full Code Here

Examples of com.salas.bb.domain.IArticle

            {
                IFeed feed = (IFeed)obj;
                selectFeed(feed);
            } else if (obj instanceof IArticle)
            {
                IArticle article = (IArticle)obj;
                controller.selectArticle(article);
            }
        }
View Full Code Here

Examples of com.salas.bb.domain.IArticle

    public boolean match(Object target, IComparisonOperation operation, String value)
    {
        if (target == null) throw new NullPointerException("Article can't be null");
        if (value == null) throw new NullPointerException("Value can't be null");

        IArticle article = (IArticle)target;
        String text = article.getPlainText();
        String title = article.getTitle();
        if (title == null) title = "";

        return operation.match(title + " " + text, value);
    }
View Full Code Here

Examples of com.salas.bb.domain.IArticle

     */
    public PostData getPostData(Template template)
    {
        String title = null;
        String text = null;
        IArticle source = null;

        IArticle[] articles = GlobalModel.SINGLETON.getSelectedArticles();
        if (articles != null && articles.length > 0)
        {
            // Prepare data for the first article
            IArticle article = articles[0];
            title            = article.getTitle();
            source           = article;

            String selectedText = getSelectedText();
            if (articles.length > 1)
            {
View Full Code Here

Examples of com.salas.bb.domain.IArticle

     * @throws ClassCastException       if target is not supported.
     * @throws IllegalArgumentException if operation is not supported.
     */
    public boolean match(Object target, IComparisonOperation operation, String value)
    {
        IArticle article = (IArticle)target;
        String targetValue = statusToValue(article);

        return operation.match(targetValue, value);
    }
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.