rss.views
Interface View

All Known Implementing Classes:
QuickHTMLView, SimpleView

public interface View

Interface that must be implemented by all plug-in views. When a plug-in view is used by the application, a call to it's constructor with no arguments will be made. If the view does not contain a constructor with no arguments, the application will mark the view as "invalid."

Views will pass their GUI through an SWT Composite object which will be added as a tab in the application. The Composite should be generated when the call to generateComposite(Composite, Feed, Collection) is made. The view should display all the given FeedItems and mark then as "read" as seen appropriate. Any changes to Feed will be ignored. Feed is given as an argument so that the view can perform special operations or display extra information to the user.

The getName() method must return the name of the view. This name will be used to allow the user to choose his or her view.

Views should avoid making connections to outside sources such as the Internet or the file system. Instead, all such calls should be made through the application.

Remember support RSS Monkey by making great views! Have fun :D.

NOTE: Remeber to clearly specify the requirements for a view. For instance, any views that use the SWT Browser widget have strong outside dependecies and actually don't work on unconfigured Linux machines. The Browser widget requires certain browsers to be installed on the host operating system, and for specific environment variables to be set.

Author:
Karl E. Rieb

Method Summary
 Composite generateComposite(Composite parent, Feed feed, java.util.Collection<FeedItem> items)
          Called when the application wants to display the view.
 java.lang.String getName()
          Returns the name of the view.
 

Method Detail

generateComposite

Composite generateComposite(Composite parent,
                            Feed feed,
                            java.util.Collection<FeedItem> items)
Called when the application wants to display the view. Should return a Composite object that will be displayed in a tab in the application.

Parameters:
parent - The parent for the Composite object. All views should make this parent the parent of the Composite object returned by the method!
feed - Feed to be displayed
items - FeedItems that belong to the Feed to be displayed
Returns:
Composite object used to display the FeedItems to the user

getName

java.lang.String getName()
Returns the name of the view. This name is used to allow users to choose a view for a given Feed.

Returns:
Name of the view.