Inheritance diagram for edu.cmu.hcii.calo.manager.TaskManager:
Public Member Functions | |
void | addTasklikeObject (TasklikeObject t) |
Adds a task to be managed by the task manager. | |
int | countTasks () |
Counts the number of tasks currently being managed. | |
TasklikeObject | getTasklikeObject (TasklikeObject t) |
Gets the given tasklike object in this manager if it exists. | |
TasklikeObject[] | getTasks () |
Returns an array containing all the tasks in the manager. | |
boolean | hasTask (TasklikeObject t) |
Returns whether or not the manager is managing the given task. | |
void | noteCompletenessChanged (Task t, boolean wasComplete, boolean isComplete) |
Called by a Task when its completeness is changed so that the manager can notify all interested parties of the change. | |
void | noteStarrednessChanged (Task t, boolean wasStarred, boolean isStarred) |
Called by a Task when its starredness (or "whether or not it's starred", for those among us with a healthy respect for English) is changed so that the manager can notify all interested parties of the change. | |
void | noteTaskDueDateChanged (Task t, Calendar oldDueDate, Calendar newDueDate) |
Called by a Task when its due date is changed so that the manager can notify all interested parties of the change. | |
void | noteTaskGroupTasksChanged (TaskGroup t, List< Task > oldSubtasks, List< Task > newSubtasks) |
Called by a Task when its associated subtasks are changed so that the manager can notify all interested parties of the change. | |
void | noteTaskNameChanged (Task t, String oldName, String newName) |
Called by a Task when its name is changed so that the manager can notify all interested parties of the change. | |
void | noteTaskPendingStateChanged (Task t, PendingState oldPendingState, PendingState newPendingState) |
Called by a Task when its pending state is changed so that the manager can notify all interested parties of the change. | |
void | noteTaskPriorityChanged (Task t, double oldPriority, double newPriority) |
Called by a Task when its priority is changed so that the manager can notify all interested parties of the change. | |
void | noteTaskProjectChanged (Task t, Project oldProject, Project newProject) |
Called by a Task when its associated project is changed so that the manager can notify all interested parties of the change. | |
void | noteTaskResourcesChanged (Task t, ResourceList oldResources, ResourceList newResources) |
Called by a Task when its associated resources are changed so that the manager can notify all interested parties of the change. | |
void | noteTaskTagsChanged (Task t, Set< String > oldTags, HashSet< String > newTags) |
Called by a Task when its associated tags are changed so that the manager can notify all interested parties of the change. | |
void | removeTasklikeObject (TasklikeObject t) |
Removes the given task from being managed by this manager. | |
void | reset () |
Resets this manager back to the way it was when it was first created. | |
Iterator< TasklikeObject > | taskIterator () |
Returns an iterator, sorted by priority, over the tasks managed by the manager. | |
String | toString () |
Returns a string representation of this TaskManager. | |
void | noteDateCompletedChanged (Task t, Calendar oldDateCompleted, Calendar newDateCompleted) |
Called by a Task when its date completed is changed so that the manager can notify all interested parties of the change. | |
Static Public Member Functions | |
static TaskManager | getManager () |
Returns the singleton instance of this manager. | |
Private Member Functions | |
TaskManager () | |
Constructs the TaskManager instance. | |
void | readObject (java.io.ObjectInputStream in) throws IOException, ClassNotFoundException |
Reads in a serialized manager. | |
void | writeObject (java.io.ObjectOutputStream out) throws IOException |
Writes this manager to stream. | |
Private Attributes | |
MutableSortedSet< TasklikeObject > | tasks |
The actual task list, sorted by priority. | |
Static Private Attributes | |
static final long | serialVersionUID = -5072485063150524741L |
Prevents serialization collisons. | |
static TaskManager | uniqueInstance = null |
The singleton instance of the task manager. |
edu.cmu.hcii.calo.manager.TaskManager.TaskManager | ( | ) | [private] |
Constructs the TaskManager instance.
Private because this is a singleton.
static TaskManager edu.cmu.hcii.calo.manager.TaskManager.getManager | ( | ) | [static] |
Returns the singleton instance of this manager.
void edu.cmu.hcii.calo.manager.TaskManager.addTasklikeObject | ( | TasklikeObject | t | ) |
Adds a task to be managed by the task manager.
t | the task to add |
int edu.cmu.hcii.calo.manager.TaskManager.countTasks | ( | ) |
Counts the number of tasks currently being managed.
TasklikeObject edu.cmu.hcii.calo.manager.TaskManager.getTasklikeObject | ( | TasklikeObject | t | ) |
Gets the given tasklike object in this manager if it exists.
Otherwise, return null.
t | the tasklike object to get |
TasklikeObject [] edu.cmu.hcii.calo.manager.TaskManager.getTasks | ( | ) |
Returns an array containing all the tasks in the manager.
Use this instead of taskIterator() to avoid concurrent modification due to threading issues, if that's your thing.
boolean edu.cmu.hcii.calo.manager.TaskManager.hasTask | ( | TasklikeObject | t | ) |
Returns whether or not the manager is managing the given task.
t | the task to ask about |
void edu.cmu.hcii.calo.manager.TaskManager.noteCompletenessChanged | ( | Task | t, | |
boolean | wasComplete, | |||
boolean | isComplete | |||
) |
Called by a Task when its completeness is changed so that the manager can notify all interested parties of the change.
t | the task whose completeness changed | |
wasComplete | was the task complete before? | |
isComplete | is it now? |
void edu.cmu.hcii.calo.manager.TaskManager.noteStarrednessChanged | ( | Task | t, | |
boolean | wasStarred, | |||
boolean | isStarred | |||
) |
Called by a Task when its starredness (or "whether or not it's starred", for those among us with a healthy respect for English) is changed so that the manager can notify all interested parties of the change.
t | the task whose starredness changed | |
wasStarred | was the task starred before? | |
isStarred | is it now? |
void edu.cmu.hcii.calo.manager.TaskManager.noteTaskDueDateChanged | ( | Task | t, | |
Calendar | oldDueDate, | |||
Calendar | newDueDate | |||
) |
Called by a Task when its due date is changed so that the manager can notify all interested parties of the change.
t | the task that has been altered | |
oldDueDate | the former due date of this task | |
newDueDate | the new due date of this task |
void edu.cmu.hcii.calo.manager.TaskManager.noteTaskGroupTasksChanged | ( | TaskGroup | t, | |
List< Task > | oldSubtasks, | |||
List< Task > | newSubtasks | |||
) |
Called by a Task when its associated subtasks are changed so that the manager can notify all interested parties of the change.
t | the task that has been altered | |
oldSubtasks | the old subtasks of the task | |
newSubtasks | the new subtasks of the task |
void edu.cmu.hcii.calo.manager.TaskManager.noteTaskNameChanged | ( | Task | t, | |
String | oldName, | |||
String | newName | |||
) |
Called by a Task when its name is changed so that the manager can notify all interested parties of the change.
t | the task that has been altered | |
oldName | the former name of this task | |
newName | the new name of this task |
void edu.cmu.hcii.calo.manager.TaskManager.noteTaskPendingStateChanged | ( | Task | t, | |
PendingState | oldPendingState, | |||
PendingState | newPendingState | |||
) |
Called by a Task when its pending state is changed so that the manager can notify all interested parties of the change.
t | the task that has been altered | |
oldPendingState | the old pending state of the task | |
newPendingState | the new pending state of the task |
void edu.cmu.hcii.calo.manager.TaskManager.noteTaskPriorityChanged | ( | Task | t, | |
double | oldPriority, | |||
double | newPriority | |||
) |
Called by a Task when its priority is changed so that the manager can notify all interested parties of the change.
t | the task that has been altered | |
oldPriority | the former priority of this task | |
newPriority | the new priority of this task |
void edu.cmu.hcii.calo.manager.TaskManager.noteTaskProjectChanged | ( | Task | t, | |
Project | oldProject, | |||
Project | newProject | |||
) |
Called by a Task when its associated project is changed so that the manager can notify all interested parties of the change.
t | the task that has been altered | |
oldProject | the old project of the task | |
newProject | the new project of the task |
void edu.cmu.hcii.calo.manager.TaskManager.noteTaskResourcesChanged | ( | Task | t, | |
ResourceList | oldResources, | |||
ResourceList | newResources | |||
) |
Called by a Task when its associated resources are changed so that the manager can notify all interested parties of the change.
t | the task that has been altered | |
oldResources | the old resources associated with the task | |
newResources | the new resources associated with the task |
void edu.cmu.hcii.calo.manager.TaskManager.noteTaskTagsChanged | ( | Task | t, | |
Set< String > | oldTags, | |||
HashSet< String > | newTags | |||
) |
Called by a Task when its associated tags are changed so that the manager can notify all interested parties of the change.
t | the task that has been altered | |
oldTags | the old tags of the task | |
newTags | the new tags of the task |
void edu.cmu.hcii.calo.manager.TaskManager.removeTasklikeObject | ( | TasklikeObject | t | ) |
Removes the given task from being managed by this manager.
t | the task to remove |
void edu.cmu.hcii.calo.manager.TaskManager.reset | ( | ) |
Iterator<TasklikeObject> edu.cmu.hcii.calo.manager.TaskManager.taskIterator | ( | ) |
Returns an iterator, sorted by priority, over the tasks managed by the manager.
String edu.cmu.hcii.calo.manager.TaskManager.toString | ( | ) |
Returns a string representation of this TaskManager.
Useful only for debugging.
void edu.cmu.hcii.calo.manager.TaskManager.readObject | ( | java.io.ObjectInputStream | in | ) | throws IOException, ClassNotFoundException [private] |
Reads in a serialized manager.
Just checks against the serialVersionUID.
in | the input stream to read from |
IOException | ||
ClassNotFoundException |
void edu.cmu.hcii.calo.manager.TaskManager.writeObject | ( | java.io.ObjectOutputStream | out | ) | throws IOException [private] |
Writes this manager to stream.
Since I don't want to deal with everything below this manager being serialized and it is a singleton, I just write the ID for error checking.
out | the output stream to write to |
IOException |
void edu.cmu.hcii.calo.manager.TaskManager.noteDateCompletedChanged | ( | Task | t, | |
Calendar | oldDateCompleted, | |||
Calendar | newDateCompleted | |||
) |
Called by a Task when its date completed is changed so that the manager can notify all interested parties of the change.
t | the task that has been altered | |
oldDateCompleted | the old date completed of the task | |
newDateCompleted | the new date completed of the task |
final long edu.cmu.hcii.calo.manager.TaskManager.serialVersionUID = -5072485063150524741L [static, private] |
TaskManager edu.cmu.hcii.calo.manager.TaskManager.uniqueInstance = null [static, private] |
The singleton instance of the task manager.
MutableSortedSet<TasklikeObject> edu.cmu.hcii.calo.manager.TaskManager.tasks [private] |
The actual task list, sorted by priority.