Exemplo n.º 1
0
  private void updateUiTaskList() {
    switch (currentView) {
      case SHOW_OUTSTANDING:
        ui.updateTaskList(taskEngine.getOutstandingTasks(), ScreenView.SCREEN_MAIN);
        break;

      case SHOW_DONE:
        ui.updateTaskList(taskEngine.getCompletedTasks(), ScreenView.SCREEN_DONE);
        break;

      case SHOW_ALL:
        ui.updateTaskList(taskEngine.getAllTasks(), ScreenView.SCREEN_MAIN_ALL);
        break;

      case SHOW_SUMMARY:
        ui.updateTaskList(taskEngine.getOutstandingTasks(), ScreenView.SCREEN_SUMMARY);
        break;

      case SHOW_SEARCH_RESULTS:
        ui.passSearchStringToSearchScreen(searchString);
        ui.updateTaskList(
            taskEngine.search(searchTerm, searchStartDate, searchEndDate, searchShowDone),
            ScreenView.SCREEN_SEARCH);
        break;
    }
  }
Exemplo n.º 2
0
 private void initUiTaskList() {
   ui.initialUpdateTaskList(taskEngine.getOutstandingTasks());
   updateView(ViewType.SHOW_SUMMARY);
 }