net.sourceforge.rssowl.controller
Class EventManager

java.lang.Object
  extended bynet.sourceforge.rssowl.controller.EventManager

public class EventManager
extends Object

The Event Manager is responsible to react on user-action. User action may for example occur when any item from the main menu is selected.

Version:
1.1.3
Author:
Benjamin Pasero

Field Summary
private  org.eclipse.swt.dnd.Clipboard cb
           
private  org.eclipse.swt.widgets.Display display
           
(package private) static int EDIT_ACTION_COPY
          Edit Menu Action: Copy
(package private) static int EDIT_ACTION_CUT
          Edit Menu Action: Cut
(package private) static int EDIT_ACTION_DELETE
          Edit Menu Action: Delete
(package private) static int EDIT_ACTION_PASTE
          Edit Menu Action: Paste
(package private) static int EDIT_ACTION_PROPERTIES
          Edit Menu Action: Properties
(package private) static int EDIT_ACTION_SELECTALL
          Edit Menu Action: Select All
private  FavoritesTree rssOwlFavoritesTree
           
private  GUI rssOwlGui
           
private  NewsTabFolder rssOwlNewsTabFolder
           
private  NewsText rssOwlNewsText
           
private  Quickview rssOwlQuickView
           
private  org.eclipse.swt.widgets.Shell shell
           
 
Constructor Summary
EventManager(org.eclipse.swt.widgets.Display display, org.eclipse.swt.widgets.Shell shell, GUI rssOwlGui)
          Instantiate a new EventManager
 
Method Summary
 void actionAddToFavorites()
          Add displayed newsfeed to favorites
 void actionAddToFavorites(String title, String url)
          Add displayed newsfeed to favorites
 void actionAggregateAllCategories()
          Open all favorits
 void actionAggregateCategory(boolean reload)
          Open all favorits of the selected category and subcategorys
(package private)  void actionAggregateCategory(Category rssOwlCategory, String searchPattern, boolean reload)
          Open all favorits of the selected category and subcategorys
(package private)  void actionBlogNews()
          Blog displayed newsfeed
 void actionCategoryToOPML()
          Export selected category into OPML format
 void actionCategoryToOPML(Category selectedCat)
          Export selected category into OPML format
 void actionCategoryToOPML(Category selectedCat, String fileName)
          Export selected category into OPML format
(package private)  void actionCheckUpdate()
          Check for an updated RSSOwl version
(package private)  void actionCloseAll()
          Close all opened tabs
 void actionCloseCurrent()
          Close displayed tab
 void actionCopyBlogrollXmlLocation()
          Copy the location of the blogroll XML to clipboard
 void actionCopyFavoritesXmlLocation()
          Copy the XML location of the selected favorite
(package private)  void actionCopyNewsUrl()
          Copy URL of selected newsitem
(package private)  void actionCopyText(org.eclipse.swt.widgets.Control text)
          Copy text into clipboard
 void actionDeleteBlogroll()
          Remove the selected blogroll
 void actionDeleteCategory()
          Delete the selected category
 void actionDeleteFavorite()
          Delete the selected feed
(package private)  void actionDiscoverFeeds()
          Open the dialog to discover newsfeeds on a website
 void actionDiscoverFeeds(String url)
          Open the dialog to discover newsfeeds on a website with the given URL.
 void actionEditBlogroll()
          Edit the selected Blogroll
 void actionEditCategory()
          Edit a category
 void actionEditFavorite()
          Edit a favorite
(package private)  void actionExit()
          Exit application
(package private)  void actionExportFeed(int format)
          Export displayed newsfeed to pdf, rtf or html
(package private)  void actionExportFeed(int format, boolean entireFeed)
          Export displayed newsfeed to pdf, rtf or html
 void actionExportSettings(org.eclipse.swt.widgets.Shell parent)
          Export settings to local file
 void actionFavoriteToOPML()
          Generate OPML from selected favorite
(package private)  void actionGotoNextNews()
          Goto next news (either read or unread)
(package private)  void actionGotoNextTab()
          Goto next tab
(package private)  void actionGotoNextUnreadNews()
          Goto next unread news
(package private)  void actionGotoPreviousTab()
          Goto previous tab
 void actionHandleTreeItemSelect()
          The user has selected to open a TreeItem.
 void actionImportBlogroll()
          Import a synchronized Blogroll
 void actionImportOPML()
          Import favorites using a OPML file
 boolean actionImportSettings(org.eclipse.swt.widgets.Shell parent)
          Import settings from local file
