org.chorem.jtimer.ui.systray
Class AWTSystray

java.lang.Object
  extended by org.chorem.jtimer.ui.systray.SystrayManager
      extended by org.chorem.jtimer.ui.systray.AWTSystray
All Implemented Interfaces:
ActionListener, MouseListener, WindowListener, PropertyChangeListener, EventListener, DataEventListener

public class AWTSystray
extends SystrayManager
implements ActionListener, MouseListener, PropertyChangeListener

Manager for systray icon.

Version:
$Revision: 2607 $ Last update : $Date: 2009-06-18 17:19:19 +0200 (jeu. 18 juin 2009) $ By : $Author: echatellier $
Author:
chatellier

Field Summary
protected  Image idleDetectImage
          Idle detect image
protected  Image idleImage
          Idle image
protected  int nbTasksRunning
          Reference how many tasks are running
protected  JPopupMenu popup
          popup menu instance
protected  org.jdesktop.application.ResourceMap resourceMap
          I18n resources map
protected  Image runningImage
          Running image
protected  JMenuItem showItem
          Menu show
protected  TrayIcon trayIcon
          Tray icon
 
Fields inherited from class org.chorem.jtimer.ui.systray.SystrayManager
parent
 
Constructor Summary
protected AWTSystray(JTimer parent)
          Constructor.
 
Method Summary
 void actionPerformed(ActionEvent e)
           
 void install()
          Install try icon into systray.
 void mouseClicked(MouseEvent e)
           
 void mouseEntered(MouseEvent e)
           
 void mouseExited(MouseEvent e)
           
 void mousePressed(MouseEvent e)
           
 void mouseReleased(MouseEvent e)
           
 void postIdleDetect()
          Notify idle dtect ended.
 void preIdleDetect()
          Notify idle detect.
 void propertyChange(PropertyChangeEvent evt)
           
protected  void startStopTask(TimerTask task, boolean start)
          Common code for start or stop task.
 void startTask(TimerTask task)
          Start task.
 void stopTask(TimerTask task)
          Stop task.
 void windowClosing(WindowEvent e)
           
 
Methods inherited from class org.chorem.jtimer.ui.systray.SystrayManager
addProject, addTask, dataLoaded, deleteProject, deleteTask, getSystray, modifyProject, modifyTask, postChangeClosedState, postMergeTasks, postMoveTask, preChangeClosedState, preMergeTasks, preMoveTask, setAnnotation, setTaskTime, windowActivated, windowClosed, windowDeactivated, windowDeiconified, windowIconified, windowOpened
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

resourceMap

protected org.jdesktop.application.ResourceMap resourceMap
I18n resources map


trayIcon

protected TrayIcon trayIcon
Tray icon


idleImage

protected Image idleImage
Idle image


runningImage

protected Image runningImage
Running image


idleDetectImage

protected Image idleDetectImage
Idle detect image


nbTasksRunning

protected int nbTasksRunning
Reference how many tasks are running


popup

protected JPopupMenu popup
popup menu instance


showItem

protected JMenuItem showItem
Menu show

Constructor Detail

AWTSystray

protected AWTSystray(JTimer parent)
Constructor. Protected to be called only by factory.

Parameters:
parent - parent
Method Detail

install

public void install()
Install try icon into systray.

Overrides:
install in class SystrayManager

startTask

public void startTask(TimerTask task)
Description copied from interface: DataEventListener
Start task.

Specified by:
startTask in interface DataEventListener
Overrides:
startTask in class SystrayManager
Parameters:
task - started task

stopTask

public void stopTask(TimerTask task)
Description copied from interface: DataEventListener
Stop task.

Specified by:
stopTask in interface DataEventListener
Overrides:
stopTask in class SystrayManager
Parameters:
task - stoped task

startStopTask

protected void startStopTask(TimerTask task,
                             boolean start)
Common code for start or stop task.

Parameters:
task - task
start - start(true) or stop(false) task

postIdleDetect

public void postIdleDetect()
Description copied from class: SystrayManager
Notify idle dtect ended.

Overrides:
postIdleDetect in class SystrayManager

preIdleDetect

public void preIdleDetect()
Description copied from class: SystrayManager
Notify idle detect.

Overrides:
preIdleDetect in class SystrayManager

propertyChange

public void propertyChange(PropertyChangeEvent evt)
Specified by:
propertyChange in interface PropertyChangeListener

actionPerformed

public void actionPerformed(ActionEvent e)
Specified by:
actionPerformed in interface ActionListener

mouseClicked

public void mouseClicked(MouseEvent e)
Specified by:
mouseClicked in interface MouseListener

mouseEntered

public void mouseEntered(MouseEvent e)
Specified by:
mouseEntered in interface MouseListener

mouseExited

public void mouseExited(MouseEvent e)
Specified by:
mouseExited in interface MouseListener

mousePressed

public void mousePressed(MouseEvent e)
Specified by:
mousePressed in interface MouseListener

mouseReleased

public void mouseReleased(MouseEvent e)
Specified by:
mouseReleased in interface MouseListener

windowClosing

public void windowClosing(WindowEvent e)
Specified by:
windowClosing in interface WindowListener
Overrides:
windowClosing in class SystrayManager


Copyright © 2007-2009 CodeLutin. All Rights Reserved.