net.sourceforge.java.feednread.frontend.tray
Class TrayNotificationHandler

java.lang.Object
  extended bynet.sourceforge.java.feednread.frontend.tray.TrayNotificationHandler

public class TrayNotificationHandler
extends Object

Creates notification popups in the system tray if the application is minimized and a NewsFeed is updated.

Author:
Sebastian Machhausen

Nested Class Summary
private  class TrayNotificationHandler.AutoCloseNotificationThread
           Internal class to handle the automatic closing of the notification Shell.
private  class TrayNotificationHandler.NewsLinkHandler
           Internal class to handle the hyperlink handling if the user clicks a news link in a notification.
 
Field Summary
private  TrayNotificationHandler.AutoCloseNotificationThread autoCloseNotificationThread
           The Thread to close a notification Shell automatically
private  Point defaultPopupLocation
           The default location where the notifications pop up
private  MainApplicationWindow mainWindow
           The Feed'n Read main window
private  int maxNotificationNews
           The maximum number of news titles to display in a tray notification
private  Label newsCountLabel
           The Label to display the unread news count
private  Label newsFeedLabel
           The Label to display the newsfeed title
private  TrayNotificationHandler.NewsLinkHandler newsLinkHandler
           Handles clicks on the news title ImageHyperlinks
private  ImageHyperlink[] newsTitleLinks
           The ImageHyperlinks to display the news titles
private  Shell notificationShell
           The Shell used to display notifications
 
Constructor Summary
TrayNotificationHandler(MainApplicationWindow mainWindow)
           Creates a new TrayNotificationHandler.
 
Method Summary
private  void createNotificationShell()
           Creates the Shell used to display notifications in the system tray.
 void newsFeedUpdated(NewsFeed newsFeed)
           This method is called when a NewsFeed has been updated and a notification should be created.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mainWindow

private MainApplicationWindow mainWindow

The Feed'n Read main window


notificationShell

private Shell notificationShell

The Shell used to display notifications


newsFeedLabel

private Label newsFeedLabel

The Label to display the newsfeed title


newsCountLabel

private Label newsCountLabel

The Label to display the unread news count


newsTitleLinks

private ImageHyperlink[] newsTitleLinks

The ImageHyperlinks to display the news titles


defaultPopupLocation

private Point defaultPopupLocation

The default location where the notifications pop up


autoCloseNotificationThread

private TrayNotificationHandler.AutoCloseNotificationThread autoCloseNotificationThread

The Thread to close a notification Shell automatically


newsLinkHandler

private TrayNotificationHandler.NewsLinkHandler newsLinkHandler

Handles clicks on the news title ImageHyperlinks


maxNotificationNews

private int maxNotificationNews

The maximum number of news titles to display in a tray notification

Constructor Detail

TrayNotificationHandler

public TrayNotificationHandler(MainApplicationWindow mainWindow)

Creates a new TrayNotificationHandler.

Parameters:
mainWindow - the Feed'n Read main window
Method Detail

newsFeedUpdated

public void newsFeedUpdated(NewsFeed newsFeed)

This method is called when a NewsFeed has been updated and a notification should be created.

Parameters:
newsFeed - the updated NewsFeed

createNotificationShell

private void createNotificationShell()

Creates the Shell used to display notifications in the system tray.