Regain 2.1.0-STABLE API

net.sf.regain.ui.desktop
Class TrayIconHandler

java.lang.Object
  extended by net.sf.regain.ui.desktop.TrayIconHandler

public class TrayIconHandler
extends Object

Manages the tray icon.

Author:
Thomas Tesche, www.clustersystems.de

Field Summary
private  boolean active
          Should a tray icon be displayed?
private static Localizer localizer
          The localizer for this class.
private  TrayIcon trayIcon
          the TrayIcon itself.
private static TrayIconHandler trayIconHandlerSingleton
          The singleton instance of the TrayIconHandler.
 
Constructor Summary
TrayIconHandler()
           
 
Method Summary
static TrayIconHandler getInstance()
          Gets or create the singleton instances of TrayIconHandler.
 void init(boolean useTrayIcon)
          Initializes the tray icon.
private  Image loadImageFromClasspath(String name)
          Load the image from the classpath.
 void setIndexUpdateRunning(boolean updateRunning)
          Sets whether there is currently an index update running.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

localizer

private static Localizer localizer
The localizer for this class.


trayIconHandlerSingleton

private static TrayIconHandler trayIconHandlerSingleton
The singleton instance of the TrayIconHandler.


active

private boolean active
Should a tray icon be displayed?


trayIcon

private TrayIcon trayIcon
the TrayIcon itself.

Constructor Detail

TrayIconHandler

public TrayIconHandler()
Method Detail

getInstance

public static TrayIconHandler getInstance()
Gets or create the singleton instances of TrayIconHandler.

Returns:
The singleton.

init

public void init(boolean useTrayIcon)
Initializes the tray icon.

Parameters:
useTrayIcon - should the tray icon be displayed

setIndexUpdateRunning

public void setIndexUpdateRunning(boolean updateRunning)
Sets whether there is currently an index update running.

Parameters:
updateRunning - Whether there is currently an index update running.

loadImageFromClasspath

private Image loadImageFromClasspath(String name)
Load the image from the classpath.

Parameters:
name - qualified name of the image (package + image name)
Returns:
the image in case it could be loaded otherwise false

Regain 2.1.0-STABLE API

Regain 2.1.0-STABLE, Copyright (C) 2004-2010 Til Schneider, www.murfman.de, Thomas Tesche, www.clustersystems.info