KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > google > gwt > sample > dynatable > client > DynaTable


1 /*
2  * Copyright 2006 Google Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5  * use this file except in compliance with the License. You may obtain a copy of
6  * the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13  * License for the specific language governing permissions and limitations under
14  * the License.
15  */

16 package com.google.gwt.sample.dynatable.client;
17
18 import com.google.gwt.core.client.EntryPoint;
19 import com.google.gwt.user.client.ui.RootPanel;
20
21 /**
22  * The entry point class which performs the initial loading of the DynaTable
23  * application.
24  */

25 public class DynaTable implements EntryPoint {
26
27   public void onModuleLoad() {
28     // Find the slot for the calendar widget.
29
//
30
RootPanel slot = RootPanel.get("calendar");
31     if (slot != null) {
32       SchoolCalendarWidget calendar = new SchoolCalendarWidget(15);
33       slot.add(calendar);
34
35       // Find the slot for the days filter widget.
36
//
37
slot = RootPanel.get("days");
38       if (slot != null) {
39         DayFilterWidget filter = new DayFilterWidget(calendar);
40         slot.add(filter);
41       }
42     }
43   }
44 }
45
Popular Tags