net.sourceforge.java.feednread.frontend.components.tabbar
Class NewsFeedTabItemData

java.lang.Object
  extended bynet.sourceforge.java.feednread.frontend.components.tabbar.AbstractTabItemData
      extended bynet.sourceforge.java.feednread.frontend.components.tabbar.NewsFeedTabItemData
All Implemented Interfaces:
INewsFeedTableStatusListener, ITabItemData
Direct Known Subclasses:
FilterTabItemData

public class NewsFeedTabItemData
extends AbstractTabItemData
implements INewsFeedTableStatusListener

Tab data class for CTabItems displaying a NewsFeed in the NewsFeedTabBar ui component.

Author:
Sebastian Machhausen

Field Summary
private  List favorites
           The related Favorites
private  NewsFeedView newsView
           The NewsFeedView component embedded in the tab associated with this data object.
private  Watch watch
           The Watch related to this NewsFeedTabItemData
 
Fields inherited from class net.sourceforge.java.feednread.frontend.components.tabbar.AbstractTabItemData
component, item, mainWindow
 
Fields inherited from interface net.sourceforge.java.feednread.frontend.components.tabbar.ITabItemData
TYPE_BROWSER_TAB, TYPE_FILTER_TAB, TYPE_MESSAGE_TAB, TYPE_NEWSFEED_TAB
 
Constructor Summary
NewsFeedTabItemData(MainApplicationWindow mainWindow, CTabItem item, NewsFeedView newsView)
           Creates a new NewsFeedTabItemData instance.
NewsFeedTabItemData(MainApplicationWindow mainWindow, CTabItem item, NewsFeedView newsView, Favorite favorite)
           Creates a new NewsFeedTabItemData instance.
NewsFeedTabItemData(MainApplicationWindow mainWindow, CTabItem item, NewsFeedView newsView, Favorite[] favorites)
           Creates a new NewsFeedTabItemData instance.
NewsFeedTabItemData(MainApplicationWindow mainWindow, CTabItem item, NewsFeedView newsView, Watch watch)
           Creates a new NewsFeedTabItemData instance.
 
Method Summary
 void closing(NewsFeedTableStatusChangedEvent event)
           Triggered when the NewsFeedTable is about to be closed.
 void dispose()
           Disposes this NewsFeedTabItemData object and all claimed resources.
 Favorite[] getFavorites()
           Gets the Favorite objects displayed in the tab associated with this NewsFeedTabItemData object or null if no Favorite objects displayed in the tab.
 NewsFeedView getNewsFeedView()
           Gets the NewsFeedView component displayed in the tab related to this NewsFeedViewTabItemData object.
 int getType()
           Gets the type of this NewsFeedTabItemData object.
 String getUrl()
           Gets the url of the newsfeed displayed in the tab related to this NewsFeedTabItemData object.
 Watch getWatch()
           Gets the Watch displayed in the tab associated with this NewsFeedTabItemData object or null if no Watch displayed in the tab.
private  void registerEventHandler()
           Registers the event handler required in this NewsFeedTabItemData
 void statusChanged(NewsFeedTableStatusChangedEvent event)
           Triggered when the status of a NewsFeedTable changes.
 
Methods inherited from class net.sourceforge.java.feednread.frontend.components.tabbar.AbstractTabItemData
getComponent, getTabItem
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

newsView

private NewsFeedView newsView

The NewsFeedView component embedded in the tab associated with this data object.


favorites

private List favorites

The related Favorites


watch

private Watch watch

The Watch related to this NewsFeedTabItemData

Constructor Detail

NewsFeedTabItemData

public NewsFeedTabItemData(MainApplicationWindow mainWindow,
                           CTabItem item,
                           NewsFeedView newsView)

Creates a new NewsFeedTabItemData instance.

Parameters:
mainWindow - the Feed'n Read main window
item - the CTabItem control related to this NewsFeedTabItemData object
newsView - the NewsFeedView component displayed in the tab related to this NewsFeedTabItemData object

NewsFeedTabItemData

public NewsFeedTabItemData(MainApplicationWindow mainWindow,
                           CTabItem item,
                           NewsFeedView newsView,
                           Favorite favorite)

Creates a new NewsFeedTabItemData instance.

Parameters:
mainWindow - the Feed'n Read main window
item - the CTabItem control related to this NewsFeedTabItemData object
newsView - the NewsFeedView component displayed in the tab related to this NewsFeedTabItemData object
favorite - the Favorite to reference

NewsFeedTabItemData

public NewsFeedTabItemData(MainApplicationWindow mainWindow,
                           CTabItem item,
                           NewsFeedView newsView,
                           Favorite[] favorites)

Creates a new NewsFeedTabItemData instance.

Parameters:
mainWindow - the Feed'n Read main window
item - the CTabItem control related to this NewsFeedTabItemData object
newsView - the NewsFeedView component displayed in the tab related to this NewsFeedTabItemData object
favorites - the Favorite objects to reference

NewsFeedTabItemData

public NewsFeedTabItemData(MainApplicationWindow mainWindow,
                           CTabItem item,
                           NewsFeedView newsView,
                           Watch watch)

Creates a new NewsFeedTabItemData instance.

Parameters:
mainWindow - the Feed'n Read main window
item - the CTabItem control related to this NewsFeedTabItemData object
newsView - the NewsFeedView component displayed in the tab related to this NewsFeedTabItemData object
watch - the Watch object to reference
Method Detail

getUrl

public String getUrl()

Gets the url of the newsfeed displayed in the tab related to this NewsFeedTabItemData object.

Specified by:
getUrl in interface ITabItemData
Returns:
the url of the newsfeed displayed in the tab related to this NewsFeedTabItemData object

dispose

public void dispose()

Disposes this NewsFeedTabItemData object and all claimed resources.

Specified by:
dispose in interface ITabItemData

getType

public int getType()

Gets the type of this NewsFeedTabItemData object. Always returns ITabItemData.TYPE_NEWSFEED_TAB to indicate a newsfeed tab.

Specified by:
getType in interface ITabItemData
Returns:
ITabItemData.TYPE_NEWSFEED_TAB to indicate a newsfeed tab

getNewsFeedView

public NewsFeedView getNewsFeedView()

Gets the NewsFeedView component displayed in the tab related to this NewsFeedViewTabItemData object.

Returns:
the NewsFeedView component displayed in the tab related to this NewsFeedViewTabItemData object

getFavorites

public Favorite[] getFavorites()

Gets the Favorite objects displayed in the tab associated with this NewsFeedTabItemData object or null if no Favorite objects displayed in the tab.

Returns:
the Favorite objects displayed in the tab associated with this NewsFeedTabItemData object or null if no Favorite objects displayed in the tab

getWatch

public Watch getWatch()

Gets the Watch displayed in the tab associated with this NewsFeedTabItemData object or null if no Watch displayed in the tab.

Returns:
the Watch displayed in the tab associated with this NewsFeedTabItemData object or null if no Watch displayed in the tab

statusChanged

public void statusChanged(NewsFeedTableStatusChangedEvent event)

Triggered when the status of a NewsFeedTable changes.

Specified by:
statusChanged in interface INewsFeedTableStatusListener
Parameters:
event - the triggered NewsFeedTableStatusChangedEvent

closing

public void closing(NewsFeedTableStatusChangedEvent event)

Triggered when the NewsFeedTable is about to be closed.

Specified by:
closing in interface INewsFeedTableStatusListener
Parameters:
event - the triggered NewsFeedTableStatusChangedEvent

registerEventHandler

private void registerEventHandler()

Registers the event handler required in this NewsFeedTabItemData