(package private)  void actionMailNewsTip()
          Create a newstip mail
 void actionMarkAllCategoriesRead()
          Mark the favorites on all categories read
 void actionMarkAllNewsRead()
          Mark news of selected feed read
(package private)  void actionMarkAllNewsRead(Channel channel)
          Mark news of given feed read and also update the table in the tabitem that displays the feed.
(package private)  void actionMarkAllNewsRead(Channel channel, boolean updateNewsTable)
          Mark news of given feed read
 void actionMarkCategoryRead()
          Mark the favorites on an entire category read
(package private)  void actionMarkCategoryRead(Category selectedCategory, boolean updateSysTrayStatus)
          Mark the favorites on an entire category read
 void actionMarkFavoriteRead()
          Mark all news of the selected favorite read
(package private)  void actionMarkFavoriteRead(Favorite selectedFavorite)
          Mark all news of the given favorite read
(package private)  void actionMarkFavoriteRead(Favorite selectedFavorite, boolean updateSysTray)
          Mark all news of the given favorite read
(package private)  void actionMarkNewsUnread()
          Mark selected news unread
(package private)  void actionMinimizeWindow()
          Minimize application window
 void actionNewCategory(boolean asSubCategory)
          Add a new category
 String actionNewCategory(org.eclipse.swt.widgets.Shell parent, Category parentCategory)
          Add a new category
 void actionNewFavorite()
          Add a new newsfeed favorite
 void actionNewFavorite(String url, String title, Category selectedCategory)
          Display the "New favorite" dialog and create the new favorite if possible
(package private)  void actionOpenAbout()
          Show the about dialog
 void actionOpenFAQ()
          Open the FAQ.
(package private)  void actionOpenFeed()
          Open newsfeed from the given path
 void actionOpenFeed(String url)
          Open a newsfeed into the tabfolder
(package private)  void actionOpenNewsURL(String newsTitle)
          Open the URL of the given news in the browser
(package private)  void actionOpenPreferences()
          Show RSSOwl's preferences in a dialog
 void actionOpenTutorial()
          Show RSSOwl's tutorial in the browser
 void actionOpenURL(String url)
          Open the URL in the browser
(package private)  void actionOpenURL(String url, boolean handleOrigURL)
          Open the URL in the browser
(package private)  void actionOpenURLExternal(String url)
          Open the URL in the external browser
(package private)  void actionPrintNews()
          Print newstext of displayed news
(package private)  void actionRateNews(NewsItem rssNewsItem, int rating)
          Rate a news (AmphetaRate)
 void actionReload()
          Reload displayed newsfeed
 void actionReloadAllCategories()
          Reload all favorits
 void actionReloadFeed()
          Load selected feed in the tree from source
 void actionRenameSelectedItem()
          Rename the selected TreeItem (in place)
(package private)  void actionSaveFeed()
          Save displayed feed to local file
(package private)  void actionSearch()
          Search in displayed newsfeed
(package private)  void actionSearchFeeds()
          Open the dialog to search for newsfeeds
 void actionSearchInAllCategories()
          Search in all categories
 void actionSearchInCategory()
          Search in an entire category
(package private)  void actionSearchInCategory(Category rssOwlCategory)
          Search in an entire category
 void actionSearchInFeed()
          Perform fulltext search in a feed
 void actionSetBrowserView(boolean enabled)
          Set / Unset the internal browser view on the newstext to have HTML formatted.
 void actionSetProxyOnTreeItem(boolean enabled)
          Enable / Disable use of proxy for this category / favorite
(package private)  void actionShowLicense()
          Show the CPL license in a new tab
(package private)  void actionShowQuickview(boolean show)
          Show / Hide the quickview control
(package private)  void actionShowToolBar(boolean show)
          Show / Hide the toolbar control
(package private)  void actionShowWelcome()
          Show the welcome tab
 void actionSynchronizeBlogroll()
          Synchronize the selected Blogroll
 void actionSynchronizeBlogroll(Category blogrollRootCategory)
          Synchronize the selected Blogroll
(package private)  void actionTellFriends()
          Create a mail to advertise RSSOwl
 void actionValidateFeeds(boolean autoValidate)
          Open the dialog to validate newsfeeds
(package private)  void actionViewFeedInDocument(int format)
          View displayed newsfeed in pdf, rtf or html
(package private)  void handleEditAction(int action)
          This method is called when a MenuItem from the Edit Menu is selected.
 void syncControls()
          Get the main controls from the maincontroller
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EDIT_ACTION_COPY

static final int EDIT_ACTION_COPY
Edit Menu Action: Copy

See Also:
Constant Field Values

EDIT_ACTION_CUT

