edu.cmu.hcii.calo.view.task.TaskPaneView Class Reference

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

Inheritance diagram for edu.cmu.hcii.calo.view.task.TaskPaneView:

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

Collaboration graph
[legend]
List of all members.

Detailed Description

A view that shows a scrollable task pane with three subpanes (to-do, on hold, and completed).

Author:
Brian Ellis


Public Member Functions

 TaskPaneView ()
 Constructs a TaskPaneView.
void update ()
 Causes this pane and all its subpanes to update themselves to match the state of the TaskManager.
void updateTasks ()
 Causes all the task views within each subpane to update themselves to match the state of the TaskManager.

Static Public Member Functions

static void main (String[] args)
 A test program that creates and shows a TaskPaneView.

Protected Member Functions

void doFilter ()
 Updates the filters applied to each of the subpanes to match whether the filter field has text in it, and updates the subpanes so they will re-filter their results.
void makeNewTask ()
 Creates a new task using the text the user has entered into the input field.
boolean taskMatchesFilter (Task t)
 Returns whether or not the given task matches the text currently in the filter field.

Static Package Attributes

static TaskPaneView paneView
 Test instance.

Private Member Functions

void setup ()
 Sets up the visual appearance of the view.

Private Attributes

TaskSubpaneView todoList
 The to-do list subpane.
TaskSubpaneView pendingTasks
 The pending tasks subpane.
TaskSubpaneView completedTasks
 The completed tasks subpane.
Controls
Various controls in the pane.

SearchField filterField
PlaceholderTextField inputField
IconButton addTaskButton
TaskSubpaneContainerView subpaneContainer
CALOScrollPane scrollPane
JLabel searchResultsLabel

Static Private Attributes

static final long serialVersionUID = 7083012944101041073L
 Prevent serialization collisions.
static final TaskFilter TODO_FILTER
 The default filter for the to-do subpane.
static final TaskFilter PENDING_FILTER
 The default filter for the pending tasks subpane.
static final TaskFilter COMPLETED_FILTER
 The default filter for the completed tasks subpane.


Constructor & Destructor Documentation

edu.cmu.hcii.calo.view.task.TaskPaneView.TaskPaneView (  ) 

Constructs a TaskPaneView.


Member Function Documentation

static void edu.cmu.hcii.calo.view.task.TaskPaneView.main ( String[]  args  )  [static]

A test program that creates and shows a TaskPaneView.

Parameters:
args command-line args; don't bother passing any

void edu.cmu.hcii.calo.view.task.TaskPaneView.doFilter (  )  [protected]

Updates the filters applied to each of the subpanes to match whether the filter field has text in it, and updates the subpanes so they will re-filter their results.

Also shows or hides the search results label, and updates the number of matching tasks it displays, as appropriate.

void edu.cmu.hcii.calo.view.task.TaskPaneView.makeNewTask (  )  [protected]

Creates a new task using the text the user has entered into the input field.

If the input field is empty, does nothing. Also sets the input field text back to the empty string.

void edu.cmu.hcii.calo.view.task.TaskPaneView.setup (  )  [private]

Sets up the visual appearance of the view.

boolean edu.cmu.hcii.calo.view.task.TaskPaneView.taskMatchesFilter ( Task  t  )  [protected]

Returns whether or not the given task matches the text currently in the filter field.

This is called by the filters applied to the subpanes in doFilter(), and is safe (even though it uses the view state) because doFilter() is called whenever the filter field text changes.

Parameters:
t the task to match against the filter field text
Returns:
true if the task matches the filter, false otherwise

void edu.cmu.hcii.calo.view.task.TaskPaneView.update (  ) 

Causes this pane and all its subpanes to update themselves to match the state of the TaskManager.

void edu.cmu.hcii.calo.view.task.TaskPaneView.updateTasks (  ) 

Causes all the task views within each subpane to update themselves to match the state of the TaskManager.

Note:
This differs from update() in that it does not update the subpanes themselves (meaning the adding, removing, or reordering of tasks will not be correctly reflected), but it is much, much less expensive than a full update().


Member Data Documentation

TaskPaneView edu.cmu.hcii.calo.view.task.TaskPaneView.paneView [static, package]

Test instance.

final long edu.cmu.hcii.calo.view.task.TaskPaneView.serialVersionUID = 7083012944101041073L [static, private]

Prevent serialization collisions.

Reimplemented from edu.cmu.hcii.calo.view.CALOComponent.

final TaskFilter edu.cmu.hcii.calo.view.task.TaskPaneView.TODO_FILTER [static, private]

Initial value:

 new TaskFilter() {

        @Override
        public boolean shouldShowTask(Task t) {
            if (t.isComplete()) {
                return false;
            }
            if (t.getPendingState().isPending()) {
                return false;
            }
            return true;
        }

    }
The default filter for the to-do subpane.

final TaskFilter edu.cmu.hcii.calo.view.task.TaskPaneView.PENDING_FILTER [static, private]

Initial value:

 new TaskFilter() {

        @Override
        public boolean shouldShowTask(Task t) {
            if (t.getPendingState().isPending() && !t.isComplete()) {
                return true;
            }
            return false;
        }

    }
The default filter for the pending tasks subpane.

final TaskFilter edu.cmu.hcii.calo.view.task.TaskPaneView.COMPLETED_FILTER [static, private]

Initial value:

 new TaskFilter() {

        @Override
        public boolean shouldShowTask(Task t) {
            if (t.isComplete()) {
                return true;
            }
            return false;
        }

    }
The default filter for the completed tasks subpane.

TaskSubpaneView edu.cmu.hcii.calo.view.task.TaskPaneView.todoList [private]

The to-do list subpane.

TaskSubpaneView edu.cmu.hcii.calo.view.task.TaskPaneView.pendingTasks [private]

The pending tasks subpane.

TaskSubpaneView edu.cmu.hcii.calo.view.task.TaskPaneView.completedTasks [private]

The completed tasks subpane.


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