net.sourceforge.rssowl.controller.tray
Class SystemTray

java.lang.Object
  extended by net.sourceforge.rssowl.controller.tray.SystemTray

public class SystemTray
extends java.lang.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.2.4
Author:
Benjamin Pasero

Field Summary
private  Display display
           
private  MenuItem exitItem
           
(package private)  boolean isMinimizedToTray
           
private  MenuItem markAllReadItem
           
private static int MIN_POPUP_GAP
          Minimum time between two Tray Alerts in Miliseconds
private  MenuItem openItem
           
private  long popupTimeLock
           
private  MenuItem reloadAllItem
           
private static int RESTORE_DELAY
          Delay the restoring of the application window
(package private)  GUI rssOwlGui
           
private  SystemTrayAlert rssOwlTrayPopup
           
(package private)  Shell shell
           
private  Listener shellIconifyListener
           
private  Tray systemTray
           
(package private)  TrayItem systemTrayItem
           
(package private)  Menu systemTrayItemMenu
           
static boolean trayIsTeasing
          Remember the status of teasing in the tray
 
Constructor Summary
SystemTray(Display display, 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
 void resetPopupTimeLock()
          Set the Popup Time Lock to 0 in order to have it reset.
 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


MIN_POPUP_GAP

private static final int MIN_POPUP_GAP
Minimum time between two Tray Alerts in Miliseconds

See Also:
Constant Field Values

RESTORE_DELAY

private static final int RESTORE_DELAY
Delay the restoring of the application window

See Also:
Constant Field Values

display

private Display display

exitItem

private MenuItem exitItem

markAllReadItem

private MenuItem markAllReadItem

openItem

private MenuItem openItem

popupTimeLock

private long popupTimeLock

reloadAllItem

private MenuItem reloadAllItem

rssOwlTrayPopup

private SystemTrayAlert rssOwlTrayPopup

shellIconifyListener

private Listener shellIconifyListener

systemTray

private Tray systemTray

isMinimizedToTray

boolean isMinimizedToTray

rssOwlGui

GUI rssOwlGui

shell

Shell shell

systemTrayItem

TrayItem systemTrayItem

systemTrayItemMenu

Menu systemTrayItemMenu
Constructor Detail

SystemTray

public SystemTray(Display display,
                  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

resetPopupTimeLock

public void resetPopupTimeLock()
Set the Popup Time Lock to 0 in order to have it reset.


restoreWindow

public void restoreWindow()
Hide tray item and show RSSOwl


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



RSSOwl - RSS / RDF / Atom Newsreader

SourceForge.net Logo