|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnet.sourceforge.java.util.gui.jface.viewers.MutableTreeElement
net.sourceforge.java.feednread.backend.model.favoritestree.Category
Category represents a hierarchical structure for
Favorite objects, i.e.NewsFeed bookmarks in the
NewsFeedFavoritesTree component.
| Field Summary | |
private boolean |
filtered
true if a Category is filtered;
false if unfiltered
|
private String |
guid
The GUID of a Category |
private String |
title
The title of a Category |
private JobExecutionInterval |
updateInterval
The update interval of a Category. |
| Fields inherited from class net.sourceforge.java.util.gui.jface.viewers.MutableTreeElement |
|
| Constructor Summary | |
Category(String title)
Creates a new Category with the specified
title.
|
|
Category(String title,
String guid)
Creates a new Category with the specified
title.
|
|
| Method Summary | |
Favorite[] |
collectFavorites()
Recursively collects all Favorite elements starting at
this Category.
|
String |
getGUID()
Gets the GUID of this Category.
|
String |
getTitle()
Gets the title of this Category.
|
int |
getUnreadCount()
Returns the number of unread news in the NewsFeeds
related to the Favorites in this Category
and all of its sub Categorys.
|
int |
getUnreadCount(ITreeElement element)
Returns the number of unread news in the NewsFeeds
related to the specified ITreeElement. |
JobExecutionInterval |
getUpdateInterval()
Gets the update interval of this Category.
|
boolean |
isFiltered()
Gets the filtered status of this Category.
|
boolean |
isScheduled()
Returns true if this Category is scheduled
for automatic update.
|
boolean |
isUnread()
Returns true if at least one NewsFeed related
to a Favorite in this Category holds an unread
news.
|
private boolean |
isUnread(ITreeElement element)
Returns true if at least one NewsFeed
related to a Favorite in the specified
ITreeElement holds an unread news.
|
void |
setFiltered(boolean filtered)
Sets the filtered status of this Category.
|
void |
setTitle(String title)
Sets the title of this Category. |
void |
setUpdateInterval(JobExecutionInterval interval)
Sets the update interval for this Category to the
specified JobExceutionInterval object.
|
String |
toString()
Gets the textual represntation of this Category. |
| Methods inherited from class net.sourceforge.java.util.gui.jface.viewers.MutableTreeElement |
add, addIMutableTreeElementListener, allowsSubElements, collectLeafs, dispose, fireElementAdded, fireElementRemoved, fireElementUpdated, getData, getElementAt, getElements, getIndex, getParent, getPath, getSize, hasSubElements, isSubElement, remove, removeIMutableTreeElementListener, setData, setParent |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
private String guid
The GUID of a Category
private String title
The title of a Category
private boolean filtered
true if a Category is filtered;
false if unfiltered
private JobExecutionInterval updateInterval
The update interval of a Category. This is used as
template for all newly created Favorites inside a
Category.
| Constructor Detail |
public Category(String title)
Creates a new Category with the specified
title.
title - the title to identify this CategoryCategory(String, String)
public Category(String title,
String guid)
Creates a new Category with the specified
title.
title - the title to identify this Categoryguid - the GUID for this < code>CatgoryCategory(String)| Method Detail |
public String getGUID()
Gets the GUID of this Category.
getGUID in interface IGUIDCategoryIGUID.getGUID()public void setTitle(String title)
Sets the title of this Category. Notifies all registered
IMutableTreeElementListener instances of the update.
setTitle in interface INameabletitle - the new title for this Categorypublic String getTitle()
Gets the title of this Category.
getTitle in interface INameableCategorypublic String toString()
Gets the textual represntation of this Category. Returns
the Category title.
toString in class MutableTreeElementCategorypublic Favorite[] collectFavorites()
Recursively collects all Favorite elements starting at
this Category.
Favorite elementspublic boolean isUnread()
Returns true if at least one NewsFeed related
to a Favorite in this Category holds an unread
news.
isUnread in interface INewsFeedStatustrue if at least one NewsFeed related
to a Favorite in this Category holds an unread
news; false otherwiseINewsFeedStatus.isUnread()private boolean isUnread(ITreeElement element)
Returns true if at least one NewsFeed
related to a Favorite in the specified
ITreeElement holds an unread news.
element - the ITreeElement to test
true if at least one NewsFeed
related to a Favorite the specified ITreeElement
holds an unread news; false otherwisepublic int getUnreadCount()
Returns the number of unread news in the NewsFeeds
related to the Favorites in this Category
and all of its sub Categorys.
getUnreadCount in interface INewsFeedStatusNewsFeeds
related to the Favorites in this Category
and all of its sub CategorysINewsFeedStatus.getUnreadCount()public int getUnreadCount(ITreeElement element)
Returns the number of unread news in the NewsFeeds
related to the specified ITreeElement. If the
specified ITreeElement denotes a Category
the calculation is done recursively.
element - the ITreeElement to get the
number of unread news for
NewsFeeds
related to the specified ITreeElementpublic boolean isFiltered()
Gets the filtered status of this Category.
isFiltered in interface IFilterTagtrue if this Category is filtered;
false otherwisepublic void setFiltered(boolean filtered)
Sets the filtered status of this Category.
setFiltered in interface IFilterTagfiltered - true to mark this Category as
filtered; false to mark it as unfilteredpublic void setUpdateInterval(JobExecutionInterval interval)
Sets the update interval for this Category to the
specified JobExceutionInterval object.
interval - the JobExceutionInterval to set for
this CategorygetUpdateInterval(),
isScheduled()public JobExecutionInterval getUpdateInterval()
Gets the update interval of this Category.
JobExceutionInterval/code> of this
Category- See Also:
setUpdateInterval(JobExecutionInterval),
isScheduled()public boolean isScheduled()
Returns true if this Category is scheduled
for automatic update.
true if this Category is scheduled
for automatic update; false otherwisegetUpdateInterval(),
setUpdateInterval(JobExecutionInterval)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||