org.chorem.jtimer.ui.systray
Class SystrayManager

java.lang.Object
  extended by org.chorem.jtimer.ui.systray.SystrayManager
All Implemented Interfaces:
WindowListener, EventListener, DataEventListener
Direct Known Subclasses:
AWTSystray, NoSystray

public abstract class SystrayManager
extends Object
implements DataEventListener, WindowListener

Factory to get correct working systray implementation.

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  JTimer parent
          Parent reference
 
Constructor Summary
protected SystrayManager(JTimer parent)
          Default constructor.
 
Method Summary
 void addProject(TimerProject project)
          Add project event.
 void addTask(TimerTask task)
          Add task event.
 void dataLoaded(Collection<TimerProject> projects)
          All data loaded.
 void deleteProject(TimerProject project)
          Delete project.
 void deleteTask(TimerTask task)
          Delete task.
static SystrayManager getSystray(JTimer parentApp)
          Get systray.
 void install()
          Default install method.
 void modifyProject(TimerProject project)
          Modify project.
 void modifyTask(TimerTask task)
          Modify task.
 void postChangeClosedState(TimerTask task)
          Post change task state.
 void postIdleDetect()
          Notify idle dtect ended.
 void postMergeTasks(TimerTask destinationTask, List<TimerTask> otherTasks)
          Post merge task.
 void postMoveTask(TimerTask task)
          Post move task.
 void preChangeClosedState(TimerTask task)
          Pre change task state.
 void preIdleDetect()
          Notify idle detect.
 void preMergeTasks(TimerTask destinationTask, List<TimerTask> otherTasks)
          Pre merge task.
 void preMoveTask(TimerTask task)
          Pre move task.
 void setAnnotation(TimerTask task, Date date, String annotation)
          Add annotation.
 void setTaskTime(TimerTask task, Date date, Long time)
          Set task time.
 void startTask(TimerTask task)
          Start task.
 void stopTask(TimerTask task)
          Stop task.
 void windowActivated(WindowEvent e)
           
 void windowClosed(WindowEvent e)
           
 void windowClosing(WindowEvent e)
           
 void windowDeactivated(WindowEvent e)
           
 void windowDeiconified(WindowEvent e)
           
 void windowIconified(WindowEvent e)
           
 void windowOpened(WindowEvent e)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parent

protected JTimer parent
Parent reference

Constructor Detail

SystrayManager

protected SystrayManager(JTimer parent)
Default constructor.

Parameters:
parent - parent
Method Detail

getSystray

public static SystrayManager getSystray(JTimer parentApp)
Get systray.

Parameters:
parentApp - parent application ref
Returns:
systray impl

install

public void install()
Default install method. Just remove all windows listener and add this systray instance, the only one.


addProject

public void addProject(TimerProject project)
Description copied from interface: DataEventListener
Add project event.

Specified by:
addProject in interface DataEventListener
Parameters:
project - project to add

addTask

public void addTask(TimerTask task)
Description copied from interface: DataEventListener
Add task event.

Specified by:
addTask in interface DataEventListener
Parameters:
task - task to add

dataLoaded

public void dataLoaded(Collection<TimerProject> projects)
Description copied from interface: DataEventListener
All data loaded.

Specified by:
dataLoaded in interface DataEventListener
Parameters:
projects - projects collection

deleteProject

public void deleteProject(TimerProject project)
Description copied from interface: DataEventListener
Delete project.

Specified by:
deleteProject in interface DataEventListener
Parameters:
project - deleted project

deleteTask

public void deleteTask(TimerTask task)
Description copied from interface: DataEventListener
Delete task.

Specified by:
deleteTask in interface DataEventListener
Parameters:
task - deleted task

modifyProject

public void modifyProject(TimerProject project)
Description copied from interface: DataEventListener
Modify project.

Specified by:
modifyProject in interface DataEventListener
Parameters:
project - modified project

modifyTask

public void modifyTask(TimerTask task)
Description copied from interface: DataEventListener
Modify task.

Specified by:
modifyTask in interface DataEventListener
Parameters:
task - modified task

postChangeClosedState

public void postChangeClosedState(TimerTask task)
Description copied from interface: DataEventListener
Post change task state.

Specified by:
postChangeClosedState in interface DataEventListener
Parameters:
task - task

preChangeClosedState

public void preChangeClosedState(TimerTask task)
Description copied from interface: DataEventListener
Pre change task state.

Specified by:
preChangeClosedState in interface DataEventListener
Parameters:
task - task

startTask

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

Specified by:
startTask in interface DataEventListener
Parameters:
task - started task

stopTask

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

Specified by:
stopTask in interface DataEventListener
Parameters:
task - stoped task

setAnnotation

public void setAnnotation(TimerTask task,
                          Date date,
                          String annotation)
Description copied from interface: DataEventListener
Add annotation.

Specified by:
setAnnotation in interface DataEventListener
Parameters:
task - task where annotation is changed
date - date
annotation - new annotation value

setTaskTime

public void setTaskTime(TimerTask task,
                        Date date,
                        Long time)
Description copied from interface: DataEventListener
Set task time.

Specified by:
setTaskTime in interface DataEventListener
Parameters:
task - task where time is changed
date - date
time - task time

postMoveTask

public void postMoveTask(TimerTask task)
Description copied from interface: DataEventListener
Post move task.

Specified by:
postMoveTask in interface DataEventListener
Parameters:
task - task

preMoveTask

public void preMoveTask(TimerTask task)
Description copied from interface: DataEventListener
Pre move task.

Specified by:
preMoveTask in interface DataEventListener
Parameters:
task - task

postMergeTasks

public void postMergeTasks(TimerTask destinationTask,
                           List<TimerTask> otherTasks)
Description copied from interface: DataEventListener
Post merge task.

Specified by:
postMergeTasks in interface DataEventListener
Parameters:
destinationTask - task where all other task will be merged
otherTasks - other tasks to merge

preMergeTasks

public void preMergeTasks(TimerTask destinationTask,
                          List<TimerTask> otherTasks)
Description copied from interface: DataEventListener
Pre merge task.

Specified by:
preMergeTasks in interface DataEventListener
Parameters:
destinationTask - task where all other task will be merged
otherTasks - other tasks to merge

postIdleDetect

public void postIdleDetect()
Notify idle dtect ended.


preIdleDetect

public void preIdleDetect()
Notify idle detect.


windowActivated

public void windowActivated(WindowEvent e)
Specified by:
windowActivated in interface WindowListener

windowClosed

public void windowClosed(WindowEvent e)
Specified by:
windowClosed in interface WindowListener

windowClosing

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

windowDeactivated

public void windowDeactivated(WindowEvent e)
Specified by:
windowDeactivated in interface WindowListener

windowDeiconified

public void windowDeiconified(WindowEvent e)
Specified by:
windowDeiconified in interface WindowListener

windowIconified

public void windowIconified(WindowEvent e)
Specified by:
windowIconified in interface WindowListener

windowOpened

public void windowOpened(WindowEvent e)
Specified by:
windowOpened in interface WindowListener


Copyright © 2007-2009 CodeLutin. All Rights Reserved.