Updated KitchenSink demo.
Patch by: jgw
Review by: bruce


git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@1113 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/Buttons.java b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/Buttons.java
deleted file mode 100644
index c95debf..0000000
--- a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/Buttons.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright 2006 Google Inc.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.google.gwt.sample.kitchensink.client;
-
-import com.google.gwt.user.client.ui.Button;
-import com.google.gwt.user.client.ui.CheckBox;
-import com.google.gwt.user.client.ui.HorizontalPanel;
-import com.google.gwt.user.client.ui.PushButton;
-import com.google.gwt.user.client.ui.RadioButton;
-import com.google.gwt.user.client.ui.ToggleButton;
-import com.google.gwt.user.client.ui.VerticalPanel;
-
-/**
- * Demonstrates the various button widgets.
- */
-public class Buttons extends Sink {
-
-  public static SinkInfo init() {
-    return new SinkInfo("Buttons",
-      "GWT supports all the myriad types of buttons that exist in HTML.  "
-        + "Here are a few for your viewing pleasure.") {
-      public Sink createInstance() {
-        return new Buttons();
-      }
-    };
-  }
-
-  private Button disabledButton = new Button("Disabled Button");
-  private CheckBox disabledCheck = new CheckBox("Disabled Check");
-  private Button normalButton = new Button("Normal Button");
-  private CheckBox normalCheck = new CheckBox("Normal Check");
-  private VerticalPanel panel = new VerticalPanel();
-  private RadioButton radio0 = new RadioButton("group0", "Choice 0");
-  private RadioButton radio1 = new RadioButton("group0", "Choice 1");
-  private RadioButton radio2 = new RadioButton("group0", "Choice 2 (Disabled)");
-  private RadioButton radio3 = new RadioButton("group0", "Choice 3");
-  private PushButton pushButton = new PushButton("PushButton");
-  private ToggleButton toggleButton = new ToggleButton("ToggleButton");
-
-  public Buttons() {
-    HorizontalPanel hp;
-
-    panel.add(hp = new HorizontalPanel());
-    hp.setSpacing(8);
-    hp.add(normalButton);
-    hp.add(disabledButton);
-
-    panel.add(hp = new HorizontalPanel());
-    hp.setSpacing(8);
-    hp.add(normalCheck);
-    hp.add(disabledCheck);
-
-    panel.add(hp = new HorizontalPanel());
-    hp.setSpacing(8);
-    hp.add(radio0);
-    hp.add(radio1);
-    hp.add(radio2);
-    hp.add(radio3);
-
-    panel.add(hp = new HorizontalPanel());
-    hp.setSpacing(8);
-    hp.add(pushButton);
-    hp.add(toggleButton);
-
-    disabledButton.setEnabled(false);
-    disabledCheck.setEnabled(false);
-    radio2.setEnabled(false);
-
-    panel.setSpacing(8);
-    initWidget(panel);
-  }
-
-  public void onShow() {
-  }
-}
diff --git a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/Frames.java b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/Frames.java
deleted file mode 100644
index ab97ffe..0000000
--- a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/Frames.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2006 Google Inc.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.google.gwt.sample.kitchensink.client;
-
-import com.google.gwt.user.client.ui.Frame;
-
-/**
- * Demonstrates the {@link com.google.gwt.user.client.ui.Frame} widget.
- */
-public class Frames extends Sink {
-
-  public static SinkInfo init() {
-    return new SinkInfo("Frames",
-      "If you need to include multiple pages of good ol' static HTML, it's "
-        + "easy to do using the <code>Frame</code> class.") {
-      public Sink createInstance() {
-        return new Frames();
-      }
-    };
-  }
-
-  private Frame frame = new Frame("rembrandt/LaMarcheNocturne.html");
-
-  public Frames() {
-    frame.setWidth("100%");
-    frame.setHeight("48em");
-    initWidget(frame);
-  }
-
-  public void onShow() {
-  }
-}
diff --git a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/Images.java b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/Images.java
deleted file mode 100644
index b31a813..0000000
--- a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/Images.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Copyright 2006 Google Inc.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.google.gwt.sample.kitchensink.client;
-
-import com.google.gwt.user.client.ui.ClickListener;
-import com.google.gwt.user.client.ui.DockPanel;
-import com.google.gwt.user.client.ui.Widget;
-import com.google.gwt.user.client.ui.HTML;
-import com.google.gwt.user.client.ui.Image;
-import com.google.gwt.user.client.ui.LoadListener;
-import com.google.gwt.user.client.ui.VerticalPanel;
-
-/**
- * Demonstrates {@link com.google.gwt.user.client.ui.Image}.
- */
-public class Images extends Sink implements ClickListener, LoadListener {
-
-  private static final String[] sImages = new String[]{
-    "rembrandt/JohannesElison.jpg", "rembrandt/LaMarcheNocturne.jpg",
-    "rembrandt/SelfPortrait1628.jpg", "rembrandt/SelfPortrait1640.jpg",
-    "rembrandt/TheArtistInHisStudio.jpg",
-    "rembrandt/TheReturnOfTheProdigalSon.jpg"};
-
-  public static SinkInfo init() {
-    return new SinkInfo("Images",
-      "This page demonstrates GWT's support for images.  Notice in "
-        + "particular how it uses the image's onLoad event to display a 'wait "
-        + "spinner' between the back and forward buttons.") {
-      public Sink createInstance() {
-        return new Images();
-      }
-    };
-  }
-
-  private int curImage;
-  private Image image = new Image();
-  private Image loadingImage = new Image("images/blanksearching.gif");
-  private Image nextButton = new Image("rembrandt/forward.gif");
-  private Image prevButton = new Image("rembrandt/back.gif");
-
-  public Images() {
-    image.addLoadListener(this);
-    prevButton.addClickListener(this);
-    nextButton.addClickListener(this);
-
-    DockPanel topPanel = new DockPanel();
-    topPanel.setVerticalAlignment(DockPanel.ALIGN_MIDDLE);
-    topPanel.add(prevButton, DockPanel.WEST);
-    topPanel.add(nextButton, DockPanel.EAST);
-    topPanel.add(loadingImage, DockPanel.CENTER);
-
-    VerticalPanel panel = new VerticalPanel();
-    panel.setHorizontalAlignment(VerticalPanel.ALIGN_CENTER);
-    panel
-      .add(new HTML("<h2>A Bit of Rembrandt</h2>", true));
-    panel.add(topPanel);
-    panel.add(image);
-
-    panel.setWidth("100%");
-    initWidget(panel);
-    image.setStyleName("ks-images-Image");
-    nextButton.setStyleName("ks-images-Button");
-    prevButton.setStyleName("ks-images-Button");
-
-    loadImage(0);
-  }
-
-  public void onClick(Widget sender) {
-    if (sender == prevButton) {
-      loadImage(curImage - 1);
-    } else if (sender == nextButton) {
-      loadImage(curImage + 1);
-    }
-  }
-
-  public void onError(Widget sender) {
-  }
-
-  public void onLoad(Widget sender) {
-    loadingImage.setUrl("images/blanksearching.gif");
-  }
-
-  public void onShow() {
-  }
-
-  private void loadImage(int index) {
-    if (index < 0) {
-      index = sImages.length - 1;
-    } else if (index > sImages.length - 1) {
-      index = 0;
-    }
-
-    curImage = index;
-    loadingImage.setUrl("images/searching.gif");
-    image.setUrl(sImages[curImage]);
-  }
-}
diff --git a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/Info.java b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/Info.java
index 281fc96..92ef390 100644
--- a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/Info.java
+++ b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/Info.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2006 Google Inc.
+ * Copyright 2007 Google Inc.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  * use this file except in compliance with the License. You may obtain a copy of
@@ -15,7 +15,7 @@
  */
 package com.google.gwt.sample.kitchensink.client;
 
-import com.google.gwt.user.client.ui.HTML;
+import com.google.gwt.user.client.ui.Label;
 
 /**
  * Introduction page.
@@ -23,16 +23,8 @@
 public class Info extends Sink {
 
   public static SinkInfo init() {
-    return new SinkInfo("Info", "Introduction to the Kitchen Sink.") {
-      public Sink createInstance() {
-        return new Info();
-      }
-    };
-  }
-
-  public Info() {
-    initWidget(new HTML(
-      "<div class='infoProse'>This is the Kitchen Sink sample.  "
+    return new SinkInfo("Intro", "<h2>Introduction to the Kitchen Sink</h2>" +
+            "<p>This is the Kitchen Sink sample.  "
         + "It demonstrates many of the widgets in the Google Web Toolkit."
         + "<p>This sample also demonstrates something else really useful in GWT: "
         + "history support.  "
@@ -40,8 +32,16 @@
         + "updated with the current <i>history token</i>, which keeps the app "
         + "in a bookmarkable state.  The back and forward buttons work properly "
         + "as well.  Finally, notice that you can right-click a link and 'open "
-        + "in new window' (or middle-click for a new tab in Firefox).</p></div>",
-      true));
+        + "in new window' (or middle-click for a new tab in Firefox).</p></p>") {
+
+      public Sink createInstance() {
+        return new Info();
+      }
+    };
+  }
+
+  public Info() {
+    initWidget(new Label());
   }
 
   public void onShow() {
diff --git a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/KitchenSink.java b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/KitchenSink.java
index 12e6ff1..2367bee 100644
--- a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/KitchenSink.java
+++ b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/KitchenSink.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2006 Google Inc.
+ * Copyright 2007 Google Inc.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  * use this file except in compliance with the License. You may obtain a copy of
@@ -17,10 +17,9 @@
 
 import com.google.gwt.core.client.EntryPoint;
 import com.google.gwt.sample.kitchensink.client.Sink.SinkInfo;
+import com.google.gwt.user.client.DOM;
 import com.google.gwt.user.client.History;
 import com.google.gwt.user.client.HistoryListener;
-import com.google.gwt.user.client.ui.DockPanel;
-import com.google.gwt.user.client.ui.HasAlignment;
 import com.google.gwt.user.client.ui.HTML;
 import com.google.gwt.user.client.ui.RootPanel;
 import com.google.gwt.user.client.ui.VerticalPanel;
@@ -34,8 +33,7 @@
   private SinkInfo curInfo;
   private Sink curSink;
   private HTML description = new HTML();
-  private DockPanel panel = new DockPanel();
-  private DockPanel sinkContainer;
+  private VerticalPanel panel = new VerticalPanel();
 
   public void onHistoryChanged(String token) {
     // Find the SinkInfo associated with the history context. If one is
@@ -53,24 +51,12 @@
     // Load all the sinks.
     loadSinks();
 
-    // Put the sink list on the left, and add the outer dock panel to the
-    // root.
-    sinkContainer = new DockPanel();
-    sinkContainer.setStyleName("ks-Sink");
-
-    VerticalPanel vp = new VerticalPanel();
-    vp.setWidth("100%");
-    vp.add(description);
-    vp.add(sinkContainer);
+    panel.add(list);
+    panel.add(description);
+    panel.setWidth("100%");
 
     description.setStyleName("ks-Info");
 
-    panel.add(list, DockPanel.WEST);
-    panel.add(vp, DockPanel.CENTER);
-
-    panel.setCellVerticalAlignment(list, HasAlignment.ALIGN_TOP);
-    panel.setCellWidth(vp, "100%");
-
     History.addHistoryListener(this);
     RootPanel.get().add(panel);
 
@@ -96,7 +82,7 @@
     // Remove the old sink from the display area.
     if (curSink != null) {
       curSink.onHide();
-      sinkContainer.remove(curSink);
+      panel.remove(curSink);
     }
 
     // Get the new sink instance, and display its description in the
@@ -113,11 +99,13 @@
       History.newItem(info.getName());
     }
 
+    // Change the description background color.
+    DOM.setStyleAttribute(description.getElement(), "backgroundColor",
+        info.getColor());
+
     // Display the new sink.
-    sinkContainer.add(curSink, DockPanel.CENTER);
-    sinkContainer.setCellWidth(curSink, "100%");
-    sinkContainer.setCellHeight(curSink, "100%");
-    sinkContainer.setCellVerticalAlignment(curSink, DockPanel.ALIGN_TOP);
+    panel.add(curSink);
+    panel.setCellHorizontalAlignment(curSink, VerticalPanel.ALIGN_CENTER);
     curSink.onShow();
   }
 
@@ -128,21 +116,14 @@
    */
   protected void loadSinks() {
     list.addSink(Info.init());
-    list.addSink(Buttons.init());
-    list.addSink(Menus.init());
-    list.addSink(Images.init());
-    list.addSink(Layouts.init());
+    list.addSink(Widgets.init());
+    list.addSink(Panels.init());
     list.addSink(Lists.init());
-    list.addSink(Popups.init());
-    list.addSink(Tables.init());
     list.addSink(Text.init());
-    list.addSink(Trees.init());
-    list.addSink(Frames.init());
-    list.addSink(Tabs.init());
-    list.addSink(Splitters.init());
+    list.addSink(Popups.init());
   }
 
   private void showInfo() {
-    show(list.find("Info"), false);
+    show(list.find("Intro"), false);
   }
 }
diff --git a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/Lists.java b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/Lists.java
index 9a0e414..ca77a06 100644
--- a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/Lists.java
+++ b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/Lists.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2006 Google Inc.
+ * Copyright 2007 Google Inc.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  * use this file except in compliance with the License. You may obtain a copy of
@@ -21,13 +21,37 @@
 import com.google.gwt.user.client.ui.ListBox;
 import com.google.gwt.user.client.ui.MultiWordSuggestOracle;
 import com.google.gwt.user.client.ui.SuggestBox;
+import com.google.gwt.user.client.ui.Tree;
+import com.google.gwt.user.client.ui.TreeItem;
+import com.google.gwt.user.client.ui.TreeListener;
 import com.google.gwt.user.client.ui.VerticalPanel;
 import com.google.gwt.user.client.ui.Widget;
 
 /**
  * Demonstrates {@link com.google.gwt.user.client.ui.ListBox}.
  */
-public class Lists extends Sink implements ChangeListener {
+public class Lists extends Sink implements ChangeListener, TreeListener {
+
+  private static class PendingItem extends TreeItem {
+    public PendingItem() {
+      super("Please wait...");
+    }
+  }
+
+  private static class Proto {
+    public Proto[] children;
+    public TreeItem item;
+    public String text;
+
+    public Proto(String text) {
+      this.text = text;
+    }
+
+    public Proto(String text, Proto[] children) {
+      this(text);
+      this.children = children;
+    }
+  }
 
   private static final String[][] stringLists = new String[][] {
       new String[] {"foo0", "bar0", "baz0", "toto0", "tintin0"},
@@ -52,21 +76,66 @@
       "xml", "xargs", "xeno", "yacc", "yank (the vi command)", "zealot", "zoe",
       "zebra"};
 
+  private static Proto[] fProto = new Proto[]{
+    new Proto("Beethoven", new Proto[]{
+      new Proto("Concertos", new Proto[]{
+        new Proto("No. 1 - C"), new Proto("No. 2 - B-Flat Major"),
+        new Proto("No. 3 - C Minor"), new Proto("No. 4 - G Major"),
+        new Proto("No. 5 - E-Flat Major"),}),
+      new Proto("Quartets", new Proto[]{
+        new Proto("Six String Quartets"), new Proto("Three String Quartets"),
+        new Proto("Grosse Fugue for String Quartets"),}),
+      new Proto("Sonatas", new Proto[]{
+        new Proto("Sonata in A Minor"), new Proto("Sonata in F Major"),}),
+      new Proto("Symphonies", new Proto[]{
+        new Proto("No. 1 - C Major"), new Proto("No. 2 - D Major"),
+        new Proto("No. 3 - E-Flat Major"), new Proto("No. 4 - B-Flat Major"),
+        new Proto("No. 5 - C Minor"), new Proto("No. 6 - F Major"),
+        new Proto("No. 7 - A Major"), new Proto("No. 8 - F Major"),
+        new Proto("No. 9 - D Minor"),}),}),
+    new Proto("Brahms", new Proto[]{
+      new Proto("Concertos", new Proto[]{
+        new Proto("Violin Concerto"), new Proto("Double Concerto - A Minor"),
+        new Proto("Piano Concerto No. 1 - D Minor"),
+        new Proto("Piano Concerto No. 2 - B-Flat Major"),}),
+      new Proto("Quartets", new Proto[]{
+        new Proto("Piano Quartet No. 1 - G Minor"),
+        new Proto("Piano Quartet No. 2 - A Major"),
+        new Proto("Piano Quartet No. 3 - C Minor"),
+        new Proto("String Quartet No. 3 - B-Flat Minor"),}),
+      new Proto("Sonatas", new Proto[]{
+        new Proto("Two Sonatas for Clarinet - F Minor"),
+        new Proto("Two Sonatas for Clarinet - E-Flat Major"),}),
+      new Proto("Symphonies", new Proto[]{
+        new Proto("No. 1 - C Minor"), new Proto("No. 2 - D Minor"),
+        new Proto("No. 3 - F Major"), new Proto("No. 4 - E Minor"),}),}),
+    new Proto("Mozart", new Proto[]{new Proto("Concertos", new Proto[]{
+      new Proto("Piano Concerto No. 12"), new Proto("Piano Concerto No. 17"),
+      new Proto("Clarinet Concerto"), new Proto("Violin Concerto No. 5"),
+      new Proto("Violin Concerto No. 4"),}),}),};
+
   public static SinkInfo init() {
     return new SinkInfo("Lists",
-        "Here is the ListBox widget in its two major forms.") {
+        "<h2>Lists and Trees</h2>" +
+        "<p>GWT provides a number of ways to display lists and trees. This " +
+        "includes the browser's built-in list and drop-down boxes, as well as " +
+        "the more advanced suggestion combo-box and trees.</p><p>Try typing " +
+        "some text in the SuggestBox below to see what happens!</p>") {
+
       public Sink createInstance() {
         return new Lists();
       }
     };
   }
-
   private ListBox combo = new ListBox();
   private ListBox list = new ListBox();
-  private Label echo = new Label();
+
   private MultiWordSuggestOracle oracle = new MultiWordSuggestOracle();
+
   private SuggestBox suggestBox = new SuggestBox(oracle);
 
+  private Tree tree = new Tree();
+
   public Lists() {
     combo.setVisibleItemCount(1);
     combo.addChangeListener(this);
@@ -95,36 +164,54 @@
     horz.add(combo);
     horz.add(list);
     horz.add(suggestPanel);
+    horz.add(tree);
 
     VerticalPanel panel = new VerticalPanel();
     panel.setHorizontalAlignment(VerticalPanel.ALIGN_LEFT);
     panel.add(horz);
-    panel.add(echo);
     initWidget(panel);
 
-    echoSelection();
+    for (int i = 0; i < fProto.length; ++i) {
+      createItem(fProto[i]);
+      tree.addItem(fProto[i].item);
+    }
+
+    tree.addTreeListener(this);
+    tree.setWidth("20em");
   }
 
   public void onChange(Widget sender) {
     if (sender == combo) {
       fillList(combo.getSelectedIndex());
     } else if (sender == list) {
-      echoSelection();
     }
   }
 
   public void onShow() {
   }
 
-  private void echoSelection() {
-    // Determine which items are selected, and display them.
-    String msg = "Selected items: ";
-    for (int i = 0; i < list.getItemCount(); ++i) {
-      if (list.isItemSelected(i)) {
-        msg += list.getItemText(i) + " ";
+  public void onTreeItemSelected(TreeItem item) {
+  }
+
+  public void onTreeItemStateChanged(TreeItem item) {
+    TreeItem child = item.getChild(0);
+    if (child instanceof PendingItem) {
+      item.removeItem(child);
+
+      Proto proto = (Proto) item.getUserObject();
+      for (int i = 0; i < proto.children.length; ++i) {
+        createItem(proto.children[i]);
+        item.addItem(proto.children[i].item);
       }
     }
-    echo.setText(msg);
+  }
+
+  private void createItem(Proto proto) {
+    proto.item = new TreeItem(proto.text);
+    proto.item.setUserObject(proto);
+    if (proto.children != null) {
+      proto.item.addItem(new PendingItem());
+    }
   }
 
   private void fillList(int idx) {
@@ -134,7 +221,5 @@
     for (int i = 0; i < strings.length; ++i) {
       list.addItem(strings[i]);
     }
-
-    echoSelection();
   }
 }
diff --git a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/Menus.java b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/Menus.java
deleted file mode 100644
index 42965a4..0000000
--- a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/Menus.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright 2006 Google Inc.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.google.gwt.sample.kitchensink.client;
-
-import com.google.gwt.user.client.Command;
-import com.google.gwt.user.client.Window;
-import com.google.gwt.user.client.ui.MenuBar;
-import com.google.gwt.user.client.ui.MenuItem;
-
-/**
- * Demonstrates {@link com.google.gwt.user.client.ui.MenuBar} and
- * {@link com.google.gwt.user.client.ui.MenuItem}.
- */
-public class Menus extends Sink implements Command {
-
-  public static SinkInfo init() {
-    return new SinkInfo("Menus",
-      "The GWT <code>MenuBar</code> class makes it easy to build menus, "
-        + "including cascading sub-menus.") {
-      public Sink createInstance() {
-        return new Menus();
-      }
-    };
-  }
-
-  private MenuBar menu = new MenuBar();
-
-  public Menus() {
-    MenuBar subMenu = new MenuBar(true);
-    subMenu.addItem("<code>Code</code>", true, this);
-    subMenu.addItem("<strike>Strikethrough</strike>", true, this);
-    subMenu.addItem("<u>Underlined</u>", true, this);
-
-    MenuBar menu0 = new MenuBar(true);
-    menu0.addItem("<b>Bold</b>", true, this);
-    menu0.addItem("<i>Italicized</i>", true, this);
-    menu0.addItem("More &#187;", true, subMenu);
-    MenuBar menu1 = new MenuBar(true);
-    menu1.addItem("<font color='#FF0000'><b>Apple</b></font>", true, this);
-    menu1.addItem("<font color='#FFFF00'><b>Banana</b></font>", true, this);
-    menu1.addItem("<font color='#FFFFFF'><b>Coconut</b></font>", true, this);
-    menu1.addItem("<font color='#8B4513'><b>Donut</b></font>", true, this);
-    MenuBar menu2 = new MenuBar(true);
-    menu2.addItem("Bling", this);
-    menu2.addItem("Ginormous", this);
-    menu2.addItem("<code>w00t!</code>", true, this);
-
-    menu.addItem(new MenuItem("Style", menu0));
-    menu.addItem(new MenuItem("Fruit", menu1));
-    menu.addItem(new MenuItem("Term", menu2));
-
-    menu.setWidth("100%");
-
-    initWidget(menu);
-  }
-
-  public void execute() {
-    Window.alert("Thank you for selecting a menu item.");
-  }
-
-  public void onShow() {
-  }
-}
diff --git a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/Layouts.java b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/Panels.java
similarity index 68%
rename from samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/Layouts.java
rename to samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/Panels.java
index 64e3272..36e5282 100644
--- a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/Layouts.java
+++ b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/Panels.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2006 Google Inc.
+ * Copyright 2007 Google Inc.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  * use this file except in compliance with the License. You may obtain a copy of
@@ -15,43 +15,48 @@
  */
 package com.google.gwt.sample.kitchensink.client;
 
-import com.google.gwt.user.client.Command;
-import com.google.gwt.user.client.DOM;
 import com.google.gwt.user.client.ui.Button;
 import com.google.gwt.user.client.ui.CheckBox;
 import com.google.gwt.user.client.ui.DisclosurePanel;
 import com.google.gwt.user.client.ui.DockPanel;
 import com.google.gwt.user.client.ui.FlowPanel;
+import com.google.gwt.user.client.ui.Grid;
 import com.google.gwt.user.client.ui.HTML;
-import com.google.gwt.user.client.ui.HTMLPanel;
 import com.google.gwt.user.client.ui.HorizontalPanel;
-import com.google.gwt.user.client.ui.MenuBar;
+import com.google.gwt.user.client.ui.HorizontalSplitPanel;
+import com.google.gwt.user.client.ui.Image;
 import com.google.gwt.user.client.ui.ScrollPanel;
+import com.google.gwt.user.client.ui.TabPanel;
 import com.google.gwt.user.client.ui.VerticalPanel;
 
 /**
  * Demonstrates various panels and the way they lay widgets out.
  */
-public class Layouts extends Sink {
+public class Panels extends Sink {
 
   public static SinkInfo init() {
     return new SinkInfo(
-        "Layouts",
-        "This page demonstrates some of the basic GWT panels, each of which "
+        "Panels",
+        "<h2>Panels</h2><p>This page demonstrates some of the basic GWT panels, each of which "
             + "arranges its contained widgets differently.  "
             + "These panels are designed to take advantage of the browser's "
             + "built-in layout mechanics, which keeps the user interface snappy "
             + "and helps your AJAX code play nicely with existing HTML.  "
             + "On the other hand, if you need pixel-perfect control, "
             + "you can tweak things at a low level using the "
-            + "<code>DOM</code> class.") {
+            + "<code>DOM</code> class.</p>") {
+
       public Sink createInstance() {
-        return new Layouts();
+        return new Panels();
+      }
+
+      public String getColor() {
+        return "#fe9915";
       }
     };
   }
 
-  public Layouts() {
+  public Panels() {
     HTML contents = new HTML("This is a <code>ScrollPanel</code> contained at "
         + "the center of a <code>DockPanel</code>.  "
         + "By putting some fairly large contents "
@@ -102,45 +107,46 @@
     vert.add(new Button("--- BigBigBigBig ---"));
     vert.add(new Button("tiny"));
 
-    MenuBar menu = new MenuBar();
-    MenuBar menu0 = new MenuBar(true), menu1 = new MenuBar(true);
-    menu.addItem("menu0", menu0);
-    menu.addItem("menu1", menu1);
-    menu0.addItem("child00", (Command) null);
-    menu0.addItem("child01", (Command) null);
-    menu0.addItem("child02", (Command) null);
-    menu1.addItem("child10", (Command) null);
-    menu1.addItem("child11", (Command) null);
-    menu1.addItem("child12", (Command) null);
+    VerticalPanel vp = new VerticalPanel();
+    vp.setHorizontalAlignment(VerticalPanel.ALIGN_CENTER);
+    vp.setSpacing(8);
+    vp.add(makeLabel("Disclosure Panel"));
+    vp.add(disc);
+    vp.add(makeLabel("Flow Panel"));
+    vp.add(flow);
+    vp.add(makeLabel("Horizontal Panel"));
+    vp.add(horz);
+    vp.add(makeLabel("Vertical Panel"));
+    vp.add(vert);
 
-    String id = HTMLPanel.createUniqueId();
-    HTMLPanel html = new HTMLPanel(
-        "This is an <code>HTMLPanel</code>.  It allows you to add "
-            + "components inside existing HTML, like this: " + "<span id='"
-            + id + "'></span>"
-            + "Notice how the menu just fits snugly in there?  Cute.");
-    DOM.setStyleAttribute(menu.getElement(), "display", "inline");
-    html.add(menu, id);
+    Grid grid = new Grid(4, 4);
+    for (int r = 0; r < 4; ++r) {
+      for (int c = 0; c < 4; ++c) {
+        grid.setWidget(r, c, new Image("images/gwt-logo.png"));
+      }
+    }
 
-    VerticalPanel panel = new VerticalPanel();
-    panel.setSpacing(8);
-    panel.setHorizontalAlignment(VerticalPanel.ALIGN_CENTER);
+    TabPanel tabs = new TabPanel();
+    tabs.add(vp, "Basic Panels");
+    tabs.add(dock, "Dock Panel");
+    tabs.add(grid, "Tables");
+    tabs.setWidth("100%");
+    tabs.selectTab(0);
 
-    panel.add(makeLabel("Dock Panel"));
-    panel.add(dock);
-    panel.add(makeLabel("Disclosure Panel"));
-    panel.add(disc);
-    panel.add(makeLabel("Flow Panel"));
-    panel.add(flow);
-    panel.add(makeLabel("Horizontal Panel"));
-    panel.add(horz);
-    panel.add(makeLabel("Vertical Panel"));
-    panel.add(vert);
-    panel.add(makeLabel("HTML Panel"));
-    panel.add(html);
+    HorizontalSplitPanel hSplit = new HorizontalSplitPanel();
+    hSplit.setLeftWidget(tabs);
+    hSplit.setRightWidget(new HTML(
+      "This is some text to make the right side of this " +
+      "splitter look a bit more interesting... " +
+      "This is some text to make the right side of this " +
+      "splitter look a bit more interesting... " +
+      "This is some text to make the right side of this " +
+      "splitter look a bit more interesting... " +
+      "This is some text to make the right side of this " +
+      "splitter look a bit more interesting... "));
 
-    initWidget(panel);
-    setStyleName("ks-layouts");
+    initWidget(hSplit);
+    hSplit.setWidth("100%");
   }
 
   public void onShow() {
diff --git a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/Popups.java b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/Popups.java
index 8fc00d3..23b2687 100644
--- a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/Popups.java
+++ b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/Popups.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2006 Google Inc.
+ * Copyright 2007 Google Inc.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  * use this file except in compliance with the License. You may obtain a copy of
@@ -19,12 +19,12 @@
 import com.google.gwt.user.client.ui.ClickListener;
 import com.google.gwt.user.client.ui.DialogBox;
 import com.google.gwt.user.client.ui.DockPanel;
-import com.google.gwt.user.client.ui.Frame;
-import com.google.gwt.user.client.ui.Widget;
 import com.google.gwt.user.client.ui.HTML;
+import com.google.gwt.user.client.ui.Image;
 import com.google.gwt.user.client.ui.ListBox;
 import com.google.gwt.user.client.ui.PopupPanel;
 import com.google.gwt.user.client.ui.VerticalPanel;
+import com.google.gwt.user.client.ui.Widget;
 
 /**
  * Demonstrates {@link com.google.gwt.user.client.ui.PopupPanel} and
@@ -37,27 +37,22 @@
    */
   private static class MyDialog extends DialogBox implements ClickListener {
     public MyDialog() {
-      setText("Sample DialogBox with embedded Frame");
+      setText("Sample DialogBox");
 
-      Frame iframe = new Frame("rembrandt/LaMarcheNocturne.html");
       Button closeButton = new Button("Close", this);
       HTML msg = new HTML(
-        "<center>This is an example of a standard dialog box component.<br>  "
-          + "You can put pretty much anything you like into it,<br>such as the "
-          + "following IFRAME:</center>", true);
+          "<center>This is an example of a standard dialog box component.</center>",
+          true);
 
       DockPanel dock = new DockPanel();
       dock.setSpacing(4);
 
       dock.add(closeButton, DockPanel.SOUTH);
       dock.add(msg, DockPanel.NORTH);
-      dock.add(iframe, DockPanel.CENTER);
+      dock.add(new Image("images/jimmy.jpg"), DockPanel.CENTER);
 
       dock.setCellHorizontalAlignment(closeButton, DockPanel.ALIGN_RIGHT);
-      dock.setCellWidth(iframe, "100%");
       dock.setWidth("100%");
-      iframe.setWidth("36em");
-      iframe.setHeight("20em");
       setWidget(dock);
     }
 
@@ -74,7 +69,7 @@
       super(true);
 
       HTML contents = new HTML(
-        "Click anywhere outside this popup to make it disappear.");
+          "Click anywhere outside this popup to make it disappear.");
       contents.setWidth("128px");
       setWidget(contents);
 
@@ -84,21 +79,23 @@
 
   public static SinkInfo init() {
     return new SinkInfo(
-      "Popups",
-      "This page demonstrates GWT's built-in support for in-page "
-        + "popups.  The first is a very simple informational popup that closes "
-        + "itself automatically when you click off of it.  The second is a more "
-        + "complex draggable dialog box. If you're wondering why there's "
-        + "a list box at the bottom, it's to demonstrate that you can drag the "
-        + "dialog box over it.  "
-        + "This is noteworthy because some browsers render lists and combos in "
-        + "a funky way that, if GWT didn't do some magic for you, would " 
-        + "normally cause the dialog box to appear to hover <i>underneath</i> "
-        + "the list box.  Fortunately, you don't have to worry about it -- "
-        + "just use the GWT <code>DialogBox</code> class.") {
+        "Popups",
+        "<h2>Popups and Dialog Boxes</h2>"
+            + "<p>This page demonstrates GWT's built-in support for in-page "
+            + "popups.  The first is a very simple informational popup that closes "
+            + "itself automatically when you click off of it.  The second is a more "
+            + "complex draggable dialog box. If you're wondering why there's "
+            + "a list box at the bottom, it's to demonstrate that you can drag the "
+            + "dialog box over it (this obscure corner case often renders incorrectly "
+            + "on some browsers).</p>") {
+
       public Sink createInstance() {
         return new Popups();
       }
+
+      public String getColor() {
+        return "#bf2a2a";
+      }
     };
   }
 
@@ -111,7 +108,7 @@
     panel.add(dialogButton);
 
     ListBox list = new ListBox();
-    list.setVisibleItemCount(5);
+    list.setVisibleItemCount(1);
     for (int i = 0; i < 10; ++i) {
       list.addItem("list item " + i);
     }
@@ -130,10 +127,8 @@
       p.show();
     } else if (sender == dialogButton) {
       DialogBox dlg = new MyDialog();
-      int left = dialogButton.getAbsoluteLeft() + 10;
-      int top = dialogButton.getAbsoluteTop() + 10;
-      dlg.setPopupPosition(left, top);
       dlg.show();
+      dlg.center();
     }
   }
 
diff --git a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/RichTextToolbar.java b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/RichTextToolbar.java
index ff166ec..4fd3d5a 100644
--- a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/RichTextToolbar.java
+++ b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/RichTextToolbar.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2006 Google Inc.
+ * Copyright 2007 Google Inc.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  * use this file except in compliance with the License. You may obtain a copy of
@@ -235,10 +235,6 @@
         basic.setFontSize(fontSizesConstants[fontSizes.getSelectedIndex() - 1]);
         fontSizes.setSelectedIndex(0);
       }
-
-      if (sender == richText) {
-        updateStatus();
-      }
     }
 
     public void onClick(Widget sender) {
diff --git a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/Sink.java b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/Sink.java
index 9f881eb..5616857 100644
--- a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/Sink.java
+++ b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/Sink.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2006 Google Inc.
+ * Copyright 2007 Google Inc.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  * use this file except in compliance with the License. You may obtain a copy of
@@ -53,6 +53,10 @@
     public String getName() {
       return name;
     }
+
+    public String getColor() {
+      return "#2a8ebf";
+    }
   }
 
   /**
diff --git a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/SinkList.java b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/SinkList.java
index 6a58a4e..2bb021f 100644
--- a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/SinkList.java
+++ b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/SinkList.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2006 Google Inc.
+ * Copyright 2007 Google Inc.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  * use this file except in compliance with the License. You may obtain a copy of
@@ -15,35 +15,69 @@
  */
 package com.google.gwt.sample.kitchensink.client;
 
-import com.google.gwt.sample.kitchensink.client.Sink.SinkInfo;
-import com.google.gwt.user.client.ui.Composite;
-import com.google.gwt.user.client.ui.Hyperlink;
-import com.google.gwt.user.client.ui.VerticalPanel;
-
 import java.util.ArrayList;
 
+import com.google.gwt.sample.kitchensink.client.Sink.SinkInfo;
+import com.google.gwt.user.client.DOM;
+import com.google.gwt.user.client.Event;
+import com.google.gwt.user.client.ui.Composite;
+import com.google.gwt.user.client.ui.HorizontalPanel;
+import com.google.gwt.user.client.ui.Hyperlink;
+import com.google.gwt.user.client.ui.Image;
+import com.google.gwt.user.client.ui.Widget;
+
 /**
  * The left panel that contains all of the sinks, along with a short description
  * of each.
  */
 public class SinkList extends Composite {
 
-  private VerticalPanel list = new VerticalPanel();
+  private class MouseLink extends Hyperlink {
+
+    private int index;
+
+    public MouseLink(String name, int index) {
+      super(name, name);
+      this.index = index;
+      sinkEvents(Event.MOUSEEVENTS);
+    }
+
+    public void onBrowserEvent(Event event) {
+      switch (DOM.eventGetType(event)) {
+        case Event.ONMOUSEOVER:
+          mouseOver(index);
+          break;
+
+        case Event.ONMOUSEOUT:
+          mouseOut(index);
+          break;
+      }
+
+      super.onBrowserEvent(event);
+    }
+  }
+
+  private HorizontalPanel list = new HorizontalPanel();
   private ArrayList sinks = new ArrayList();
+
   private int selectedSink = -1;
 
   public SinkList() {
     initWidget(list);
+    list.add(new Image("images/gwt-logo.png"));
     setStyleName("ks-List");
   }
 
   public void addSink(final SinkInfo info) {
     String name = info.getName();
-    Hyperlink link = new Hyperlink(name, name);
-    link.setStyleName("ks-SinkItem");
+    int index = list.getWidgetCount() - 1;
 
+    MouseLink link = new MouseLink(name, index);
     list.add(link);
     sinks.add(info);
+
+    list.setCellVerticalAlignment(link, HorizontalPanel.ALIGN_BOTTOM);
+    styleSink(index, false);
   }
 
   public SinkInfo find(String sinkName) {
@@ -59,16 +93,50 @@
 
   public void setSinkSelection(String name) {
     if (selectedSink != -1) {
-      list.getWidget(selectedSink).removeStyleName("ks-SinkItem-selected");
+      styleSink(selectedSink, false);
     }
-    
+
     for (int i = 0; i < sinks.size(); ++i) {
       SinkInfo info = (SinkInfo) sinks.get(i);
       if (info.getName().equals(name)) {
         selectedSink = i;
-        list.getWidget(selectedSink).addStyleName("ks-SinkItem-selected");
+        styleSink(selectedSink, true);
         return;
       }
     }
   }
+
+  private void mouseOut(int index) {
+    if (index != selectedSink) {
+      colorSink(index, false);
+    }
+  }
+
+  private void mouseOver(int index) {
+    if (index != selectedSink) {
+      colorSink(index, true);
+    }
+  }
+
+  private void styleSink(int index, boolean selected) {
+    String style = (index == 0) ? "ks-FirstSinkItem" : "ks-SinkItem";
+    if (selected) {
+      style += "-selected";
+    }
+
+    Widget w = list.getWidget(index + 1);
+    w.setStyleName(style);
+
+    colorSink(index, selected);
+  }
+
+  private void colorSink(int index, boolean on) {
+    String color = "";
+    if (on) {
+      color = ((SinkInfo) sinks.get(index)).getColor();
+    }
+
+    Widget w = list.getWidget(index + 1);
+    DOM.setStyleAttribute(w.getElement(), "backgroundColor", color);
+  }
 }
diff --git a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/Splitters.java b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/Splitters.java
deleted file mode 100644
index ff9173f..0000000
--- a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/Splitters.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright 2006 Google Inc.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.google.gwt.sample.kitchensink.client;
-
-import com.google.gwt.user.client.ui.HTML;
-import com.google.gwt.user.client.ui.HorizontalSplitPanel;
-import com.google.gwt.user.client.ui.VerticalSplitPanel;
-
-/**
- * Demonstrates the horizontal and vertical split panels.
- */
-public class Splitters extends Sink {
-
-  public static SinkInfo init() {
-    return new SinkInfo("Splitters",
-        "GWT includes horizontal and vertical split panels, which can be used "
-            + "to create user-sizable regions in your application.") {
-
-      public Sink createInstance() {
-        return new Splitters();
-      }
-    };
-  }
-
-  private HorizontalSplitPanel hsplit = new HorizontalSplitPanel();
-  private VerticalSplitPanel vsplit = new VerticalSplitPanel();
-
-  public Splitters() {
-    hsplit.setLeftWidget(new HTML("Left side of a horizontal split panel."));
-    hsplit.setRightWidget(vsplit);
-
-    vsplit.setTopWidget(new HTML("Top of a vertical split panel."));
-    vsplit.setBottomWidget(new HTML("Bottom of a vertical split panel."));
-
-    hsplit.setSize("30em", "10em");
-    vsplit.setSize("100%", "100%");
-    initWidget(hsplit);
-  }
-}
diff --git a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/Tables.java b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/Tables.java
deleted file mode 100644
index c002e40..0000000
--- a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/Tables.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright 2006 Google Inc.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.google.gwt.sample.kitchensink.client;
-
-import com.google.gwt.user.client.ui.FlexTable;
-import com.google.gwt.user.client.ui.HasHorizontalAlignment;
-import com.google.gwt.user.client.ui.Image;
-import com.google.gwt.user.client.ui.Grid;
-
-/**
- * Demonstrates {@link com.google.gwt.user.client.ui.Table}.
- */
-public class Tables extends Sink {
-
-  public static SinkInfo init() {
-    return new SinkInfo(
-      "Tables",
-      "The <code>FlexTable</code> widget doubles as a tabular data formatter "
-        + "and a panel.  In "
-        + "this example, you'll see that there is an outer table with four cells, "
-        + "two of which contain nested components.") {
-      public Sink createInstance() {
-        return new Tables();
-      }
-    };
-  }
-
-  private Grid inner = new Grid(10, 5);
-  private FlexTable outer = new FlexTable();
-
-  public Tables() {
-    outer.setWidget(0, 0, new Image("rembrandt/LaMarcheNocturne.jpg"));
-    outer.getFlexCellFormatter().setColSpan(0, 0, 2);
-    outer.getFlexCellFormatter().setHorizontalAlignment(0, 0,
-      HasHorizontalAlignment.ALIGN_CENTER);
-
-    outer.setHTML(1, 0, "Look to the right...<br>"
-      + "That's a nested table component ->");
-    outer.setWidget(1, 1, inner);
-    ((FlexTable.FlexCellFormatter) outer.getCellFormatter())
-      .setColSpan(1, 1, 2);
-
-    for (int i = 0; i < 10; ++i) {
-      for (int j = 0; j < 5; ++j) {
-        inner.setText(i, j, "" + i + "," + j);
-      }
-    }
-
-    inner.setWidth("100%");
-    outer.setWidth("100%");
-
-    inner.setBorderWidth(1);
-    outer.setBorderWidth(1);
-
-    initWidget(outer);
-  }
-
-  public void onShow() {
-  }
-}
diff --git a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/Tabs.java b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/Tabs.java
deleted file mode 100644
index d7d70e6..0000000
--- a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/Tabs.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright 2006 Google Inc.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.google.gwt.sample.kitchensink.client;
-
-import com.google.gwt.user.client.ui.Image;
-import com.google.gwt.user.client.ui.TabPanel;
-import com.google.gwt.user.client.ui.VerticalPanel;
-import com.google.gwt.user.client.ui.Widget;
-
-/**
- * Demonstrates {"@link com.google.gwt.user.client.ui.TabPanel}.
- */
-public class Tabs extends Sink {
-
-  public static SinkInfo init() {
-    return new SinkInfo("Tabs",
-      "GWT's built-in <code>TabPanel</code> class makes it easy to build tabbed dialogs "
-        + "and the like.  Notice that no page load occurs when you select the "
-        + "different tabs in this page.  That's the magic of dynamic HTML.") {
-      public Sink createInstance() {
-        return new Tabs();
-      }
-    };
-  }
-
-  private TabPanel tabs = new TabPanel();
-
-  public Tabs() {
-    tabs.add(createImage("rembrandt/JohannesElison.jpg"), "1634");
-    tabs.add(createImage("rembrandt/SelfPortrait1640.jpg"), "1640");
-    tabs.add(createImage("rembrandt/LaMarcheNocturne.jpg"), "1642");
-    tabs.add(createImage("rembrandt/TheReturnOfTheProdigalSon.jpg"), "1662");
-    tabs.selectTab(0);
-
-    tabs.setWidth("100%");
-    tabs.setHeight("100%");
-    initWidget(tabs);
-  }
-
-  public void onShow() {
-  }
-
-  private Widget createImage(String imageUrl) {
-    Image image = new Image(imageUrl);
-    image.setStyleName("ks-images-Image");
-
-    VerticalPanel p = new VerticalPanel();
-    p.setHorizontalAlignment(VerticalPanel.ALIGN_CENTER);
-    p.setVerticalAlignment(VerticalPanel.ALIGN_MIDDLE);
-    p.add(image);
-    return p;
-  }
-}
diff --git a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/Text.java b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/Text.java
index 95c7131..fb6fcf6 100644
--- a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/Text.java
+++ b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/Text.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2006 Google Inc.
+ * Copyright 2007 Google Inc.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  * use this file except in compliance with the License. You may obtain a copy of
@@ -15,7 +15,7 @@
  */
 package com.google.gwt.sample.kitchensink.client;
 
-import com.google.gwt.user.client.ui.Button;
+import com.google.gwt.user.client.DOM;
 import com.google.gwt.user.client.ui.ClickListener;
 import com.google.gwt.user.client.ui.HTML;
 import com.google.gwt.user.client.ui.HorizontalPanel;
@@ -35,16 +35,23 @@
 
   public static SinkInfo init() {
     return new SinkInfo(
-      "Text",
-      "GWT includes the standard complement of text-entry widgets, each of which "
-        + "supports keyboard and selection events you can use to control text entry.  "
-        + "In particular, notice that the selection range for each widget is "
-        + "updated whenever you press a key.  "
-        + "This can be a bit tricky on some browsers, but the GWT class library "
-        + "takes care of the plumbing for you automatically.") {
+        "Text",
+        "<h2>Basic and Rich Text</h2>"
+            + "<p>GWT includes the standard complement of text-entry widgets, each of which "
+            + "supports keyboard and selection events you can use to control text entry.  "
+            + "In particular, notice that the selection range for each widget is "
+            + "updated whenever you press a key.</p>"
+            + "<p>Also notice the rich-text area to the right. This is supported on "
+            + "all major browsers, and will fall back gracefully to the level of "
+            + "functionality supported on each.</p>") {
+
       public Sink createInstance() {
         return new Text();
       }
+
+      public String getColor() {
+        return "#2fba10";
+      }
     };
   }
 
@@ -53,17 +60,33 @@
   private TextBox textBox = new TextBox();
 
   public Text() {
-    VerticalPanel panel = new VerticalPanel();
-    panel.setSpacing(8);
-    panel.add(new HTML("Normal text box:"));
-    panel.add(createTextThing(textBox));
-    panel.add(new HTML("Password text box:"));
-    panel.add(createTextThing(passwordText));
-    panel.add(new HTML("Text area:"));
-    panel.add(createTextThing(textArea));
-    panel.add(new HTML("Rich text area:"));
-    panel.add(createRichText());
-    initWidget(panel);
+    TextBox readOnlyTextBox = new TextBox();
+    readOnlyTextBox.setReadOnly(true);
+    readOnlyTextBox.setText("read only");
+    readOnlyTextBox.setWidth("20em");
+
+    VerticalPanel vp = new VerticalPanel();
+    vp.setSpacing(8);
+    vp.add(new HTML("Normal text box:"));
+    vp.add(createTextThing(textBox));
+    vp.add(readOnlyTextBox);
+    vp.add(new HTML("Password text box:"));
+    vp.add(createTextThing(passwordText));
+    vp.add(new HTML("Text area:"));
+    vp.add(createTextThing(textArea));
+
+    textArea.setVisibleLines(5);
+
+    Widget richText = createRichText();
+
+    HorizontalPanel hp = new HorizontalPanel();
+    hp.add(vp);
+    hp.add(richText);
+    hp.setCellHorizontalAlignment(vp, HorizontalPanel.ALIGN_LEFT);
+    hp.setCellHorizontalAlignment(richText, HorizontalPanel.ALIGN_RIGHT);
+
+    initWidget(hp);
+    hp.setWidth("100%");
   }
 
   public void onShow() {
@@ -76,7 +99,12 @@
     VerticalPanel p = new VerticalPanel();
     p.add(tb);
     p.add(area);
+
+    area.setHeight("14em");
     area.setWidth("100%");
+    tb.setWidth("100%");
+    p.setWidth("100%");
+    DOM.setStyleAttribute(p.getElement(), "margin-right", "4px");
     return p;
   }
 
@@ -87,13 +115,6 @@
     p.add(textBox);
 
     final HTML echo = new HTML();
-    p.add(new Button("select all", new ClickListener() {
-      public void onClick(Widget sender) {
-        textBox.selectAll();
-        textBox.setFocus(true);
-        updateText(textBox, echo);
-      }
-    }));
 
     p.add(echo);
     textBox.addKeyboardListener(new KeyboardListenerAdapter() {
@@ -108,11 +129,13 @@
       }
     });
 
+    textBox.setWidth("20em");
+    updateText(textBox, echo);
     return p;
   }
 
   private void updateText(TextBoxBase text, HTML echo) {
-    echo.setHTML("Text: " + text.getText() + "<br>" + "Selection: "
-      + text.getCursorPos() + ", " + text.getSelectionLength());
+    echo.setHTML("Selection: " + text.getCursorPos() + ", "
+        + text.getSelectionLength());
   }
 }
diff --git a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/Trees.java b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/Trees.java
deleted file mode 100644
index 3e845a6..0000000
--- a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/Trees.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * Copyright 2006 Google Inc.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.google.gwt.sample.kitchensink.client;
-
-import com.google.gwt.user.client.ui.Tree;
-import com.google.gwt.user.client.ui.TreeItem;
-import com.google.gwt.user.client.ui.TreeListener;
-
-/**
- * Demonstrates the {@link com.google.gwt.user.client.ui.Tree} widget.
- */
-public class Trees extends Sink implements TreeListener {
-
-  private static class PendingItem extends TreeItem {
-    public PendingItem() {
-      super("Please wait...");
-    }
-  }
-
-  private static class Proto {
-    public Proto[] children;
-    public TreeItem item;
-    public String text;
-
-    public Proto(String text) {
-      this.text = text;
-    }
-
-    public Proto(String text, Proto[] children) {
-      this(text);
-      this.children = children;
-    }
-  }
-
-  private static Proto[] fProto = new Proto[]{
-    new Proto("Beethoven", new Proto[]{
-      new Proto("Concertos", new Proto[]{
-        new Proto("No. 1 - C"), new Proto("No. 2 - B-Flat Major"),
-        new Proto("No. 3 - C Minor"), new Proto("No. 4 - G Major"),
-        new Proto("No. 5 - E-Flat Major"),}),
-      new Proto("Quartets", new Proto[]{
-        new Proto("Six String Quartets"), new Proto("Three String Quartets"),
-        new Proto("Grosse Fugue for String Quartets"),}),
-      new Proto("Sonatas", new Proto[]{
-        new Proto("Sonata in A Minor"), new Proto("Sonata in F Major"),}),
-      new Proto("Symphonies", new Proto[]{
-        new Proto("No. 1 - C Major"), new Proto("No. 2 - D Major"),
-        new Proto("No. 3 - E-Flat Major"), new Proto("No. 4 - B-Flat Major"),
-        new Proto("No. 5 - C Minor"), new Proto("No. 6 - F Major"),
-        new Proto("No. 7 - A Major"), new Proto("No. 8 - F Major"),
-        new Proto("No. 9 - D Minor"),}),}),
-    new Proto("Brahms", new Proto[]{
-      new Proto("Concertos", new Proto[]{
-        new Proto("Violin Concerto"), new Proto("Double Concerto - A Minor"),
-        new Proto("Piano Concerto No. 1 - D Minor"),
-        new Proto("Piano Concerto No. 2 - B-Flat Major"),}),
-      new Proto("Quartets", new Proto[]{
-        new Proto("Piano Quartet No. 1 - G Minor"),
-        new Proto("Piano Quartet No. 2 - A Major"),
-        new Proto("Piano Quartet No. 3 - C Minor"),
-        new Proto("String Quartet No. 3 - B-Flat Minor"),}),
-      new Proto("Sonatas", new Proto[]{
-        new Proto("Two Sonatas for Clarinet - F Minor"),
-        new Proto("Two Sonatas for Clarinet - E-Flat Major"),}),
-      new Proto("Symphonies", new Proto[]{
-        new Proto("No. 1 - C Minor"), new Proto("No. 2 - D Minor"),
-        new Proto("No. 3 - F Major"), new Proto("No. 4 - E Minor"),}),}),
-    new Proto("Mozart", new Proto[]{new Proto("Concertos", new Proto[]{
-      new Proto("Piano Concerto No. 12"), new Proto("Piano Concerto No. 17"),
-      new Proto("Clarinet Concerto"), new Proto("Violin Concerto No. 5"),
-      new Proto("Violin Concerto No. 4"),}),}),};
-
-  public static SinkInfo init() {
-    return new SinkInfo("Trees",
-      "GWT has a built-in <code>Tree</code> widget.  "
-        + "The tree is focusable and has keyboard support as well.") {
-      public Sink createInstance() {
-        return new Trees();
-      }
-    };
-  }
-
-  private Tree tree = new Tree();
-
-  public Trees() {
-    for (int i = 0; i < fProto.length; ++i) {
-      createItem(fProto[i]);
-      tree.addItem(fProto[i].item);
-    }
-
-    tree.addTreeListener(this);
-    initWidget(tree);
-  }
-
-  public void onShow() {
-  }
-
-  public void onTreeItemSelected(TreeItem item) {
-  }
-
-  public void onTreeItemStateChanged(TreeItem item) {
-    TreeItem child = item.getChild(0);
-    if (child instanceof PendingItem) {
-      item.removeItem(child);
-
-      Proto proto = (Proto) item.getUserObject();
-      for (int i = 0; i < proto.children.length; ++i) {
-        createItem(proto.children[i]);
-        item.addItem(proto.children[i].item);
-      }
-    }
-  }
-
-  private void createItem(Proto proto) {
-    proto.item = new TreeItem(proto.text);
-    proto.item.setUserObject(proto);
-    if (proto.children != null) {
-      proto.item.addItem(new PendingItem());
-    }
-  }
-}
diff --git a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/Widgets.java b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/Widgets.java
new file mode 100644
index 0000000..db15f2f
--- /dev/null
+++ b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/client/Widgets.java
@@ -0,0 +1,137 @@
+/*
+ * Copyright 2007 Google Inc.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.google.gwt.sample.kitchensink.client;
+
+import com.google.gwt.user.client.Command;
+import com.google.gwt.user.client.Window;
+import com.google.gwt.user.client.ui.Button;
+import com.google.gwt.user.client.ui.CheckBox;
+import com.google.gwt.user.client.ui.HorizontalPanel;
+import com.google.gwt.user.client.ui.Image;
+import com.google.gwt.user.client.ui.MenuBar;
+import com.google.gwt.user.client.ui.MenuItem;
+import com.google.gwt.user.client.ui.PushButton;
+import com.google.gwt.user.client.ui.RadioButton;
+import com.google.gwt.user.client.ui.ToggleButton;
+import com.google.gwt.user.client.ui.VerticalPanel;
+
+/**
+ * Demonstrates the various button widgets.
+ */
+public class Widgets extends Sink implements Command {
+
+  public static SinkInfo init() {
+    return new SinkInfo("Widgets", "<h2>Basic Widgets</h2>" +
+      "<p>GWT has all sorts of the basic widgets you would expect from any " +
+      "toolkit.</p><p>Below, you can see various kinds of buttons, check boxes, " +
+      "radio buttons, and menus.</p>") {
+
+      public Sink createInstance() {
+        return new Widgets();
+      }
+
+      public String getColor() {
+        return "#bf2a2a";
+      }
+    };
+  }
+
+  private Button disabledButton = new Button("Disabled Button");
+  private CheckBox disabledCheck = new CheckBox("Disabled Check");
+  private Button normalButton = new Button("Normal Button");
+  private CheckBox normalCheck = new CheckBox("Normal Check");
+  private VerticalPanel panel = new VerticalPanel();
+  private RadioButton radio0 = new RadioButton("group0", "Choice 0");
+  private RadioButton radio1 = new RadioButton("group0", "Choice 1");
+  private RadioButton radio2 = new RadioButton("group0", "Choice 2 (Disabled)");
+  private RadioButton radio3 = new RadioButton("group0", "Choice 3");
+  private PushButton pushButton = new PushButton(new Image("images/gwt-logo.png"));
+  private ToggleButton toggleButton = new ToggleButton(new Image("images/gwt-logo.png"));
+
+  public Widgets() {
+    HorizontalPanel hp;
+
+    panel.add(createMenu());
+
+    panel.add(hp = new HorizontalPanel());
+    hp.setSpacing(8);
+    hp.add(normalButton);
+    hp.add(disabledButton);
+
+    panel.add(hp = new HorizontalPanel());
+    hp.setSpacing(8);
+    hp.add(normalCheck);
+    hp.add(disabledCheck);
+
+    panel.add(hp = new HorizontalPanel());
+    hp.setSpacing(8);
+    hp.add(radio0);
+    hp.add(radio1);
+    hp.add(radio2);
+    hp.add(radio3);
+
+    panel.add(hp = new HorizontalPanel());
+    hp.setSpacing(8);
+    hp.add(pushButton);
+    hp.add(toggleButton);
+
+    disabledButton.setEnabled(false);
+    disabledCheck.setEnabled(false);
+    radio2.setEnabled(false);
+
+    panel.setSpacing(8);
+    initWidget(panel);
+  }
+
+  public MenuBar createMenu() {
+    MenuBar menu = new MenuBar();
+    menu.setAutoOpen(true);
+
+    MenuBar subMenu = new MenuBar(true);
+    subMenu.addItem("<code>Code</code>", true, this);
+    subMenu.addItem("<strike>Strikethrough</strike>", true, this);
+    subMenu.addItem("<u>Underlined</u>", true, this);
+
+    MenuBar menu0 = new MenuBar(true);
+    menu0.addItem("<b>Bold</b>", true, this);
+    menu0.addItem("<i>Italicized</i>", true, this);
+    menu0.addItem("More &#187;", true, subMenu);
+    MenuBar menu1 = new MenuBar(true);
+    menu1.addItem("<font color='#FF0000'><b>Apple</b></font>", true, this);
+    menu1.addItem("<font color='#FFFF00'><b>Banana</b></font>", true, this);
+    menu1.addItem("<font color='#FFFFFF'><b>Coconut</b></font>", true, this);
+    menu1.addItem("<font color='#8B4513'><b>Donut</b></font>", true, this);
+    MenuBar menu2 = new MenuBar(true);
+    menu2.addItem("Bling", this);
+    menu2.addItem("Ginormous", this);
+    menu2.addItem("<code>w00t!</code>", true, this);
+
+    menu.addItem(new MenuItem("Style", menu0));
+    menu.addItem(new MenuItem("Fruit", menu1));
+    menu.addItem(new MenuItem("Term", menu2));
+
+    menu.setWidth("100%");
+
+    return menu;
+  }
+
+  public void execute() {
+    Window.alert("Thank you for selecting a menu item.");
+  }
+
+  public void onShow() {
+  }
+}
diff --git a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/KitchenSink.css b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/KitchenSink.css
index c278e53..47a27b9 100644
--- a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/KitchenSink.css
+++ b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/KitchenSink.css
@@ -1,9 +1,13 @@
 body {
   background-color: white;
   color: black;
-  font-family: Arial, sans-serif;
+  font-family: Helvetica, Arial, sans-serif;
 	font-size: 10pt;
-  margin: 20px 20px 20px 20px;
+  margin: 0px 20px 20px 20px;
+}
+
+h2 {
+	font-weight: normal;
 }
 
 table {
@@ -35,7 +39,6 @@
 }
 
 .gwt-DialogBox {
-  sborder: 8px solid #C3D9FF;
   border: 2px outset;
   background-color: white;
 }
@@ -54,16 +57,6 @@
 .gwt-Frame {
 }
 
-.gwt-HorizontalSplitter .Bar {
-  width: 8px;
-  background-color: #C3D9FF;
-}
-
-.gwt-VerticalSplitter .Bar {
-  height: 8px;
-  background-color: #C3D9FF;
-}
-
 .gwt-HTML {
 }
 
@@ -101,30 +94,33 @@
 }
 
 .gwt-TabPanel {
+	margin-top: 4px;
 }
 
 .gwt-TabPanelBottom {
-  border-left: 1px solid #87B3FF;
+  background-color: #E8EEF7;
 }
 
 .gwt-TabBar {
-  background-color: #C3D9FF;
+  padding-top: 2px;
 }
 
 .gwt-TabBar .gwt-TabBarFirst {
-  height: 100%;
-  border-bottom: 1px solid #87B3FF;
+  font-size: 12pt;
+  border-bottom: 2px solid #87B3FF;
+  border-right: 2px solid #87B3FF;
   padding-left: 3px;
 }
 
 .gwt-TabBar .gwt-TabBarRest {
-  border-bottom: 1px solid #87B3FF;
+  border-bottom: 2px solid #87B3FF;
   padding-right: 3px;
 }
 
 .gwt-TabBar .gwt-TabBarItem {
-  border-top: 1px solid #C3D9FF;
-  border-bottom: 1px solid #87B3FF;
+  border-top: 2px solid #C3D9FF;
+  border-right: 2px solid #87B3FF;
+  border-bottom: 2px solid #87B3FF;
   padding: 2px;
   cursor: pointer;
   cursor: hand;
@@ -133,10 +129,9 @@
 .gwt-TabBar .gwt-TabBarItem-selected {
   font-weight: bold;
   background-color: #E8EEF7;
-  border-top: 1px solid #87B3FF;
-  border-left: 1px solid #87B3FF;
-  border-right: 1px solid #87B3FF;
-  border-bottom: 1px solid #E8EEF7;
+  border-top: 2px solid #87B3FF;
+  border-right: 2px solid #87B3FF;
+  border-bottom: 2px solid #E8EEF7;
   padding: 2px;
   cursor: default;
 }
@@ -147,7 +142,12 @@
 .gwt-TextBox {
 }
 
+.gwt-TextBox-readonly {
+	color: #888;
+}
+
 .gwt-Tree {
+	background: white;
 }
 
 .gwt-Tree .gwt-TreeItem {
@@ -172,7 +172,7 @@
 .gwt-PushButton-up {
   background-color: #C3D9FF;
   padding: 2px;
-  border: 1px solid transparent;
+  border: 2px solid transparent;
   border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205) rgb(232, 241, 255)
   cursor: pointer;
   cursor: hand;
@@ -181,7 +181,7 @@
 .gwt-PushButton-up-hovering {
   background-color: #C3D9FF;
   padding: 2px;
-  border: 1px solid transparent;
+  border: 2px solid transparent;
   border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205) rgb(232, 241, 255)
   cursor: pointer;
   cursor: hand;
@@ -190,7 +190,7 @@
 .gwt-PushButton-down {
   background-color: #C3D9FF;
   padding: 2px;
-  border: 1px solid transparent;
+  border: 2px solid transparent;
   border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255) rgb(157, 174, 205);
   cursor: pointer;
   cursor: hand;
@@ -199,7 +199,7 @@
 .gwt-PushButton-down-hovering {
   background-color: #C3D9FF;
   padding: 2px;
-  border: 1px solid transparent;
+  border: 2px solid transparent;
   border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255) rgb(157, 174, 205);
   cursor: pointer;
   cursor: hand;
@@ -208,7 +208,7 @@
 .gwt-ToggleButton-up {
   background-color: #C3D9FF;
   padding: 2px;
-  border: 1px solid transparent;
+  border: 2px solid transparent;
   border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205) rgb(232, 241, 255)
   cursor: pointer;
   cursor: hand;
@@ -217,7 +217,7 @@
 .gwt-ToggleButton-up-hovering {
   background-color: #C3D9FF;
   padding: 2px;
-  border: 1px solid transparent;
+  border: 2px solid transparent;
   border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205) rgb(232, 241, 255)
   cursor: pointer;
   cursor: hand;
@@ -227,7 +227,7 @@
   background-color: #C3D9FF;
   padding: 2px;
   background-color: #E8F1FF;
-  border: 1px solid transparent;
+  border: 2px solid transparent;
   border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255) rgb(157, 174, 205);
   cursor: pointer;
   cursor: hand;
@@ -237,7 +237,7 @@
   background-color: #C3D9FF;
   padding: 2px;
   background-color: #E8F1FF;
-  border: 1px solid transparent;
+  border: 2px solid transparent;
   border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255) rgb(157, 174, 205);
   cursor: pointer;
   cursor: hand;
@@ -335,32 +335,82 @@
 
 /* -------------------------------------------------------------------------- */
 .ks-Sink {
-  border: 8px solid #C3D9FF;
-  background-color: #E8EEF7;
   width: 100%;
   height: 24em;
 }
 
 .ks-Info {
-  background-color: #C3D9FF;
-  padding: 10px 10px 2px 10px;
+	color: white;
+  padding: 20px 10px 20px 40px;
+  margin-bottom: 10px;
 }
 
 .ks-List {
-  margin-top: 8px;
-  margin-bottom: 8px;
+}
+
+.ks-List .gwt-Image {
+	position: relative;
+	top: 8px;
+}
+
+.ks-List .ks-SinkItem a {
+	text-decoration: none;
+	color: white;
+}
+
+.ks-List .ks-SinkItem-selected a {
+	text-decoration: none;
+	color: white;
+}
+
+.ks-List .ks-FirstSinkItem a {
+	text-decoration: none;
+	color: white;
+}
+
+.ks-List .ks-FirstSinkItem-selected a {
+	text-decoration: none;
+	color: white;
 }
 
 .ks-List .ks-SinkItem {
-  width: 100%;
-  padding: 0.3em;
+	background: #c6cab7;
+  padding: 4px;
+  padding-left: 16px;
   padding-right: 16px;
+  margin-right: 3px;
+  border-bottom: 3px solid white;
   cursor: pointer;
   cursor: hand;
 }
 
 .ks-List .ks-SinkItem-selected {
-  background-color: #C3D9FF;
+	background: #c6cab7;
+  padding: 4px;
+  padding-left: 16px;
+  padding-right: 16px;
+  margin-right: 3px;
+  padding-bottom: 7px;
+}
+
+.ks-List .ks-FirstSinkItem {
+	background: #c6cab7 url(images/corner.gif) no-repeat top left;
+  padding: 4px;
+  padding-left: 16px;
+  padding-right: 16px;
+  margin-right: 3px;
+  border-bottom: 3px solid white;
+  cursor: pointer;
+  cursor: hand;
+}
+
+.ks-List .ks-FirstSinkItem-selected {
+	background: #c3d9ff url(images/corner.gif) no-repeat top left;
+  padding: 4px;
+  padding-left: 16px;
+  padding-right: 16px;
+  margin-right: 3px;
+  padding-bottom: 7px;
 }
 
 .ks-images-Image {
@@ -397,7 +447,3 @@
   border: 1px solid #87B3FF;
   padding: 4px;
 }
-
-.infoProse {
-  margin: 8px;
-}
diff --git a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/KitchenSink.html b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/KitchenSink.html
index 0215b48..8f745d3 100644
--- a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/KitchenSink.html
+++ b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/KitchenSink.html
@@ -2,7 +2,7 @@
 	<head>
 		<title>Kitchen Sink</title>
 	</head>
-	<body> 
+	<body>
 		<script language='javascript' src='com.google.gwt.sample.kitchensink.KitchenSink.nocache.js'></script>
 		<iframe src="javascript:''" id='__gwt_historyFrame' style='width:0;height:0;border:0'></iframe>
 	</body>
diff --git a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/images/blanksearching.gif b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/images/blanksearching.gif
deleted file mode 100644
index 45b7594..0000000
--- a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/images/blanksearching.gif
+++ /dev/null
Binary files differ
diff --git a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/images/corner.gif b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/images/corner.gif
new file mode 100644
index 0000000..97acb41
--- /dev/null
+++ b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/images/corner.gif
Binary files differ
diff --git a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/images/gwt-logo.png b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/images/gwt-logo.png
new file mode 100644
index 0000000..00fda35
--- /dev/null
+++ b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/images/gwt-logo.png
Binary files differ
diff --git a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/images/jimmy.jpg b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/images/jimmy.jpg
new file mode 100755
index 0000000..1453a1e
--- /dev/null
+++ b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/images/jimmy.jpg
Binary files differ
diff --git a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/images/searching.gif b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/images/searching.gif
deleted file mode 100644
index 167cd5f..0000000
--- a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/images/searching.gif
+++ /dev/null
Binary files differ
diff --git a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/rembrandt/JohannesElison.html b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/rembrandt/JohannesElison.html
deleted file mode 100644
index 0b470e3..0000000
--- a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/rembrandt/JohannesElison.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<html>
-  <head>
-    <title>Johannes Elison</title>
-    <link rel='stylesheet' href='rembrandt.css'>
-  </head>
-
-  <body>
-    <center>
-      <a href='TheReturnOfTheProdigalSon.html'><img border='0' src='back.gif'></a>
-      <span class='header'>Johannes Elison</span>
-      <a href='LaMarcheNocturne.html'><img border='0' src='forward.gif'></a>
-
-      <p> <img src='JohannesElison.jpg'> </p>
-    </center>
-  </body>
-</html>
-
diff --git a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/rembrandt/JohannesElison.jpg b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/rembrandt/JohannesElison.jpg
deleted file mode 100644
index a6d283e..0000000
--- a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/rembrandt/JohannesElison.jpg
+++ /dev/null
Binary files differ
diff --git a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/rembrandt/LaMarcheNocturne.html b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/rembrandt/LaMarcheNocturne.html
deleted file mode 100644
index 3d5e0b0..0000000
--- a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/rembrandt/LaMarcheNocturne.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<html>
-  <head>
-    <title>La Marche Nocturne</title>
-    <link rel='stylesheet' href='rembrandt.css'>
-  </head>
-
-  <body>
-    <center>
-      <a href='JohannesElison.html'><img border='0' src='back.gif'></a>
-      <span class='header'>La Marche Nocturne</span>
-      <a href='SelfPortrait1628.html'><img border='0' src='forward.gif'></a>
-
-      <p> <img src='LaMarcheNocturne.jpg'> </p>
-    </center>
-  </body>
-</html>
-
diff --git a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/rembrandt/LaMarcheNocturne.jpg b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/rembrandt/LaMarcheNocturne.jpg
deleted file mode 100644
index cd3d39b..0000000
--- a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/rembrandt/LaMarcheNocturne.jpg
+++ /dev/null
Binary files differ
diff --git a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/rembrandt/SelfPortrait1628.html b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/rembrandt/SelfPortrait1628.html
deleted file mode 100644
index f45acac..0000000
--- a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/rembrandt/SelfPortrait1628.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<html>
-  <head>
-    <title>Self Portrait 1628</title>
-    <link rel='stylesheet' href='rembrandt.css'>
-  </head>
-
-  <body>
-    <center>
-      <a href='LaMarcheNocturne.html'><img border='0' src='back.gif'></a>
-      <span class='header'>Self Portrait 1628</span>
-      <a href='SelfPortrait1640.html'><img border='0' src='forward.gif'></a>
-
-      <p> <img src='SelfPortrait1628.jpg'> </p>
-    </center>
-  </body>
-</html>
-
diff --git a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/rembrandt/SelfPortrait1628.jpg b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/rembrandt/SelfPortrait1628.jpg
deleted file mode 100644
index 688d694..0000000
--- a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/rembrandt/SelfPortrait1628.jpg
+++ /dev/null
Binary files differ
diff --git a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/rembrandt/SelfPortrait1640.html b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/rembrandt/SelfPortrait1640.html
deleted file mode 100644
index b71902f..0000000
--- a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/rembrandt/SelfPortrait1640.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<html>
-  <head>
-    <title>Self Portrait 1640</title>
-    <link rel='stylesheet' href='rembrandt.css'>
-  </head>
-
-  <body>
-    <center>
-      <a href='SelfPortrait1628.html'><img border='0' src='back.gif'></a>
-      <span class='header'>Self Portrait 1640</span>
-      <a href='TheArtistInHisStudio.html'><img border='0' src='forward.gif'></a>
-
-      <p> <img src='SelfPortrait1640.jpg'> </p>
-    </center>
-  </body>
-</html>
-
diff --git a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/rembrandt/SelfPortrait1640.jpg b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/rembrandt/SelfPortrait1640.jpg
deleted file mode 100644
index 89e71b1..0000000
--- a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/rembrandt/SelfPortrait1640.jpg
+++ /dev/null
Binary files differ
diff --git a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/rembrandt/TheArtistInHisStudio.html b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/rembrandt/TheArtistInHisStudio.html
deleted file mode 100644
index 70d0e6e..0000000
--- a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/rembrandt/TheArtistInHisStudio.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<html>
-  <head>
-    <title>The Artist in His Studio</title>
-    <link rel='stylesheet' href='rembrandt.css'>
-  </head>
-
-  <body>
-    <center>
-      <a href='SelfPortrait1640.html'><img border='0' src='back.gif'></a>
-      <span class='header'>The Artist in His Studio</span>
-      <a href='TheReturnOfTheProdigalSon.html'><img border='0' src='forward.gif'></a>
-
-      <p> <img src='TheArtistInHisStudio.jpg'> </p>
-    </center>
-  </body>
-</html>
-
diff --git a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/rembrandt/TheArtistInHisStudio.jpg b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/rembrandt/TheArtistInHisStudio.jpg
deleted file mode 100644
index 5835879..0000000
--- a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/rembrandt/TheArtistInHisStudio.jpg
+++ /dev/null
Binary files differ
diff --git a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/rembrandt/TheReturnOfTheProdigalSon.html b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/rembrandt/TheReturnOfTheProdigalSon.html
deleted file mode 100644
index 83c2ed1..0000000
--- a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/rembrandt/TheReturnOfTheProdigalSon.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<html>
-  <head>
-    <title>The Return of the Prodigal Son</title>
-    <link rel='stylesheet' href='rembrandt.css'>
-  </head>
-
-  <body>
-    <center>
-      <a href='TheArtistInHisStudio.html'><img border='0' src='back.gif'></a>
-      <span class='header'>The Return of the Prodigal Son</span>
-      <a href='JohannesElison.html'><img border='0' src='forward.gif'></a>
-
-      <p> <img src='TheReturnOfTheProdigalSon.jpg'> </p>
-    </center>
-  </body>
-</html>
-
diff --git a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/rembrandt/TheReturnOfTheProdigalSon.jpg b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/rembrandt/TheReturnOfTheProdigalSon.jpg
deleted file mode 100644
index 31f30b0..0000000
--- a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/rembrandt/TheReturnOfTheProdigalSon.jpg
+++ /dev/null
Binary files differ
diff --git a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/rembrandt/back.gif b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/rembrandt/back.gif
deleted file mode 100644
index 2a59fc2..0000000
--- a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/rembrandt/back.gif
+++ /dev/null
Binary files differ
diff --git a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/rembrandt/forward.gif b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/rembrandt/forward.gif
deleted file mode 100644
index 6216167..0000000
--- a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/rembrandt/forward.gif
+++ /dev/null
Binary files differ
diff --git a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/rembrandt/rembrandt.css b/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/rembrandt/rembrandt.css
deleted file mode 100644
index cd8ae2c..0000000
--- a/samples/kitchensink/src/com/google/gwt/sample/kitchensink/public/rembrandt/rembrandt.css
+++ /dev/null
@@ -1,8 +0,0 @@
-.header {
-  font-weight:bold;
-  font-size:150%;
-  font-family: arial, sans-serif;
-  font-style: italic;
-  margin-left: 1em;
-  margin-right: 1em;
-}