|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnet.sourceforge.java.feednread.frontend.components.favoritestree.NewsFeedFavoritesTree
Component to display a Tree of hierarchical
Category and Favorite structures.
| Nested Class Summary | |
private class |
NewsFeedFavoritesTree.RefreshFavoritesTreeTask
Runnable task to refresh the
NewsFeedFavoritesTree if the filter value changed.
|
| Field Summary | |
private TreeCellModifier |
cellModifier
Describes how to edit an element in the favorites tree by querying the corresponding value from the model and putting the updated value back into the model again. |
private ToolItem |
clearFilterButton
Button to clear the filter |
private ToolBar |
clearFilterToolBar
The filter ToolBar |
private TreeViewerContentProvider |
contentProvider
The favorites tree content provider which delivers the data from the underlying model layer to the gui layer. |
private TreeViewerDnDHandler |
dndHandler
DnD support for the favorites TreeViewer |
private Object[] |
expandedElements
A backup structure for the currently expanded elements. |
private TreeViewer |
favoritesViewer
The TreeViewer that manages the
NewsFeedFavoritesTree
|
private TreeViewerFilter |
filter
Default favorites tree filter which allows filtering the complete favorites tree upon a filter keyword. |
private static int |
FILTER_REFRESH_INTERVAL
The refresh interval of the filter in milliseconds |
private Text |
filterField
The favorites tree filter Text field |
private CLabel |
filterLabel
The favorites tree filter CLabel |
private NewsFeedFavoritesTreeLabelProvider |
labelProvider
The favorites tree label provider which converts or translates domain objects from the model layer to the gui layer by providing textual and visual representations of domain objects. |
private long |
lastFilterUpdate
The timestamp of the last update to the filter |
private MainApplicationWindow |
mainWindow
The Feed'n Read main window |
private MenuManager |
menuMgr
The internal MenuManager used to create the context
Menu
|
private Tree |
newsFeedFavorites
The favorites Tree itself |
private TreeViewerSorter |
sorter
Default favorites tree sorter. |
| Constructor Summary | |
NewsFeedFavoritesTree(Composite parent,
MainApplicationWindow mainWindow)
Creates a new NewsFeedFavoritesTree instance and embeds it
into the specified component.
|
|
| Method Summary | |
void |
collapseAll()
Collapses all expanded elements in this NewsFeedFavoritesTree.
|
private void |
createFavoritesPanel(Composite parent)
Creates a panel holding a form that contains a header, the favorites tree itself and an attached toolbar. |
private void |
createFavoritesTree(Composite parent)
Creates the favorites tree itself, creates the underlying model and adjusts its settings. |
private void |
createFilterBar(Composite parent)
Creates the filter bar to hold an input field which allows an user input to filter the favorites tree. |
private void |
createMenuManager()
Creates the internal MenuManager used to
create the context menu of this
NewsFeedFavoritesTree
|
void |
defaultLanguageChanged(LanguageResourceChangeEvent lrce)
Called whenever the default language changes. |
void |
dispose()
Disposes all resources claimed by this NewsFeedFavoritesTree.
|
void |
expand(ITreeElement element)
Expands the specified ITreeElement.
|
void |
expandAll()
Expands all collapsed elements in this NewsFeedFavoritesTree.
|
IMutableTreeElement |
getRoot()
Gets the root of this favorites tree. |
IMutableTreeElement |
getSelection()
Gets the current selection of the favorites tree. |
boolean |
isVisible()
Gets the visibility status of this NewsFeedFavoritesTree
component.
|
void |
refresh()
Refreshes this NewsFeedFavoritesTree.
|
private void |
registerEventHandler()
Creates and registers all event handlers required in this NewsFeedFavoritesTree |
void |
setSelection(IMutableTreeElement element)
Sets the current selection of the favorites tree to the specified element. |
void |
setVisible(boolean visible)
Sets the visibility status of this NewsFeedFavoritesTree
component.
|
void |
showElement(ITreeElement element)
Shows the specified element by making sure that it's visible in the favorites tree. |
private void |
unregisterEventHandler()
Unregisters all event handlers required in this NewsFeedFavoritesTree |
| 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 TreeViewer favoritesViewer
The TreeViewer that manages the
NewsFeedFavoritesTree
private Tree newsFeedFavorites
The favorites Tree itself
private CLabel filterLabel
The favorites tree filter CLabel
private Text filterField
The favorites tree filter Text field
private ToolBar clearFilterToolBar
The filter ToolBar
private ToolItem clearFilterButton
Button to clear the filter
private static final int FILTER_REFRESH_INTERVAL
The refresh interval of the filter in milliseconds
private TreeViewerContentProvider contentProvider
The favorites tree content provider which delivers the data from the underlying model layer to the gui layer.
private NewsFeedFavoritesTreeLabelProvider labelProvider
The favorites tree label provider which converts or translates domain objects from the model layer to the gui layer by providing textual and visual representations of domain objects.
private TreeViewerSorter sorter
Default favorites tree sorter. By default Categories are
weighted higher than Favorites.
private TreeViewerFilter filter
Default favorites tree filter which allows filtering the complete favorites tree upon a filter keyword.
private TreeCellModifier cellModifier
Describes how to edit an element in the favorites tree by querying the corresponding value from the model and putting the updated value back into the model again.
private Object[] expandedElements
A backup structure for the currently expanded elements. This is needed whensoever the favorites tree is filtered by user interaction to store and restore the current expansion status of the tree.
private long lastFilterUpdate
The timestamp of the last update to the filter
private MenuManager menuMgr
The internal MenuManager used to create the context
Menu
private TreeViewerDnDHandler dndHandler
DnD support for the favorites TreeViewer
| Constructor Detail |
public NewsFeedFavoritesTree(Composite parent,
MainApplicationWindow mainWindow)
Creates a new NewsFeedFavoritesTree instance and embeds it
into the specified component.
parent - the component to embed this
NewsFeedFavoritesTree intomainWindow - 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 resources claimed by this
NewsFeedFavoritesTree.
public void setSelection(IMutableTreeElement element)
Sets the current selection of the favorites tree to the specified
element. This may either be a Category or
a Favorite instance.
element - the IMutableTreeElement to selectpublic IMutableTreeElement getSelection()
Gets the current selection of the favorites tree. This may either be a
Category or a Favorite instance.
public IMutableTreeElement getRoot()
Gets the root of this favorites tree. Note that the root is set invisible by default.
public void showElement(ITreeElement element)
Shows the specified element by making sure that it's visible in the favorites tree. The current selection remains unchanged.
element - the element to make visiblepublic void expand(ITreeElement element)
Expands the specified ITreeElement.
element - the ITreeElement to expandpublic void expandAll()
Expands all collapsed elements in this
NewsFeedFavoritesTree.
public void collapseAll()
Collapses all expanded elements in this
NewsFeedFavoritesTree.
public void setVisible(boolean visible)
Sets the visibility status of this NewsFeedFavoritesTree
component.
visible - true for visible; false
for invisiblepublic boolean isVisible()
Gets the visibility status of this NewsFeedFavoritesTree
component.
true if visible; false
if invisiblepublic void refresh()
Refreshes this NewsFeedFavoritesTree.
private void createMenuManager()
Creates the internal MenuManager used to
create the context menu of this
NewsFeedFavoritesTree
private void createFavoritesPanel(Composite parent)
Creates a panel holding a form that contains a header, the favorites tree itself and an attached toolbar.
parent - the component to embed the created favorites panel intoprivate void createFavoritesTree(Composite parent)
Creates the favorites tree itself, creates the underlying model and adjusts its settings.
parent - the parent Composite to embed the created
favorites Tree inprivate void createFilterBar(Composite parent)
Creates the filter bar to hold an input field which allows an user input to filter the favorites tree.
parent - the parent Composite to embed the created
filter bar inprivate void registerEventHandler()
Creates and registers all event handlers required in this
NewsFeedFavoritesTree context.
private void unregisterEventHandler()
Unregisters all event handlers required in this
NewsFeedFavoritesTree context.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||