edu.cmu.hcii.calo.view.task.viewer.TaskViewerTaskList Class Reference

Inherits edu.cmu.hcii.calo.view.CALOComponent.

Inheritance diagram for edu.cmu.hcii.calo.view.task.viewer.TaskViewerTaskList:

Inheritance graph
[legend]
Collaboration diagram for edu.cmu.hcii.calo.view.task.viewer.TaskViewerTaskList:

Collaboration graph
[legend]
List of all members.

Detailed Description

A JList-like view that shows tasks as they appear in the task viewer.

We can't actually use a JList for this because it uses its cells as "rubber stamps" for painting but does not actually keep them resident in the view, which makes them non-interactive.

Author:
Brian Ellis


Public Member Functions

 TaskViewerTaskList ()
 Constructs a TaskViewerTaskList.
void update ()
 Updates the tasks contained in the task list from the TaskManager.

Private Member Functions

CALOComponent createListCell (int index, Task task)
 Creates and returns a new TaskViewerTaskListCell for the given task at the given index.

Private Attributes

List< TasklikeObjecttasks
 The tasks represented by this list.


Constructor & Destructor Documentation

edu.cmu.hcii.calo.view.task.viewer.TaskViewerTaskList.TaskViewerTaskList (  ) 

Constructs a TaskViewerTaskList.


Member Function Documentation

void edu.cmu.hcii.calo.view.task.viewer.TaskViewerTaskList.update (  ) 

Updates the tasks contained in the task list from the TaskManager.

Should be called whenever the task manager's state changes.

Note:
Currently, every update causes the entire list to be re-created from scratch with all new cells. This is somewhat expensive, as you might imagine, so avoid spamming updates to the list if possible.
Todo:
Currently, the expanded state of the views is not preserved when updates occur, causing all views to collapse.

CALOComponent edu.cmu.hcii.calo.view.task.viewer.TaskViewerTaskList.createListCell ( int  index,
Task  task 
) [private]

Creates and returns a new TaskViewerTaskListCell for the given task at the given index.

The index is only used to determine the background color of the list cell: odd-numbered indices have the default list background, while even-numbered indices use a light blue background.

Parameters:
index the index of the task in sorted order, needed to determine the cell's background color
task the task to be represented by this cell
Returns:
the new TaskViewerTaskListCell


Member Data Documentation

List<TasklikeObject> edu.cmu.hcii.calo.view.task.viewer.TaskViewerTaskList.tasks [private]

The tasks represented by this list.

Automatically refreshed from the TaskManager upon update.


The documentation for this class was generated from the following file:
Generated on Mon Aug 13 15:06:28 2007 for CALO by  doxygen 1.5.2