view.timelineView
Class TimelineView

java.lang.Object
  extended by view.timelineView.TimelineView
All Implemented Interfaces:
View

public class TimelineView
extends java.lang.Object
implements View

Timeline View is an implementation of the View interface that allows the user to perform a search, and organizes as a timeline

Author:
pgroudas

Field Summary
private  java.util.List<Article> articles
           
private  org.eclipse.swt.browser.Browser browser
           
private  Controller control
           
private  org.eclipse.swt.widgets.Label label
           
private  org.eclipse.swt.widgets.Slider mySlider
           
private  org.eclipse.swt.widgets.Text searchText
           
 
Constructor Summary
TimelineView(Controller c)
           
 
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()
          Not implemented for this view
 Article getSelectedArticle()
          Not implemented for this view
 java.util.List<Article> getSelectedArticles()
          Not implemented for this view
 Feed getSelectedFeed()
          Not implemented for this view
 java.util.List<Feed> getSelectedFeeds()
          Not implemented for this view
 Folder getSelectedFolder()
          Not implemented for this view
 java.util.List<Folder> getSelectedFolders()
          Not implemented for this view
private  void processSearch()
          Ensures that there is text before search is performed, then performs search and sets up the slider to behave properly
private  void setupSlider()
          Sets min and max value of slider so there are the right number of locations for each article.
 void setURL(java.lang.String url)
          Sets the url of the browser
 void update()
          Not implemented for this view
 void updateArticle(Article a)
          Not implemented for this view
 void updateArticles(Feed f)
          Not implemented for this view
 void updateFeed(Feed f)
          Not implemented for this view
 void updateFolderContents(Folder f)
          Not implemented for this view
 void updateOutbox()
          Not implemented for this view
 void updateTrash()
          Not implemented for this view
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

browser

private org.eclipse.swt.browser.Browser browser

control

private Controller control

articles

private java.util.List<Article> articles

mySlider

private org.eclipse.swt.widgets.Slider mySlider

searchText

private org.eclipse.swt.widgets.Text searchText

label

private org.eclipse.swt.widgets.Label label
Constructor Detail

TimelineView

public TimelineView(Controller c)
Method Detail

getComposite

public org.eclipse.swt.widgets.Composite getComposite(org.eclipse.swt.widgets.Composite parent)
Description copied from interface: View
getComposite returns a Composite instance that is displayed by the controller.

Specified by:
getComposite in interface View
Parameters:
parent - Composite
Returns:
Composite

processSearch

private void processSearch()
Ensures that there is text before search is performed, then performs search and sets up the slider to behave properly


setupSlider

private void setupSlider()
Sets min and max value of slider so there are the right number of locations for each article. Disables slider if there were no search results


setURL

public void setURL(java.lang.String url)
Sets the url of the browser

Specified by:
setURL in interface View
Parameters:
url - String url

getSelectedFeed

public Feed getSelectedFeed()
                     throws NoItemSelectedException
Not implemented for this view

Specified by:
getSelectedFeed in interface View
Returns:
Feed selected feed.
Throws:
NoItemSelectedException - If no feed is currently selected.

getSelectedArticle

public Article getSelectedArticle()
                           throws NoItemSelectedException
Not implemented for this view

Specified by:
getSelectedArticle in interface View
Returns:
Article selected article.
Throws:
NoItemSelectedException - If no article is currently selected.

getSelectedArticles

public java.util.List<Article> getSelectedArticles()
                                            throws NoItemSelectedException
Not implemented for this view

Specified by:
getSelectedArticles in interface View
Returns:
List of Articles selected articles
Throws:
NoItemSelectedException - if no articles are selected

getSelectedFeeds

public java.util.List<Feed> getSelectedFeeds()
                                      throws NoItemSelectedException
Not implemented for this view

Specified by:
getSelectedFeeds in interface View
Returns:
List of feeds selected feeds
Throws:
NoItemSelectedException - if no Feeds are selected

getSelectedFolders

public java.util.List<Folder> getSelectedFolders()
                                          throws NoItemSelectedException
Not implemented for this view

Specified by:
getSelectedFolders in interface View
Returns:
List of Folders selected folders
Throws:
NoItemSelectedException

getSelectedFolder

public Folder getSelectedFolder()
                         throws NoItemSelectedException
Not implemented for this view

Specified by:
getSelectedFolder in interface View
Returns:
Folder selected folder.
Throws:
NoItemSelectedException - If no folder is currently selected.

getParentOfSelected

public Folder getParentOfSelected()
                           throws NoItemSelectedException
Not implemented for this view

Specified by:
getParentOfSelected in interface View
Returns:
Throws:
NoItemSelectedException

updateFolderContents

public void updateFolderContents(Folder f)
Not implemented for this view

Specified by:
updateFolderContents in interface View
Parameters:
f - Folder whose contents will be updated

update

public void update()
Not implemented for this view

Specified by:
update in interface View

updateArticles

public void updateArticles(Feed f)
Not implemented for this view

Specified by:
updateArticles in interface View

updateArticle

public void updateArticle(Article a)
Not implemented for this view

Specified by:
updateArticle in interface View

updateFeed

public void updateFeed(Feed f)
Not implemented for this view

Specified by:
updateFeed in interface View

updateOutbox

public void updateOutbox()
Not implemented for this view

Specified by:
updateOutbox in interface View

updateTrash

public void updateTrash()
Not implemented for this view

Specified by:
updateTrash in interface View