fable.gui
Class AbstractFeedView

java.lang.Object
  extended by Composite
      extended by fable.gui.AbstractFeedView
Direct Known Subclasses:
FeedView

public abstract class AbstractFeedView
extends Composite

This class is a component of the GUI. It displays a a list of articles in a given feed, and the details of a selected article. All interaction between this class and other classes are handled by the concrete class which extends this one (and the MessageHandler class).

Author:
Weijie Yuan, Christopher Moh, Yongjin Kim (DND Only)

Constructor Summary
AbstractFeedView(Composite parent, int style, FableManager fbm)
          Instantiates the class with the given parent and styles
 
Method Summary
 void clearArticleView()
          Clears the article view, making it blank
 void clearFeedView()
          Clears the feed view, making it blank
protected  Article currentArticle()
          Gets the currently selected article
 java.lang.String getFeedName()
          Returns the name of the current feed
protected  void showArticle(Article article)
          Displays the article in the Article View
 void showFeed(FableContainer feed)
          Displays the list of articles contained in the feed in the feed view
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractFeedView

public AbstractFeedView(Composite parent,
                        int style,
                        FableManager fbm)
Instantiates the class with the given parent and styles

Parameters:
parent - the parent of this component
style - the style
Method Detail

showFeed

public void showFeed(FableContainer feed)
Displays the list of articles contained in the feed in the feed view

Parameters:
feed - the feed whose articles is to be displayed

currentArticle

protected Article currentArticle()
Gets the currently selected article

Returns:
current article being shown

showArticle

protected void showArticle(Article article)
Displays the article in the Article View

Parameters:
article - the article to be displayed in the article view
Requires:
articles != null

clearFeedView

public void clearFeedView()
Clears the feed view, making it blank


clearArticleView

public void clearArticleView()
Clears the article view, making it blank


getFeedName

public java.lang.String getFeedName()
Returns the name of the current feed