static final int EDIT_ACTION_CUT
Edit Menu Action: Cut

See Also:
Constant Field Values

EDIT_ACTION_DELETE

static final int EDIT_ACTION_DELETE
Edit Menu Action: Delete

See Also:
Constant Field Values

EDIT_ACTION_PASTE

static final int EDIT_ACTION_PASTE
Edit Menu Action: Paste

See Also:
Constant Field Values

EDIT_ACTION_PROPERTIES

static final int EDIT_ACTION_PROPERTIES
Edit Menu Action: Properties

See Also:
Constant Field Values

EDIT_ACTION_SELECTALL

static final int EDIT_ACTION_SELECTALL
Edit Menu Action: Select All

See Also:
Constant Field Values

cb

private org.eclipse.swt.dnd.Clipboard cb

display

private org.eclipse.swt.widgets.Display display

rssOwlFavoritesTree

private FavoritesTree rssOwlFavoritesTree

rssOwlGui

private GUI rssOwlGui

rssOwlNewsTabFolder

private NewsTabFolder rssOwlNewsTabFolder

rssOwlNewsText

private NewsText rssOwlNewsText

rssOwlQuickView

private Quickview rssOwlQuickView

shell

private org.eclipse.swt.widgets.Shell shell
Constructor Detail

EventManager

public EventManager(org.eclipse.swt.widgets.Display display,
                    org.eclipse.swt.widgets.Shell shell,
                    GUI rssOwlGui)
Instantiate a new EventManager

Parameters:
display - The display
shell - The shell
rssOwlGui - The Maincontroller
Method Detail

actionAddToFavorites

public void actionAddToFavorites()
Add displayed newsfeed to favorites


actionAddToFavorites

public void actionAddToFavorites(String title,
                                 String url)
Add displayed newsfeed to favorites

Parameters:
title - Title of the favorite
url - URL of the favorite

actionAggregateAllCategories

public void actionAggregateAllCategories()
Open all favorits


actionAggregateCategory

public void actionAggregateCategory(boolean reload)
Open all favorits of the selected category and subcategorys

Parameters:
reload - TRUE if the category is only reloaded and not displayed

actionCategoryToOPML

public void actionCategoryToOPML()
Export selected category into OPML format


actionCategoryToOPML

public void actionCategoryToOPML(Category selectedCat)
Export selected category into OPML format

Parameters:
selectedCat - The category to export into OPML.

actionCategoryToOPML

public void actionCategoryToOPML(Category selectedCat,
                                 String fileName)
Export selected category into OPML format

Parameters:
selectedCat - The category to export into OPML.
fileName - A file name suggestion.

actionCloseCurrent

public void actionCloseCurrent()
Close displayed tab


actionCopyBlogrollXmlLocation

public void actionCopyBlogrollXmlLocation()
Copy the location of the blogroll XML to clipboard


actionCopyFavoritesXmlLocation

public void actionCopyFavoritesXmlLocation()
Copy the XML location of the selected favorite


actionDeleteBlogroll

public void actionDeleteBlogroll()
Remove the selected blogroll


actionDeleteCategory

public void actionDeleteCategory()
Delete the selected category


actionDeleteFavorite

public void actionDeleteFavorite()
Delete the selected feed


actionDiscoverFeeds

public void actionDiscoverFeeds(String url)
Open the dialog to discover newsfeeds on a website with the given URL.

Parameters:
url - The URL to discover newsfeeds on

actionEditBlogroll

public void actionEditBlogroll()
Edit the selected Blogroll


actionEditCategory

public void actionEditCategory()
Edit a category


actionEditFavorite

public void actionEditFavorite()
Edit a favorite


actionExportSettings

public void actionExportSettings(org.eclipse.swt.widgets.Shell parent)
Export settings to local file

Parameters:
parent - The parent Shell of the Dialog

actionFavoriteToOPML

public void actionFavoriteToOPML()
Generate OPML from selected favorite


actionHandleTreeItemSelect

public void actionHandleTreeItemSelect()
The user has selected to open a TreeItem. In dependance of what kind of data the TreeItem is representating, an action is performed.


actionImportBlogroll

public void actionImportBlogroll()
Import a synchronized Blogroll


actionImportOPML

public void actionImportOPML()
Import favorites using a OPML file


actionImportSettings

public boolean actionImportSettings(org.eclipse.swt.widgets.Shell parent)
Import settings from local file

Parameters:
parent - The parent Shell of the Dialog
Returns:
boolean TRUE if the import of settings was successfull

actionMarkAllCategoriesRead

public void actionMarkAllCategoriesRead()
Mark the favorites on all categories read


