net.sourceforge.rssowl.controller.tray
Class SystemTrayAlert

java.lang.Object
  extended bynet.sourceforge.rssowl.controller.tray.SystemTrayAlert

public class SystemTrayAlert
extends Object

This class creates a small Shell which places itself to the bottom right corner and informs the user that unread news are available. A click on the content text will restore RSSOwl from the System Tray.

Version:
1.1.3
Author:
Benjamin Pasero

Field Summary
private static int ANIMATION_DELAY
          Delay animation for performance reasons
private static int AUTO_CLOSE_TIME
          Time after the popup is closed automatically
private  ExtendedThread autoClosePopup
           
(package private)  org.eclipse.swt.graphics.Image closeImageHot
           
(package private)  org.eclipse.swt.graphics.Image closeImageNormal
           
(package private)  org.eclipse.swt.widgets.Display display
           
private static SystemTrayAlert instance
          Keep a single instance of the popup
(package private)  boolean mouseInPopup
           
(package private)  org.eclipse.swt.graphics.Font popupBoldFont
           
(package private)  org.eclipse.swt.graphics.Color popupBorderColor
           
(package private)  boolean popupClosed
           
(package private)  org.eclipse.swt.graphics.Color popupInnerCircleColor
           
(package private)  org.eclipse.swt.graphics.Color popupOuterCircleColor
           
(package private)  org.eclipse.swt.widgets.Shell popupShell
           
(package private)  SystemTray rssOwlSystemTray
           
(package private)  org.eclipse.swt.graphics.Image trayOwlTease
           
 
Constructor Summary
private SystemTrayAlert(org.eclipse.swt.widgets.Display display, SystemTray rssOwlSystemTray)
          Instantiate a new SystemTrayAlert
 
Method Summary
(package private)  void close()
          Close the popup shell
static SystemTrayAlert getInstance(org.eclipse.swt.widgets.Display display, SystemTray rssOwlSystemTray)
          Factory method to create or return the single instance of the popup.
private  org.eclipse.swt.graphics.Rectangle getPrimaryClientArea()
          Get the Client Area of the primary Monitor.
(package private)  void hide()
          Hide the Popup and set location outside client area.
private  void initComponents()
          Init the popup components
private  void initResources()
          Init Fonts, Colors and Images
 boolean isPopupClosed()
          Get if the popup was closed already
(package private)  void move(int x, int y)
          Move the Popup in a timed exec.
private  void moveIn()
          Move the Popup in, from right to left.
(package private)  void onDispose()
          Dispose Resources
 void show()
          Show the popup shell.
private  void startAutoCloseThread()
          This thread will close the popup automatically after a certain amount of time.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ANIMATION_DELAY

private static final int ANIMATION_DELAY
Delay animation for performance reasons

See Also:
Constant Field Values

AUTO_CLOSE_TIME

private static final int AUTO_CLOSE_TIME
Time after the popup is closed automatically

See Also:
Constant Field Values

instance

private static SystemTrayAlert instance
Keep a single instance of the popup


autoClosePopup

private ExtendedThread autoClosePopup

closeImageHot

org.eclipse.swt.graphics.Image closeImageHot

closeImageNormal

org.eclipse.swt.graphics.Image closeImageNormal

display

org.eclipse.swt.widgets.Display display

mouseInPopup

boolean mouseInPopup

popupBoldFont

org.eclipse.swt.graphics.Font popupBoldFont

popupBorderColor

org.eclipse.swt.graphics.Color popupBorderColor

popupClosed

boolean popupClosed

popupInnerCircleColor

org.eclipse.swt.graphics.Color popupInnerCircleColor

popupOuterCircleColor

org.eclipse.swt.graphics.Color popupOuterCircleColor

popupShell

org.eclipse.swt.widgets.Shell popupShell

rssOwlSystemTray

SystemTray rssOwlSystemTray

trayOwlTease

org.eclipse.swt.graphics.Image trayOwlTease
Constructor Detail

SystemTrayAlert

private SystemTrayAlert(org.eclipse.swt.widgets.Display display,
                        SystemTray rssOwlSystemTray)
Instantiate a new SystemTrayAlert

Parameters:
display - The display of RSSOwl
rssOwlSystemTray - The calling System Tray class
Method Detail

getInstance

public static SystemTrayAlert getInstance(org.eclipse.swt.widgets.Display display,
                                          SystemTray rssOwlSystemTray)
Factory method to create or return the single instance of the popup.

Parameters:
display - The display
rssOwlSystemTray - The System Tray of RSSOwl
Returns:
SystemTrayAlert An instance of this class

isPopupClosed

public boolean isPopupClosed()
Get if the popup was closed already

Returns:
boolean TRUE if the popup was closed

show

public void show()
Show the popup shell. Move it in from the right side or just display it, if the user has set so.


getPrimaryClientArea

private org.eclipse.swt.graphics.Rectangle getPrimaryClientArea()
Get the Client Area of the primary Monitor.

Returns:
Rectangle Client Area of the primary Monitor.

initComponents

private void initComponents()
Init the popup components


initResources

private void initResources()
Init Fonts, Colors and Images


moveIn

private void moveIn()
Move the Popup in, from right to left.


startAutoCloseThread

private void startAutoCloseThread()
This thread will close the popup automatically after a certain amount of time. The popup will not close in the case the user has the mouse set into the content or close button.


close

void close()
Close the popup shell


hide

void hide()
Hide the Popup and set location outside client area.


move

void move(int x,
          int y)
Move the Popup in a timed exec.

Parameters:
x - The X location
y - The Y location

onDispose

void onDispose()
Dispose Resources



RSSOwl - RSS / RDF / Atom Newsreader

SourceForge.net Logo