Inheritance diagram for edu.cmu.hcii.calo.view.task.TaskPaneView:
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. |
edu.cmu.hcii.calo.view.task.TaskPaneView.TaskPaneView | ( | ) |
Constructs a TaskPaneView.
static void edu.cmu.hcii.calo.view.task.TaskPaneView.main | ( | String[] | args | ) | [static] |
A test program that creates and shows a TaskPaneView.
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.
t | the task to match against the filter field text |
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.
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] |
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; } }
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; } }
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 to-do list subpane.
The pending tasks subpane.
The completed tasks subpane.