actionMarkAllNewsRead

public void actionMarkAllNewsRead()
Mark news of selected feed read


actionMarkCategoryRead

public void actionMarkCategoryRead()
Mark the favorites on an entire category read


actionMarkFavoriteRead

public void actionMarkFavoriteRead()
Mark all news of the selected favorite read


actionNewCategory

public void actionNewCategory(boolean asSubCategory)
Add a new category

Parameters:
asSubCategory - If TRUE the new category will be created as subcategory of the selected one.

actionNewCategory

public String actionNewCategory(org.eclipse.swt.widgets.Shell parent,
                                Category parentCategory)
Add a new category

Parameters:
parent - The parent Shell of the Dialog
parentCategory - The parent category of the new category
Returns:
boolean TRUE on success

actionNewFavorite

public void actionNewFavorite()
Add a new newsfeed favorite


actionNewFavorite

public void actionNewFavorite(String url,
                              String title,
                              Category selectedCategory)
Display the "New favorite" dialog and create the new favorite if possible

Parameters:
url - Preset URL field of the dialog
title - Preset title field of the dialog
selectedCategory - The selected category, or NULL

actionOpenFAQ

public void actionOpenFAQ()
Open the FAQ. Either open locally if exist, otherwise load the FAQ from the Homepage.


actionOpenFeed

public void actionOpenFeed(String url)
Open a newsfeed into the tabfolder

Parameters:
url - The url of the newsfeed

actionOpenTutorial

public void actionOpenTutorial()
Show RSSOwl's tutorial in the browser


actionOpenURL

public void actionOpenURL(String url)
Open the URL in the browser

Parameters:
url - The URL to open

actionReload

public void actionReload()
Reload displayed newsfeed


actionReloadAllCategories

public void actionReloadAllCategories()
Reload all favorits


actionReloadFeed

public void actionReloadFeed()
Load selected feed in the tree from source


actionRenameSelectedItem

public void actionRenameSelectedItem()
Rename the selected TreeItem (in place)


actionSearchInAllCategories

public void actionSearchInAllCategories()
Search in all categories


actionSearchInCategory

public void actionSearchInCategory()
Search in an entire category


actionSearchInFeed

public void actionSearchInFeed()
Perform fulltext search in a feed


actionSetBrowserView

public void actionSetBrowserView(boolean enabled)
Set / Unset the internal browser view on the newstext to have HTML formatted.

Parameters:
enabled - TRUE if the internal browser should be used to display the newstext.

actionSetProxyOnTreeItem

public void actionSetProxyOnTreeItem(boolean enabled)
Enable / Disable use of proxy for this category / favorite

Parameters:
enabled - State of use proxy

actionSynchronizeBlogroll

public void actionSynchronizeBlogroll()
Synchronize the selected Blogroll


actionSynchronizeBlogroll

public void actionSynchronizeBlogroll(Category blogrollRootCategory)
Synchronize the selected Blogroll

Parameters:
blogrollRootCategory - The blogroll to synchronize

actionValidateFeeds

public void actionValidateFeeds(boolean autoValidate)
Open the dialog to validate newsfeeds

Parameters:
autoValidate - If TRUE, validate automatically after dialog was opened

syncControls

public void syncControls()
Get the main controls from the maincontroller


actionAggregateCategory

void actionAggregateCategory(Category rssOwlCategory,
                             String searchPattern,
                             boolean reload)
Open all favorits of the selected category and subcategorys

Parameters:
rssOwlCategory - The category to aggregate
searchPattern - The pattern to search for or NULL if not searching
reload - TRUE if the category is only reloaded and not displayed

actionBlogNews

void actionBlogNews()
Blog displayed newsfeed


actionCheckUpdate

void actionCheckUpdate()
Check for an updated RSSOwl version


actionCloseAll

void actionCloseAll()
Close all opened tabs


actionCopyNewsUrl

void actionCopyNewsUrl()
Copy URL of selected newsitem


actionCopyText

void actionCopyText(org.eclipse.swt.widgets.Control text)
Copy text into clipboard

Parameters:
text - Any control capable of holding text

actionDiscoverFeeds

void actionDiscoverFeeds()
Open the dialog to discover newsfeeds on a website


actionExit

void actionExit()
Exit application


actionExportFeed

void actionExportFeed(int format)
Export displayed newsfeed to pdf, rtf or html

Parameters:
format - PDF, RTF or HTML

actionExportFeed

void actionExportFeed(int format,
                      boolean entireFeed)
Export displayed newsfeed to pdf, rtf or html

