net.sourceforge.rssowl.controller.tray
Class SystemTray

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

public class SystemTray
extends Object

RSSOwl is supporting a simple system tray menu that allows to re-open and to exit RSSOwl. Supported on Windows and Linux.

Version:
1.1.3
Author:
Benjamin Pasero

Field Summary
private  org.eclipse.swt.widgets.Display display
           
private  org.eclipse.swt.widgets.MenuItem exitItem
           
(package private)  boolean isMinimizedToTray
           
private  org.eclipse.swt.widgets.MenuItem markAllReadItem
           
private  org.eclipse.swt.widgets.MenuItem openItem
           
private  org.eclipse.swt.widgets.MenuItem reloadAllItem
           
(package private)  GUI rssOwlGui
           
private  SystemTrayAlert rssOwlTrayPopup
           
(package private)  org.eclipse.swt.widgets.Shell shell
           
private  org.eclipse.swt.widgets.Listener shellIconifyListener
           
private  org.eclipse.swt.widgets.Tray systemTray
           
(package private)  org.eclipse.swt.widgets.TrayItem systemTrayItem
           
(package private)  org.eclipse.swt.widgets.Menu systemTrayItemMenu
           
static boolean trayIsTeasing
          Remember the status of teasing in the tray
 
Constructor Summary
SystemTray(org.eclipse.swt.widgets.Display display, org.eclipse.swt.widgets.Shell shell, GUI rssOwlGui)
          Instantiate a new SystemTray
 
Method Summary
 void disable()
          Disable systray icon
private  void initComponents()
          Init the System Tray Menu
 boolean isMinimizedToTray()
          Get wether RSSOwl is minimized to system tray
(package private)  void minimizeWindow()
          Minimize RSSOwl to the system tray
(package private)  void restoreWindow()
          Hide tray item and show RSSOwl
 void setTrayItemState(boolean teasing)
          Set the trayitem state to either teasing or not.
private  void showTrayPopup()
          Show Tray Popup if: - GlobalSettings allow it (GlobalSettings.showTrayPopup = TRUE) - Unread news are available (teasing = TRUE) - RSSOwl is minimized to the tray and not visible (isMinimizedToTray) - No tray popup was made before (rssOwlTrayPopup = NULL), or - The previous tray popup was already closed
 void updateI18N()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

trayIsTeasing

public static boolean trayIsTeasing
Remember the status of teasing in the tray


display

private org.eclipse.swt.widgets.Display display

exitItem

private org.eclipse.swt.widgets.MenuItem exitItem

markAllReadItem

private org.eclipse.swt.widgets.MenuItem markAllReadItem

openItem

private org.eclipse.swt.widgets.MenuItem openItem

reloadAllItem

private org.eclipse.swt.widgets.MenuItem reloadAllItem

rssOwlTrayPopup

private SystemTrayAlert rssOwlTrayPopup

shellIconifyListener

private org.eclipse.swt.widgets.Listener shellIconifyListener

systemTray

private org.eclipse.swt.widgets.Tray systemTray

isMinimizedToTray

boolean isMinimizedToTray

rssOwlGui

GUI rssOwlGui

shell

org.eclipse.swt.widgets.Shell shell

systemTrayItem

org.eclipse.swt.widgets.TrayItem systemTrayItem

systemTrayItemMenu

org.eclipse.swt.widgets.Menu systemTrayItemMenu
Constructor Detail

SystemTray

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

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

disable

public void disable()
Disable systray icon


isMinimizedToTray

public boolean isMinimizedToTray()
Get wether RSSOwl is minimized to system tray

Returns:
boolean TRUE if minimized to tray

setTrayItemState

public void setTrayItemState(boolean teasing)
Set the trayitem state to either teasing or not.

Parameters:
teasing - Set to TRUE to indicate unread news are available

updateI18N

public void updateI18N()
See Also:
ITranslatable.updateI18N()

initComponents

private void initComponents()
Init the System Tray Menu


showTrayPopup

private void showTrayPopup()
Show Tray Popup if:

- GlobalSettings allow it (GlobalSettings.showTrayPopup = TRUE)

- Unread news are available (teasing = TRUE)

- RSSOwl is minimized to the tray and not visible (isMinimizedToTray)

- No tray popup was made before (rssOwlTrayPopup = NULL), or

- The previous tray popup was already closed


minimizeWindow

void minimizeWindow()
Minimize RSSOwl to the system tray


restoreWindow

void restoreWindow()
Hide tray item and show RSSOwl



RSSOwl - RSS / RDF / Atom Newsreader

SourceForge.net Logo