net.sourceforge.doyen
Class EventManager
java.lang.Object
java.lang.Thread
net.sourceforge.doyen.EventManager
- All Implemented Interfaces:
- Runnable
- class EventManager
- extends Thread
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
mLogger
private static Logger mLogger
mProfile
private ProfileType mProfile
mContinue
private boolean mContinue
mEvents
private SortedSet mEvents
mEVT
private EventFrame mEVT
mCurrentTask
private TaskType mCurrentTask
mStart
private Calendar mStart
mEarlyEvents
private List mEarlyEvents
mParent
private Doyen mParent
EventManager
public EventManager(Doyen parent)
setProfile
public void setProfile(ProfileType profile)
run
public void run()
processEvents
private void processEvents()
shutdown
public void shutdown()
checkForPendingEvents
public void checkForPendingEvents()
checkForPendingEvents
private void checkForPendingEvents(ProfileType profile)
checkForPendingEvents
private void checkForPendingEvents(ProjectType proj)
setNextOccurrence
private void setNextOccurrence(TaskType task)
- Sets the next occurence of a completed task based on recurrence
- Parameters:
task
- the task to set the next occurence
setNextOccurrence
private void setNextOccurrence(TaskType task,
TaskType.ScheduleType sched,
TaskType.ScheduleType.RecurrenceType rec)
- Sets the next occurence of a completed task based on recurrence
- Parameters:
task
- the task to set the next occurencesched
- the schedule to base the next occurence onrec
- the recurrence to use
checkForPendingEvents
private void checkForPendingEvents(TaskType task)
- Task are checked for pending events in the following precendence
1) If the task is completed
If recurrence
True: clear the completed and schedule the next event
False: done
2) If next occurence set
If it's before now, post event
If early notification is before now, post notification
Check for pending
3) It's not done, they didn't set when to do it, and it's never been
worked on before: it's ready to be worked on now.
postEvent
private void postEvent(TaskType task,
Calendar time,
TaskType.ScheduleType.RecurrenceType rec)
postEarlyEvent
private void postEarlyEvent(TaskType task)
clearEarlyEvent
void clearEarlyEvent(TaskType task)
setCurrentTask
public void setCurrentTask(TaskType task)
endCurrentTask
void endCurrentTask()
addTimeLogEntry
private void addTimeLogEntry()
completeCurrentTask
void completeCurrentTask()
switchTask
void switchTask()
startTimeLogging
private void startTimeLogging()
togglePauseResume
void togglePauseResume()
isPaused
boolean isPaused()
updatedObject
void updatedObject(Object o)