net.sourceforge.rssowl.model
Class TabItemData

java.lang.Object
  extended bynet.sourceforge.rssowl.model.TabItemData

public class TabItemData
extends Object

Model class to store data in a TabItem. The setData() Method of any TabItem in RSSOwl is used with a TabItemData Object.

Version:
1.1.3
Author:
Benjamin Pasero

Field Summary
private  Category aggregatedCategory
           
private  org.eclipse.swt.widgets.Table newsHeaderTable
           
private  Channel rssChannel
           
private  BrowserPanel rssOwlBrowserPanel
           
private  boolean showsUnreadNews
           
private  String title
           
private  int type
           
private static int TYPE_BROWSER
          Tab is displaying a browser
private static int TYPE_ERROR
          Tab is displaying a warning
private static int TYPE_FEED
          Tab is displaying a feed
private static int TYPE_MESSAGE
          Tab is displaying a message
private  String url
           
 
Constructor Summary
private TabItemData(String url, String title, Category aggregatedCategory, org.eclipse.swt.widgets.Table newsHeaderTable, Channel rssChannel, BrowserPanel rssOwlBrowserPanel, int type)
          Private constructor which is used by the factory methods.
 
Method Summary
static TabItemData createBrowserData(BrowserPanel rssOwlBrowserPanel)
          Create a new TabItemData with the type: Browser
static TabItemData createErrorData(String urlOrTitle)
          Create a new TabItemData with the type: Error
static TabItemData createFeedData(String url, String title, Channel rssChannel, org.eclipse.swt.widgets.Table newsHeaderTable)
          Create a new TabItemData with the type: Feed
static TabItemData createMessageData(String urlOrTitle)
          Create a new TabItemData with the type: Message
 void dispose()
          Dispose this TabItemData Object
 Category getAggregatedCategory()
           
 org.eclipse.swt.widgets.Table getNewsHeaderTable()
           
 Channel getRSSChannel()
           
 BrowserPanel getRSSOwlBrowserPanel()
           
 String getTitle()
           
 String getUrl()
           
 boolean isAggregatedCat()
           
 boolean isBrowser()
           
 boolean isError()
           
 boolean isFeed()
           
 boolean isMessage()
           
 boolean isShowsUnreadNews()
          Status flag to remember the TabItems state
 void setShowsUnreadNews(boolean showsUnreadNews)
          Set the status flag to remember the TabItems state
 boolean showsCategory(Category category)
          Check if the given Category is aggregated in this TabItem
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE_BROWSER

private static final int TYPE_BROWSER
Tab is displaying a browser

See Also:
Constant Field Values

TYPE_ERROR

private static final int TYPE_ERROR
Tab is displaying a warning

See Also:
Constant Field Values

TYPE_FEED

private static final int TYPE_FEED
Tab is displaying a feed

See Also:
Constant Field Values

TYPE_MESSAGE

private static final int TYPE_MESSAGE
Tab is displaying a message

See Also:
Constant Field Values

aggregatedCategory

private Category aggregatedCategory

newsHeaderTable

private org.eclipse.swt.widgets.Table newsHeaderTable

rssChannel

private Channel rssChannel

rssOwlBrowserPanel

private BrowserPanel rssOwlBrowserPanel

showsUnreadNews

private boolean showsUnreadNews

title

private String title

type

private int type

url

private String url
Constructor Detail

TabItemData

private TabItemData(String url,
                    String title,
                    Category aggregatedCategory,
                    org.eclipse.swt.widgets.Table newsHeaderTable,
                    Channel rssChannel,
                    BrowserPanel rssOwlBrowserPanel,
                    int type)
Private constructor which is used by the factory methods.

Parameters:
url - The URL of the feed
title - The title of the feed
aggregatedCategory - If this is an aggregation, the aggregated category
newsHeaderTable - The table holding the newsheader of the feed
rssChannel - The displayed rsschannel if this tab is displaying a feed
rssOwlBrowserPanel - The browser panel if a browser is displayed
type - The type of the tab
Method Detail

createBrowserData

public static TabItemData createBrowserData(BrowserPanel rssOwlBrowserPanel)
Create a new TabItemData with the type: Browser

Parameters:
rssOwlBrowserPanel - The browserpanel used by the browser
Returns:
TabItemData An instance of TabItemData

createErrorData

public static TabItemData createErrorData(String urlOrTitle)
Create a new TabItemData with the type: Error

Parameters:
urlOrTitle - URL or Title of the Error
Returns:
TabItemData An instance of TabItemData

createFeedData

public static TabItemData createFeedData(String url,
                                         String title,
                                         Channel rssChannel,
                                         org.eclipse.swt.widgets.Table newsHeaderTable)
Create a new TabItemData with the type: Feed

Parameters:
url - The URL of the feed
title - The title of the feed
rssChannel - The displayed rsschannel if this tab is displaying a feed
newsHeaderTable - The table holding the newsheader of the feed
Returns:
TabItemData An instance of TabItemData

createMessageData

public static TabItemData createMessageData(String urlOrTitle)
Create a new TabItemData with the type: Message

Parameters:
urlOrTitle - URL or Title of the Message / Error
Returns:
TabItemData An instance of TabItemData

dispose

public void dispose()
Dispose this TabItemData Object


getAggregatedCategory

public Category getAggregatedCategory()
Returns:
Category If this is an aggregation, the aggregated category

getNewsHeaderTable

public org.eclipse.swt.widgets.Table getNewsHeaderTable()
Returns:
Returns the newsHeaderTable.

getRSSChannel

public Channel getRSSChannel()
Returns:
Returns the rssChannel that is displayed

getRSSOwlBrowserPanel

public BrowserPanel getRSSOwlBrowserPanel()
Returns:
Returns the rssOwlBrowserPanel.

getTitle

public String getTitle()
Returns:
Returns the title.

getUrl

public String getUrl()
Returns:
Returns the url.

isAggregatedCat

public boolean isAggregatedCat()
Returns:
boolean TRUE if the Feed is an aggregated category

isBrowser

public boolean isBrowser()
Returns:
boolean TRUE if the Type is Browser

isError

public boolean isError()
Returns:
boolean TRUE if the Type is Message

isFeed

public boolean isFeed()
Returns:
boolean TRUE if the Type is Feed

isMessage

public boolean isMessage()
Returns:
boolean TRUE if the Type is Message

isShowsUnreadNews

public boolean isShowsUnreadNews()
Status flag to remember the TabItems state

Returns:
boolean Returns the showsUnreadNews.

setShowsUnreadNews

public void setShowsUnreadNews(boolean showsUnreadNews)
Set the status flag to remember the TabItems state

Parameters:
showsUnreadNews - The showsUnreadNews to set.

showsCategory

public boolean showsCategory(Category category)
Check if the given Category is aggregated in this TabItem

Parameters:
category - The category to check if shown
Returns:
boolean TRUE in case this tabitem is showing an aggregation of the given category


RSSOwl - RSS / RDF / Atom Newsreader

SourceForge.net Logo