public static Controls createControls(final Controller controller,
TaskList.Resources resources) {
TaskList.Css css = resources.taskListCss();
// Setup the controls that will be added to the top bar the TaskList screen
Controls controls = new Controls(resources);
controls.addControl(css.plus(), new EventListener() {
public void onBrowserEvent(Event event) {
controller.loadTask(null);
controller.goToTaskDetails();
}
});
controls.addControl(css.garbage(), new EventListener() {
public void onBrowserEvent(Event event) {
controller.deleteCompletedTasks();
}