|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnet.sourceforge.java.feednread.frontend.components.tabbar.TabManager
Acts as model for the NewsFeedTabBar ui component by managing
the CTabItems and their associated ITabItemData
objects.
| Field Summary | |
private Map |
aggregatedNewsFeedTabs
Structure to store aggregated newsfeed tabs |
private CTabItem |
filterTab
The special tab to hold filtered news |
private MainApplicationWindow |
mainWindow
The Feed'n Read main window |
private Map |
plainNewsFeedTabs
Structure to store plain newsfeed tabs |
private NewsFeedTabBar |
tabBar
The NewsFeedTabBar component managed |
private CTabFolder |
tabFolder
The managed CTabFolder component |
private Map |
watchTabs
Structure to store Watch tabs |
| Constructor Summary | |
TabManager(MainApplicationWindow mainWindow,
NewsFeedTabBar tabBar)
Creates a new TabManager.
|
|
| Method Summary | |
void |
addBrowserTab(String url)
Adds a new tab showing a browser page refering to the specified url. |
void |
addMessageTab(String title,
Throwable throwable)
Adds a new tab showing an error message using the specified Throwable.
|
void |
addTab(Favorite favorite)
Adds a new tab that displays the NewsFeed held by the
specified Favorite. |
void |
addTab(Favorite[] favorites,
AggregatedNewsFeed newsFeed)
Adds a tab that displays the specified AggregatedNewsFeed
and is bound to the specified Favorites. |
void |
addTab(NewsFeed newsFeed)
Adds a new tab that displays the specified NewsFeed. |
void |
addTab(Watch watch)
Adds a tab that displays the specified Watch. |
private void |
createNewsFeedTab(Favorite favorite)
Creates a new tab that displays the NewsFeed held by the
specified Favorite.
|
private void |
createNewsFeedTab(Favorite[] favorites,
AggregatedNewsFeed newsFeed)
Creates a new tab that displays the specified AggregatedNewsFeed bound to the specified
Favorites.
|
private void |
createNewsFeedTab(NewsFeed newsFeed)
Creates a new tab that displays the specified NewsFeed.
|
private void |
createNewsFeedTab(Watch watch)
Creates a new tab that displays the specified Watch.
|
void |
dispose(CTabItem item)
Disposes the specified CTabItem. |
CTabItem[] |
getBrowserTabs()
Gets all tabs that display a web page in an InternalBrowser
component.
|
(package private) CTabItem |
getFilterTab()
Gets the filter tab managed by this TabManager.
|
CTabItem[] |
getNewsFeedTabs()
Gets all tabs that display a NewsFeed.
|
CTabItem |
getTab(AggregatedNewsFeed newsFeed)
Gets the CTabItem that displays the specified
AggregatedNewsFeed.
|
CTabItem |
getTab(NewsFeed newsFeed)
Gets the CTabItem that displays the specified
NewsFeed.
|
CTabItem |
getTab(Watch watch)
Gets the CTabItem that displays the specified
Watch.
|
AggregatedNewsFeed |
isAggregated(NewsFeed newsFeed)
Tests if the specified NewsFeed is aggregated in
an AggregatedNewsFeed displayed in any aggregated
newsfeed tab.
|
boolean |
isOpen(AggregatedNewsFeed newsFeed)
Verifies if the specified AggregatedNewsFeed is open in an
aggregated newsfeed tab.
|
boolean |
isOpen(NewsFeed newsFeed)
Verifies if the specified NewsFeed is open in a plain
newsfeed tab.
|
boolean |
isOpen(Watch watch)
Verifies if the specified Watch is open in a tab.
|
private void |
refreshFilterTab()
Refreshes the filter tab with the news from a previously added tab. |
void |
synchronizeFilterTab()
Synchronizes the filter tab to show only news items from open news tabs. |
void |
updateAggregations(NewsFeed updatedNewsFeed)
Updates all open aggregated newsfeed tabs to the updated version of the specified NewsFeed. |
void |
updateFilterTab(Favorite[] favorites,
NewsFeed filteredFeed)
Updates the filter tab with the specified filteredFeed.
|
private void |
updateNewsFeedTab(AggregatedNewsFeed newsFeed)
Updates a tab to the specified AggregatedNewsFeed.
|
private void |
updateNewsFeedTab(Favorite favorite)
Updates a tab to the NewsFeed held by the specified
Favorite.
|
private void |
updateNewsFeedTab(NewsFeed newsFeed)
Updates a tab to the specified NewsFeed.
|
private void |
updateNewsFeedTab(Watch watch)
Updates a tab to the NewsFeed held by the specified
Watch.
|
void |
updateTabReadStates()
Updates the tab read status of all newsfeed tabs and the filter tab if it is currently visible. |
void |
updateTabReadStatus(CTabItem item)
Updates the tab read status of the specified CTabItem.
|
void |
updateWatches(NewsFeed updatedNewsFeed)
Updates all open Watch tabs to the updated version
of the specified NewsFeed. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private MainApplicationWindow mainWindow
The Feed'n Read main window
private NewsFeedTabBar tabBar
The NewsFeedTabBar component managed
private CTabFolder tabFolder
The managed CTabFolder component
private CTabItem filterTab
The special tab to hold filtered news
private Map plainNewsFeedTabs
Structure to store plain newsfeed tabs
private Map aggregatedNewsFeedTabs
Structure to store aggregated newsfeed tabs
private Map watchTabs
Structure to store Watch tabs
| Constructor Detail |
public TabManager(MainApplicationWindow mainWindow,
NewsFeedTabBar tabBar)
Creates a new TabManager.
mainWindow - the Feed'n Read main window| Method Detail |
public void addTab(NewsFeed newsFeed)
Adds a new tab that displays the specified NewsFeed. If a
tab is yet open for the specified NewsFeed it is then
updated and focussed.
newsFeed - the NewsFeed to create or update a tab
forpublic void addTab(Favorite favorite)
Adds a new tab that displays the NewsFeed held by the
specified Favorite. If a tab is yet open for the
NewsFeed held by the specified Favorite it
is then updated and focussed.
favorite - the Favorite for which to create or update
a tab
public void addTab(Favorite[] favorites,
AggregatedNewsFeed newsFeed)
Adds a tab that displays the specified AggregatedNewsFeed
and is bound to the specified Favorites. If a tab is yet
open for the AggregatedNewsFeed it is then updated and
focussed.
favorites - the Favorites to bind to the tab to
createnewsFeed - the AggregatedNewsFeed to create or update
a tab forpublic void addTab(Watch watch)
Adds a tab that displays the specified Watch. If a tab is
yet open for the Watch it is then updated and focussed.
watch - the Watchs to bind to the tab to
createpublic void addBrowserTab(String url)
Adds a new tab showing a browser page refering to the specified url.
url - the url to open in a new browser tab
public void addMessageTab(String title,
Throwable throwable)
Adds a new tab showing an error message using the specified
Throwable.
title - the title of the message tabthrowable - the Throwable raised
public void updateFilterTab(Favorite[] favorites,
NewsFeed filteredFeed)
Updates the filter tab with the specified filteredFeed.
If no filtering has been done yet the filter tab is created lazily.
filteredFeed - the NewsFeed holding all
filtered newspublic void updateAggregations(NewsFeed updatedNewsFeed)
Updates all open aggregated newsfeed tabs to the updated version
of the specified NewsFeed. Those which do not hold
the specified NewsFeed are omited.
updatedNewsFeed - the updated version of the NewsFeedpublic void updateWatches(NewsFeed updatedNewsFeed)
Updates all open Watch tabs to the updated version
of the specified NewsFeed. Those which do not hold
the specified NewsFeed are omited.
updatedNewsFeed - the updated version of the NewsFeedpublic boolean isOpen(NewsFeed newsFeed)
Verifies if the specified NewsFeed is open in a plain
newsfeed tab.
newsFeed - the NewsFeed to verify
true if the specified NewsFeed is open
in a plain newsfeed tab; false otherwiseisOpen(AggregatedNewsFeed),
isOpen(Watch)public boolean isOpen(AggregatedNewsFeed newsFeed)
Verifies if the specified AggregatedNewsFeed is open in an
aggregated newsfeed tab.
newsFeed - the AggregatedNewsFeed to verify
true if the specified
AggregatedNewsFeed is open in an aggregated newsfeed tab;
false otherwiseisOpen(NewsFeed),
isOpen(Watch)public boolean isOpen(Watch watch)
Verifies if the specified Watch is open in a tab.
watch - the Watch to verify
true if the specified Watch is open
in a tab; false otherwiseisOpen(NewsFeed),
isOpen(AggregatedNewsFeed)public AggregatedNewsFeed isAggregated(NewsFeed newsFeed)
Tests if the specified NewsFeed is aggregated in
an AggregatedNewsFeed displayed in any aggregated
newsfeed tab.
newsFeed - the NewsFeed to test
AggregatedNewsFeed which holds the
specified NewsFeed; null if the
specified NewsFeed is not aggregatedpublic CTabItem getTab(NewsFeed newsFeed)
Gets the CTabItem that displays the specified
NewsFeed.
newsFeed - the NewsFeed to get the displaying
CTabItem for
CTabItem that displays the specified
NewsFeedgetTab(AggregatedNewsFeed),
getTab(Watch)public CTabItem getTab(AggregatedNewsFeed newsFeed)
Gets the CTabItem that displays the specified
AggregatedNewsFeed.
newsFeed - the AggregatedNewsFeed to get the displaying
CTabItem for
CTabItem that displays the specified
AggregatedNewsFeedgetTab(NewsFeed),
getTab(Watch)public CTabItem getTab(Watch watch)
Gets the CTabItem that displays the specified
Watch.
watch - the Watch to get the displaying
CTabItem for
CTabItem that displays the specified
WatchgetTab(NewsFeed),
getTab(AggregatedNewsFeed)public void synchronizeFilterTab()
Synchronizes the filter tab to show only news items from open news tabs. Call this method whenever a newsfeed tab is closed.
public void updateTabReadStatus(CTabItem item)
Updates the tab read status of the specified CTabItem.
item - the CTabItem to update the read status forpublic void updateTabReadStates()
Updates the tab read status of all newsfeed tabs and the filter tab if it is currently visible.
public CTabItem[] getNewsFeedTabs()
Gets all tabs that display a NewsFeed.
NewsFeedpublic CTabItem[] getBrowserTabs()
Gets all tabs that display a web page in an InternalBrowser
component.
InternalBrowser componentpublic void dispose(CTabItem item)
Disposes the specified CTabItem. This includes the
disposal of the embedded Control and the removal of
the related TabItemData object.
item - the CTabItem to dispose ofprivate void createNewsFeedTab(NewsFeed newsFeed)
Creates a new tab that displays the specified NewsFeed.
newsFeed - the NewsFeed to create a tab forprivate void createNewsFeedTab(Favorite favorite)
Creates a new tab that displays the NewsFeed held by the
specified Favorite.
favorite - the Favorite to create a tab for
private void createNewsFeedTab(Favorite[] favorites,
AggregatedNewsFeed newsFeed)
Creates a new tab that displays the specified
AggregatedNewsFeed bound to the specified
Favorites.
favorites - the Favorites to bind the tab tonewsFeed - the AggregatedNewsFeed to display in
the tabprivate void createNewsFeedTab(Watch watch)
Creates a new tab that displays the specified Watch.
watch - the Watchs to bind the tab toprivate void updateNewsFeedTab(NewsFeed newsFeed)
Updates a tab to the specified NewsFeed.
newsFeed - the updated version of the NewsFeed to
display in the tabprivate void updateNewsFeedTab(Favorite favorite)
Updates a tab to the NewsFeed held by the specified
Favorite.
favorite - the Favorite which holds the updated
version of the NewsFeed to display in the tabprivate void updateNewsFeedTab(AggregatedNewsFeed newsFeed)
Updates a tab to the specified AggregatedNewsFeed.
newsFeed - the updated version of the
AggregatedNewsFeed to display in the tabprivate void updateNewsFeedTab(Watch watch)
Updates a tab to the NewsFeed held by the specified
Watch.
watch - the Watch which holds the updated
version of the NewsFeed to display in the tabprivate void refreshFilterTab()
Refreshes the filter tab with the news from a previously added tab.
CTabItem getFilterTab()
Gets the filter tab managed by this TabManager.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||