|
||||||||||
| 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 |
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 |
postChangeClosedState(TimerTask task)
Post change task state. |
void |
postIdleDetect()
Called by main application UI after idle detect. |
void |
postMergeTasks(TimerTask destinationTask,
List<TimerTask> otherTasks)
Post merge task. |
void |
preChangeClosedState(TimerTask task)
Pre change task state. |
void |
preDeleteProject(TimerProject project)
Before delete project. |
void |
preDeleteTask(TimerTask task)
Before delete 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 - parent| Method Detail |
|---|
public void install()
public void run()
run in interface RunnableEventQueue.invokeLater(Runnable)public void addProject(TimerProject project)
DataEventListener
addProject in interface DataEventListenerproject - project to addpublic void addTask(TimerTask task)
DataEventListener
addTask in interface DataEventListenertask - task to addpublic void dataLoaded(Collection<TimerProject> projects)
DataEventListener
dataLoaded in interface DataEventListenerprojects - projects collectionpublic void preDeleteProject(TimerProject project)
DataEventListener
preDeleteProject in interface DataEventListenerproject - deleted projectpublic void preDeleteTask(TimerTask task)
DataEventListener
preDeleteTask in interface DataEventListenertask - deleted taskpublic void deleteProject(TimerProject project)
DataEventListener
deleteProject in interface DataEventListenerproject - deleted projectpublic void deleteTask(TimerTask task)
DataEventListener
deleteTask in interface DataEventListenertask - deleted taskpublic void modifyProject(TimerProject project)
DataEventListener
modifyProject in interface DataEventListenerproject - modified projectpublic void modifyTask(TimerTask task)
DataEventListener
modifyTask in interface DataEventListenertask - modified taskpublic void postChangeClosedState(TimerTask task)
DataEventListener
postChangeClosedState in interface DataEventListenertask - taskpublic void preChangeClosedState(TimerTask task)
DataEventListener
preChangeClosedState in interface DataEventListenertask - taskpublic void startTask(TimerTask task)
DataEventListener
startTask in interface DataEventListenertask - started taskpublic void stopTask(TimerTask task)
DataEventListener
stopTask in interface DataEventListenertask - stoped task
protected 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 DataEventListenertask - task where annotation is changeddate - dateannotation - new annotation value
public void setTaskTime(TimerTask task,
Date date,
Long time)
DataEventListener
setTaskTime in interface DataEventListenertask - task where time is changeddate - datetime - task timepublic void moveTask(TimerTask task)
DataEventListener
moveTask in interface DataEventListenertask - taskpublic void preMoveTask(TimerTask task)
DataEventListener
preMoveTask in interface DataEventListenertask - task
public void postMergeTasks(TimerTask destinationTask,
List<TimerTask> otherTasks)
DataEventListener
postMergeTasks in interface DataEventListenerdestinationTask - task where all other task will be mergedotherTasks - other tasks to merge
public void preMergeTasks(TimerTask destinationTask,
List<TimerTask> otherTasks)
DataEventListener
preMergeTasks in interface DataEventListenerdestinationTask - task where all other task will be mergedotherTasks - other tasks to mergepublic void mouseClicked(MouseEvent e)
mouseClicked in interface MouseListenerpublic void mouseEntered(MouseEvent e)
mouseEntered in interface MouseListenerpublic void mouseExited(MouseEvent e)
mouseExited in interface MouseListenerpublic void mousePressed(MouseEvent e)
mousePressed in interface MouseListenerpublic void mouseReleased(MouseEvent e)
mouseReleased in interface MouseListenerpublic void windowClosing(WindowEvent e)
windowClosing in interface WindowListenerpublic void windowActivated(WindowEvent e)
windowActivated in interface WindowListenerpublic void windowClosed(WindowEvent e)
windowClosed in interface WindowListenerpublic void windowDeactivated(WindowEvent e)
windowDeactivated in interface WindowListenerpublic void windowDeiconified(WindowEvent e)
windowDeiconified in interface WindowListenerpublic void windowIconified(WindowEvent e)
windowIconified in interface WindowListenerpublic void windowOpened(WindowEvent e)
windowOpened in interface WindowListener
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||