Parameters:
format - PDF, RTF or HTML
entireFeed - If TRUE export the entire feed to the document. If FALSE, get the newstitle and only generate the document from the selected newsheader.

actionGotoNextNews

void actionGotoNextNews()
Goto next news (either read or unread)


actionGotoNextTab

void actionGotoNextTab()
Goto next tab


actionGotoNextUnreadNews

void actionGotoNextUnreadNews()
Goto next unread news


actionGotoPreviousTab

void actionGotoPreviousTab()
Goto previous tab


actionMailNewsTip

void actionMailNewsTip()
Create a newstip mail


actionMarkAllNewsRead

void actionMarkAllNewsRead(Channel channel)
Mark news of given feed read and also update the table in the tabitem that displays the feed.

Parameters:
channel - The channel to mark read

actionMarkAllNewsRead

void actionMarkAllNewsRead(Channel channel,
                           boolean updateNewsTable)
Mark news of given feed read

Parameters:
channel - The channel to mark read
updateNewsTable - If TRUE also update the table that is showing newsitems in the tabfolder

actionMarkCategoryRead

void actionMarkCategoryRead(Category selectedCategory,
                            boolean updateSysTrayStatus)
Mark the favorites on an entire category read

Parameters:
selectedCategory - The category to mark read
updateSysTrayStatus - Wether to update the Systemtray Status

actionMarkFavoriteRead

void actionMarkFavoriteRead(Favorite selectedFavorite)
Mark all news of the given favorite read

Parameters:
selectedFavorite - The selected favorite containing news to mark read

actionMarkFavoriteRead

void actionMarkFavoriteRead(Favorite selectedFavorite,
                            boolean updateSysTray)
Mark all news of the given favorite read

Parameters:
selectedFavorite - The selected favorite containing news to mark read
updateSysTray - Wether to update the Systemtray status

actionMarkNewsUnread

void actionMarkNewsUnread()
Mark selected news unread


actionMinimizeWindow

void actionMinimizeWindow()
Minimize application window


actionOpenAbout

void actionOpenAbout()
Show the about dialog


actionOpenFeed

void actionOpenFeed()
Open newsfeed from the given path


actionOpenNewsURL

void actionOpenNewsURL(String newsTitle)
Open the URL of the given news in the browser

Parameters:
newsTitle - Title of the news

actionOpenPreferences

void actionOpenPreferences()
Show RSSOwl's preferences in a dialog


actionOpenURL

void actionOpenURL(String url,
                   boolean handleOrigURL)
Open the URL in the browser

Parameters:
url - The URL to open
handleOrigURL - If TRUE the selected URL is compared to the tag that comes in AmphetaRate recommended articles. If the URL is the origurl, the "New Favorite" Dialog is opened.

actionOpenURLExternal

void actionOpenURLExternal(String url)
Open the URL in the external browser

Parameters:
url - The URL to open

actionPrintNews

void actionPrintNews()
Print newstext of displayed news


actionRateNews

void actionRateNews(NewsItem rssNewsItem,
                    int rating)
Rate a news (AmphetaRate)

Parameters:
rssNewsItem - The newsitem to rate
rating - One of the supported rating levels (Fantastic, Good, Moderate, Bad, Very Bad).

actionSaveFeed

void actionSaveFeed()
Save displayed feed to local file


actionSearch

void actionSearch()
Search in displayed newsfeed


actionSearchFeeds

void actionSearchFeeds()
Open the dialog to search for newsfeeds


actionSearchInCategory

void actionSearchInCategory(Category rssOwlCategory)
Search in an entire category

Parameters:
rssOwlCategory - The category to search in

actionShowLicense

void actionShowLicense()
Show the CPL license in a new tab


actionShowQuickview

void actionShowQuickview(boolean show)
Show / Hide the quickview control

Parameters:
show - TRUE if visible

actionShowToolBar

void actionShowToolBar(boolean show)
Show / Hide the toolbar control

Parameters:
show - TRUE if visible

actionShowWelcome

void actionShowWelcome()
Show the welcome tab


actionTellFriends

void actionTellFriends()
Create a mail to advertise RSSOwl


actionViewFeedInDocument

void actionViewFeedInDocument(int format)
View displayed newsfeed in pdf, rtf or html

Parameters:
format - PDF, RTF or HTML

handleEditAction

void handleEditAction(int action)
This method is called when a MenuItem from the Edit Menu is selected. It will retrieve the current selected control and perform an action based on the given action value and the type of Control that is selected.

Parameters:
action - One of the supported actions of the edit menu


RSSOwl - RSS / RDF / Atom Newsreader

SourceForge.net Logo