|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnet.sourceforge.java.feednread.frontend.components.newstable.NewsFeedTable
Display a NewsFeed in a TableViewer.
| Nested Class Summary | |
private class |
NewsFeedTable.NewsClickHandler
Event handler that attends to open a new browser tab showing the double clicked NewsFeedEntry.
|
private class |
NewsFeedTable.SelectionHandler
Event handler that attends to set the read status of a news depending on user selections. |
private class |
NewsFeedTable.SortListener
Handles changes in the sorting column and/or direction. |
| Field Summary | |
private NewsFeedTableContentProvider |
contentProvider
|
private List |
eventListener
|
private NewsFeedTableViewerFilter |
keywordFilter
|
private NewsFeedTableLabelProvider |
labelProvider
|
private MainApplicationWindow |
mainWindow
|
private MenuManager |
menuMgr
|
private NewsFeedTable.NewsClickHandler |
newsClickHandler
|
private Table |
newsTable
|
private NewsFeedTable.SelectionHandler |
selectionHandler
|
private TableViewerSorter |
sorter
|
private NewsFeedTable.SortListener |
sortListener
|
private TableViewer |
tableViewer
|
private NewsFeedTableViewerTaggedFilter |
taggedFilter
|
private NewsFeedTableViewerUnreadFilter |
unreadFilter
|
| Constructor Summary | |
NewsFeedTable(Composite parent,
MainApplicationWindow mainWindow,
NewsFeed newsFeed)
Creates a new NewsFeedTable holding the news of the
newsfeed at the specified url and embeds it into the given
Composite.
|
|
| Method Summary | |
void |
addNewsFeedTableStatusListener(INewsFeedTableStatusListener listener)
Adds the specified NewsFeedTableStatusListener to the list
of registered listeners.
|
private void |
createMenuManager()
Creates the internal MenuManager used to
create the context menu of this
NewsFeedTable
|
void |
defaultLanguageChanged(LanguageResourceChangeEvent lrce)
Called whenever the default language changes. |
void |
dispose()
Disposes this NewsFeedTable and all of its components
and allocated resources.
|
NewsFeedEntry[] |
filter(String filterText)
Filters the entries in the underlying NewsFeedTableContentProvider that match the specified
filterText keyword.
|
private void |
fireClosing()
Notifies all registered NewsFeedTableStatusListener
instances that this NewsFeedTable is about to be closed.
|
private void |
fireStatusChanged()
Notifies all registered NewsFeedTableStatusListener
instances that the status of this NewsFeedTable has
changed.
|
NewsFeedTableContentProvider |
getContentProvider()
Gets the content provider used by this NewsTable.
|
String |
getFilterText()
Gets the currently set filter text; null if none set.
|
NewsFeed |
getNewsFeed()
Gets the NewsFeed displayed in this
NewsFeedTable
|
Table |
getNewsTable()
Gets the news table gui component. |
NewsFeedEntry |
getSelectedNews()
Gets the selected news or null if none selected.
|
int |
getVisibleEntries()
Gets the number of currently visible NewsFeedEntries
according to the current filter settings in this
NewsFeedTable.
|
private void |
initializeColumns()
Initializes the table columns by setting their widths and adjusting their settings. |
private void |
initializeEventListener()
Initializes the internal event listener list structure. |
private void |
initializeTable(Composite parent,
NewsFeed newsFeed)
Initializes this NewsFeedTable by creating the required
models and adjusting its gui specific settings.
|
void |
markAllRead()
Marks all news as read. |
void |
markAllUnread()
Marks all news as unread. |
void |
markAsRead(NewsFeedEntry entry)
Marks the specified news as read. |
void |
markAsUnread(NewsFeedEntry entry)
Marks the specified news as unread. |
void |
packColumns()
Packs the newsfeed table columns to adopt the width of their respective widest item. |
void |
refresh()
Refreshes this NewsFeedTable.
|
private void |
registerEventHandler()
Creates and registers the required event handler for this NewsFeedTable.
|
void |
removeNewsFeedTableStatusListener(INewsFeedTableStatusListener listener)
Removes the specified NewsFeedTableStatusListener from the
list of registered listeners.
|
void |
selectNextNews()
Selects the next news in this NewsFeedTable.
|
void |
selectNextUnreadNews()
Selects the next unread news in this NewsFeedTable.
|
void |
setFilterText(String filterText)
Sets the filter to the specified filterText.
|
void |
setNewsFeed(NewsFeed newsFeed)
Sets the NewsFeed displayed in this
NewsFeedTable.
|
void |
setNewsTagged(NewsFeedEntry entry,
boolean tagged)
Sets the tagged status of the specified NewsFeedEntry
to tagged where a value of true means
tagged, false untagged.
|
void |
setTaggedFilterEnabled(boolean enabled)
Sets the enabled status of the tagged news filter. |
void |
setUnreadFilterEnabled(boolean enabled)
Sets the enabled status of the unread news filter. |
private void |
unregisterEventHandler()
Unregisters all Event Handler from this NewsFeedTable.
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private MainApplicationWindow mainWindow
private Table newsTable
private TableViewer tableViewer
private NewsFeedTableLabelProvider labelProvider
private NewsFeedTableContentProvider contentProvider
private TableViewerSorter sorter
private NewsFeedTableViewerFilter keywordFilter
private NewsFeedTableViewerUnreadFilter unreadFilter
private NewsFeedTableViewerTaggedFilter taggedFilter
private MenuManager menuMgr
private NewsFeedTable.SortListener sortListener
private NewsFeedTable.SelectionHandler selectionHandler
private NewsFeedTable.NewsClickHandler newsClickHandler
private List eventListener
| Constructor Detail |
public NewsFeedTable(Composite parent,
MainApplicationWindow mainWindow,
NewsFeed newsFeed)
Creates a new NewsFeedTable holding the news of the
newsfeed at the specified url and embeds it into the given
Composite.
parent - the parent to hold this NewsFeedTablemainWindow - the Feed'n Read main windownewsFeed - the newsfeed to display| Method Detail |
public void defaultLanguageChanged(LanguageResourceChangeEvent lrce)
Called whenever the default language changes.
defaultLanguageChanged in interface ILanguageResourceChangeListenerlrce - the triggered LanguageResourceChangeEventpublic void dispose()
Disposes this NewsFeedTable and all of its components
and allocated resources.
public void setNewsFeed(NewsFeed newsFeed)
Sets the NewsFeed displayed in this
NewsFeedTable.
newsFeed - the NewsFeed to displaypublic NewsFeed getNewsFeed()
Gets the NewsFeed displayed in this
NewsFeedTable
NewsFeed displayed in this
NewsFeedTablepublic NewsFeedTableContentProvider getContentProvider()
NewsTable.
public Table getNewsTable()
Gets the news table gui component.
public NewsFeedEntry[] filter(String filterText)
Filters the entries in the underlying
NewsFeedTableContentProvider that match the specified
filterText keyword.
filterText - the keyword to use for filtering
filterText keywordpublic void setFilterText(String filterText)
Sets the filter to the specified filterText.
A null value clears the filter.
filterText - the text to use as filter; null to clear
the filterpublic String getFilterText()
Gets the currently set filter text; null if none set.
null if none setpublic void refresh()
Refreshes this NewsFeedTable.
public NewsFeedEntry getSelectedNews()
Gets the selected news or null if none selected.
null if none selectedpublic int getVisibleEntries()
Gets the number of currently visible NewsFeedEntries
according to the current filter settings in this
NewsFeedTable.
NewsFeedEntriespublic void markAsRead(NewsFeedEntry entry)
Marks the specified news as read.
entry - the news to mark as readpublic void markAsUnread(NewsFeedEntry entry)
Marks the specified news as unread.
entry - the news to mark as unreadpublic void markAllRead()
Marks all news as read.
public void markAllUnread()
Marks all news as unread.
public void setNewsTagged(NewsFeedEntry entry,
boolean tagged)
Sets the tagged status of the specified NewsFeedEntry
to tagged where a value of true means
tagged, false untagged.
entry - the NewsFeedEntry to set the tagged status
fortagged - true to tag; false to
untagpublic void selectNextNews()
Selects the next news in this NewsFeedTable.
public void selectNextUnreadNews()
Selects the next unread news in this NewsFeedTable.
public void packColumns()
Packs the newsfeed table columns to adopt the width of their respective widest item.
public void addNewsFeedTableStatusListener(INewsFeedTableStatusListener listener)
Adds the specified NewsFeedTableStatusListener to the list
of registered listeners.
listener - the listener to addpublic void removeNewsFeedTableStatusListener(INewsFeedTableStatusListener listener)
Removes the specified NewsFeedTableStatusListener from the
list of registered listeners.
listener - the listener to removepublic void setUnreadFilterEnabled(boolean enabled)
Sets the enabled status of the unread news filter. If enabled only unread news otherwise all news are shown.
enabled - true to enable the
unread news filter; false to disable itpublic void setTaggedFilterEnabled(boolean enabled)
Sets the enabled status of the tagged news filter. If enabled only tagged news otherwise all news are shown.
enabled - true to enable the
tagged news filter; false to disable itprivate void createMenuManager()
Creates the internal MenuManager used to
create the context menu of this
NewsFeedTable
private void initializeEventListener()
Initializes the internal event listener list structure.
private void fireStatusChanged()
Notifies all registered NewsFeedTableStatusListener
instances that the status of this NewsFeedTable has
changed.
private void fireClosing()
Notifies all registered NewsFeedTableStatusListener
instances that this NewsFeedTable is about to be closed.
private void initializeTable(Composite parent,
NewsFeed newsFeed)
Initializes this NewsFeedTable by creating the required
models and adjusting its gui specific settings.
parent - the parent to hold this NewsFeedTablenewsFeed - the newsfeed to displayprivate void initializeColumns()
Initializes the table columns by setting their widths and adjusting their settings.
private void registerEventHandler()
Creates and registers the required event handler for this
NewsFeedTable.
private void unregisterEventHandler()
Unregisters all Event Handler from this NewsFeedTable.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||