01: /*
02: * MyGWT Widget Library
03: * Copyright(c) 2007, MyGWT.
04: * licensing@mygwt.net
05: *
06: * http://mygwt.net/license
07: */
08: package net.mygwt.samples.mail.client;
09:
10: import net.mygwt.ui.client.Registry;
11: import net.mygwt.ui.client.mvc.AppEvent;
12: import net.mygwt.ui.client.mvc.Controller;
13: import net.mygwt.ui.client.widget.ContentPanel;
14: import net.mygwt.ui.client.widget.WidgetContainer;
15:
16: public class TaskController extends Controller {
17:
18: public TaskController() {
19: registerEventType(AppEvents.NavTasks);
20: }
21:
22: public void handleEvent(AppEvent event) {
23: if (event.type == AppEvents.NavTasks) {
24: ContentPanel center = (ContentPanel) Registry.get("center");
25: center.setText("Tasks");
26: center.removeAll();
27:
28: WidgetContainer south = (WidgetContainer) Registry
29: .get("south");
30: south.removeAll();
31: }
32: }
33:
34: }
|