view
Interface View

All Known Implementing Classes:
FightView, MailBoxView, MinimalView, NewsPaperView, RandomView, TimelineView

public interface View

The view interface specifies what methods a view must implement to properly interact with a controller.

Author:
pgroudas

Method Summary
 org.eclipse.swt.widgets.Composite getComposite(org.eclipse.swt.widgets.Composite parent)
          getComposite returns a Composite instance that is displayed by the controller.
 Folder getParentOfSelected()
          gets the parent folder of the selected item
 Article getSelectedArticle()
          gets the currently selected article in the view.
 java.util.List<Article> getSelectedArticles()
          Gets the selected articles
 Feed getSelectedFeed()
          gets the currently selected feed in the view.
 java.util.List<Feed> getSelectedFeeds()
          Gets the selected feeds
 Folder getSelectedFolder()
          gets the currently selected folder in the view.
 java.util.List<Folder> getSelectedFolders()
          Gets the selected folders
 void setURL(java.lang.String url)
          Sets the url of a view's browser, if it has one.
 void update()
          The update method is called when the Controller wants the view to refresh.
 void updateArticle(Article a)
          updates the view of a particular article
 void updateArticles(Feed f)
          Updates the articles of the specified feed.
 void updateFeed(Feed f)
          updates the view of a particular feed
 void updateFolderContents(Folder f)
          updates the specified folder's contents
 void updateOutbox()
          updates the view of the outbox
 void updateTrash()
          updates the view of the trash
 

Method Detail

getComposite

org.eclipse.swt.widgets.Composite getComposite(org.eclipse.swt.widgets.Composite parent)
getComposite returns a Composite instance that is displayed by the controller.

Parameters:
parent - Composite
Returns:
Composite

getSelectedFeed

Feed getSelectedFeed()
                     throws NoItemSelectedException
gets the currently selected feed in the view.

Returns:
Feed selected feed.
Throws:
NoItemSelectedException - If no feed is currently selected.

getSelectedArticle

Article getSelectedArticle()
                           throws NoItemSelectedException
gets the currently selected article in the view.

Returns:
Article selected article.
Throws:
NoItemSelectedException - If no article is currently selected.

getSelectedArticles

java.util.List<Article> getSelectedArticles()
                                            throws NoItemSelectedException
Gets the selected articles

Returns:
List of Articles selected articles
Throws:
NoItemSelectedException - if no articles are selected

getSelectedFeeds

java.util.List<Feed> getSelectedFeeds()
                                      throws NoItemSelectedException
Gets the selected feeds

Returns:
List of feeds selected feeds
Throws:
NoItemSelectedException - if no Feeds are selected

getSelectedFolders

java.util.List<Folder> getSelectedFolders()
                                          throws NoItemSelectedException
Gets the selected folders

Returns:
List of Folders selected folders
Throws:
NoItemSelectedException

getSelectedFolder

Folder getSelectedFolder()
                         throws NoItemSelectedException
gets the currently selected folder in the view.

Returns:
Folder selected folder.
Throws:
NoItemSelectedException - If no folder is currently selected.

getParentOfSelected

Folder getParentOfSelected()
                           throws NoItemSelectedException
gets the parent folder of the selected item

Returns:
Throws:
NoItemSelectedException

updateFolderContents

void updateFolderContents(Folder f)
updates the specified folder's contents

Parameters:
f - Folder whose contents will be updated

update

void update()
The update method is called when the Controller wants the view to refresh.


updateArticles

void updateArticles(Feed f)
Updates the articles of the specified feed.

Parameters:
f -

updateArticle

void updateArticle(Article a)
updates the view of a particular article

Parameters:
a -

updateFeed

void updateFeed(Feed f)
updates the view of a particular feed

Parameters:
f -

updateOutbox

void updateOutbox()
updates the view of the outbox


updateTrash

void updateTrash()
updates the view of the trash


setURL

void setURL(java.lang.String url)
Sets the url of a view's browser, if it has one.

Parameters:
url -