|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.chorem.jtimer.ui.systray.SystrayManager
public class SystrayManager
Factory to get correct working systray implementation.
Field Summary | |
---|---|
protected Image |
idleDetectImage
Idle detect image. |
protected Image |
idleImage
Idle image. |
protected int |
nbTasksRunning
Reference how many tasks are running. |
protected JTimer |
parent
Parent reference. |
protected JPopupMenu |
popup
Non running popup menu instance. |
protected org.jdesktop.application.ResourceMap |
resourceMap
I18n resources map. |
protected Image |
runningImage
Running image. |
protected JMenuItem |
showItem
Menu show. |
protected JMenuItem |
stopItem
Menu stop. |
protected JPopupTrayIcon |
trayIcon
Tray icon. |
Constructor Summary | |
---|---|
SystrayManager(JTimer parent)
Default constructor. |
Method Summary | |
---|---|
void |
actionPerformed(ActionEvent e)
|
void |
addProject(TimerProject project)
Add project event. |
void |
addTask(TimerTask task)
Add task event. |
void |
changeClosedState(TimerTask task)
Change task state. |
void |
dataLoaded(Collection<TimerProject> projects)
All data loaded. |
void |
deleteProject(TimerProject project)
Delete project. |
void |
deleteTask(TimerTask task)
Delete task. |
void |
install()
Install try icon into systray. |
void |
modifyProject(TimerProject project)
Modify project. |
void |
modifyTask(TimerTask task)
Modify task. |
void |
mouseClicked(MouseEvent e)
|
void |
mouseEntered(MouseEvent e)
|
void |
mouseExited(MouseEvent e)
|
void |
mousePressed(MouseEvent e)
|
void |
mouseReleased(MouseEvent e)
|
void |
moveTask(TimerTask task)
Post move task. |
void |
postIdleDetect()
Called by main application UI after idle detect. |
void |
postMergeTasks(TimerTask destinationTask,
List<TimerTask> otherTasks)
Post merge task. |
void |
preIdleDetect()
Called by main application UI on idle detect. |
void |
preMergeTasks(TimerTask destinationTask,
List<TimerTask> otherTasks)
Pre merge task. |
void |
preMoveTask(TimerTask task)
Pre move task. |
void |
run()
Tray icon installation is make into a thread, put un AWT event queue. |
void |
setAnnotation(TimerTask task,
Date date,
String annotation)
Add annotation. |
void |
setTaskTime(TimerTask task,
Date date,
Long time)
Set task time. |
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 |
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 |
---|
protected JTimer parent
protected org.jdesktop.application.ResourceMap resourceMap
protected Image idleImage
protected Image runningImage
protected Image idleDetectImage
protected JPopupTrayIcon trayIcon
protected int nbTasksRunning
protected JPopupMenu popup
protected JMenuItem showItem
protected JMenuItem stopItem
Constructor Detail |
---|
public SystrayManager(JTimer parent)
parent
- parentMethod Detail |
---|
public void install()
public void run()
run
in interface Runnable
EventQueue.invokeLater(Runnable)
public void addProject(TimerProject project)
DataEventListener
addProject
in interface DataEventListener
project
- project to addpublic void addTask(TimerTask task)
DataEventListener
addTask
in interface DataEventListener
task
- task to addpublic void dataLoaded(Collection<TimerProject> projects)
DataEventListener
dataLoaded
in interface DataEventListener
projects
- projects collectionpublic void deleteProject(TimerProject project)
DataEventListener
deleteProject
in interface DataEventListener
project
- deleted projectpublic void deleteTask(TimerTask task)
DataEventListener
deleteTask
in interface DataEventListener
task
- deleted taskpublic void modifyProject(TimerProject project)
DataEventListener
modifyProject
in interface DataEventListener
project
- modified projectpublic void modifyTask(TimerTask task)
DataEventListener
modifyTask
in interface DataEventListener
task
- modified taskpublic void changeClosedState(TimerTask task)
DataEventListener
changeClosedState
in interface DataEventListener
task
- taskpublic void startTask(TimerTask task)
DataEventListener
startTask
in interface DataEventListener
task
- started taskpublic void stopTask(TimerTask task)
DataEventListener
stopTask
in interface DataEventListener
task
- stoped taskprotected void startStopTask(TimerTask task, boolean start)
task
- taskstart
- start(true) or stop(false) taskpublic void preIdleDetect()
public void postIdleDetect()
public void actionPerformed(ActionEvent e)
actionPerformed
in interface ActionListener
public void setAnnotation(TimerTask task, Date date, String annotation)
DataEventListener
setAnnotation
in interface DataEventListener
task
- task where annotation is changeddate
- dateannotation
- new annotation valuepublic void setTaskTime(TimerTask task, Date date, Long time)
DataEventListener
setTaskTime
in interface DataEventListener
task
- task where time is changeddate
- datetime
- task timepublic void moveTask(TimerTask task)
DataEventListener
moveTask
in interface DataEventListener
task
- taskpublic void preMoveTask(TimerTask task)
DataEventListener
preMoveTask
in interface DataEventListener
task
- taskpublic void postMergeTasks(TimerTask destinationTask, List<TimerTask> otherTasks)
DataEventListener
postMergeTasks
in interface DataEventListener
destinationTask
- task where all other task will be mergedotherTasks
- other tasks to mergepublic void preMergeTasks(TimerTask destinationTask, List<TimerTask> otherTasks)
DataEventListener
preMergeTasks
in interface DataEventListener
destinationTask
- task where all other task will be mergedotherTasks
- other tasks to mergepublic void mouseClicked(MouseEvent e)
mouseClicked
in interface MouseListener
public void mouseEntered(MouseEvent e)
mouseEntered
in interface MouseListener
public void mouseExited(MouseEvent e)
mouseExited
in interface MouseListener
public void mousePressed(MouseEvent e)
mousePressed
in interface MouseListener
public void mouseReleased(MouseEvent e)
mouseReleased
in interface MouseListener
public void windowClosing(WindowEvent e)
windowClosing
in interface WindowListener
public void windowActivated(WindowEvent e)
windowActivated
in interface WindowListener
public void windowClosed(WindowEvent e)
windowClosed
in interface WindowListener
public void windowDeactivated(WindowEvent e)
windowDeactivated
in interface WindowListener
public void windowDeiconified(WindowEvent e)
windowDeiconified
in interface WindowListener
public void windowIconified(WindowEvent e)
windowIconified
in interface WindowListener
public void windowOpened(WindowEvent e)
windowOpened
in interface WindowListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |