KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > google > gwt > sample > kitchensink > client > Info


1 /*
2  * Copyright 2007 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.kitchensink.client;
17
18 import com.google.gwt.user.client.ui.Label;
19
20 /**
21  * Introduction page.
22  */

23 public class Info extends Sink {
24
25   public static SinkInfo init() {
26     return new SinkInfo("Intro", "<h2>Introduction to the Kitchen Sink</h2>" +
27             "<p>This is the Kitchen Sink sample. "
28         + "It demonstrates many of the widgets in the Google Web Toolkit."
29         + "<p>This sample also demonstrates something else really useful in GWT: "
30         + "history support. "
31         + "When you click on a tab, the location bar will be "
32         + "updated with the current <i>history token</i>, which keeps the app "
33         + "in a bookmarkable state. The back and forward buttons work properly "
34         + "as well. Finally, notice that you can right-click a tab and 'open "
35         + "in new window' (or middle-click for a new tab in Firefox).</p></p>") {
36
37       public Sink createInstance() {
38         return new Info();
39       }
40     };
41   }
42
43   public Info() {
44     initWidget(new Label());
45   }
46
47   public void onShow() {
48   }
49 }
50
Popular Tags