Package de.kopis.jusenet.nntp

Examples of de.kopis.jusenet.nntp.Article


    }

    public Object getValueAt(int rowIndex, int columnIndex) {
        Object o = null;
       
        Article a = data.get(rowIndex);
        switch(columnIndex) {
        case 0:
            o = a.getSubject();
            break;
        case 1:
            o = a.getAuthor();
            break;
        case 2:
            o = a.getSent();
            break;
        default:
            o = a.getSubject();
            break;
        }
       
        return o;
    }
View Full Code Here


        articleList.setCellRenderer(new ArticleCellRenderer());
        articleList.addListSelectionListener(new ListSelectionListener() {
            public void valueChanged(ListSelectionEvent e) {
                   if(e.getValueIsAdjusting()) return;
                  
                   Article a = (Article) articleList.getSelectedValue();
                   openArticle(a);
            }});
        articleList.addMouseListener(new MouseAdapter() {
            public void mousePressed(MouseEvent e) {
                if(SwingUtilities.isRightMouseButton(e)) {
View Full Code Here

    /**
     * Removes an Article from database.
     *
     */
    public void removeArticle() {
        Article a = (Article) articleList.getSelectedValue();
        HibernateUtils.remove(a);
    }
View Full Code Here

     * Marks an article read/unread.
     *
     * @param read
     */
    public void markread(boolean read) {
        Article a = (Article) articleList.getSelectedValue();
        if(a == null) {
            GuiUtils.showError("No article selected.");
        } else {
            HibernateUtils.markRead(a, read);
        }
View Full Code Here

    public static void markRead(Group group, boolean read) {
        Session session = getSessionFactory().getCurrentSession();
       
        session.beginTransaction();
        Iterator<Article> it = group.getArticles().iterator();
        Article a;
        while(it.hasNext()) {
            a = it.next();
            a.setRead(read);
            session.saveOrUpdate(a);
        }
        session.getTransaction().commit();
    }
View Full Code Here

TOP

Related Classes of de.kopis.jusenet.nntp.Article

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.