net.sourceforge.java.feednread.frontend.components
Class NewsContentView

java.lang.Object
  extended bynet.sourceforge.java.feednread.frontend.components.NewsContentView

public class NewsContentView
extends Object

Displays the content fo a single NewsFeedEntry in a internal Browser. Optionally creates a drop down menu from which an enclosure or podcast, if any, may be selected for download by the end-user.

Author:
Sebastian Machhausen

Field Summary
private  ToolBar enclosureToolBar
           The ToolBar component to show a drop down menu of all embedded enclosures
private  ToolBarManager enclosureToolBarManager
           The ToolBarManager responsible of managing the EnclosureListAction which defines all single EnclosureActions
private  MainApplicationWindow mainWindow
           The Feed'n Read main window
private  Browser newsBrowser
           The internal Browser shoing the news content
private  ViewForm newsContentForm
           The container holding the component itself
private  Composite newsContentPanel
           The container holding all components
private  Hyperlink newsHyperlink
           The Hyperlink showing the news link
private  Label newsTitle
           The Label<(code> showing the news title
 
Constructor Summary
NewsContentView(Composite parent, MainApplicationWindow mainWindow)
           Creates a new NewsContentView instance which is used to display a single news.
 
Method Summary
 void clear()
           Clears this NewsContentView.
private  void createComponents(Composite parent)
           Creates the components used in the context of this NewsContentView.
 boolean isVisible()
           Gets the visibility status of this NewsContentView component.
 void setNews(NewsFeedEntry news)
           Sets the news displayed in this NewsContentView.
 void setVisible(boolean visible)
           Sets the visibility status of this NewsContentView component.
private  void showEnclosures(NewsFeedEntry entry)
           Shows the enclosures embedded in the specified NewsFeedEntry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mainWindow

private MainApplicationWindow mainWindow

The Feed'n Read main window


newsContentForm

private ViewForm newsContentForm

The container holding the component itself


newsTitle

private Label newsTitle

The Label<(code> showing the news title


newsHyperlink

private Hyperlink newsHyperlink

The Hyperlink showing the news link


newsBrowser

private Browser newsBrowser

The internal Browser shoing the news content


newsContentPanel

private Composite newsContentPanel

The container holding all components


enclosureToolBar

private ToolBar enclosureToolBar

The ToolBar component to show a drop down menu of all embedded enclosures


enclosureToolBarManager

private ToolBarManager enclosureToolBarManager

The ToolBarManager responsible of managing the EnclosureListAction which defines all single EnclosureActions

Constructor Detail

NewsContentView

public NewsContentView(Composite parent,
                       MainApplicationWindow mainWindow)

Creates a new NewsContentView instance which is used to display a single news. This component shows the news title and url in it's header and the news content in it's body.

Parameters:
parent - Composite the component that this NewsContentView should be placed in
Method Detail

createComponents

private void createComponents(Composite parent)

Creates the components used in the context of this NewsContentView.

Parameters:
parent - Composite the component that this NewsContentView and its children should be placed in

setNews

public void setNews(NewsFeedEntry news)

Sets the news displayed in this NewsContentView.

Parameters:
news - NewsFeedEntry the news to display

clear

public void clear()

Clears this NewsContentView.


setVisible

public void setVisible(boolean visible)

Sets the visibility status of this NewsContentView component.

Parameters:
visible - true for visible; false for invisible

isVisible

public boolean isVisible()

Gets the visibility status of this NewsContentView component.

Returns:
visible true if visible; false if invisible

showEnclosures

private void showEnclosures(NewsFeedEntry entry)

Shows the enclosures embedded in the specified NewsFeedEntry.

Parameters:
entry - the NewsFeedEbtry to show the enclosures for