|
|||||||||||
| 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.NewsFeedTabBar
Displays NewsFeedView and InternalBrowser
components in tabs. Supplementally adds a filter bar to perform filter
operations on the NewsFeeds viewed in the tabs.
| Nested Class Summary | |
private class |
NewsFeedTabBar.TabHandler
Internal Event Handler to react on closing tabs. |
| Field Summary | |
private ToolItem |
clearFilterButton
The Button to clear the filter |
private MenuManager |
contextMenuMgr
The internal MenuManager used to create the context menu
|
private Text |
filterField
The news filter Text field |
private CLabel |
filterLabel
The news filter CLabel |
private ToolItem |
filterMenuItem
The ToolItem to open the filter menu |
private MenuManager |
filterMenuMgr
The internal MenuManager used to created the filter menu
|
private MainApplicationWindow |
mainWindow
The Feed'n Read main window |
private ToolItem |
maximizeButton
The Button to maximize the NewsFeedTabBar
|
private ViewForm |
newsFeedTabBarForm
The ViewForm to place the CTabFolder in
|
private CTabFolder |
newsTabFolder
The CTabFolder to hold the newsfeed tabs |
private Composite |
newsTabFolderContainer
The container to act as placeholder for the ViewForm
|
private NewsFeedTabBar.TabHandler |
tabHandler
Event handler to react on tab selection and close |
private TabManager |
tabManager
The TabManager acts as bridge between tab model and tab
gui
|
| Constructor Summary | |
NewsFeedTabBar(Composite parent,
MainApplicationWindow mainWindow)
Creates a new NewsFeedTabBar instance and embeds it into
the specified placeholder.
|
|
| 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 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. |
void |
closeAllTabs()
Closes all currently opened tabs in this NewsFeedTabBar.
|
void |
closeSelectedTab()
Closes the currently selected tab in this NewsFeedTabBar.
|
private void |
createComponents(Composite parent)
Creates all required gui components and setups the layout of this NewsFeedTabBar.
|
private void |
createContextMenu()
Creates the internal MenuManager used to create the
context menu of this NewsFeedTabBar.
|
private void |
createFilterBar()
Creates the filter bar to hold an input field which allows an user input to filter news by a keyword. |
private Menu |
createFilterMenu()
Creates the internal MenuManager used to create the
filter menu of this NewsFeedTabBar.
|
void |
defaultLanguageChanged(LanguageResourceChangeEvent lrce)
Called whenever the default language changes. |
void |
dispose()
Disposes all components and resources claimed by this NewsFeedTabBar.
|
void |
dispose(CTabItem item)
Disposes the specified CTabItem. |
CTabItem[] |
getBrowserTabs()
Gets all tabs that display a web page in an InternalBrowser
component.
|
String |
getFilterText()
Gets the currently set filter text; null if none set.
|
CTabItem[] |
getNewsFeedTabs()
Gets all tabs that display a NewsFeed.
|
CTabItem |
getSelectedTab()
Gets the currently selected CTabItem or null
if no tab available.
|
CTabItem |
getTab(NewsFeed newsFeed)
Gets the CTabItem matching the specified
NewsFeed or null if no such tab is
currently open showing the specified NewsFeed.
|
CTabItem |
getTab(Watch watch)
Gets the CTabItem matching the specified Watch |
int |
getTabCount()
Gets the number of tabs currently held by this NewsFeedTabBar.
|
(package private) CTabFolder |
getTabFolder()
Gets the CTabFolder component used by this
NewsFeedTabBar.
|
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.
|
boolean |
isVisible()
Gets the visibility status of this NewsFeedTabBar
component.
|
private void |
registerEventHandler()
Registers all event handlers required by this NewsFeedTabBar.
|
void |
selectNextTab()
Selects the tab next to the the currently selected tab in this NewsFeedTabBar.
|
void |
selectPreviousTab()
Selects the tab previous to the currently selected tab in this NewsFeedTabBar.
|
void |
setSelectedTab(CTabItem item)
Sets the currently selected CTabItem.
|
void |
setVisible(boolean visible)
Sets the visibility status of this NewsFeedTabBar
component.
|
void |
synchronizeFilterTab()
Synchronizes the filtered news tab to show only news items from open news tabs. |
private void |
unregisterEventHandler()
Unregisters all event handlers from by this NewsFeedTabBar.
|
void |
updateAggregations(NewsFeed newsFeed)
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.
|
void |
updateTabReadStates()
Updates the tab titles of all newsfeed tabs and the filter tab if it is currently visible. |
void |
updateTabReadStatus(CTabItem item)
Updates the tab title of the specified CTabItem.
|
void |
updateTabTitle(InternalBrowser browser,
String title)
Updates the title of the tab holding the specified InternalBrowser to the specified title.
|
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 ViewForm newsFeedTabBarForm
The ViewForm to place the CTabFolder in
private Composite newsTabFolderContainer
The container to act as placeholder for the ViewForm
private CTabFolder newsTabFolder
The CTabFolder to hold the newsfeed tabs
private CLabel filterLabel
The news filter CLabel
private ToolItem clearFilterButton
The Button to clear the filter
private Text filterField
The news filter Text field
private ToolItem maximizeButton
The Button to maximize the NewsFeedTabBar
private MenuManager contextMenuMgr
The internal MenuManager used to create the context menu
private MenuManager filterMenuMgr
The internal MenuManager used to created the filter menu
private ToolItem filterMenuItem
The ToolItem to open the filter menu
private TabManager tabManager
The TabManager acts as bridge between tab model and tab
gui
private NewsFeedTabBar.TabHandler tabHandler
Event handler to react on tab selection and close
| Constructor Detail |
public NewsFeedTabBar(Composite parent,
MainApplicationWindow mainWindow)
Creates a new NewsFeedTabBar instance and embeds it into
the specified placeholder.
parent - the placeholder that this NewsFeedTabBar
should be embedded inmainWindow - the Feed'n Read main window| Method Detail |
public void defaultLanguageChanged(LanguageResourceChangeEvent lrce)
Called whenever the default language changes.
defaultLanguageChanged in interface ILanguageResourceChangeListenerlrce - the triggered LanguageResourceChangeEventpublic void dispose()
Disposes all components and resources claimed by this
NewsFeedTabBar.
public void dispose(CTabItem item)
Disposes the specified CTabItem. This includes the
disposal of the embedded Control and the removal of
the associated TabItemData object.
item - the CTabItem to dispose ofpublic void setSelectedTab(CTabItem item)
Sets the currently selected CTabItem.
item - the CTabItem to selectpublic CTabItem getSelectedTab()
Gets the currently selected CTabItem or null
if no tab available.
CTabItem
or null if no tab availablepublic void selectNextTab()
Selects the tab next to the the currently selected tab in this
NewsFeedTabBar.
public void selectPreviousTab()
Selects the tab previous to the currently selected tab in this
NewsFeedTabBar.
public void closeSelectedTab()
Closes the currently selected tab in this NewsFeedTabBar.
public void closeAllTabs()
Closes all currently opened tabs in this NewsFeedTabBar.
public void setVisible(boolean visible)
Sets the visibility status of this NewsFeedTabBar
component.
visible - true for visible; false
for invisiblepublic boolean isVisible()
Gets the visibility status of this NewsFeedTabBar
component.
true if visible; false
if invisible
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 raisedpublic 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 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 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 newsFeed)
Updates all open aggregated newsfeed tabs to the updated version
of the specified NewsFeed. Those which do not hold
the specified NewsFeed are omited.
newsFeed - 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 int getTabCount()
Gets the number of tabs currently held by this
NewsFeedTabBar.
public 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 void updateTabTitle(InternalBrowser browser,
String title)
Updates the title of the tab holding the specified
InternalBrowser to the specified title.
browser - the InternalBrowser which is embedded
in the tab to update the title fortitle - the updated titlepublic 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 String getFilterText()
Gets the currently set filter text; null if none set.
null if none setpublic void updateTabReadStatus(CTabItem item)
Updates the tab title of the specified CTabItem.
item - the CTabItem to update the title forpublic void updateTabReadStates()
Updates the tab titles of all newsfeed tabs and the filter tab if it is currently visible.
public CTabItem getTab(NewsFeed newsFeed)
Gets the CTabItem matching the specified
NewsFeed or null if no such tab is
currently open showing the specified NewsFeed.
newsFeed - the NewsFeed to get the corresponding
CTabItem for
NewsFeedgetTab(Watch)public CTabItem getTab(Watch watch)
Gets the CTabItem matching the specified Watch
null if no such tab is currently open showing the
specified Watch.
watch - the Watch to get the
corresponding CTabItem for
WatchgetTab(NewsFeed)public void synchronizeFilterTab()
Synchronizes the filtered news tab to show only news items from open news tabs. Call this method whenever a news tab is closed.
CTabFolder getTabFolder()
Gets the CTabFolder component used by this
NewsFeedTabBar.
CTabFolder component used by this
NewsFeedTabBarprivate void createComponents(Composite parent)
Creates all required gui components and setups the layout of this
NewsFeedTabBar.
parent - the placeholder that this NewsFeedTabBar
should be placed inprivate void createFilterBar()
Creates the filter bar to hold an input field which allows an user input to filter news by a keyword.
private void createContextMenu()
Creates the internal MenuManager used to create the
context menu of this NewsFeedTabBar.
private Menu createFilterMenu()
Creates the internal MenuManager used to create the
filter menu of this NewsFeedTabBar.
Menuprivate void registerEventHandler()
Registers all event handlers required by this NewsFeedTabBar.
private void unregisterEventHandler()
Unregisters all event handlers from by this NewsFeedTabBar.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||