The Showcase sample demonstrates many of the features of GWT including Widget styles and animations, I18N support, general design patterns, other features. The Showcase is available in 4 languages and works well on all browsers. This version is almost complete, but Bruce, Joel and I decided to check it in before GWT 1.5 milestone 2 so we can receive feedback before the offical release.
Patch by: jlabanca
git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@2061 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/eclipse/samples/Showcase/.checkstyle b/eclipse/samples/Showcase/.checkstyle
new file mode 100644
index 0000000..222627f
--- /dev/null
+++ b/eclipse/samples/Showcase/.checkstyle
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<fileset-config file-format-version="1.2.0" simple-config="false">
+ <fileset name="all" enabled="true" check-config-name="GWT Checks" local="false">
+ <file-match-pattern match-pattern="." include-pattern="true"/>
+ </fileset>
+</fileset-config>
diff --git a/eclipse/samples/Showcase/.classpath b/eclipse/samples/Showcase/.classpath
new file mode 100644
index 0000000..8996e78
--- /dev/null
+++ b/eclipse/samples/Showcase/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="core/src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/gwt-user"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/eclipse/samples/Showcase/.project b/eclipse/samples/Showcase/.project
new file mode 100644
index 0000000..981c3fd
--- /dev/null
+++ b/eclipse/samples/Showcase/.project
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>Showcase</name>
+ <comment>Showcase project</comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>com.atlassw.tools.eclipse.checkstyle.CheckstyleBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>com.atlassw.tools.eclipse.checkstyle.CheckstyleNature</nature>
+ </natures>
+ <linkedResources>
+ <link>
+ <name>core</name>
+ <type>2</type>
+ <locationURI>GWT_ROOT/samples/showcase/</locationURI>
+ </link>
+ </linkedResources>
+</projectDescription>
diff --git a/samples/build.xml b/samples/build.xml
index bc5ad97..01b34a6 100644
--- a/samples/build.xml
+++ b/samples/build.xml
@@ -30,6 +30,10 @@
<gwt.ant dir="mail" />
</target>
+ <target name="showcase" description="Build showcase">
+ <gwt.ant dir="showcase" />
+ </target>
+
<target name="simplexml" description="Build simplexml">
<gwt.ant dir="simplexml" />
</target>
@@ -41,6 +45,7 @@
<antcall target="json" />
<antcall target="kitchensink" />
<antcall target="mail" />
+ <antcall target="showcase" />
<antcall target="simplexml" />
</target>
diff --git a/samples/common.ant.xml b/samples/common.ant.xml
index ac4f9ed..0bfb833 100755
--- a/samples/common.ant.xml
+++ b/samples/common.ant.xml
@@ -44,6 +44,7 @@
<sequential>
<mkdir dir="${sample.build}/www" />
<java dir="${sample.build}" classname="com.google.gwt.dev.GWTCompiler" classpath="src:${sample.build}/bin:${gwt.user.jar}:${gwt.dev.jar}" fork="yes" failonerror="true">
+ <jvmarg value="-Xmx128M"/>
<arg value="-out" />
<arg file="${sample.build}/www" />
<arg value="com.google.gwt.sample.${sample.package}.${sample.module}" />
diff --git a/samples/showcase/build.xml b/samples/showcase/build.xml
new file mode 100755
index 0000000..f733288
--- /dev/null
+++ b/samples/showcase/build.xml
@@ -0,0 +1,5 @@
+<project name="showcase" default="build" basedir=".">
+ <property name="sample.root" value="showcase" />
+ <property name="sample.module" value="Showcase" />
+ <import file="../common.ant.xml" />
+</project>
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/Showcase.gwt.xml b/samples/showcase/src/com/google/gwt/sample/showcase/Showcase.gwt.xml
new file mode 100644
index 0000000..8fa3321
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/Showcase.gwt.xml
@@ -0,0 +1,27 @@
+<module>
+ <!-- Inherit the core Web Toolkit stuff. -->
+ <inherits name="com.google.gwt.core.Core"/>
+ <inherits name='com.google.gwt.user.User'/>
+ <inherits name="com.google.gwt.i18n.I18N"/>
+
+ <!-- Enable Animations -->
+ <set-property name="gwt.enableAnimations" value="true"/>
+ <set-property name="gwt.enableWidgetAnimations" value="true"/>
+
+ <!-- Enable debug ID. -->
+ <inherits name="com.google.gwt.user.Debug"/>
+ <set-property name="gwt.enableDebugId" value="true"/>
+
+ <!-- Specify the app entry point class. -->
+ <entry-point class='com.google.gwt.sample.showcase.client.Showcase'/>
+
+ <!-- Internationalization support. -->
+ <extend-property name="locale" values="en"/>
+ <extend-property name="locale" values="ar"/>
+ <extend-property name="locale" values="fr"/>
+ <extend-property name="locale" values="zh"/>
+
+ <!-- Include style sheets. -->
+ <stylesheet src="GWT-default.css"/>
+ <stylesheet src="Showcase.css"/>
+</module>
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/Application.java b/samples/showcase/src/com/google/gwt/sample/showcase/client/Application.java
new file mode 100644
index 0000000..7a58f49
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/Application.java
@@ -0,0 +1,341 @@
+/*
+ * Copyright 2008 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.showcase.client;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.user.client.DOM;
+import com.google.gwt.user.client.Window;
+import com.google.gwt.user.client.WindowResizeListener;
+import com.google.gwt.user.client.ui.AbstractImagePrototype;
+import com.google.gwt.user.client.ui.Composite;
+import com.google.gwt.user.client.ui.DecoratorPanel;
+import com.google.gwt.user.client.ui.FlexTable;
+import com.google.gwt.user.client.ui.Grid;
+import com.google.gwt.user.client.ui.HTML;
+import com.google.gwt.user.client.ui.HasHorizontalAlignment;
+import com.google.gwt.user.client.ui.HasVerticalAlignment;
+import com.google.gwt.user.client.ui.HorizontalPanel;
+import com.google.gwt.user.client.ui.ScrollPanel;
+import com.google.gwt.user.client.ui.Tree;
+import com.google.gwt.user.client.ui.TreeImages;
+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;
+import com.google.gwt.user.client.ui.FlexTable.FlexCellFormatter;
+import com.google.gwt.user.client.ui.HTMLTable.CellFormatter;
+
+/**
+ * <p>
+ * A generic application that includes a title bar, main menu, content area, and
+ * some external links at the top.
+ * </p>
+ * <h3>CSS Style Rules</h3>
+ * <ul class="css">
+ * <li>.Application { Applied to the entire Application }</li>
+ * <li>.Application-top { The top portion of the Application }</li>
+ * <li>.Application-title { The title widget }</li>
+ * <li>.Application-links { The main external links }</li>
+ * <li>.Application-menu { The main menu }</li>
+ * <li>.Application-menu-title { The title above the main menu }</li>
+ * <li>.Application-menu-wrapper { The scrollable element around the main menu }</li>
+ * <li>.Application-content-wrapper { The scrollable element around the content }</li>
+ * </ul>
+ */
+public class Application extends Composite implements WindowResizeListener {
+ /**
+ * Images used in the {@link Application}.
+ */
+ public interface ApplicationImages extends TreeImages {
+ /**
+ * An image indicating a leaf.
+ *
+ * @gwt.resource noimage.png
+ * @return a prototype of this image
+ */
+ AbstractImagePrototype treeLeaf();
+ }
+
+ /**
+ * A listener to handle events from the Application.
+ */
+ public interface ApplicationListener {
+ /**
+ * Fired when a menu item is selected.
+ *
+ * @param item the item that was selected
+ */
+ void onMenuItemSelected(com.google.gwt.user.client.ui.TreeItem item);
+ }
+
+ /**
+ * The base style name.
+ */
+ public static final String DEFAULT_STYLE_NAME = "Application";
+
+ /**
+ * The wrapper around the content.
+ */
+ private ScrollPanel contentWrapper;
+
+ /**
+ * The main wrapper around the menu and content.
+ */
+ private FlexTable contentLayout;
+
+ /**
+ * The panel that holds the main links.
+ */
+ private HorizontalPanel linksPanel;
+
+ /**
+ * The {@link ApplicationListener}.
+ */
+ private ApplicationListener listener = null;
+
+ /**
+ * The main menu.
+ */
+ private Tree mainMenu;
+
+ /**
+ * The wrapper around the main menu.
+ */
+ private ScrollPanel mainMenuWrapper;
+
+ /**
+ * The panel that contains the title widget and links.
+ */
+ private Grid topPanel;
+
+ /**
+ * Constructor.
+ */
+ public Application() {
+ // Setup the main layout
+ VerticalPanel layout = new VerticalPanel();
+ initWidget(layout);
+ layout.setSize("100%", "100%");
+
+ // Setup the top panel with the title and links
+ topPanel = createTopPanel();
+ layout.add(topPanel);
+
+ // Create a DecoratorPanel to hold the menu and content
+ DecoratorPanel mainDecorator = new DecoratorPanel();
+ layout.add(mainDecorator);
+ layout.setCellHorizontalAlignment(mainDecorator,
+ HasHorizontalAlignment.ALIGN_CENTER);
+ layout.setCellVerticalAlignment(mainDecorator,
+ HasVerticalAlignment.ALIGN_MIDDLE);
+
+ // Setup the content layout
+ contentLayout = new FlexTable();
+ contentLayout.setCellPadding(0);
+ contentLayout.setCellSpacing(0);
+ mainDecorator.setWidget(contentLayout);
+ FlexCellFormatter formatter = contentLayout.getFlexCellFormatter();
+
+ // Add the main menu title
+ setMainMenuTitle("Main Menu");
+ formatter.setStyleName(0, 0, DEFAULT_STYLE_NAME + "-menu-title");
+
+ // Add the main menu
+ contentLayout.setWidget(1, 0, createMainMenu());
+ formatter.setStyleName(1, 0, DEFAULT_STYLE_NAME + "-menu-wrapper");
+
+ // Add the content title
+ setContentTitle(new HTML("Content"));
+ formatter.setStyleName(0, 1, DEFAULT_STYLE_NAME + "-content-title");
+
+ // Add the content wrapper
+ contentWrapper = new ScrollPanel();
+ contentLayout.setWidget(1, 1, contentWrapper);
+ formatter.setStyleName(1, 1, DEFAULT_STYLE_NAME + "-content-wrapper");
+ setContent(null);
+ }
+
+ /**
+ * Add a link to the top of the page.
+ *
+ * @param link the widget to add to the mainLinks
+ */
+ public void addLink(Widget link) {
+ if (linksPanel.getWidgetCount() > 0) {
+ linksPanel.add(new HTML(" | "));
+ }
+ linksPanel.add(link);
+ }
+
+ /**
+ * @return the {@link Widget} in the content area
+ */
+ public Widget getContent() {
+ return contentWrapper.getWidget();
+ }
+
+ /**
+ * @return the content title widget
+ */
+ public Widget getContentTitle() {
+ return contentLayout.getWidget(0, 1);
+ }
+
+ /**
+ * @return the main menu.
+ */
+ public Tree getMainMenu() {
+ return mainMenu;
+ }
+
+ /**
+ * @return the title above the main menu
+ */
+ public String getMainMenuTitle() {
+ return contentLayout.getHTML(0, 0);
+ }
+
+ /**
+ * @return the {@link Widget} used as the title
+ */
+ public Widget getTitleWidget() {
+ return topPanel.getWidget(0, 0);
+ }
+
+ public void onWindowResized(int width, int height) {
+ // Set the height of the main layout
+ getWidget().setHeight(height + "px");
+
+ // Set the size of the main wrappers
+ int contentTitleHeight = DOM.getElementPropertyInt(
+ contentLayout.getCellFormatter().getElement(0, 1), "offsetHeight");
+ int bottomHeight = height - topPanel.getOffsetHeight() - 50
+ - contentTitleHeight;
+ int bottomWidth = width - 50;
+ mainMenuWrapper.setSize("200px", bottomHeight + "px");
+ contentWrapper.setSize((bottomWidth - 200) + "px", bottomHeight + "px");
+ }
+
+ /**
+ * Set the {@link Widget} to display in the content area.
+ *
+ * @param content the content widget
+ */
+ public void setContent(Widget content) {
+ if (content == null) {
+ contentWrapper.setWidget(new HTML(" "));
+ } else {
+ contentWrapper.setWidget(content);
+ }
+ }
+
+ /**
+ * Set the title of the content area.
+ *
+ * @param title the content area title
+ */
+ public void setContentTitle(Widget title) {
+ contentLayout.setWidget(0, 1, title);
+ }
+
+ /**
+ * Set the {@link ApplicationListener}.
+ *
+ * @param listener the listener
+ */
+ public void setListener(ApplicationListener listener) {
+ this.listener = listener;
+ }
+
+ /**
+ * Set the title of the main menu.
+ *
+ * @param title the main menu title
+ */
+ public void setMainMenuTitle(String title) {
+ contentLayout.setHTML(0, 0, title);
+ }
+
+ /**
+ * Set the {@link Widget} to use as the title bar.
+ *
+ * @param title the title widget
+ */
+ public void setTitleWidget(Widget title) {
+ topPanel.setWidget(0, 0, title);
+ }
+
+ @Override
+ protected void onLoad() {
+ Window.addWindowResizeListener(this);
+ onWindowResized(Window.getClientWidth(), Window.getClientHeight());
+ }
+
+ @Override
+ protected void onUnload() {
+ Window.removeWindowResizeListener(this);
+ }
+
+ /**
+ * Create the main menu.
+ *
+ * @return the main menu
+ */
+ private Widget createMainMenu() {
+ // Setup the main menu
+ ApplicationImages treeImages = GWT.create(ApplicationImages.class);
+ mainMenu = new Tree(treeImages);
+ mainMenu.addStyleName(DEFAULT_STYLE_NAME + "-menu");
+ mainMenu.addTreeListener(new TreeListener() {
+ public void onTreeItemSelected(TreeItem item) {
+ if (listener != null) {
+ listener.onMenuItemSelected(item);
+ }
+ }
+
+ public void onTreeItemStateChanged(TreeItem item) {
+ }
+ });
+
+ // Add a wrapper around the menu
+ mainMenuWrapper = new ScrollPanel(mainMenu);
+ return mainMenuWrapper;
+ }
+
+ /**
+ * Create the panel at the top of the page that contains the title and links.
+ *
+ * @return the top panel
+ */
+ private Grid createTopPanel() {
+ Grid grid = new Grid(1, 2);
+ grid.setStyleName(DEFAULT_STYLE_NAME + "-top");
+ grid.getRowFormatter().setVerticalAlign(0, HasVerticalAlignment.ALIGN_TOP);
+
+ // Setup the title cell
+ CellFormatter formatter = grid.getCellFormatter();
+ formatter.setStyleName(0, 0, DEFAULT_STYLE_NAME + "-title");
+
+ // Setup the links cell
+ linksPanel = new HorizontalPanel();
+ grid.setWidget(0, 1, linksPanel);
+ formatter.setStyleName(0, 1, DEFAULT_STYLE_NAME + "-links");
+ formatter.setHorizontalAlignment(0, 1, HasHorizontalAlignment.ALIGN_RIGHT);
+
+ // Return the panel
+ return grid;
+ }
+}
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/ContentWidget.java b/samples/showcase/src/com/google/gwt/sample/showcase/client/ContentWidget.java
new file mode 100644
index 0000000..d04b3b8
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/ContentWidget.java
@@ -0,0 +1,314 @@
+/*
+ * Copyright 2008 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.showcase.client;
+
+import com.google.gwt.i18n.client.Constants;
+import com.google.gwt.user.client.HTTPRequest;
+import com.google.gwt.user.client.ResponseTextHandler;
+import com.google.gwt.user.client.ui.Composite;
+import com.google.gwt.user.client.ui.DeckPanel;
+import com.google.gwt.user.client.ui.HTML;
+import com.google.gwt.user.client.ui.Image;
+import com.google.gwt.user.client.ui.SourcesTabEvents;
+import com.google.gwt.user.client.ui.TabBar;
+import com.google.gwt.user.client.ui.TabListener;
+import com.google.gwt.user.client.ui.VerticalPanel;
+import com.google.gwt.user.client.ui.Widget;
+
+/**
+ * <p>
+ * A widget used to show GWT examples in the ContentPanel. It includes a tab bar
+ * with options to view the example, view the source, or view the css style
+ * rules.
+ * </p>
+ * <p>
+ * This {@link Widget} uses a lazy initialization mechanism so that the content
+ * is not rendered until the onInitialize method is called, which happens the
+ * first time the {@link Widget} is added to the page.. The data in the source
+ * and css tabs are loaded using an RPC call to the server.
+ * </p>
+ * <h3>CSS Style Rules</h3>
+ * <ul class="css">
+ * <li>.sc-ContentWidget { Applied to the entire widget }</li>
+ * <li>.sc-ContentWidget-tabBar { Applied to the TabBar }</li>
+ * <li>.sc-ContentWidget-deckPanel { Applied to the DeckPanel }</li>
+ * <li>.sc-ContentWidget-name { Applied to the name }</li>
+ * <li>.sc-ContentWidget-description { Applied to the description }</li>
+ * </ul>
+ */
+public abstract class ContentWidget extends Composite implements TabListener {
+ /**
+ * The constants used in this Content Widget.
+ */
+ public static interface CwConstants extends Constants {
+ String contentWidgetExample();
+
+ String contentWidgetSource();
+
+ String contentWidgetStyle();
+ }
+
+ /**
+ * The default style name.
+ */
+ private static final String DEFAULT_STYLE_NAME = "sc-ContentWidget";
+
+ /**
+ * The static loading image displayed when loading CSS or source code.
+ */
+ private static Image loadingImage;
+
+ /**
+ * An instance of the constants.
+ *
+ * @gwt.DATA
+ */
+ private CwConstants constants;
+
+ /**
+ * The deck panel with the contents.
+ */
+ private DeckPanel deckPanel = null;
+
+ /**
+ * A boolean indicating whether or not this widget has been initialized.
+ */
+ private boolean initialized = false;
+
+ /**
+ * A boolean indicating whether or not the RPC request for the source code has
+ * been sent.
+ */
+ private boolean sourceLoaded = false;
+
+ /**
+ * The widget used to display source code.
+ */
+ private HTML sourceWidget = null;
+
+ /**
+ * A boolean indicating whether or not the RPC request for the style code has
+ * been sent.
+ */
+ private boolean styleLoaded = false;
+
+ /**
+ * The widget used to display css style.
+ */
+ private HTML styleWidget = null;
+
+ /**
+ * The tab bar of options.
+ */
+ private TabBar tabBar = null;
+
+ /**
+ * Constructor.
+ *
+ * @param constants the constants
+ */
+ public ContentWidget(CwConstants constants) {
+ this.constants = constants;
+ tabBar = new TabBar();
+ deckPanel = new DeckPanel();
+ initWidget(deckPanel);
+ setStyleName(DEFAULT_STYLE_NAME);
+ }
+
+ /**
+ * Add an item to this content widget.
+ *
+ * @param w the widget to add
+ * @param tabText the text to display in the tab
+ */
+ public void add(Widget w, String tabText) {
+ tabBar.addTab(tabText);
+ deckPanel.add(w);
+ }
+
+ /**
+ * Get the description of this example.
+ *
+ * @return a description for this example
+ */
+ public abstract String getDescription();
+
+ /**
+ * Get the name of this example to use as a title.
+ *
+ * @return a name for this example
+ */
+ public abstract String getName();
+
+ /**
+ * @return the tab bar
+ */
+ public TabBar getTabBar() {
+ return tabBar;
+ }
+
+ /**
+ * Returns true if this widget has a source section.
+ *
+ * @return true if source tab available
+ */
+ public boolean hasSource() {
+ return true;
+ }
+
+ /**
+ * Returns true if this widget has a style section.
+ *
+ * @return true if style tab available
+ */
+ public boolean hasStyle() {
+ return true;
+ }
+
+ /**
+ * Initialize this widget by creating the elements that should be added to the
+ * page.
+ */
+ public final void initialize() {
+ if (initialized == false) {
+ initialized = true;
+
+ // Add a tab listener
+ tabBar.addTabListener(this);
+
+ // Create a container for the main example
+ final VerticalPanel vPanel = new VerticalPanel();
+ add(vPanel, constants.contentWidgetExample());
+
+ // Add the name
+ HTML nameWidget = new HTML(getName());
+ nameWidget.setStyleName(DEFAULT_STYLE_NAME + "-name");
+ vPanel.add(nameWidget);
+
+ // Add the description
+ HTML descWidget = new HTML(getDescription());
+ descWidget.setStyleName(DEFAULT_STYLE_NAME + "-description");
+ vPanel.add(descWidget);
+
+ // Add source code tab
+ if (hasSource()) {
+ sourceWidget = new HTML();
+ add(sourceWidget, constants.contentWidgetSource());
+ } else {
+ sourceLoaded = true;
+ }
+
+ // Add style tab
+ if (hasStyle()) {
+ styleWidget = new HTML();
+ add(styleWidget, constants.contentWidgetStyle());
+ } else {
+ styleLoaded = true;
+ }
+
+ // Initialize the widget and add it to the page
+ Widget widget = onInitialize();
+ if (widget != null) {
+ vPanel.add(widget);
+ }
+ onInitializeComplete();
+ }
+ }
+
+ public boolean onBeforeTabSelected(SourcesTabEvents sender, int tabIndex) {
+ return true;
+ }
+
+ /**
+ * When the widget is first initialize, this method is called. If it returns a
+ * Widget, the widget will be added as the first tab. Return null to disable
+ * the first tab.
+ *
+ * @return the widget to add to the first tab
+ */
+ public abstract Widget onInitialize();
+
+ /**
+ * Called when initialization has completed and the widget has been added to
+ * the page.
+ */
+ public void onInitializeComplete() {
+ }
+
+ public void onTabSelected(SourcesTabEvents sender, int tabIndex) {
+ // Show the associated widget in the deck panel
+ deckPanel.showWidget(tabIndex);
+
+ // Send an RPC request to load the content of the tab
+ String tabHTML = getTabBar().getTabHTML(tabIndex);
+ if (!sourceLoaded && tabHTML.equals(constants.contentWidgetSource())) {
+ sourceLoaded = true;
+ requestFileContents("source/" + this.getClass().getName() + ".html",
+ sourceWidget, "Source code not available.");
+ } else if (!styleLoaded && tabHTML.equals(constants.contentWidgetStyle())) {
+ styleLoaded = true;
+ requestFileContents("style/" + this.getClass().getName() + ".html",
+ styleWidget, "Style not available.");
+ }
+ }
+
+ /**
+ * Select a tab.
+ *
+ * @param index the tab index
+ */
+ public void selectTab(int index) {
+ tabBar.selectTab(index);
+ }
+
+ @Override
+ protected void onLoad() {
+ // Initialize this widget if we haven't already
+ initialize();
+
+ // Select the first tab
+ if (getTabBar().getTabCount() > 0) {
+ tabBar.selectTab(0);
+ }
+ }
+
+ /**
+ * Load the contents of a remote file into the specified widget.
+ *
+ * @param url the URL of the file
+ * @param target the target Widget to place the contents
+ * @param errorMsg the error message to display if the request fails
+ */
+ protected void requestFileContents(String url, final HTML target,
+ final String errorMsg) {
+ // Show the loading image
+ if (loadingImage == null) {
+ loadingImage = new Image("images/loading.gif");
+ }
+ target.setHTML(" " + loadingImage.toString());
+
+ // Request the contents of the file
+ HTTPRequest.asyncGet(url, new ResponseTextHandler() {
+ public void onCompletion(String responseText) {
+ if (responseText.length() > 0) {
+ target.setHTML(responseText);
+ } else {
+ target.setHTML(errorMsg);
+ }
+ }
+ });
+ }
+}
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/Showcase.java b/samples/showcase/src/com/google/gwt/sample/showcase/client/Showcase.java
new file mode 100644
index 0000000..1428c17
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/Showcase.java
@@ -0,0 +1,454 @@
+/*
+ * Copyright 2008 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.showcase.client;
+
+import com.google.gwt.core.client.EntryPoint;
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.i18n.client.LocaleInfo;
+import com.google.gwt.sample.showcase.client.Application.ApplicationListener;
+import com.google.gwt.sample.showcase.client.content.i18n.CwConstantsExample;
+import com.google.gwt.sample.showcase.client.content.i18n.CwConstantsWithLookupExample;
+import com.google.gwt.sample.showcase.client.content.i18n.CwDateTimeFormat;
+import com.google.gwt.sample.showcase.client.content.i18n.CwDictionaryExample;
+import com.google.gwt.sample.showcase.client.content.i18n.CwMessagesExample;
+import com.google.gwt.sample.showcase.client.content.i18n.CwNumberFormat;
+import com.google.gwt.sample.showcase.client.content.lists.CwListBox;
+import com.google.gwt.sample.showcase.client.content.lists.CwMenuBar;
+import com.google.gwt.sample.showcase.client.content.lists.CwStackPanel;
+import com.google.gwt.sample.showcase.client.content.lists.CwSuggestBox;
+import com.google.gwt.sample.showcase.client.content.lists.CwTree;
+import com.google.gwt.sample.showcase.client.content.other.CwAnimation;
+import com.google.gwt.sample.showcase.client.content.other.CwCookies;
+import com.google.gwt.sample.showcase.client.content.other.CwFrame;
+import com.google.gwt.sample.showcase.client.content.panels.CwAbsolutePanel;
+import com.google.gwt.sample.showcase.client.content.panels.CwDecoratorPanel;
+import com.google.gwt.sample.showcase.client.content.panels.CwDisclosurePanel;
+import com.google.gwt.sample.showcase.client.content.panels.CwDockPanel;
+import com.google.gwt.sample.showcase.client.content.panels.CwFlowPanel;
+import com.google.gwt.sample.showcase.client.content.panels.CwHorizontalPanel;
+import com.google.gwt.sample.showcase.client.content.panels.CwHorizontalSplitPanel;
+import com.google.gwt.sample.showcase.client.content.panels.CwTabPanel;
+import com.google.gwt.sample.showcase.client.content.panels.CwVerticalPanel;
+import com.google.gwt.sample.showcase.client.content.panels.CwVerticalSplitPanel;
+import com.google.gwt.sample.showcase.client.content.popups.CwBasicPopup;
+import com.google.gwt.sample.showcase.client.content.popups.CwDialogBox;
+import com.google.gwt.sample.showcase.client.content.tables.CwFlexTable;
+import com.google.gwt.sample.showcase.client.content.tables.CwGrid;
+import com.google.gwt.sample.showcase.client.content.text.CwBasicText;
+import com.google.gwt.sample.showcase.client.content.text.CwRichText;
+import com.google.gwt.sample.showcase.client.content.widgets.CwBasicButton;
+import com.google.gwt.sample.showcase.client.content.widgets.CwCheckBox;
+import com.google.gwt.sample.showcase.client.content.widgets.CwCustomButton;
+import com.google.gwt.sample.showcase.client.content.widgets.CwFileUpload;
+import com.google.gwt.sample.showcase.client.content.widgets.CwHyperlink;
+import com.google.gwt.sample.showcase.client.content.widgets.CwRadioButton;
+import com.google.gwt.user.client.DOM;
+import com.google.gwt.user.client.Element;
+import com.google.gwt.user.client.History;
+import com.google.gwt.user.client.HistoryListener;
+import com.google.gwt.user.client.Window;
+import com.google.gwt.user.client.ui.AbstractImagePrototype;
+import com.google.gwt.user.client.ui.ChangeListener;
+import com.google.gwt.user.client.ui.HTML;
+import com.google.gwt.user.client.ui.HasVerticalAlignment;
+import com.google.gwt.user.client.ui.HorizontalPanel;
+import com.google.gwt.user.client.ui.Image;
+import com.google.gwt.user.client.ui.ListBox;
+import com.google.gwt.user.client.ui.RootPanel;
+import com.google.gwt.user.client.ui.Tree;
+import com.google.gwt.user.client.ui.TreeItem;
+import com.google.gwt.user.client.ui.Widget;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Entry point classes define <code>onModuleLoad()</code>.
+ */
+public class Showcase implements EntryPoint {
+ /**
+ * The static images used throughout the Showcase.
+ */
+ public static final ShowcaseImages images = (ShowcaseImages) GWT.create(ShowcaseImages.class);
+
+ /**
+ * The images to cache, such as background images. These images will be added
+ * to the page and hidden, forcing the browser to cache them.
+ */
+ private static final String[] CACHED_IMAGES = {
+ "bg_headergradient.png", "bg_listgradient.png", "bg_stackpanel.png",
+ "bg_tab_selected.png", "corner.png", "hborder.png", "loading.gif",
+ "vborder.png", "ie6/corner_dialog_topleft.png",
+ "ie6/corner_dialog_topright.png", "ie6/hborder_blue_shadow.png",
+ "ie6/hborder_gray_shadow.png", "ie6/vborder_blue_shadow.png",
+ "ie6/vborder_gray_shadow.png"};
+
+ /**
+ * Link to GWT homepage.
+ */
+ private static final String GWT_HOMEPAGE = "http://code.google.com/webtoolkit/";
+
+ /**
+ * Link to GWT examples page.
+ */
+ private static final String GWT_EXAMPLES = GWT_HOMEPAGE + "examples/";
+
+ /**
+ * Convenience method for getting the document's head element.
+ *
+ * @return the document's head element
+ */
+ private static native Element getHeadElement() /*-{
+ return $doc.getElementsByTagName("head")[0];
+ }-*/;
+
+ /**
+ * Get the URL of the page, without an hash of query string.
+ *
+ * @return the location of the page
+ */
+ private static native String getHostPageLocation() /*-{
+ var s = $doc.location.href;
+
+ // Pull off any hash.
+ var i = s.indexOf('#');
+ if (i != -1)
+ s = s.substring(0, i);
+
+ // Pull off any query string.
+ i = s.indexOf('?');
+ if (i != -1)
+ s = s.substring(0, i);
+
+ // Ensure a final slash if non-empty.
+ return s;
+ }-*/;
+
+ /**
+ * The {@link Application}.
+ */
+ private Application app;
+
+ /**
+ * A mapping of history tokens to their associated menu items.
+ */
+ private Map<String, TreeItem> itemTokens = new HashMap<String, TreeItem>();
+
+ /**
+ * A mapping of menu items to the widget display when the item is selected.
+ */
+ private Map<TreeItem, ContentWidget> itemWidgets = new HashMap<TreeItem, ContentWidget>();
+
+ /**
+ * This is the entry point method.
+ */
+ public void onModuleLoad() {
+ // Immediately add the CSS files
+ includeStyleSheets();
+
+ // Create the constants
+ ShowcaseConstants constants = (ShowcaseConstants) GWT.create(ShowcaseConstants.class);
+
+ // Create the application
+ Window.enableScrolling(false);
+ app = new Application();
+ app.setMainMenuTitle(constants.mainMenuTitle());
+ setupTitlePanel(constants);
+ setupMainLinks(constants);
+ setupMainMenu(constants);
+ RootPanel.get().add(app);
+
+ // Add an listener that sets the content widget when a menu item is selected
+ app.setListener(new ApplicationListener() {
+ public void onMenuItemSelected(TreeItem item) {
+ ContentWidget content = itemWidgets.get(item);
+ if (content != null) {
+ History.newItem(getContentWidgetToken(content));
+ }
+ }
+ });
+
+ // Setup a history listener to reselect the associate menu item
+ HistoryListener historyListener = new HistoryListener() {
+ public void onHistoryChanged(String historyToken) {
+ TreeItem item = itemTokens.get(historyToken);
+ if (item != null) {
+ // Select the item in the tree
+ if (!item.equals(app.getMainMenu().getSelectedItem())) {
+ app.getMainMenu().setSelectedItem(item, false);
+ app.getMainMenu().ensureSelectedItemVisible();
+ }
+
+ // Show the associated widget
+ displayContentWidget(itemWidgets.get(item));
+ }
+ }
+ };
+ History.addHistoryListener(historyListener);
+
+ // Show the initial example
+ String initToken = History.getToken();
+ if (initToken.length() > 0) {
+ historyListener.onHistoryChanged(initToken);
+ } else {
+ // Use the first token available
+ TreeItem firstItem = app.getMainMenu().getItem(0).getChild(0);
+ ContentWidget firstContent = itemWidgets.get(firstItem);
+ historyListener.onHistoryChanged(getContentWidgetToken(firstContent));
+ }
+
+ // Cache images as needed
+ cacheImages();
+ }
+
+ /**
+ * Cache the images used in the background.
+ */
+ private void cacheImages() {
+ for (int i = 0; i < CACHED_IMAGES.length; i++) {
+ Image image = new Image("images/" + CACHED_IMAGES[i]);
+ RootPanel.get().add(image);
+ image.setVisible(false);
+ }
+ }
+
+ /**
+ * Set the content to the {@link ContentWidget}.
+ *
+ * @param content the {@link ContentWidget} to display
+ */
+ private void displayContentWidget(ContentWidget content) {
+ if (content != null) {
+ app.setContent(content);
+ app.setContentTitle(content.getTabBar());
+ }
+ }
+
+ /**
+ * Get the token for a given content widget.
+ *
+ * @return the content widget token.
+ */
+ private String getContentWidgetToken(ContentWidget content) {
+ String className = content.getClass().getName();
+ className = className.substring(className.lastIndexOf('.') + 1);
+ return className;
+ }
+
+ /**
+ * Add the stylesheets to the page, loading one at a time.
+ */
+ private void includeStyleSheets() {
+ // Do nothing if we are in LTR
+ if (!LocaleInfo.getCurrentLocale().isRTL()) {
+ return;
+ }
+
+ // Remove existing style sheets
+ Element headElem = getHeadElement();
+ int numChildren = DOM.getChildCount(headElem);
+ for (int i = 0; i < numChildren; i++) {
+ Element elem = DOM.getChild(headElem, i);
+ if (DOM.getElementProperty(elem, "tagName").equalsIgnoreCase("link")
+ && DOM.getElementProperty(elem, "rel").equalsIgnoreCase("stylesheet")) {
+ // Remove the existing link
+ String href = DOM.getElementProperty(elem, "href");
+ DOM.removeChild(headElem, elem);
+
+ // Add the style tag to the page
+ href = href.replaceAll(".css", ".rtl.css");
+ Element styleElem = DOM.createElement("link");
+ DOM.setElementProperty(styleElem, "rel", "stylesheet");
+ DOM.setElementProperty(styleElem, "type", "text/css");
+ DOM.setElementProperty(styleElem, "href", href);
+ DOM.insertChild(headElem, styleElem, i);
+ }
+ }
+ }
+
+ /**
+ * Create the main links at the top of the application.
+ *
+ * @param constants the constants with text
+ */
+ private void setupMainLinks(ShowcaseConstants constants) {
+ // Change the locale
+ final ListBox localeBox = new ListBox();
+ String currentLocale = LocaleInfo.getCurrentLocale().getLocaleName();
+ if (currentLocale.equals("default")) {
+ currentLocale = "en";
+ }
+ String[] localeNames = LocaleInfo.getAvailableLocaleNames();
+ for (String localeName : localeNames) {
+ if (!localeName.equals("default")) {
+ String nativeName = LocaleInfo.getLocaleNativeDisplayName(localeName);
+ localeBox.addItem(nativeName, localeName);
+ if (localeName.equals(currentLocale)) {
+ localeBox.setSelectedIndex(localeBox.getItemCount() - 1);
+ }
+ }
+ }
+ localeBox.addChangeListener(new ChangeListener() {
+ public void onChange(Widget sender) {
+ String localeName = localeBox.getValue(localeBox.getSelectedIndex());
+ Window.open(getHostPageLocation() + "?locale=" + localeName, "_self",
+ "");
+ }
+ });
+ app.addLink(localeBox);
+
+ // Link to GWT Homepage
+ app.addLink(new HTML("<a href=\"" + GWT_HOMEPAGE + "\">"
+ + constants.mainLinkHomepage() + "</a>"));
+
+ // Link to More Examples
+ app.addLink(new HTML("<a href=\"" + GWT_EXAMPLES + "\">"
+ + constants.mainLinkExamples() + "</a>"));
+ }
+
+ /**
+ * Setup all of the options in the main menu.
+ *
+ * @param constants the constant values to use
+ */
+ private void setupMainMenu(ShowcaseConstants constants) {
+ Tree mainMenu = app.getMainMenu();
+
+ // Widgets
+ TreeItem catWidgets = mainMenu.addItem(constants.categoryWidgets());
+ setupMainMenuOption(catWidgets, new CwCheckBox(constants),
+ images.catWidgets());
+ setupMainMenuOption(catWidgets, new CwRadioButton(constants),
+ images.catWidgets());
+ setupMainMenuOption(catWidgets, new CwBasicButton(constants),
+ images.catWidgets());
+ setupMainMenuOption(catWidgets, new CwCustomButton(constants),
+ images.catWidgets());
+ setupMainMenuOption(catWidgets, new CwFileUpload(constants),
+ images.catWidgets());
+ setupMainMenuOption(catWidgets, new CwHyperlink(constants),
+ images.catWidgets());
+
+ // Lists
+ TreeItem catLists = mainMenu.addItem(constants.categoryLists());
+ setupMainMenuOption(catLists, new CwListBox(constants), images.catLists());
+ setupMainMenuOption(catLists, new CwSuggestBox(constants),
+ images.catLists());
+ setupMainMenuOption(catLists, new CwTree(constants), images.catLists());
+ setupMainMenuOption(catLists, new CwMenuBar(constants), images.catLists());
+ setupMainMenuOption(catLists, new CwStackPanel(constants),
+ images.catLists());
+
+ // Text
+ TreeItem catText = mainMenu.addItem(constants.categoryTextInput());
+ setupMainMenuOption(catText, new CwBasicText(constants),
+ images.catTextInput());
+ setupMainMenuOption(catText, new CwRichText(constants),
+ images.catTextInput());
+
+ // Popups
+ TreeItem catPopup = mainMenu.addItem(constants.categoryPopups());
+ setupMainMenuOption(catPopup, new CwBasicPopup(constants),
+ images.catPopups());
+ setupMainMenuOption(catPopup, new CwDialogBox(constants),
+ images.catPopups());
+
+ // Panels
+ TreeItem catPanels = mainMenu.addItem(constants.categoryPanels());
+ setupMainMenuOption(catPanels, new CwDecoratorPanel(constants),
+ images.catPanels());
+ setupMainMenuOption(catPanels, new CwFlowPanel(constants),
+ images.catPanels());
+ setupMainMenuOption(catPanels, new CwHorizontalPanel(constants),
+ images.catPanels());
+ setupMainMenuOption(catPanels, new CwVerticalPanel(constants),
+ images.catPanels());
+ setupMainMenuOption(catPanels, new CwAbsolutePanel(constants),
+ images.catPanels());
+ setupMainMenuOption(catPanels, new CwDockPanel(constants),
+ images.catPanels());
+ setupMainMenuOption(catPanels, new CwDisclosurePanel(constants),
+ images.catPanels());
+ setupMainMenuOption(catPanels, new CwTabPanel(constants),
+ images.catPanels());
+ setupMainMenuOption(catPanels, new CwHorizontalSplitPanel(constants),
+ images.catPanels());
+ setupMainMenuOption(catPanels, new CwVerticalSplitPanel(constants),
+ images.catPanels());
+
+ // Tables
+ TreeItem catTables = mainMenu.addItem(constants.categoryTables());
+ setupMainMenuOption(catTables, new CwGrid(constants), images.catTables());
+ setupMainMenuOption(catTables, new CwFlexTable(constants),
+ images.catTables());
+
+ // Internationalization
+ TreeItem catI18N = mainMenu.addItem(constants.categoryI18N());
+ setupMainMenuOption(catI18N, new CwNumberFormat(constants),
+ images.catI18N());
+ setupMainMenuOption(catI18N, new CwDateTimeFormat(constants),
+ images.catI18N());
+ setupMainMenuOption(catI18N, new CwMessagesExample(constants),
+ images.catI18N());
+ setupMainMenuOption(catI18N, new CwConstantsExample(constants),
+ images.catI18N());
+ setupMainMenuOption(catI18N, new CwConstantsWithLookupExample(constants),
+ images.catI18N());
+ setupMainMenuOption(catI18N, new CwDictionaryExample(constants),
+ images.catI18N());
+
+ // Other
+ TreeItem catOther = mainMenu.addItem(constants.categoryOther());
+ setupMainMenuOption(catOther, new CwAnimation(constants), images.catOther());
+ setupMainMenuOption(catOther, new CwFrame(constants), images.catOther());
+ setupMainMenuOption(catOther, new CwCookies(constants), images.catOther());
+ }
+
+ /**
+ * Add an option to the main menu.
+ *
+ * @param parent the {@link TreeItem} that is the option
+ * @param content the {@link ContentWidget} to display when selected
+ * @param image the icon to display next to the {@link TreeItem}
+ */
+ private void setupMainMenuOption(TreeItem parent, ContentWidget content,
+ AbstractImagePrototype image) {
+ // Create the TreeItem
+ TreeItem option = parent.addItem(image.getHTML() + " " + content.getName());
+
+ // Map the item to its history token and content widget
+ itemWidgets.put(option, content);
+ itemTokens.put(getContentWidgetToken(content), option);
+ }
+
+ /**
+ * Create the title bar at the top of the application.
+ *
+ * @param constants the constant values to use
+ */
+ private void setupTitlePanel(ShowcaseConstants constants) {
+ // Get the title from the internationalized constants
+ String pageTitle = "<h1>" + constants.mainTitle() + "</h1><h2>"
+ + constants.mainSubTitle() + "</h2>";
+
+ // Add the title and some images to the title bar
+ HorizontalPanel titlePanel = new HorizontalPanel();
+ titlePanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
+ titlePanel.add(images.gwtLogo().createImage());
+ titlePanel.add(new HTML(pageTitle));
+ app.setTitleWidget(titlePanel);
+ }
+}
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/ShowcaseConstants.java b/samples/showcase/src/com/google/gwt/sample/showcase/client/ShowcaseConstants.java
new file mode 100644
index 0000000..525b35c
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/ShowcaseConstants.java
@@ -0,0 +1,118 @@
+/*
+ * Copyright 2008 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.showcase.client;
+
+import com.google.gwt.i18n.client.Constants;
+import com.google.gwt.sample.showcase.client.content.i18n.CwConstantsExample;
+import com.google.gwt.sample.showcase.client.content.i18n.CwConstantsWithLookupExample;
+import com.google.gwt.sample.showcase.client.content.i18n.CwDateTimeFormat;
+import com.google.gwt.sample.showcase.client.content.i18n.CwDictionaryExample;
+import com.google.gwt.sample.showcase.client.content.i18n.CwMessagesExample;
+import com.google.gwt.sample.showcase.client.content.i18n.CwNumberFormat;
+import com.google.gwt.sample.showcase.client.content.lists.CwListBox;
+import com.google.gwt.sample.showcase.client.content.lists.CwMenuBar;
+import com.google.gwt.sample.showcase.client.content.lists.CwStackPanel;
+import com.google.gwt.sample.showcase.client.content.lists.CwSuggestBox;
+import com.google.gwt.sample.showcase.client.content.lists.CwTree;
+import com.google.gwt.sample.showcase.client.content.other.CwAnimation;
+import com.google.gwt.sample.showcase.client.content.other.CwCookies;
+import com.google.gwt.sample.showcase.client.content.other.CwFrame;
+import com.google.gwt.sample.showcase.client.content.panels.CwAbsolutePanel;
+import com.google.gwt.sample.showcase.client.content.panels.CwDecoratorPanel;
+import com.google.gwt.sample.showcase.client.content.panels.CwDisclosurePanel;
+import com.google.gwt.sample.showcase.client.content.panels.CwDockPanel;
+import com.google.gwt.sample.showcase.client.content.panels.CwFlowPanel;
+import com.google.gwt.sample.showcase.client.content.panels.CwHorizontalPanel;
+import com.google.gwt.sample.showcase.client.content.panels.CwHorizontalSplitPanel;
+import com.google.gwt.sample.showcase.client.content.panels.CwTabPanel;
+import com.google.gwt.sample.showcase.client.content.panels.CwVerticalPanel;
+import com.google.gwt.sample.showcase.client.content.panels.CwVerticalSplitPanel;
+import com.google.gwt.sample.showcase.client.content.popups.CwBasicPopup;
+import com.google.gwt.sample.showcase.client.content.popups.CwDialogBox;
+import com.google.gwt.sample.showcase.client.content.tables.CwFlexTable;
+import com.google.gwt.sample.showcase.client.content.tables.CwGrid;
+import com.google.gwt.sample.showcase.client.content.text.CwBasicText;
+import com.google.gwt.sample.showcase.client.content.text.CwRichText;
+import com.google.gwt.sample.showcase.client.content.widgets.CwBasicButton;
+import com.google.gwt.sample.showcase.client.content.widgets.CwCheckBox;
+import com.google.gwt.sample.showcase.client.content.widgets.CwCustomButton;
+import com.google.gwt.sample.showcase.client.content.widgets.CwFileUpload;
+import com.google.gwt.sample.showcase.client.content.widgets.CwHyperlink;
+import com.google.gwt.sample.showcase.client.content.widgets.CwRadioButton;
+
+/**
+ * Constants used throughout the showcase.
+ */
+public interface ShowcaseConstants extends Constants,
+ ContentWidget.CwConstants, CwCheckBox.CwConstants,
+ CwRadioButton.CwConstants, CwBasicButton.CwConstants,
+ CwCustomButton.CwConstants, CwListBox.CwConstants,
+ CwSuggestBox.CwConstants, CwTree.CwConstants, CwMenuBar.CwConstants,
+ CwFlowPanel.CwConstants, CwDisclosurePanel.CwConstants,
+ CwTabPanel.CwConstants, CwDockPanel.CwConstants,
+ CwHorizontalPanel.CwConstants, CwHorizontalSplitPanel.CwConstants,
+ CwVerticalPanel.CwConstants, CwVerticalSplitPanel.CwConstants,
+ CwBasicPopup.CwConstants, CwDialogBox.CwConstants, CwGrid.CwConstants,
+ CwFlexTable.CwConstants, CwBasicText.CwConstants, CwRichText.CwConstants,
+ CwFileUpload.CwConstants, CwAbsolutePanel.CwConstants,
+ CwHyperlink.CwConstants, CwFrame.CwConstants, CwStackPanel.CwConstants,
+ CwCookies.CwConstants, CwNumberFormat.CwConstants,
+ CwDateTimeFormat.CwConstants, CwMessagesExample.CwConstants,
+ CwConstantsExample.CwConstants, CwConstantsWithLookupExample.CwConstants,
+ CwDictionaryExample.CwConstants, CwDecoratorPanel.CwConstants,
+ CwAnimation.CwConstants {
+
+ String categoryI18N();
+
+ String categoryLists();
+
+ String categoryOther();
+
+ String categoryPanels();
+
+ String categoryPopups();
+
+ String categoryTables();
+
+ String categoryTextInput();
+
+ String categoryWidgets();
+
+ /**
+ * @return text for the link to more examples
+ */
+ String mainLinkExamples();
+
+ /**
+ * @return text for the link to the GWT homepage
+ */
+ String mainLinkHomepage();
+
+ /**
+ * @return the title of the main menu
+ */
+ String mainMenuTitle();
+
+ /**
+ * @return the sub title of the application
+ */
+ String mainSubTitle();
+
+ /**
+ * @return the title of the application
+ */
+ String mainTitle();
+}
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/ShowcaseConstants.properties b/samples/showcase/src/com/google/gwt/sample/showcase/client/ShowcaseConstants.properties
new file mode 100644
index 0000000..8abc5c2
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/ShowcaseConstants.properties
@@ -0,0 +1,212 @@
+mainMenuTitle = GWT Examples
+mainSubTitle = Showcase of Features
+mainTitle = Google Web Toolkit
+mainLinkHomepage = GWT Homepage
+mainLinkExamples = More Examples
+
+categoryI18N = Internationalization
+categoryLists = Lists and Menus
+categoryOther = Other Features
+categoryPanels = Panels
+categoryPopups = Popups
+categoryTables = Tables
+categoryTextInput = Text Input
+categoryWidgets = Widgets
+
+contentWidgetExample = Example
+contentWidgetSource = Source Code
+contentWidgetStyle = CSS Style
+
+cwAbsolutePanelName = Absolute Panel
+cwAbsolutePanelDescription = An absolute panel positions all of its children absolutely, allowing them to overlap.
+cwAbsolutePanelClickMe = Click Me!
+cwAbsolutePanelHelloWorld = Hello World
+cwAbsolutePanelLeft = <b>Left:</b>
+cwAbsolutePanelItemsToMove = <b>Items to move:</b>
+cwAbsolutePanelTop = <b>Top:</b>
+cwAbsolutePanelWidgetNames = Hello World, Button, Grid
+cwAnimationName = Animations
+cwAnimationDescription = Animate your application with timed effects.
+cwBasicButtonName = Basic Button
+cwBasicButtonDescription = Basic button widgets
+cwBasicButtonClickMessage = Stop poking me!
+cwBasicButtonDisabled = Disabled Button
+cwBasicButtonNormal = Normal Button
+cwBasicPopupName = Basic Popup
+cwBasicPopupDescription = GWT provides the framework to create a custom popup.
+cwBasicPopupClickOutsideInstructions = Click anywhere outside this popup to make it disappear.
+cwBasicPopupInstructions = <b>Click an image to see full size:</b>
+cwBasicPopupShowButton = Show Basic Popup
+cwBasicTextName = Basic Text
+cwBasicTextDescription = 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.
+cwBasicTextAreaLabel = <b>Text area:</b>
+cwBasicTextNormalLabel = <b>Normal text box:</b>
+cwBasicTextPasswordLabel = <b>Password text box:</b>
+cwBasicTextReadOnly = read only
+cwBasicTextSelected = Selected
+cwCheckBoxName = Checkbox
+cwCheckBoxDescription = Basic Checkbox Widgets
+cwCheckBoxCheckAll = <b>Check all that apply:</b>
+cwCheckBoxFemale = Female
+cwCheckBoxMale = Male
+cwCheckBoxUnknown = Unknown (disabled)
+cwConstantsExampleDescription = Interface Constants makes it possible to localize strings, numbers, and maps of strings onto strings. This example isn't terribly exciting, but it does demonstrate how to localize constants. The labels and color choices below are provided by the localized implementation of the sample interface ExampleConstants.
+cwConstantsExampleName = Constants
+cwConstantsExampleLinkText = This example interacts with the sample interface:
+cwConstantsWithLookupExampleDescription = Interface ConstantsWithLookup makes it possible to dynamically look up localized values using method names as string keys.
+cwConstantsWithLookupExampleLinkText = This example interacts with the sample interface:
+cwConstantsWithLookupExampleMethodName = <b>Name of method:</b>
+cwConstantsWithLookupExampleName = Constants With Lookup
+cwConstantsWithLookupExampleResults = <b>Lookup results:</b>
+cwConstantsWithLookupExampleNoInput = <Please enter a method name above>
+cwConstantsWithLookupExampleNoMatches = <Not found>
+cwCookiesName = Cookies
+cwCookiesDescription = Track users with ease and save data on the client side using cookies.
+cwCookiesDeleteCookie = Delete
+cwCookiesExistingLabel = <b>Existing Cookies:</b>
+cwCookiesInvalidCookie = You must specify a cookie name
+cwCookiesNameLabel = <b>Name:</b>
+cwCookiesSetCookie = Set Cookie
+cwCookiesValueLabel = <b>Value:</b>
+cwCustomButtonName = Custom Button
+cwCustomButtonDescription = PushButtons and ToggleButtons allow you to customize the look of your buttons
+cwCustomButtonPush = <b>Push Buttons:</b>
+cwCustomButtonToggle = <b>Toggle Buttons:</b>
+cwDateTimeFormatName = Date Time Format
+cwDateTimeFormatDescription = Class DateTimeFormat supports locale-sensitive formatting and parsing of date and time values, like NumberFormat, using a flexible pattern-based syntax. Both custom patterns and standard patterns are supported.
+cwDateTimeFormatFailedToParseInput = Unable to parse input
+cwDateTimeFormatFormattedLabel = <b>Formatted value:</b>
+cwDateTimeFormatInvalidPattern = Invalid pattern
+cwDateTimeFormatPatternLabel = <b>Pattern:</b>
+cwDateTimeFormatPatterns = Full Date/Time, Long Date/Time, Medium Date/Time, Short Date/Time, Full Date, Long Date, Medium Date, Short Date, Full Time, Long Time, Medium Time, Short Time, Custom
+cwDateTimeFormatValueLabel = <b>Value to format:</b>
+cwDecoratorPanelName = Decorator Panel
+cwDecoratorPanelDescription = Add rounded corners to any Widget using the Decorator Panel.
+cwDialogBoxName = Dialog Box
+cwDialogBoxDescription = The draggable DialogBox resembles a window and includes a title bar. You can adjust to opacity to allow some of the background to show through the popup.
+cwDialogBoxMakeTransparent = Make Transparent
+cwDialogBoxCaption = Sample DialogBox
+cwDialogBoxClose = Close
+cwDialogBoxDetails = This is an example of a standard dialog box component.
+cwDialogBoxItem = item
+cwDialogBoxListBoxInfo = This list box demonstrates that you can drag the popup over it. This obscure corner case renders incorrectly for many other libraries.
+cwDialogBoxShowButton = Show Dialog Box
+cwDictionaryExampleName = Dictionary
+cwDictionaryExampleDescription = Using the Dictionary class, you can lookup localized values within JavaScript objects defined in the host HTML page rather than compiling them into your GWT code. This is useful if your translations change frequently, because your HTML server can emit updated translations into the host page HTML as often as needed. It can also a useful way to integrate a GWT module with existing localized web applications. Note that a dictionary's values depend only on the host page HTML and are not influenced by the GWT locale client property. For this example, the JavaScript variable declaration appears in the source for this HTML page.
+cwDictionaryExampleLinkText = <b>This example interacts with the following JavaScript variable:</b>
+cwDisclosurePanelName = Disclosure Panel
+cwDisclosurePanelDescription = A Disclosure Panel will show or hide its contents when the user clicks on the header text. The contents can be simple text, or any Widget, such as an image or advanced options in a form.
+cwDisclosurePanelFormAdvancedCriteria = Advanced Criteria
+cwDisclosurePanelFormDescription = Description:
+cwDisclosurePanelFormGender = Gender:
+cwDisclosurePanelFormGenderOptions = male, female, both
+cwDisclosurePanelFormLocation = Location:
+cwDisclosurePanelFormName = Name:
+cwDisclosurePanelFormTitle = <b>Enter Search Criteria</b>
+cwDockPanelName = Dock Panel
+cwDockPanelDescription = A Dock Panel aligns its content using compass directions.
+cwDockPanelCenter = This is a <code>ScrollPanel</code> contained at the center of a <code>DockPanel</code>. By putting some fairly large contents in the middle and setting its size explicitly, it becomes a scrollable area within the page, but without requiring the use of an IFRAME.<br><br>Here's quite a bit more meaningless text that will serve primarily to make this thing scroll off the bottom of its visible area. Otherwise, you might have to make it really, really small in order to see the nifty scroll bars!
+cwDockPanelEast = This is the east component
+cwDockPanelNorth1 = This is the first north component
+cwDockPanelNorth2 = This is the second north component
+cwDockPanelSouth1 = This is the first south component
+cwDockPanelSouth2 = This is the second south component
+cwDockPanelWest = This is the west component
+cwFileUploadName = File Upload
+cwFileUploadDescription = Upload files asynchronously using AJAX file uploads.
+cwFileUploadNoFileError = You must select a file to upload
+cwFileUploadSelectFile = <b>Select a file:</b>
+cwFileUploadSuccessful = File uploaded!
+cwFileUploadButton = Upload File
+cwFlexTableName = Flex Table
+cwFlexTableDescription = The Flex Table supports row spans and column spans, allowing you to layout data in a variety of ways.
+cwFlexTableAddRow = Add a row
+cwFlexTableDetails = This is a FlexTable that supports <B>colspans</B> and <B>rowspans</B>. You can use it to format your page or as a special purpose table.
+cwFlexTableRemoveRow = Remove a row
+cwFlowPanelName = Flow Panel
+cwFlowPanelDescription = A Flow Panel lets its content flow naturally. Move the splitter bar to see how the content wraps around as needed.
+cwFlowPanelItem = Item
+cwFrameName = Frames
+cwFrameDescription = Embed content from other sites into your page using the Frame, a wrapper around an IFRAME element.
+cwFrameSetLocation = Set Location
+cwGridName = Grid
+cwGridDescription = A simple grid
+cwHorizontalPanelName = Horizontal Panel
+cwHorizontalPanelDescription = A Horizontal Panel aligns its content horizontally without allowing it to wrap. Resize the page to see how the content maintains its horizontal alignment.
+cwHorizontalPanelButton = Button
+cwHorizontalSplitPanelName = Horizontal Split Panel
+cwHorizontalSplitPanelDescription = Give users the freedom to decide how to allocate space using this split panel.
+cwHorizontalSplitPanelText = This is some text to show how the contents on either side of the splitter flow.
+cwHyperlinkName = Hyperlink
+cwHyperlinkDescription = Embed your page with Hyperlinks to navigate to different sections. Hyperlinks create history tokens, allowing users to return to a previous state using the browser back button.
+cwHyperlinkChoose = <b>Choose a section:</b>
+cwListBoxName = List Box
+cwListBoxDescription = Built-in selection box and drop down lists
+cwListBoxCategories = Cars, Sports, Vacation Spots
+cwListBoxSelectAll = <b>Select a category:</b>
+cwListBoxSelectCategory = <b>Select all that apply:</b>
+cwListBoxSports = Baseball, Basketball, Football, Hockey, Lacrosse, Polo, Soccor, Softball, Water Polo
+cwListBoxVacations = Carribean, Disney World, Grand Canyon, Paris, Italy
+cwMenuBarName = Menu Bar
+cwMenuBarDescription = The Menu Bar can be used to navigate through many options. It also supports nested sub menus.
+cwMenuBarEditCategory = Edit
+cwMenuBarEditOptions = Undo, Redo, Cut, Copy, Paste
+cwMenuBarFileCategory = File
+cwMenuBarFileOptions = New, Open, Close, Recent, Exit
+cwMenuBarFileRecents = Fishing in the desert.txt, How to tame a wild parrot, Idiots Guide to Emu Farms
+cwMenuBarGWTOptions = Download, Examples, Source Code, GWT wit' the program
+cwMenuBarHelpCategory = Help
+cwMenuBarHelpOptions = Contents, Fortune Cookie, About GWT
+cwMenuBarPrompts = Thank you for selecting a menu item, A fine selection indeed, Don't you have anything better to do than select menu items?, Try something else, this is just a menu!, Another wasted click
+cwMessagesExampleName = Messages
+cwMessagesExampleDescription = Interface Messages provides a way to create strongly-typed parameterized messages that are checked for correctness during compilation.
+cwMessagesExampleArg0Label = <b>Argument {0}:</b>
+cwMessagesExampleArg1Label = <b>Argument {1}:</b>
+cwMessagesExampleArg2Label = <b>Argument {2}:</b>
+cwMessagesExampleFormattedLabel = <b>Formatted message:</b>
+cwMessagesExampleLinkText = This example interacts with the sample interface:
+cwMessagesExampleTemplateLabel = <b>Message template:</b>
+cwNumberFormatName = Number Format
+cwNumberFormatDescription = Class NumberFormat supports locale-sensitive formatting and parsing of numbers using a flexible pattern-based syntax. In addition to custom patterns, several standard patterns are also available for convenience.
+cwNumberFormatFailedToParseInput = Unable to parse input
+cwNumberFormatFormattedLabel = <b>Formatted value:</b>
+cwNumberFormatInvalidPattern = Invalid pattern
+cwNumberFormatPatternLabel = <b>Pattern:</b>
+cwNumberFormatPatterns = Decimal, Currency, Scientific, Percent, Custom
+cwNumberFormatValueLabel = <b>Value to format:</b>
+cwRadioButtonName = Radio Button
+cwRadioButtonDescription = Basic RadioButton Widget
+cwRadioButtonColors = blue, red, yellow, green
+cwRadioButtonSelectColor = <b>Select your favorite color:</b>
+cwRadioButtonSelectSport = <b>Select your favorite sport:</b>
+cwRadioButtonSports = Baseball, Basketball, Football, Hockey, Soccor, Water Polo
+cwRichTextName = Rich Text
+cwRichTextDescription = The Rich Text Area is supported on all major browsers, and will fall back gracefully to the level of functionality supported on each.
+cwStackPanelName = Stack Panel
+cwStackPanelDescription = The StackPanel stacks its children vertically, displaying only one at a time, with a header for each child which the user can click to display. This is useful for vertical menu systems.
+cwStackPanelContactsHeader = Contacts
+cwStackPanelContacts = Benoit Mandelbrot, Albert Einstein, Rene Descartes, Bob Saget, Ludwig von Beethoven, Richard Feynman, Alan Turing, John von Neumann
+cwStackPanelMailHeader = Mail
+cwStackPanelMailFolders = Inbox, Drafts, Templates, Sent, Trash
+cwStackPanelFiltersHeader = Filters
+cwStackPanelFilters = All, Starred, Read, Unread, Recent, Sent by me
+cwSuggestBoxName = Suggest Box
+cwSuggestBoxDescription = Generate suggestions via RPC calls to the server or static data on the page
+cwSuggestBoxLabel = <b>Choose a word:</b>
+cwSuggestBoxWords = 1337, apple, about, ant, bruce, banana, bobv, canada, coconut, compiler, donut, deferred binding, dessert topping, eclair, ecc, frog attack, floor wax, fitz, google, gosh, gwt, hollis, haskell, hammer, in the flinks, internets, ipso facto, jat, jgw, java, jens, knorton, kaitlyn, kangaroo, la grange, lars, love, morrildl, max, maddie, mloofle, mmendez, nail, narnia, null, optimizations, obfuscation, original, ping pong, polymorphic, pleather, quotidian, quality, qu'est-ce que c'est, ready state, ruby, rdayal, subversion, superclass, scottb, tobyr, the dans, ~ tilde, undefined, unit tests, under 100ms, vtbl, vidalia, vector graphics, w3c, web experience, work around, w00t!, xml, xargs, xeno, yacc, yank (the vi command), zealot, zoe, zebra
+cwTabPanelName = Tab Panel
+cwTabPanelDescription = Divide content over multiple tabs.
+cwTabPanelTab0 = Click one the tabs to see more content.
+cwTabPanelTab2 = Tabs are highly customizable using CSS.
+cwTabPanelTabs = Home, GWT Logo, More Info
+cwTreeName = Tree
+cwTreeDescription = Dynamic Tree Widget supports lazy loading of data via RPC calls to the server
+cwTreeDynamicLabel = <b>Dynamic Tree:</b>
+cwTreeItem = Item
+cwTreeStaticLabel = <b>Static Tree:</b>
+cwVerticalPanelName = Vertical Panel
+cwVerticalPanelDescription = A Vertical Panel aligns its content vertically without allowing it to wrap. Resize the page to see how the content maintains its vertical alignment.
+cwVerticalPanelButton = Button
+cwVerticalSplitPanelName = Vertical Split Panel
+cwVerticalSplitPanelDescription = Give users the freedom to decide how to allocate space using this split panel.
+cwVerticalSplitPanelText = This is some text to show how the contents on either side of the splitter flow.
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/ShowcaseConstants_ar.properties b/samples/showcase/src/com/google/gwt/sample/showcase/client/ShowcaseConstants_ar.properties
new file mode 100644
index 0000000..b90aefa
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/ShowcaseConstants_ar.properties
@@ -0,0 +1,208 @@
+mainMenuTitle = gwt امثلة
+mainSubTitle = معرض للسمات
+mainTitle = google ادوات الويب
+mainLinkHomepage = gwt الصفحه الرئيسية
+mainLinkExamples = اكثر الامثله
+
+categoryI18N = التدويل
+categoryLists = القوائم والقوائم
+categoryOther = السمات الاخرى
+categoryPanels = فريقي
+categoryPopups = النوافذ
+categoryTables = الجداول
+categoryTextInput = ادخال النص
+categoryWidgets = الحاجيات
+
+contentWidgetExample = مثلا
+contentWidgetSource = شفره المصدر
+contentWidgetStyle = اسلوب CSS
+
+cwAbsolutePanelName = المطلق الفريق
+cwAbsolutePanelDescription = مطلقة الفريق مواقف جميع ابنائها على الاطلاق , اذ تتيح لهم التداخل.
+cwAbsolutePanelClickMe = انقر لي!
+cwAbsolutePanelHelloWorld = مرحبا العالم
+cwAbsolutePanelLeft = <b>:اليسار</b>
+cwAbsolutePanelItemsToMove = <b>:الانتقال الى البنود</b>
+cwAbsolutePanelTop = <b>:عليا</b>
+cwAbsolutePanelWidgetNames = مرحبا العالم ,زر ,غريد
+cwBasicButtonName = الاساسي زر
+cwBasicButtonDescription = زر الحاجيات الاساسية
+cwBasicButtonClickMessage = وقف الطعن لي!
+cwBasicButtonDisabled = المعوقين زر
+cwBasicButtonNormal = عادية زر
+cwBasicPopupName = الاساسية المنبثقة
+cwBasicPopupDescription = gwt يوفر اطارا لخلق العرف المنبثقة.
+cwBasicPopupClickOutsideInstructions = انقر في اي مكان خارج هذا تعداد لجعلها تختفي.
+cwBasicPopupInstructions = <b>:انقر على الصورة لترى الحجم الكامل</b>
+cwBasicPopupShowButton = اظهار الاساسية المنبثقة
+cwBasicTextName = النص الاساسي
+cwBasicTextDescription = gwt يشمل معيار النص تكملة للدخول الحاجيات , والذي يدعم كل من لوحة المفاتيح واختيار الأحداث يمكنك استخدامها لمراقبة دخول النص. على وجه الخصوص , نلاحظ ان لكل طائفة اختيار القطعه يتم تحديثها كلما قمت الصحافة رئيسي.
+cwBasicTextAreaLabel = <b>:النص المنطقة</b>
+cwBasicTextNormalLabel = <b>:مربع النص العادي</b>
+cwBasicTextPasswordLabel = <b>:كلمة السر مربع النص</b>
+cwBasicTextReadOnly = قراءة فقط
+cwBasicTextSelected = مختارة
+cwCheckBoxName = مربع الاختيار
+cwCheckBoxDescription = مربع اختيار الحاجيات الاساسية
+cwCheckBoxCheckAll = <b>:تحقق من كل ما ينطبق</b>
+cwCheckBoxFemale = الاناث
+cwCheckBoxMale = الذكور
+cwCheckBoxUnknown = مجهول (المعاقين)
+cwConstantsExampleDescription = بينية الثوابت يجعل من الممكن لحصر قيود , وارقام , وخرائط من الخيوط على الخيوط. هذا المثال ليست مثيرة رهيبه , ولكنه يظهر كيفية موضع الثوابت. العلامات ولون الخيارات المبينه ادناه التي قدمها محلي تنفيذ العينه بينية exampleconstants.
+cwConstantsExampleName = الثوابت
+cwConstantsExampleLinkText = هذا المثال يتفاعل مع عينة الوصله :
+cwConstantsWithLookupExampleDescription = بينية constantswithlookup يجعل من الممكن النظر الى ديناميكيه تصل محلي القيم باستخدام اسلوب الاسماء حسب سلسلة المفاتيح.
+cwConstantsWithLookupExampleLinkText = هذا المثال يتفاعل مع عينة الوصله :
+cwConstantsWithLookupExampleMethodName = <b>:اسم الطريقة</b>
+cwConstantsWithLookupExampleName = الثوابت مع المشاهده
+cwConstantsWithLookupExampleResults = <b>:مشاهدة النتائج</b>
+cwConstantsWithLookupExampleNoInput =< الرجاء ادخال اسم الطريقة اعلا >
+cwConstantsWithLookupExampleNoMatches = <لم يتم العثور على>
+cwCookiesName = الكعكات
+cwCookiesDescription = المسار المستخدمين مع سهولة وانقاذ البيانات على العميل باستخدام الجانب الكعكات.
+cwCookiesDeleteCookie = حذف
+cwCookiesExistingLabel = <b>:القائمة الكعكات</b>
+cwCookiesInvalidCookie = عليك ان تحدد اسم الكعكه
+cwCookiesNameLabel = <b>:الاسم</b>
+cwCookiesSetCookie = مجموعة كعكه
+cwCookiesValueLabel = <b>:القيمه</b>
+cwCustomButtonName = الزر المخصص
+cwCustomButtonDescription = الازرار وtogglebuttons تسمح لك خصص شكل ازرار الخاص بك
+cwCustomButtonPush = <b>:دفع الأزرار</b>
+cwCustomButtonToggle = <b>:المسمار الأزرار</b>
+cwDateTimeFormatName = التاريخ الوقت الشكل
+cwDateTimeFormatDescription = الطبقة datetimeformat تدعم موقع تراعي الشكل وتحليل للتاريخ ووقت القيم , مثل numberformat , باستخدام مرن قائم على نمط لغوي. كل من انماط العادات وانماط موحدة مدعمه.
+cwDateTimeFormatFailedToParseInput = لم يتمكن اعرب المدخلات
+cwDateTimeFormatFormattedLabel = <b>:بصيغة القيمه</b>
+cwDateTimeFormatInvalidPattern = باطلة نمط
+cwDateTimeFormatPatternLabel = <b>:نمط</b>
+cwDateTimeFormatPatterns = كامل التاريخ / الوقت , طويل التاريخ / الوقت , متوسطة التاريخ / الوقت القصير التاريخ / الوقت , والتاريخ الكامل , وتاريخ طويل , تاريخ متوسطة , وقصيرة حتى الآن , بدوام كامل , وقتا طويلا , والوقت المتوسط , خلال وقت قصير , والعرف
+cwDateTimeFormatValueLabel = <b>:قيمة لهذا الشكل</b>
+cwDialogBoxName = مربع الحوار
+cwDialogBoxDescription = draggable dialogbox يشبه النافذة ويتضمن شريط عنوان. يمكنك تعديل الى التعتيم للسماح لبعض المعلومات الاساسية التي تظهر من خلال تعداد.
+cwDialogBoxMakeTransparent = جعل شفافة
+cwDialogBoxCaption = عينه dialogbox
+cwDialogBoxClose = الوثيق
+cwDialogBoxDetails = هذا هو مثال لمعيار عنصر مربع الحوار.
+cwDialogBoxItem = البند
+cwDialogBoxListBoxInfo = هذا المربع قائمة يدلل على ان اسحب يمكنك تعداد أكثر من ذلك. يطمس ركن من اركان هذا يجعل القضية غير صحيحة لكثير من المكتبات الاخرى.
+cwDialogBoxShowButton = اظهار مربع حوار
+cwDictionaryExampleName = قاموس
+cwDictionaryExampleDescription = باستخدام القاموس الطبقة , يمكنك البحث عن القيم محلي داخل جافا سكريبت الاشياء المحددة في استضافة لغة تأشير النص الفائق الصفحه بدلا من جمع لهم الدخول إلى حسابك في gwt المدونه. وهذا مفيد إذا كان جهازك الترجمات كثيرا ما تتغير , لأن لغة تأشير النص الفائق الخادم الخاص بك يمكن ان تنبعث من استكمال ترجمته الى لغة تأشير النص الفائق المضيفه الصفحه كما في كثير من الأحيان حسب الحاجة. ويمكن ايضا ان وسيلة نافعه لادماج gwt الوحدة القائمة محلي مع التطبيقات الشبكيه. علما ان القاموس قيم تعتمد فقط على استضافة صفحة وهي لغة تأشير النص الفائق لا تتأثر gwt موقع العميل الممتلكات. لهذا المثال , يبدو جافا سكريبت اعلان متغير في لغة تأشير النص الفائق مصدرا لهذه الصفحه.
+cwDictionaryExampleLinkText = <b>:هذا المثال تتفاعل مع المتغيرات التالية جافا سكريبت</b>
+cwDisclosurePanelName = الكشف عن الفريق
+cwDisclosurePanelDescription = أ كشف الفريق سيظهر او اخفاء محتوياته عندما ينقر مستخدم على نص الراسيه. مضمون النص يمكن ان يكون بسيطا , او اي القطعه , مثل صورة او خيارات متقدمة في شكل من الاشكال.
+cwDisclosurePanelFormAdvancedCriteria = معايير متقدمة
+cwDisclosurePanelFormDescription = :الوصف
+cwDisclosurePanelFormGender = :بين الجنسين
+cwDisclosurePanelFormGenderOptions = الذكور ,والإناث ,على حد سواء
+cwDisclosurePanelFormLocation = :موقع
+cwDisclosurePanelFormName = :اسم
+cwDisclosurePanelFormTitle = <b>ادخل معايير البحث</b>
+cwDockPanelName = رصيف الفريق
+cwDockPanelDescription = انشاء رصيف الفريق البيان مضمونها باستخدام بوصلة الاتجاهات.
+cwDockPanelCenter = هذا هو <code>scrollpanel</code> المدونه الواردة في هذا المركز من <code>dockpanel</code> المدونه>. من خلال وضع بعض المحتويات الى حد كبير في خط الوسط وتحديد حجمه صراحة , فانه يصبح المجال قابل للتدرج ضمن صفحة , ولكن دون ان يتطلب ذلك استخدام وسيلة iframe. <br><br>اليك لا بأس به اكثر معنى النص من شأنه ان يخدم في المقام الاول لجعل هذا الشيء لفيفه من اسفل منطقة اعمالها للعيان. خلاف ذلك , انك قد تضطر الى جعلها حقا , حقا الصغيرة كي نرى nifty فيفه القضبان!
+cwDockPanelEast = هذا هو العنصر الشرقية
+cwDockPanelNorth1 = هذا هو اول عنصر الشمال
+cwDockPanelNorth2 = وهذا هو ثاني عنصر الشمال
+cwDockPanelSouth1 = هذا هو اول عنصر الجنوب
+cwDockPanelSouth2 = وهذا هو العنصر الثاني للجنوب
+cwDockPanelWest = هذا هو الغرب عنصر
+cwFileUploadName = تحميل الملفات
+cwFileUploadDescription = ايداع الملفات بشكل غير متزامن باستخدام اجاكس يرسل الملف.
+cwFileUploadNoFileError = يجب عليك اختيار ملف للتحميل
+cwFileUploadSelectFile = <b>:اختيار ملف</b>
+cwFileUploadSuccessful = الملف الذى تم تحميله!
+cwFileUploadButton = ايداع الملف
+cwFlexTableName = العطف الجدول
+cwFlexTableDescription = العطف الجدول تؤيد الصف القناطر والقناطر العمود , فيتيح لك البيانات في التخطيط لمجموعة متنوعة من الطرق.
+cwFlexTableAddRow = تضاف على التوالي
+cwFlexTableDetails = هذا هو flextable ان تؤيد <b>colspans</b> ب و <b>rowspans</b> ب>. يمكنك استعمالها لشكل صفحتك الخاصة او باعتبارها الغرض الجدول.
+cwFlexTableRemoveRow = ازالة التوالي
+cwFlowPanelName = التدفق الفريق
+cwFlowPanelDescription = تدفق الفريق يتيح التدفق الطبيعي ان مضمونها. تحريك الفاصل بار لترى كيف حول محتوى الاغطيه حسب الحاجة.
+cwFlowPanelItem = البند
+cwFrameName = اطر
+cwFrameDescription = ترسيخ المضمون من مواقع اخرى الى صفحتك باستخدام الاطار , أ الغلاف حول iframe عنصر.
+cwFrameSetLocation = حدد مكان
+cwGridName = غريد
+cwGridDescription = بسيطة غريد
+cwHorizontalPanelName = الافقي الفريق
+cwHorizontalPanelDescription = افقي الفريق البيان مضمونها افقيا دون السماح لها بأن ختاميه. تغيير حجم الصفحه لنرى كيف مضمون وتتمسك الافقي الانحياز.
+cwHorizontalPanelButton = زر
+cwHorizontalSplitPanelName = الافقي سبليت الفريق
+cwHorizontalSplitPanelDescription = اعطاء المستخدمين حرية ان تقرر كيفية تخصيص الفضاء باستخدام هذا الفريق سبليت.
+cwHorizontalSplitPanelText = هذا هو النص على بعض تبين كيف المحتويات على جانبي الفاصل من التدفق.
+cwHyperlinkName = وصلة
+cwHyperlinkDescription = ترسيخ صفحتك مع وصلات الى الانتقال الى اقسام مختلفة. وصلات خلق رموز التاريخ , ويسمح للمستخدمين في العودة الى سابق للدولة باستخدام زر الرجوع في المتصفح.
+cwHyperlinkChoose = <b>:اختيار احد الاقسا</b>
+cwListBoxName = قائمة المربع
+cwListBoxDescription = المدمج في اختيار المربع واسقاط القوائم
+cwListBoxCategories = السيارات الرياضية , عطلة البقع
+cwListBoxSelectAll = <b>:اختر الفئة</b>
+cwListBoxSelectCategory = <b>:اختر كل ما ينطبق</b>
+cwListBoxSports = البيسبول , كرة السلة , كرة القدم , الهوكي , لاكروس , بولو , soccor , اللينه , وكرة الماء
+cwListBoxVacations = منطقة البحر الكاريبي , ديزني وورلد , جراند كانيون , باريس , ايطاليا
+cwMenuBarName = قائمة المحامين
+cwMenuBarDescription = القائمة بار يمكن استخدامها لتبحر من خلال العديد من الخيارات. وهو يدعم ايضا متداخل القوائم الفرعية.
+cwMenuBarEditCategory = تحرير
+cwMenuBarEditOptions = الغاء , redo , قطع , نسخة , وألصق
+cwMenuBarFileCategory = الملف
+cwMenuBarFileOptions = جديدة , مفتوحة , وثيقة , مؤخرا , الخروج
+cwMenuBarFileRecents = الصيد في desert.txt , كيفية ترويض أ الببغاوات البرية , والاتحاد الاقتصادي والنقدي البلهاء دليل المزارع
+cwMenuBarGWTOptions = تنزيل , امثلة , شفره المصدر , gwt فيت 'البرنامج
+cwMenuBarHelpCategory = مساعدة
+cwMenuBarHelpOptions = المحتويات , كعكه الحظ , عن gwt
+cwMenuBarPrompts = شكرا لاختيار قائمة البند , وغرامة اختيار الواقع , لا عليك ان تفعل أي شيء أفضل من اختيار قائمة البنود؟ , جرب شيئا آخر , هذا مجرد قائمة! , آخر اهدر انقر
+cwMessagesExampleName = رسائل
+cwMessagesExampleDescription = بينية رسائل يوفر طريقة لايجاد بشدة وصف او عبر بالحدود - طباعة الرسائل التي يتم فحص للصحه خلال تجميع.
+cwMessagesExampleArg0Label = <b>:{0} بارامتر</b>
+cwMessagesExampleArg1Label = <b>:{1} بارامتر</b>
+cwMessagesExampleArg2Label = <b>:{2} بارامتر</b>
+cwMessagesExampleFormattedLabel = <b>:بصيغة الرسالة</b>
+cwMessagesExampleLinkText = هذا المثال يتفاعل مع عينة الوصله :
+cwMessagesExampleTemplateLabel = <b>:رسالة قالب</b>
+cwNumberFormatName = عدد الشكل
+cwNumberFormatDescription = الطبقة numberformat تدعم موقع تراعي الشكل وتحليل للارقام باستخدام مرن قائم على نمط لغوي. وبالاضافة الى العادات وانماط عدة انماط القياسيه متاحة ايضا للراحة.
+cwNumberFormatFailedToParseInput = لم يتمكن اعرب المدخلات
+cwNumberFormatFormattedLabel = <b>:بصيغة القيمه</b>
+cwNumberFormatInvalidPattern = باطلة نمط
+cwNumberFormatPatternLabel = <b>:نمط</b>
+cwNumberFormatPatterns = عشري , والعملة , والعلم , في المئة , والعرف
+cwNumberFormatValueLabel = <b>:قيمة لهذا الشكل</b>
+cwRadioButtonName = زر الراديو
+cwRadioButtonDescription = زر راديو القطعه الاساسية
+cwRadioButtonColors = الازرق ,الأحمر ,الأصفر ,الأخضر
+cwRadioButtonSelectColor = <b>:اختر اللون المفضل</b>
+cwRadioButtonSelectSport = <b>:اختر الرياضة المفضلة لديك</b>
+cwRadioButtonSports = البيسبول , كرة السلة , كرة القدم , الهوكي , soccor , كرة الماء
+cwRichTextName = الغنيه النص
+cwRichTextDescription = الغنيه النص المجال يتم دعمها على جميع المتصفحات الرئيسية , وسوف تعود بلطافه الى مستوى القدرة الوظيفيه على كل الدعم.
+cwStackPanelName = كومة الفريق
+cwStackPanelDescription = stackpanel الاكوام ابنائها رأسيا , عرض واحد فقط في وقت واحد , مع رأس لكل طفل الذي يستطيع المستخدم النقر فوق لعرضها. وهذا امر مفيد للنظم القائمة الراسي.
+cwStackPanelContactsHeader = اتصالات
+cwStackPanelContacts = benoit ماندلبروت , البرت اينشتاين , رينيه ديكارت , بوب saget , لودفيغ فون بيتهوفن , ريتشارد فاينمان , الآن تورنج , جون فون نيومان
+cwStackPanelMailHeader = البريد
+cwStackPanelMailFolders = البريد الوارد , مسودات , قوالب , وأرسلت , المهملات
+cwStackPanelFiltersHeader = الفلاتر
+cwStackPanelFilters = جميع , نجمة , وقراءتها , لم يتم قراءتها , والاخيرة , التي ارسلتها لي
+cwSuggestBoxName = توحي المربع
+cwSuggestBoxDescription = تولد عبر اقتراحات للجنة الحمايه من الاشعاع ويدعو الى الخادم او ساكنة البيانات على الصفحه
+cwSuggestBoxLabel = <b>:اختيار كلمة</b>
+cwSuggestBoxWords = 1337 , تفاح , نحو , نمله , بروس , الموز , bobv , كندا , وجوز الهند , والمطيع , donut , ارجأت ملزمة , بينما تتصدر حلوى , eclair , رعايه الطفولة المبكره , ضفدع الهجوم , الكلمه الشمع , وفيتز , google , غوش , gwt , هوليس , حزقيل , المطرقه , في flinks , internets , بحكم الواقع , jat , jgw , جاوه , جينز , knorton , kaitlyn , الكنغر , مدينة لوس انجلوس المزرعه , لارس , الحب , morrildl , ماكس , maddie , mloofle , mmendez , مسمار , narnia , لاغيه , تحسينات , والتشويش , والأصل , بينغ بونغ , متعلق ب تعدد الأشكال , pleather , يومي , والجوده , qu'est - جيم - هاء c'est اختصار اسم مدينة كوبيك الكنديه , واستعداد الدولة , روبي , rdayal , التخريب , ما دون الشعبه وفوق الطبقة , scottb , tobyr , dans , ~ التلده , دون تعريف , وحده الاختبارات , في اطار 100ms , vtbl , مدينة فيداليا , مكافحة ناقلات الرسومات , ومجموعة الشبكه العالمية لمتصفحات الويب , ويب التجربه , وعمل حولها , w00t! , أكس أم أل , xargs , xeno , وياك , yank (سادسا القيادة) , المتعصب , زوي , العتابي
+cwTabPanelName = تبويبه الفريق
+cwTabPanelDescription = تقسيم المحتوى أكثر من تبويبات متعددة.
+cwTabPanelTab0 = انقر على أحد علامات التبويب للاطلاع على مزيد من المحتوى.
+cwTabPanelTab2 = اسعار عالية للتخصيص باستخدام CSS.
+cwTabPanelTabs = البيت , gwt الشعار , والمزيد من المعلومات
+cwTreeName = شجرة
+cwTreeDescription = ديناميه شجرة القطعه تؤيد كسوله تحميل البيانات عن طريق لجنة الحمايه من الاشعاع يدعو الخادم
+cwTreeDynamicLabel = <b>ديناميه شجرة</b>
+cwTreeItem = البند
+cwTreeStaticLabel = <b>ساكنة شجرة</b>
+cwVerticalPanelName = الفريق الراسي
+cwVerticalPanelDescription = عمودي الفريق البيان مضمونها عموديا دون السماح لها بأن ختاميه. تغيير حجم الصفحه لنرى كيف مضمون وتتمسك الراسي الانحياز.
+cwVerticalPanelButton = زر
+cwVerticalSplitPanelName = سبليت الفريق الراسي
+cwVerticalSplitPanelDescription = اعطاء المستخدمين حرية ان تقرر كيفية تخصيص الفضاء باستخدام هذا الفريق سبليت.
+cwVerticalSplitPanelText = هذا هو النص على بعض تبين كيف المحتويات على جانبي الفاصل من التدفق.
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/ShowcaseConstants_fr.properties b/samples/showcase/src/com/google/gwt/sample/showcase/client/ShowcaseConstants_fr.properties
new file mode 100644
index 0000000..88624c4
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/ShowcaseConstants_fr.properties
@@ -0,0 +1,208 @@
+mainMenuTitle = Exemples GWT
+mainSubTitle = Présentation des fonctionnalités
+mainTitle = Outils Google Web Toolkit
+mainLinkHomepage = Page d'accueil de GWT
+mainLinkExamples = Autres exemples
+
+categoryI18N = Internationalisation
+categoryLists = Listes et menus
+categoryOther = Autres fonctions
+categoryPanels = Volets
+categoryPopups = Fenêtres pop-up
+categoryTables = Tableaux
+categoryTextInput = Saisie de texte
+categoryWidgets = Widgets
+
+contentWidgetExample = Exemple
+contentWidgetSource = Code source
+contentWidgetStyle = Style CSS
+
+cwAbsolutePanelName = Absolute Groupe
+cwAbsolutePanelDescription = Une absolue panneau toutes les positions de ses enfants absolument, ce qui leur permet de se chevaucher.
+cwAbsolutePanelClickMe = Cliquez-moi!
+cwAbsolutePanelHelloWorld = Hello World
+cwAbsolutePanelLeft = <b>Gauche:</b>
+cwAbsolutePanelItemsToMove = <b>Points de circuler:</b>
+cwAbsolutePanelTop = <b>Haut:</b>
+cwAbsolutePanelWidgetNames = Bonjour le monde, Button, Grid
+cwBasicButtonName = Bouton basique
+cwBasicButtonDescription = Widgets de bouton basique
+cwBasicButtonClickMessage = Arrêtez de me titiller !
+cwBasicButtonDisabled = Bouton désactivé
+cwBasicButtonNormal = Bouton normal
+cwBasicPopupName = Fenêtre pop-up basique
+cwBasicPopupDescription = GWT fournit le cadre pour créer une fenêtre pop-up personnalisée.
+cwBasicPopupClickOutsideInstructions = Cliquez en dehors de cette fenêtre pop-up pour la faire disparaître.
+cwBasicPopupInstructions = <b>Cliquez sur une image pour l'afficher à sa taille maximale:</b>
+cwBasicPopupShowButton = Afficher la fenêtre pop-up basique
+cwBasicTextName = Texte basique
+cwBasicTextDescription = GWT inclut les widgets de saisie de texte en complément standard, chacun de ces widgets prenant en charge les événements de clavier et de sélection que vous pouvez utiliser pour contrôler la saisie de texte. En particulier, notez que la plage de sélection pour chaque widget est mise à jour chaque fois que vous appuyez sur une touche.
+cwBasicTextAreaLabel = <b>Zone de texte:</b>
+cwBasicTextNormalLabel = <b>Zone de texte normale:</b>
+cwBasicTextPasswordLabel = <b>Zone de texte Mot de passe:</b>
+cwBasicTextReadOnly = lecture seule
+cwBasicTextSelected = Sélectionné
+cwCheckBoxName = Case à cocher
+cwCheckBoxDescription = Widgets de case à cocher basique
+cwCheckBoxCheckAll = <b>Sélectionnez toutes les réponses appropriées:</b>
+cwCheckBoxFemale = F
+cwCheckBoxMale = M
+cwCheckBoxUnknown = Inconnu (désactivé)
+cwConstantsExampleDescription = Interface Constantes permet de localiser des chaînes de caractères, des numéros et des cartes sur les chaînes de chaînes. Cet exemple n'est pas très passionnant, mais il ne montre comment localiser des constantes. Les étiquettes et le choix des couleurs ci-dessous sont fournies par l'application localisée de l'échantillon d'interface ExampleConstants.
+cwConstantsExampleName = Constantes
+cwConstantsExampleLinkText = Cet exemple interagit avec le clip de l'interface:
+cwConstantsWithLookupExampleDescription = Interface ConstantsWithLookup permet de rechercher dynamiquement localisés valeurs méthode utilisant des noms comme chaîne clés.
+cwConstantsWithLookupExampleLinkText = Cet exemple interagit avec le clip de l'interface:
+cwConstantsWithLookupExampleMethodName = <b>Nom de la méthode:</b>
+cwConstantsWithLookupExampleName = Constantes Avec Lookup
+cwConstantsWithLookupExampleResults = <b>Lookup résultats:</b>
+cwConstantsWithLookupExampleNoInput = <entrer un nom de méthode, s’il vous plaît>
+cwConstantsWithLookupExampleNoMatches = <Ne peut pas trouver>
+cwCookiesName = Cookies
+cwCookiesDescription = Track utilisateurs avec facilité et la sauvegarde des données sur le client en utilisant les cookies.
+cwCookiesDeleteCookie = Supprimer
+cwCookiesExistingLabel = <b>Existant Cookies:</b>
+cwCookiesInvalidCookie = Vous devez indiquer un nom de cookie
+cwCookiesNameLabel = <b>Nom:</b>
+cwCookiesSetCookie = Sauver Cookie
+cwCookiesValueLabel = <b>Valeur:</b>
+cwCustomButtonName = Bouton personnalisé
+cwCustomButtonDescription = Les boutons de commande et les boutons bascule vous permettent de personnaliser l'apparence de vos boutons
+cwCustomButtonPush = <b>Boutons de commande:</b>
+cwCustomButtonToggle = <b>Boutons bascule:</b>
+cwDateTimeFormatName = Date Heure Format
+cwDateTimeFormatDescription = Catégorie DateTimeFormat soutient locale-specific sensibles formatage et l'analyse des valeurs date et l'heure, à l'instar de NumberFormat, au moyen d'un modèle souple fondée sur la syntaxe. Les deux modèles standard et personnalisés schémas sont pris en charge.
+cwDateTimeFormatFailedToParseInput = Impossible d'analyser la contribution
+cwDateTimeFormatFormattedLabel = <b>formatée valeur:</b>
+cwDateTimeFormatInvalidPattern = schéma incorrect
+cwDateTimeFormatPatternLabel = <b>Pattern:</b>
+cwDateTimeFormatPatterns = Full Date / Heure, Long Date / Heure, Moyen Date / Heure, Short Date / Heure, Full Date, Longue Date, Moyen Date, date courte, Full Time, Long Time, temps moyen, temps court, Custom
+cwDateTimeFormatValueLabel = <b>Valeur au format:</b>
+cwDialogBoxName = Boîte de dialogue
+cwDialogBoxDescription = La boîte de dialogue que vous pouvez faire glisser et déposer est similaire à une fenêtre et inclut une barre de titre. Vous pouvez régler l'opacité pour rendre visible une partie de l'arrière-plan à travers la fenêtre pop-up.
+cwDialogBoxMakeTransparent = Ajouter de la transparence
+cwDialogBoxCaption = Exemple de boîte de dialogue
+cwDialogBoxClose = Fermer
+cwDialogBoxDetails = Ceci est un exemple de composant de boîte de dialogue standard.
+cwDialogBoxItem = élément
+cwDialogBoxListBoxInfo = Cette zone de liste montre que vous pouvez faire glisser une fenêtre pop-up devant elle. Ce problème complexe se répète pour de nombreuses autres bibliothèques.
+cwDialogBoxShowButton = Afficher la boîte de dialogue
+cwDictionaryExampleName = Dictionnaire
+cwDictionaryExampleDescription = Utilisation de la classe Dictionary, vous pouvez valeurs dans la recherche localisée objets JavaScript définies dans la page HTML hôte plutôt que de la compilation dans votre code de GWT. Cette option est utile si vos traductions changent fréquemment, car votre serveur HTML peuvent émettre à jour des traductions dans le HTML de la page d'accueil aussi souvent que nécessaire. Il peut également un moyen utile d'intégrer un module avec GWT existantes localisées des applications Web. Notez que les valeurs d'un dictionnaire dépendait que de la HTML de la page d'accueil et ne sont pas influencées par la localisation GWT les biens d'un client. Pour cet exemple, le code JavaScript Déclaration de la variable apparaît dans le code source de cette page HTML.
+cwDictionaryExampleLinkText = <b>Cet exemple interagit avec le JavaScript variables suivantes:</b>
+cwDisclosurePanelName = Volet de présentation
+cwDisclosurePanelDescription = Un volet de présentation affiche ou masque son contenu lorsque l'utilisateur clique sur le texte de son en-tête. Son contenu peut être un simple texte ou un widget, tel qu'une image ou des options avancées dans un formulaire.
+cwDisclosurePanelFormAdvancedCriteria = Critères avancés
+cwDisclosurePanelFormDescription = Description:
+cwDisclosurePanelFormGender = Sexe:
+cwDisclosurePanelFormGenderOptions = masculin, féminin, les deux
+cwDisclosurePanelFormLocation = Lieu:
+cwDisclosurePanelFormName = Nom:
+cwDisclosurePanelFormTitle = <b>Saisissez des critères de recherche</b>
+cwDockPanelName = Panneau d'ancrage
+cwDockPanelDescription = Dans un panneau d'ancrage, le contenu est placé en fonction des points cardinaux.
+cwDockPanelCenter = Voici un <code>volet de défilement</code> situé au centre d'un <code>panneau d'ancrage</code>. Si des contenus relativement volumineux sont insérés au milieu de ce volet et si sa taille est définie, il prend la forme d'une zone dotée d'une fonction de défilement à l'intérieur de la page, sans utilisation d'un IFRAME.<br><br>Voici un texte encore plus obscur qui va surtout servir à faire défiler cet élément jusqu'en bas de sa zone visible. Sinon, il vous faudra réduire ce volet à une taille minuscule pour pouvoir afficher ces formidables barres de défilement !
+cwDockPanelEast = Ceci est le composant est
+cwDockPanelNorth1 = Ceci est le premier composant nord
+cwDockPanelNorth2 = Ceci est le second composant nord
+cwDockPanelSouth1 = Ceci est le premier composant sud
+cwDockPanelSouth2 = Ceci est le second composant sud
+cwDockPanelWest = Ceci est le composant ouest
+cwFileUploadName = Transfert de fichier
+cwFileUploadDescription = Transférez des fichiers de manière asynchrone à l'aide de transferts de fichiers AJAX
+cwFileUploadNoFileError = Vous devez sélectionner un fichier à envoyer
+cwFileUploadSelectFile = <b>Choisissez un fichier:</b>
+cwFileUploadSuccessful = Fichier téléchargé!
+cwFileUploadButton = Envoyer un fichier
+cwFlexTableName = Tableau flexible
+cwFlexTableDescription = Le tableau flexible prend en charge des plages de lignes et des plages de colonnes, pour vous permettre de disposer les données de plusieurs façons.
+cwFlexTableAddRow = Ajouter une ligne
+cwFlexTableDetails = Ceci est un tableau flexible qui prend en charge les <B>plages de colonne</B> et les <B>plages de ligne</B>. Vous pouvez l'utiliser pour mettre en forme votre page ou en tant que tableau réservé à un but précis.
+cwFlexTableRemoveRow = Supprimer une ligne
+cwFlowPanelName = Volet déroulant
+cwFlowPanelDescription = Dans un volet déroulant, le contenu défile de manière continue. Déplacez la barre de fractionnement pour voir comment le contenu est renvoyé à la ligne si nécessaire.
+cwFlowPanelItem = Élément
+cwFrameName = Frames
+cwFrameDescription = Intégrez le contenu d'autres sites dans votre page à l'aide de l'encadrement, d'une enveloppe autour d'un élément IFRAME.
+cwFrameSetLocation = emplacement défini
+cwGridName = Grille
+cwGridDescription = Grille simple
+cwHorizontalPanelName = Volet horizontal
+cwHorizontalPanelDescription = Dans un volet horizontal, le contenu est aligné horizontalement sans qu'il puisse être renvoyé à la ligne. Redimensionnez la page pour voir comment le contenu conserve son alignement horizontal.
+cwHorizontalPanelButton = Bouton
+cwHorizontalSplitPanelName = Volet à fractionnement horizontal
+cwHorizontalSplitPanelDescription = Donne aux utilisateurs la possibilité de décider de la manière dont l'espace doit être alloué.
+cwHorizontalSplitPanelText = Voici un texte permettant de voir comment le contenu situé de chaque côté de la barre de fractionnement défile.
+cwHyperlinkName = Hyperlien
+cwHyperlinkDescription = Intégrer votre page avec les hyperliens pour naviguer dans les différentes sections. Créer des hyperliens histoire jetons, permettant aux utilisateurs de revenir à un état précédent en utilisant le bouton de retour du navigateur.
+cwHyperlinkChoose = <b>Choisir une section:</b>
+cwListBoxName = Zone de liste
+cwListBoxDescription = Zone de sélection et listes déroulantes intégrées
+cwListBoxCategories = Voitures, Sports, Lieux de vacances
+cwListBoxSelectAll = <b>Sélectionnez une catégorie:</b>
+cwListBoxSelectCategory = <b>Sélectionnez toutes les options appropriées:</b>
+cwListBoxSports = Base-ball, Basket-ball, Football, Hockey, Crosse, Polo, Soccer, Softball, Water-polo
+cwListBoxVacations = Caraïbes, Disneyland, Grand Canyon, Paris, Italie
+cwMenuBarName = Barre de menus
+cwMenuBarDescription = La barre de menus permet de naviguer parmi de nombreuses options. Elle prend également en charge des sous-menus.
+cwMenuBarEditCategory = Édition
+cwMenuBarEditOptions = Annuler, Rétablir, Couper, Copier, Coller
+cwMenuBarFileCategory = Fichier
+cwMenuBarFileOptions = Nouveau, Ouvrir, Fermer, Récent, Quitter
+cwMenuBarFileRecents = Pêcher dans le désert.txt, Comment apprivoiser un perroquet sauvage, L'élevage des émeus pour les nuls
+cwMenuBarGWTOptions = Télécharger, Exemples, Code source, GWT avec le programme
+cwMenuBarHelpCategory = Aide
+cwMenuBarHelpOptions = Contenu, Fortune cookie, À propos de GWT
+cwMenuBarPrompts = Merci d'avoir sélectionné une option de menu, Une sélection vraiment pertinente, N'avez-vous rien de mieux à faire que de sélectionner des options de menu ?, Essayez quelque chose d'autre, ceci n'est qu'un menu !, Un autre clic gaspillé
+cwMessagesExampleName = Messages
+cwMessagesExampleDescription = Interface Messages fournit un moyen de créer fortement typé paramétré messages qui sont vérifié conforme lors de la compilation.
+cwMessagesExampleArg0Label = <b>Paramètre (0):</b>
+cwMessagesExampleArg1Label = <b>Paramètre (1):</b>
+cwMessagesExampleArg2Label = <b>Paramètre (2):</b>
+cwMessagesExampleFormattedLabel = <b>formatée messages:</b>
+cwMessagesExampleLinkText = Cet exemple interagit avec le clip de l'interface:
+cwMessagesExampleTemplateLabel = <b>Message modèle:</b>
+cwNumberFormatName = Nombre Format
+cwNumberFormatDescription = classe NumberFormat soutient locale-specific sensibles formatage et de l'analyse des chiffres au moyen d'un modèle souple fondée sur la syntaxe. En plus des modes de coutume, plusieurs modèles standards sont également disponibles pour la commodité.
+cwNumberFormatFailedToParseInput = Impossible d'analyser la contribution
+cwNumberFormatFormattedLabel = <b>formatée valeur:</b>
+cwNumberFormatInvalidPattern = schéma incorrect
+cwNumberFormatPatternLabel = <b>Pattern:</b>
+cwNumberFormatPatterns = décimales, la monnaie, la science, en pourcentage, Custom
+cwNumberFormatValueLabel = <b>Valeur au format:</b>
+cwRadioButtonName = Case d'option
+cwRadioButtonDescription = Widget de case d'option basique
+cwRadioButtonColors = bleu, rouge, jaune, vert
+cwRadioButtonSelectColor = <b>Sélectionnez votre couleur préférée:</b>
+cwRadioButtonSelectSport = <b>Sélectionnez votre sport préféré:</b>
+cwRadioButtonSports = Base-ball, Basket-ball, Football, Hockey, Soccer, Water-polo
+cwRichTextName = Texte enrichi
+cwRichTextDescription = La zone de texte enrichi est prise en charge sur tous les navigateurs les plus courants. Normalement, cette zone adopte harmonieusement le niveau de fonctionnalité pris en charge par chacun d'entre eux.
+cwStackPanelName = Stack Panel
+cwStackPanelDescription = Le StackPanel piles verticalement ses enfants, affichant seulement un à la fois, avec une tête pour chaque enfant dont l'utilisateur peut cliquer pour afficher. Cette option est utile pour les systèmes de menu verticale.
+cwStackPanelContactsHeader = Contacts
+cwStackPanelContacts = Benoit Mandelbrot, Albert Einstein, René Descartes, Bob Saget, Ludwig von Beethoven, Richard Feynman, Alan Turing, John de von Neumann
+cwStackPanelMailHeader = Mail
+cwStackPanelMailFolders = Boîte de réception, Brouillons, Templates, Sent, Trash
+cwStackPanelFiltersHeader = Filtres
+cwStackPanelFilters = Tous, Suivi, Lire, non lu, récemment, posté par moi
+cwSuggestBoxName = Zone de suggestion
+cwSuggestBoxDescription = Permet de générer des suggestions par l'intermédiaire d'appels de procédure distante (RPC) au serveur ou de données statiques sur la page.
+cwSuggestBoxLabel = <b>Choisir un mot:</b>
+cwSuggestBoxWords = 1337, apple, about, ant, bruce, banana, bobv, canada, coconut, compiler, donut, deferred binding, dessert topping, eclair, ecc, frog attack, floor wax, fitz, google, gosh, gwt, hollis, haskell, hammer, in the flinks, internets, ipso facto, jat, jgw, java, jens, knorton, kaitlyn, kangaroo, la grange, lars, love, morrildl, max, maddie, mloofle, mmendez, nail, narnia, null, optimizations, obfuscation, original, ping pong, polymorphic, pleather, quotidian, quality, qu'est-ce que c'est, ready state, ruby, rdayal, subversion, superclass, scottb, tobyr, the dans, ~ tilde, undefined, unit tests, under 100ms, vtbl, vidalia, vector graphics, w3c, web experience, work around, w00t!, xml, xargs, xeno, yacc, yank (the vi command), zealot, zoe, zebra
+cwTabPanelName = Volet d'onglets
+cwTabPanelDescription = Permet de répartir le contenu en plusieurs onglets.
+cwTabPanelTab0 = Cliquez sur l'un des onglets pour afficher du contenu supplémentaire.
+cwTabPanelTab2 = Grâce au langage CSS, les onglets sont presque entièrement personnalisables.
+cwTabPanelTabs = Accueil, Logo GWT, Plus d'info
+cwTreeName = Arborescence
+cwTreeDescription = Le widget d'arborescence dynamique prend en charge le téléchargement allégé ("lazy loading") des données par le biais des appels de procédure distante au serveur.
+cwTreeDynamicLabel = <b>Arborescence dynamique:</b>
+cwTreeItem = Élément
+cwTreeStaticLabel = <b>Arborescence statique:</b>
+cwVerticalPanelName = Volet vertical
+cwVerticalPanelDescription = Dans un volet vertical, le contenu est aligné verticalement sans qu'il puisse être renvoyé à la ligne. Redimensionnez la page pour voir comment le contenu conserve son alignement vertical.
+cwVerticalPanelButton = Bouton
+cwVerticalSplitPanelName = Volet à fractionnement vertical
+cwVerticalSplitPanelDescription = Donne aux utilisateurs la possibilité de décider de la manière dont l'espace doit être alloué.
+cwVerticalSplitPanelText = Voici un texte permettant de voir comment le contenu situé de chaque côté de la barre de fractionnement défile.
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/ShowcaseConstants_zh.properties b/samples/showcase/src/com/google/gwt/sample/showcase/client/ShowcaseConstants_zh.properties
new file mode 100644
index 0000000..2fa4627
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/ShowcaseConstants_zh.properties
@@ -0,0 +1,208 @@
+mainMenuTitle = GWT 示例
+mainSubTitle = 功能展示
+mainTitle = Google Web Toolkit
+mainLinkHomepage = GWT 主页
+mainLinkExamples = 更多示例
+
+categoryI18N =国际化
+categoryLists = 列表和菜单
+categoryOther =其它特点
+categoryPanels = 面板
+categoryPopups = 弹出式窗口
+categoryTables = 表
+categoryTextInput = 文本输入
+categoryWidgets = 窗口小部件
+
+contentWidgetExample = 示例
+contentWidgetSource = 源代码
+contentWidgetStyle = CSS 样式
+
+cwAbsolutePanelName =绝对小组
+cwAbsolutePanelDescription =绝对小组职位,其所有子女,绝对让他们重叠。
+cwAbsolutePanelClickMe =点击我!
+cwAbsolutePanelHelloWorld =你好世界
+cwAbsolutePanelLeft = <b>左:</b>
+cwAbsolutePanelItemsToMove = <b>项动议:</b>
+cwAbsolutePanelTop = <b>顶部:</b>
+cwAbsolutePanelWidgetNames =你好世界, 按钮, 并网
+cwBasicButtonName = 基本按钮
+cwBasicButtonDescription = 基本按钮窗口小部件
+cwBasicButtonClickMessage = 不要再点了!
+cwBasicButtonDisabled = 已停用按钮
+cwBasicButtonNormal = 常规按钮
+cwBasicPopupName = 基本弹出式窗口
+cwBasicPopupDescription = GWT 提供了创建自定义弹出式窗口的架构。
+cwBasicPopupClickOutsideInstructions = 点击此弹出式窗口外的任意位置可将其隐藏。
+cwBasicPopupInstructions = <b>点击图片可查看完整尺寸:</b>
+cwBasicPopupShowButton = 显示基本弹出式窗口
+cwBasicTextName = 基本文本
+cwBasicTextDescription = GWT 包含整套标准文本输入窗口小部件,每个小部件均支持控制文本输入所需的键盘和选择事件。 有一点请注意,各个窗口小部件的选择范围会在每次按键后更新。
+cwBasicTextAreaLabel = <b>文本区域:</b>
+cwBasicTextNormalLabel = <b>常规文本框:</b>
+cwBasicTextPasswordLabel = <b>密码文本框:</b>
+cwBasicTextReadOnly = 只读
+cwBasicTextSelected = 已选择
+cwCheckBoxName = 复选框
+cwCheckBoxDescription = 复选框窗口基本小部件
+cwCheckBoxCheckAll = <b>选中所有适用内容:</b>
+cwCheckBoxFemale = 女
+cwCheckBoxMale = 男
+cwCheckBoxUnknown = 未知(已停用)
+cwConstantsExampleDescription =接口常量使人们有可能本地化字符串,数字,地图上的串上串。这个例子不是特别兴奋,但它确实表现如何本地化常数。标签和颜色的选择,下面是提供的本地化实施的抽样界面exampleconstants 。
+cwConstantsExampleName =常量
+cwConstantsExampleLinkText =这个例子互动样本接口:
+cwConstantsWithLookupExampleDescription =接口constantswithlookup使人们有可能动态地看局部价值观使用方法的名称作为字符串键。
+cwConstantsWithLookupExampleLinkText =这个例子互动样本接口:
+cwConstantsWithLookupExampleMethodName = <b>名称的方法: </b>
+cwConstantsWithLookupExampleName =常量与查找
+cwConstantsWithLookupExampleResults = <b>查找结果: </b>
+cwConstantsWithLookupExampleNoInput = <请输入方法名以上>
+cwConstantsWithLookupExampleNoMatches = <未找到>
+cwCookiesName =曲奇
+cwCookiesDescription =跟踪用户轻松保存数据在客户端使用的cookies 。
+cwCookiesDeleteCookie =删除
+cwCookiesExistingLabel = <b>现有饼干:</b>
+cwCookiesInvalidCookie = 您必须指定cookie的名称
+cwCookiesNameLabel = <b>姓名:</b>
+cwCookiesSetCookie = 定曲奇
+cwCookiesValueLabel = <b>价值:</b>
+cwCustomButtonName = 自定义按钮
+cwCustomButtonDescription = PushButton 和 ToggleButton 可以让您自定义按钮的外观
+cwCustomButtonPush = <b>按动按钮:</b>
+cwCustomButtonToggle = <b>切换按钮:</b>
+cwDateTimeFormatName = 日期时间格式
+cwDateTimeFormatDescription =级datetimeformat支持位置敏感的格式化和解析日期和时间值,如numberformat ,用一种灵活的基于模式的语法。既定制模式和标准模式的支持。
+cwDateTimeFormatFailedToParseInput =无法解析投入
+cwDateTimeFormatFormattedLabel = <b>格式化价值: </b>
+cwDateTimeFormatInvalidPattern =无效格局
+cwDateTimeFormatPatternLabel = <b>格局: </b>
+cwDateTimeFormatPatterns =充分日期/时间, 只要日期/时间, 中, 日期/时间, 短日期/时间, 充分日期, 长日期, 中, 日, 短日期, 全部时间很长的时间, 中, 短的时间内, 风俗
+cwDateTimeFormatValueLabel = <b>价值格式: </b>
+cwDialogBoxName = 对话框
+cwDialogBoxDescription = 可拖动的 DialogBox 类似于一个窗口,其中包括一个标题栏。 您可以调整为不透明状态,让部分背景透过弹出式窗口显示。
+cwDialogBoxMakeTransparent = 使透明
+cwDialogBoxCaption = DialogBox 示例
+cwDialogBoxClose = 关闭
+cwDialogBoxDetails = 以下是一个标准对话框组件的示例。
+cwDialogBoxItem = 项目
+cwDialogBoxListBoxInfo = 此列表框演示了将弹出式窗口拖放到上面的情况。 对于其他许多库,这一模糊的边际情形都无法正确显示。
+cwDialogBoxShowButton = 显示对话框
+cwDictionaryExampleName =字典
+cwDictionaryExampleDescription =用字典一流的,你可以查找局部价值观javascript对象界定在东道国html网页,而不是编译成你的gwt代码。这是有益的,如果你的翻译经常变更的,因为你的html服务器可以排出更新翻译成所在页的html ,因为往往按需要发放。它也可以一个有益的途径,以整合gwt模块与现有的局域网络应用程序。得悉该辞典的价值观,仅仅依靠东道国页html的,而且不会受gwt现场客户财产。对于这个例子中, javascript的变量的声明看来,在源头上为这个html网页。
+cwDictionaryExampleLinkText = <b>这个例子相互作用,可与下列javascript的变量: </b>
+cwDisclosurePanelName = 显示面板
+cwDisclosurePanelDescription = 显示面板会在用户点击标题文字时显示或隐藏其中的内容。 该内容可以是简单的文本或任意窗口小部件,如图片或表单中的高级选项。
+cwDisclosurePanelFormAdvancedCriteria = 高级条件
+cwDisclosurePanelFormDescription = 说明:
+cwDisclosurePanelFormGender = 性别:
+cwDisclosurePanelFormGenderOptions = 男, 女, 男女都有
+cwDisclosurePanelFormLocation = 位置:
+cwDisclosurePanelFormName = 姓名:
+cwDisclosurePanelFormTitle = <b>输入搜索条件</b>
+cwDockPanelName = 停靠面板
+cwDockPanelDescription = 停靠面板会使用罗盘方向来对齐内容。
+cwDockPanelCenter = 以下为 <code>ScrollPanel</code>(位于 <code>DockPanel</code> 的中间位置)。 通过将一些篇幅较大的内容置于中间并设置精确的尺寸,可以将这些内容变成页面内的可滚动区域,而无需使用 IFRAME。<br><br>此处使用了相当多无意义的文字,主要是为了可以滚动至可视区域的底部。 否则,您恐怕不得不把它缩到非常非常之小,才能看到那小巧的滚动条。
+cwDockPanelEast = 此为东侧组件
+cwDockPanelNorth1 = 此为北侧首个组件
+cwDockPanelNorth2 = 此为北侧第二个组件
+cwDockPanelSouth1 = 此为南侧首个组件
+cwDockPanelSouth2 = 此为南侧第二个组件
+cwDockPanelWest = 此为西侧组件
+cwFileUploadName = 文件上传
+cwFileUploadDescription = 使用 AJAX 文件上传异步上传文件。
+cwFileUploadNoFileError = 你必须选择一个要上传的档案
+cwFileUploadSelectFile = <b>选择一个档案:</b>
+cwFileUploadSuccessful = 文件上传!
+cwFileUploadButton = 上传文件
+cwFlexTableName = 伸缩表
+cwFlexTableDescription = 伸缩表支持行跨度和列跨度,以便您用多种方式来设置数据布局。
+cwFlexTableAddRow = 添加行
+cwFlexTableDetails = 这是一个可支持 <B>colspans</B> 和 <B>rowspans</B> 的 FlexTable。 您可以用它来设置页面格式或作为特殊用途的表。
+cwFlexTableRemoveRow = 删除行
+cwFlowPanelName = 流动面板
+cwFlowPanelDescription = 流动面板可让其中的内容自然流动。 移动分隔条可查看内容如何根据需要换行。
+cwFlowPanelItem = 项目
+cwFrameName =帧
+cwFrameDescription =嵌入内容从其他网站到您的网页使用框架,即包皮周围的iframe元素。
+cwFrameSetLocation =设置地点
+cwGridName = 网格
+cwGridDescription = 简单网格
+cwHorizontalPanelName = 水平面板
+cwHorizontalPanelDescription = 水平面板可横向对齐内容,而不必进行换行。 重新调整页面大小,查看内容如何保持水平对齐。
+cwHorizontalPanelButton = 按钮
+cwHorizontalSplitPanelName = 水平拆分面板
+cwHorizontalSplitPanelDescription = 用户可通过此拆分面板自由决定如何分配空间。
+cwHorizontalSplitPanelText = 以下文字显示了分隔条两侧的内容是如何流动的。
+cwHyperlinkName =超链
+cwHyperlinkDescription =嵌入你的网页超连结,以导航到不同路段。超连结,才是创造世界历史的令牌,可以让用户恢复到原来的状态使用浏览器后退按钮。
+cwHyperlinkChoose = <b>选择一个栏目:</b>
+cwListBoxName = 列表框
+cwListBoxDescription = 内置的选择框和下拉列表
+cwListBoxCategories = 汽车, 体育, 度假景点
+cwListBoxSelectAll = <b>选择类别:</b>
+cwListBoxSelectCategory = <b>选择所有适用内容:</b>
+cwListBoxSports = 棒球, 篮球, 足球, 冰球, 长柄曲棍球, 马球, 足球, 垒球, 水球
+cwListBoxVacations = 加勒比海, 迪斯尼乐园, 大峡谷, 巴黎, 意大利
+cwMenuBarName = 菜单栏
+cwMenuBarDescription = 菜单栏可用于浏览众多选项, 还可支持嵌套子菜单。
+cwMenuBarEditCategory = 编辑
+cwMenuBarEditOptions = 撤消, 重复, 剪切, 复制, 粘贴
+cwMenuBarFileCategory = 文件
+cwMenuBarFileOptions = 新建, 打开, 关闭, 近期文件, 退出
+cwMenuBarFileRecents = Fishing in the desert.txt, How to tame a wild parrot, Idiots Guide to Emu Farms
+cwMenuBarGWTOptions = 下载, 示例, 源代码, GWT 高手程序
+cwMenuBarHelpCategory = 帮助
+cwMenuBarHelpOptions = 内容, 幸运饼, 关于 GWT
+cwMenuBarPrompts = 感谢您选择菜单项, 选得很不错, 除了选择菜单项之外难道没有更好的选择?, 试试别的吧, 这不过是个菜单而已!, 又浪费了一次点击
+cwMessagesExampleName =讯息
+cwMessagesExampleDescription =界面的信息提供了一种方式,以营造强烈型参数信息,是检查的正确性,在汇编。
+cwMessagesExampleArg0Label = <b>论点( 0 ): </b>
+cwMessagesExampleArg1Label = <b>论点( 1 ): </b>
+cwMessagesExampleArg2Label = <b>论点( 2 ): </b>
+cwMessagesExampleFormattedLabel = <b>格式化信息: </b>
+cwMessagesExampleLinkText =这个例子互动样本接口:
+cwMessagesExampleTemplateLabel = <b>讯息模板:</b>
+cwNumberFormatName =多少格式
+cwNumberFormatDescription =级numberformat支持位置敏感格式化与解析的号码使用一个灵活的基于模式的语法。除了定制模式,一些标准模式,也可方便使用。
+cwNumberFormatFailedToParseInput =无法解析投入
+cwNumberFormatFormattedLabel = <b>格式化价值:</b>
+cwNumberFormatInvalidPattern =无效格局
+cwNumberFormatPatternLabel = <b>格局:</b>
+cwNumberFormatPatterns =小数点, 货币, 科学, % , 习俗
+cwNumberFormatValueLabel = <b>价值格式:</b>
+cwRadioButtonName = 单选按钮
+cwRadioButtonDescription = RadioButton 窗口基本小部件
+cwRadioButtonColors = 蓝, 红, 黄, 绿
+cwRadioButtonSelectColor = <b>选择您喜欢的颜色:</b>
+cwRadioButtonSelectSport = <b>选择您喜欢的运动:</b>
+cwRadioButtonSports = 棒球, 篮球, 足球, 冰球, 足球, 水球
+cwRichTextName = 富文本
+cwRichTextDescription = 富文本区域可在所有主要浏览器中获得支持,且可轻松降级至各浏览器所支持的功能级别。
+cwStackPanelName =栈小组
+cwStackPanelDescription = stackpanel栈其子女纵向上,表现了,只有一个一个地,同一个头,为每名子女,其中,用户可以通过点击汇演。这是有益的垂直菜单系统。
+cwStackPanelContactsHeader =接触
+cwStackPanelContacts = benoit曼德尔布洛特, 爱因斯坦, 笛卡尔, 鲍勃saget, 路德维希冯贝多芬, 理查德费曼, 阿兰图灵, 约翰冯诺依曼
+cwStackPanelMailHeader =邮件
+cwStackPanelMailFolders = 收件箱, 草稿, 范本, 发送, 垃圾桶
+cwStackPanelFiltersHeader =过滤器
+cwStackPanelFilters =所有, 主演, 读, 未读, 最近, 派出由我
+cwSuggestBoxName = 建议框
+cwSuggestBoxDescription = 通过对服务器进行的 RPC 调用或页面上的静态数据来生成建议
+cwSuggestBoxLabel = <b>选择字词:</b>
+cwSuggestBoxWords = 1337, apple, about, ant, bruce, banana, bobv, canada, coconut, compiler, donut, deferred binding, dessert topping, eclair, ecc, frog attack, floor wax, fitz, google, gosh, gwt, hollis, haskell, hammer, in the flinks, internets, ipso facto, jat, jgw, java, jens, knorton, kaitlyn, kangaroo, la grange, lars, love, morrildl, max, maddie, mloofle, mmendez, nail, narnia, null, optimizations, obfuscation, original, ping pong, polymorphic, pleather, quotidian, quality, qu'est-ce que c'est, ready state, ruby, rdayal, subversion, superclass, scottb, tobyr, the dans, ~ tilde, undefined, unit tests, under 100ms, vtbl, vidalia, vector graphics, w3c, web experience, work around, w00t!, xml, xargs, xeno, yacc, yank (the vi command), zealot, zoe, zebra
+cwTabPanelName = 标签面板
+cwTabPanelDescription = 通过多个标签划分内容。
+cwTabPanelTab0 = 点击标签可查看更多内容。
+cwTabPanelTab2 = 标签可通过 CSS 实现高度自定义化。
+cwTabPanelTabs = 主页, GWT 徽标, 更多信息
+cwTreeName = 树
+cwTreeDescription = 动态树窗口小部件可通过对服务器进行 RPC 调用来支持数据的延迟加载
+cwTreeDynamicLabel = <b>动态树:</b>
+cwTreeItem = 项目
+cwTreeStaticLabel = <b>静态树:</b>
+cwVerticalPanelName = 垂直面板
+cwVerticalPanelDescription = 垂直面板可纵向对齐相关内容,而不必进行换行。 重新调整页面大小,查看内容如何保持垂直对齐。
+cwVerticalPanelButton = 按钮
+cwVerticalSplitPanelName = 垂直拆分面板
+cwVerticalSplitPanelDescription = 用户可通过此拆分面板自由决定如何分配空间。
+cwVerticalSplitPanelText = 以下文字显示了分隔条两侧的内容是如何流动的。
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/ShowcaseImages.java b/samples/showcase/src/com/google/gwt/sample/showcase/client/ShowcaseImages.java
new file mode 100644
index 0000000..9c85b28
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/ShowcaseImages.java
@@ -0,0 +1,48 @@
+/*
+ * Copyright 2008 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.showcase.client;
+
+import com.google.gwt.user.client.ui.AbstractImagePrototype;
+import com.google.gwt.user.client.ui.ImageBundle;
+
+/**
+ * The images used throughout the Showcase.
+ */
+public interface ShowcaseImages extends ImageBundle {
+ AbstractImagePrototype catI18N();
+
+ AbstractImagePrototype catLists();
+
+ AbstractImagePrototype catOther();
+
+ AbstractImagePrototype catPanels();
+
+ AbstractImagePrototype catPopups();
+
+ AbstractImagePrototype catTables();
+
+ AbstractImagePrototype catTextInput();
+
+ AbstractImagePrototype catWidgets();
+
+ AbstractImagePrototype gwtLogo();
+
+ AbstractImagePrototype gwtLogoThumb();
+
+ AbstractImagePrototype jimmy();
+
+ AbstractImagePrototype jimmyThumb();
+}
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/blank.png b/samples/showcase/src/com/google/gwt/sample/showcase/client/blank.png
new file mode 100644
index 0000000..b3f90a1
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/blank.png
Binary files differ
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/catI18N.png b/samples/showcase/src/com/google/gwt/sample/showcase/client/catI18N.png
new file mode 100644
index 0000000..ffaa6af
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/catI18N.png
Binary files differ
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/catLists.png b/samples/showcase/src/com/google/gwt/sample/showcase/client/catLists.png
new file mode 100644
index 0000000..6e6d0dd
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/catLists.png
Binary files differ
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/catOther.png b/samples/showcase/src/com/google/gwt/sample/showcase/client/catOther.png
new file mode 100644
index 0000000..5f8c729
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/catOther.png
Binary files differ
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/catPanels.png b/samples/showcase/src/com/google/gwt/sample/showcase/client/catPanels.png
new file mode 100644
index 0000000..293916d
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/catPanels.png
Binary files differ
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/catPopups.png b/samples/showcase/src/com/google/gwt/sample/showcase/client/catPopups.png
new file mode 100644
index 0000000..8274679
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/catPopups.png
Binary files differ
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/catTables.png b/samples/showcase/src/com/google/gwt/sample/showcase/client/catTables.png
new file mode 100644
index 0000000..832ce0f
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/catTables.png
Binary files differ
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/catTextInput.png b/samples/showcase/src/com/google/gwt/sample/showcase/client/catTextInput.png
new file mode 100644
index 0000000..47620ef
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/catTextInput.png
Binary files differ
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/catWidgets.png b/samples/showcase/src/com/google/gwt/sample/showcase/client/catWidgets.png
new file mode 100644
index 0000000..202c88f
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/catWidgets.png
Binary files differ
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/ColorConstants.java b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/ColorConstants.java
new file mode 100644
index 0000000..f6f7e1e
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/ColorConstants.java
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2008 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.showcase.client.content.i18n;
+
+import com.google.gwt.i18n.client.ConstantsWithLookup;
+
+/**
+ * Internationalized constants used to demonstrate {@link ConstantsWithLookup}.
+ *
+ * @gwt.RAW
+ */
+public interface ColorConstants extends ConstantsWithLookup {
+ String black();
+
+ String blue();
+
+ String green();
+
+ String grey();
+
+ String lightGrey();
+
+ String red();
+
+ String white();
+
+ String yellow();
+}
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/ColorConstants.properties b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/ColorConstants.properties
new file mode 100644
index 0000000..08c58d8
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/ColorConstants.properties
@@ -0,0 +1,25 @@
+#
+# Copyright 2008 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.
+#
+# @gwt.RAW
+
+red = Red
+green = Green
+yellow = Yellow
+blue = Blue
+black = Black
+white = White
+grey = Grey
+lightGrey = Light Grey
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/ColorConstants_ar.properties b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/ColorConstants_ar.properties
new file mode 100644
index 0000000..f3b4cb7
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/ColorConstants_ar.properties
@@ -0,0 +1,25 @@
+#
+# Copyright 2008 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.
+#
+# @gwt.RAW
+
+red = الاحمر
+green = الخضراء
+yellow = الاصفر
+blue = زرقاء
+black = أسود
+white = أبيض
+grey = الرمادية
+lightGrey = ضوء الرمادية
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/ColorConstants_fr.properties b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/ColorConstants_fr.properties
new file mode 100644
index 0000000..123f164
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/ColorConstants_fr.properties
@@ -0,0 +1,25 @@
+#
+# Copyright 2008 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.
+#
+# @gwt.RAW
+
+red = Rouge
+green = Vert
+yellow = Jaune
+blue = Bleu
+black = Noir
+white = Blanc
+grey = Gris
+lightGrey = Lumière Gris
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/ColorConstants_zh.properties b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/ColorConstants_zh.properties
new file mode 100644
index 0000000..c183888
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/ColorConstants_zh.properties
@@ -0,0 +1,25 @@
+#
+# Copyright 2008 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.
+#
+# @gwt.RAW
+
+red =红
+green =绿
+yellow =黄色
+blue =蓝
+black =黑色
+white =白
+grey =灰色
+lightGrey =浅灰色
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/CwConstantsExample.java b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/CwConstantsExample.java
new file mode 100644
index 0000000..d936017
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/CwConstantsExample.java
@@ -0,0 +1,200 @@
+/*
+ * Copyright 2008 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.showcase.client.content.i18n;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.i18n.client.Constants;
+import com.google.gwt.sample.showcase.client.ContentWidget;
+import com.google.gwt.user.client.ui.ClickListener;
+import com.google.gwt.user.client.ui.FlexTable;
+import com.google.gwt.user.client.ui.HTML;
+import com.google.gwt.user.client.ui.HorizontalPanel;
+import com.google.gwt.user.client.ui.ListBox;
+import com.google.gwt.user.client.ui.SourcesTabEvents;
+import com.google.gwt.user.client.ui.TextBox;
+import com.google.gwt.user.client.ui.Widget;
+import com.google.gwt.user.client.ui.FlexTable.FlexCellFormatter;
+
+import java.util.Map;
+
+/**
+ * Example file.
+ */
+public class CwConstantsExample extends ContentWidget {
+ /**
+ * The constants used in this Content Widget.
+ *
+ * @gwt.SRC
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String cwConstantsExampleDescription();
+
+ String cwConstantsExampleLinkText();
+
+ String cwConstantsExampleName();
+ }
+
+ /**
+ * An instance of the constants.
+ *
+ * @gwt.DATA
+ */
+ private CwConstants constants;
+
+ /**
+ * Indicates whether or not we have loaded the {@link ExampleConstants} java
+ * source yet.
+ */
+ private boolean javaLoaded = false;
+
+ /**
+ * The widget used to display {@link ExampleConstants} java source.
+ */
+ private HTML javaWidget = null;
+
+ /**
+ * Indicates whether or not we have loaded the {@link ExampleConstants}
+ * properties source yet.
+ */
+ private boolean propertiesLoaded = false;
+
+ /**
+ * The widget used to display {@link ExampleConstants} properties source.
+ */
+ private HTML propertiesWidget = null;
+
+ /**
+ * Constructor.
+ *
+ * @param constants the constants
+ */
+ public CwConstantsExample(CwConstants constants) {
+ super(constants);
+ this.constants = constants;
+ }
+
+ @Override
+ public String getDescription() {
+ return constants.cwConstantsExampleDescription();
+ }
+
+ @Override
+ public String getName() {
+ return constants.cwConstantsExampleName();
+ }
+
+ @Override
+ public boolean hasStyle() {
+ return false;
+ }
+
+ /**
+ * Initialize this example.
+ *
+ * @gwt.SRC
+ */
+ @Override
+ public Widget onInitialize() {
+ // Create the internationalized constants
+ ExampleConstants exampleConstants = GWT.create(ExampleConstants.class);
+
+ // Use a FlexTable to layout the content
+ FlexTable layout = new FlexTable();
+ FlexCellFormatter formatter = layout.getFlexCellFormatter();
+ layout.setCellSpacing(5);
+
+ // Add a link to the source code of the Interface
+ HTML link = new HTML(
+ " <a href=\"javascript:void(0);\">ExampleConstants</a>");
+ link.addClickListener(new ClickListener() {
+ public void onClick(Widget sender) {
+ selectTab(2);
+ }
+ });
+ HorizontalPanel linkPanel = new HorizontalPanel();
+ linkPanel.setSpacing(3);
+ linkPanel.add(new HTML(constants.cwConstantsExampleLinkText()));
+ linkPanel.add(link);
+ layout.setWidget(0, 0, linkPanel);
+ formatter.setColSpan(0, 0, 2);
+
+ // Show the first name
+ TextBox firstNameBox = new TextBox();
+ firstNameBox.setText("Amelie");
+ firstNameBox.setWidth("17em");
+ layout.setHTML(1, 0, exampleConstants.firstName());
+ layout.setWidget(1, 1, firstNameBox);
+
+ // Show the last name
+ TextBox lastNameBox = new TextBox();
+ lastNameBox.setText("Crutcher");
+ lastNameBox.setWidth("17em");
+ layout.setHTML(2, 0, exampleConstants.lastName());
+ layout.setWidget(2, 1, lastNameBox);
+
+ // Create a list box of favorite colors
+ ListBox colorBox = new ListBox();
+ Map<String, String> colorMap = exampleConstants.colorMap();
+ for (Map.Entry<String, String> entry : colorMap.entrySet()) {
+ String key = entry.getKey();
+ String value = entry.getValue();
+ colorBox.addItem(value, key);
+ }
+ layout.setHTML(3, 0, exampleConstants.favoriteColor());
+ layout.setWidget(3, 1, colorBox);
+
+ // Return the layout Widget
+ return layout;
+ }
+
+ @Override
+ public void onInitializeComplete() {
+ addConstantsTab();
+ }
+
+ @Override
+ public void onTabSelected(SourcesTabEvents sender, int tabIndex) {
+ super.onTabSelected(sender, tabIndex);
+
+ if (!javaLoaded && tabIndex == 2) {
+ // Load ErrorMessages.java
+ javaLoaded = true;
+ String className = ExampleConstants.class.getName().replaceAll("_", "");
+ requestFileContents("raw/" + className + ".java.html", javaWidget,
+ "Source code not available.");
+ } else if (!propertiesLoaded && tabIndex == 3) {
+ // Load ErrorMessages.properties
+ propertiesLoaded = true;
+ String className = ExampleConstants.class.getName().replaceAll("_", "");
+ requestFileContents("raw/" + className + ".properties.html",
+ propertiesWidget, "Source code not available.");
+ }
+ }
+
+ /**
+ * Add a tab to this example to show the messages interface.
+ */
+ private void addConstantsTab() {
+ // Add a tab to show the interface
+ javaWidget = new HTML();
+ add(javaWidget, "ExampleConstants.java");
+
+ // Add a tab to show the properties
+ propertiesWidget = new HTML();
+ add(propertiesWidget, "ExampleConstants.properties");
+ }
+}
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/CwConstantsWithLookupExample.java b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/CwConstantsWithLookupExample.java
new file mode 100644
index 0000000..f4c2057
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/CwConstantsWithLookupExample.java
@@ -0,0 +1,243 @@
+/*
+ * Copyright 2008 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.showcase.client.content.i18n;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.i18n.client.Constants;
+import com.google.gwt.sample.showcase.client.ContentWidget;
+import com.google.gwt.user.client.ui.ClickListener;
+import com.google.gwt.user.client.ui.FlexTable;
+import com.google.gwt.user.client.ui.HTML;
+import com.google.gwt.user.client.ui.HorizontalPanel;
+import com.google.gwt.user.client.ui.KeyboardListenerAdapter;
+import com.google.gwt.user.client.ui.SourcesTabEvents;
+import com.google.gwt.user.client.ui.TextBox;
+import com.google.gwt.user.client.ui.Widget;
+import com.google.gwt.user.client.ui.FlexTable.FlexCellFormatter;
+
+import java.util.MissingResourceException;
+
+/**
+ * Example file.
+ */
+public class CwConstantsWithLookupExample extends ContentWidget {
+ /**
+ * The constants used in this Content Widget.
+ *
+ * @gwt.SRC
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String cwConstantsWithLookupExampleDescription();
+
+ String cwConstantsWithLookupExampleLinkText();
+
+ String cwConstantsWithLookupExampleMethodName();
+
+ String cwConstantsWithLookupExampleName();
+
+ String cwConstantsWithLookupExampleNoInput();
+
+ String cwConstantsWithLookupExampleNoMatches();
+
+ String cwConstantsWithLookupExampleResults();
+ }
+
+ /**
+ * A {@link TextBox} where the user can select a color to lookup.
+ *
+ * @gwt.DATA
+ */
+ private TextBox colorBox = null;
+
+ /**
+ * The {@link ColorConstants} that map colors to values.
+ */
+ private ColorConstants colorConstants = null;
+
+ /**
+ * A {@link TextBox} where the results of the lookup are displayed.
+ *
+ * @gwt.DATA
+ */
+ private TextBox colorResultsBox = null;
+
+ /**
+ * An instance of the constants.
+ *
+ * @gwt.DATA
+ */
+ private CwConstants constants;
+
+ /**
+ * Indicates whether or not we have loaded the {@link ExampleConstants} java
+ * source yet.
+ */
+ private boolean javaLoaded = false;
+
+ /**
+ * The widget used to display {@link ExampleConstants} java source.
+ */
+ private HTML javaWidget = null;
+
+ /**
+ * Indicates whether or not we have loaded the {@link ExampleConstants}
+ * properties source yet.
+ */
+ private boolean propertiesLoaded = false;
+
+ /**
+ * The widget used to display {@link ExampleConstants} properties source.
+ */
+ private HTML propertiesWidget = null;
+
+ /**
+ * Constructor.
+ *
+ * @param constants the constants
+ */
+ public CwConstantsWithLookupExample(CwConstants constants) {
+ super(constants);
+ this.constants = constants;
+ }
+
+ @Override
+ public String getDescription() {
+ return constants.cwConstantsWithLookupExampleDescription();
+ }
+
+ @Override
+ public String getName() {
+ return constants.cwConstantsWithLookupExampleName();
+ }
+
+ @Override
+ public boolean hasStyle() {
+ return false;
+ }
+
+ /**
+ * Initialize this example.
+ *
+ * @gwt.SRC
+ */
+ @Override
+ public Widget onInitialize() {
+ // Create the internationalized constants
+ colorConstants = GWT.create(ColorConstants.class);
+
+ // Use a FlexTable to layout the content
+ FlexTable layout = new FlexTable();
+ FlexCellFormatter formatter = layout.getFlexCellFormatter();
+ layout.setCellSpacing(5);
+
+ // Add a link to the source code of the Interface
+ HTML link = new HTML(" <a href=\"javascript:void(0);\">ColorConstants</a>");
+ link.addClickListener(new ClickListener() {
+ public void onClick(Widget sender) {
+ selectTab(2);
+ }
+ });
+ HorizontalPanel linkPanel = new HorizontalPanel();
+ linkPanel.setSpacing(3);
+ linkPanel.add(new HTML(constants.cwConstantsWithLookupExampleLinkText()));
+ linkPanel.add(link);
+ layout.setWidget(0, 0, linkPanel);
+ formatter.setColSpan(0, 0, 2);
+
+ // Add a field so the user can type a color
+ colorBox = new TextBox();
+ colorBox.setText("red");
+ colorBox.setWidth("17em");
+ layout.setHTML(1, 0, constants.cwConstantsWithLookupExampleMethodName());
+ layout.setWidget(1, 1, colorBox);
+
+ // Show the last name
+ colorResultsBox = new TextBox();
+ colorResultsBox.setEnabled(false);
+ colorResultsBox.setWidth("17em");
+ layout.setHTML(2, 0, constants.cwConstantsWithLookupExampleResults());
+ layout.setWidget(2, 1, colorResultsBox);
+
+ // Add a listener to update the color as the user types a lookup value
+ colorBox.addKeyboardListener(new KeyboardListenerAdapter() {
+ @Override
+ public void onKeyUp(Widget sender, char keyCode, int modifiers) {
+ updateColor();
+ }
+ });
+
+ // Return the layout Widget
+ updateColor();
+ return layout;
+ }
+
+ @Override
+ public void onInitializeComplete() {
+ addConstantsTab();
+ }
+
+ @Override
+ public void onTabSelected(SourcesTabEvents sender, int tabIndex) {
+ super.onTabSelected(sender, tabIndex);
+
+ if (!javaLoaded && tabIndex == 2) {
+ // Load ErrorMessages.java
+ javaLoaded = true;
+ String className = ColorConstants.class.getName().replaceAll("_", "");
+ requestFileContents("raw/" + className + ".java.html", javaWidget,
+ "Source code not available.");
+ } else if (!propertiesLoaded && tabIndex == 3) {
+ // Load ErrorMessages.properties
+ propertiesLoaded = true;
+ String className = ColorConstants.class.getName().replaceAll("_", "");
+ requestFileContents("raw/" + className + ".properties.html",
+ propertiesWidget, "Source code not available.");
+ }
+ }
+
+ /**
+ * Add a tab to this example to show the messages interface.
+ */
+ private void addConstantsTab() {
+ // Add a tab to show the interface
+ javaWidget = new HTML();
+ add(javaWidget, "ColorConstants.java");
+
+ // Add a tab to show the properties
+ propertiesWidget = new HTML();
+ add(propertiesWidget, "ColorConstants.properties");
+ }
+
+ /**
+ * Lookup the color based on the value the user entered.
+ *
+ * @gwt.SRC
+ */
+ private void updateColor() {
+ String key = colorBox.getText().trim();
+ if (key.equals("")) {
+ colorResultsBox.setText(constants.cwConstantsWithLookupExampleNoInput());
+ } else {
+ try {
+ String color = colorConstants.getString(key);
+ colorResultsBox.setText(color);
+ } catch (MissingResourceException e) {
+ colorResultsBox.setText(constants.cwConstantsWithLookupExampleNoMatches());
+ }
+ }
+ }
+}
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/CwDateTimeFormat.java b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/CwDateTimeFormat.java
new file mode 100644
index 0000000..066dcfc
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/CwDateTimeFormat.java
@@ -0,0 +1,314 @@
+/*
+ * Copyright 2008 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.showcase.client.content.i18n;
+
+import com.google.gwt.i18n.client.Constants;
+import com.google.gwt.i18n.client.DateTimeFormat;
+import com.google.gwt.sample.showcase.client.ContentWidget;
+import com.google.gwt.user.client.ui.ChangeListener;
+import com.google.gwt.user.client.ui.Grid;
+import com.google.gwt.user.client.ui.HasVerticalAlignment;
+import com.google.gwt.user.client.ui.KeyboardListenerAdapter;
+import com.google.gwt.user.client.ui.Label;
+import com.google.gwt.user.client.ui.ListBox;
+import com.google.gwt.user.client.ui.TextBox;
+import com.google.gwt.user.client.ui.Widget;
+import com.google.gwt.user.client.ui.HTMLTable.CellFormatter;
+
+import java.util.Date;
+
+/**
+ * Example file.
+ *
+ * @gwt.CSS .cw-RedText
+ */
+public class CwDateTimeFormat extends ContentWidget {
+ /**
+ * The constants used in this Content Widget.
+ *
+ * @gwt.SRC
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String cwDateTimeFormatDescription();
+
+ String cwDateTimeFormatFailedToParseInput();
+
+ String cwDateTimeFormatFormattedLabel();
+
+ String cwDateTimeFormatInvalidPattern();
+
+ String cwDateTimeFormatName();
+
+ String cwDateTimeFormatPatternLabel();
+
+ String[] cwDateTimeFormatPatterns();
+
+ String cwDateTimeFormatValueLabel();
+ }
+
+ /**
+ * The {@link DateTimeFormat} that is currently being applied.
+ */
+ private DateTimeFormat activeFormat = null;
+
+ /**
+ * An instance of the constants.
+ *
+ * @gwt.DATA
+ */
+ private CwConstants constants;
+
+ /**
+ * The {@link Label} where the formatted value is displayed.
+ *
+ * @gwt.DATA
+ */
+ private Label formattedBox = null;
+
+ /**
+ * The {@link TextBox} that displays the current pattern.
+ *
+ * @gwt.DATA
+ */
+ private TextBox patternBox = null;
+
+ /**
+ * The {@link ListBox} that holds the patterns.
+ *
+ * @gwt.DATA
+ */
+ private ListBox patternList = null;
+
+ /**
+ * The {@link TextBox} where the user enters a value.
+ *
+ * @gwt.DATA
+ */
+ private TextBox valueBox = null;
+
+ /**
+ * Constructor.
+ *
+ * @param constants the constants
+ */
+ public CwDateTimeFormat(CwConstants constants) {
+ super(constants);
+ this.constants = constants;
+ }
+
+ @Override
+ public String getDescription() {
+ return constants.cwDateTimeFormatDescription();
+ }
+
+ @Override
+ public String getName() {
+ return constants.cwDateTimeFormatName();
+ }
+
+ /**
+ * Initialize this example.
+ *
+ * @gwt.SRC
+ */
+ @Override
+ public Widget onInitialize() {
+ // Use a Grid to layout the content
+ Grid layout = new Grid(4, 2);
+ CellFormatter formatter = layout.getCellFormatter();
+ layout.setCellSpacing(5);
+
+ // Add a field to select the pattern
+ patternList = new ListBox();
+ patternList.setWidth("17em");
+ String[] patterns = constants.cwDateTimeFormatPatterns();
+ for (String pattern : patterns) {
+ patternList.addItem(pattern);
+ }
+ patternList.addChangeListener(new ChangeListener() {
+ public void onChange(Widget sender) {
+ updatePattern();
+ }
+ });
+ layout.setHTML(0, 0, constants.cwDateTimeFormatPatternLabel());
+ layout.setWidget(0, 1, patternList);
+
+ // Add a field to display the pattern
+ patternBox = new TextBox();
+ patternBox.setWidth("17em");
+ patternBox.addKeyboardListener(new KeyboardListenerAdapter() {
+ @Override
+ public void onKeyUp(Widget sender, char keyCode, int modifiers) {
+ updatePattern();
+ }
+ });
+ layout.setWidget(1, 1, patternBox);
+
+ // Add a field to set the value
+ valueBox = new TextBox();
+ valueBox.setWidth("17em");
+ valueBox.setText("13 September 1999");
+ valueBox.addKeyboardListener(new KeyboardListenerAdapter() {
+ @Override
+ public void onKeyUp(Widget sender, char keyCode, int modifiers) {
+ updateFormattedValue();
+ }
+ });
+ layout.setHTML(2, 0, constants.cwDateTimeFormatValueLabel());
+ layout.setWidget(2, 1, valueBox);
+
+ // Add a field to display the formatted value
+ formattedBox = new Label();
+ formattedBox.setWidth("17em");
+ layout.setHTML(3, 0, constants.cwDateTimeFormatFormattedLabel());
+ layout.setWidget(3, 1, formattedBox);
+ formatter.setVerticalAlignment(3, 0, HasVerticalAlignment.ALIGN_TOP);
+
+ // Return the layout Widget
+ updatePattern();
+ return layout;
+ }
+
+ /**
+ * Show an error message. Pass in null to clear the error message.
+ *
+ * @param errorMsg the error message
+ * @gwt.SRC
+ */
+ private void showErrorMessage(String errorMsg) {
+ if (errorMsg == null) {
+ formattedBox.removeStyleName("cw-RedText");
+ } else {
+ formattedBox.setText(errorMsg);
+ formattedBox.addStyleName("cw-RedText");
+ }
+ }
+
+ /**
+ * Update the formatted value based on the user entered value and pattern.
+ *
+ * @gwt.SRC
+ */
+ private void updateFormattedValue() {
+ String sValue = valueBox.getText();
+ if (!sValue.equals("")) {
+ try {
+ Date date = new Date(sValue);
+ String formattedValue = activeFormat.format(date);
+ formattedBox.setText(formattedValue);
+ showErrorMessage(null);
+ } catch (IllegalArgumentException e) {
+ showErrorMessage(constants.cwDateTimeFormatFailedToParseInput());
+ }
+ } else {
+ formattedBox.setText("<None>");
+ }
+ }
+
+ /**
+ * Update the selected pattern based on the pattern in the list.
+ *
+ * @gwt.SRC
+ */
+ private void updatePattern() {
+ switch (patternList.getSelectedIndex()) {
+ // Date + Time
+ case 0:
+ activeFormat = DateTimeFormat.getFullDateTimeFormat();
+ patternBox.setText(activeFormat.getPattern());
+ patternBox.setEnabled(false);
+ break;
+
+ case 1:
+ activeFormat = DateTimeFormat.getLongDateTimeFormat();
+ patternBox.setText(activeFormat.getPattern());
+ patternBox.setEnabled(false);
+ break;
+ case 2:
+ activeFormat = DateTimeFormat.getMediumDateTimeFormat();
+ patternBox.setText(activeFormat.getPattern());
+ patternBox.setEnabled(false);
+ break;
+ case 3:
+ activeFormat = DateTimeFormat.getShortDateTimeFormat();
+ patternBox.setText(activeFormat.getPattern());
+ patternBox.setEnabled(false);
+ break;
+
+ // Date only
+ case 4:
+ activeFormat = DateTimeFormat.getFullDateFormat();
+ patternBox.setText(activeFormat.getPattern());
+ patternBox.setEnabled(false);
+ break;
+
+ case 5:
+ activeFormat = DateTimeFormat.getLongDateFormat();
+ patternBox.setText(activeFormat.getPattern());
+ patternBox.setEnabled(false);
+ break;
+ case 6:
+ activeFormat = DateTimeFormat.getMediumDateFormat();
+ patternBox.setText(activeFormat.getPattern());
+ patternBox.setEnabled(false);
+ break;
+ case 7:
+ activeFormat = DateTimeFormat.getShortDateFormat();
+ patternBox.setText(activeFormat.getPattern());
+ patternBox.setEnabled(false);
+ break;
+
+ // Time only
+ case 8:
+ activeFormat = DateTimeFormat.getFullTimeFormat();
+ patternBox.setText(activeFormat.getPattern());
+ patternBox.setEnabled(false);
+ break;
+
+ case 9:
+ activeFormat = DateTimeFormat.getLongTimeFormat();
+ patternBox.setText(activeFormat.getPattern());
+ patternBox.setEnabled(false);
+ break;
+ case 10:
+ activeFormat = DateTimeFormat.getMediumTimeFormat();
+ patternBox.setText(activeFormat.getPattern());
+ patternBox.setEnabled(false);
+ break;
+ case 11:
+ activeFormat = DateTimeFormat.getShortTimeFormat();
+ patternBox.setText(activeFormat.getPattern());
+ patternBox.setEnabled(false);
+ break;
+
+ // Custom
+ case 12:
+ patternBox.setEnabled(true);
+ String pattern = patternBox.getText();
+ try {
+ activeFormat = DateTimeFormat.getFormat(pattern);
+ } catch (IllegalArgumentException e) {
+ showErrorMessage(constants.cwDateTimeFormatInvalidPattern());
+ return;
+ }
+ break;
+ }
+
+ // Update the formatted value
+ updateFormattedValue();
+ }
+}
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/CwDictionaryExample.java b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/CwDictionaryExample.java
new file mode 100644
index 0000000..6cf8f40
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/CwDictionaryExample.java
@@ -0,0 +1,119 @@
+/*
+ * Copyright 2008 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.showcase.client.content.i18n;
+
+import com.google.gwt.i18n.client.Constants;
+import com.google.gwt.i18n.client.Dictionary;
+import com.google.gwt.sample.showcase.client.ContentWidget;
+import com.google.gwt.user.client.ui.FlexTable;
+import com.google.gwt.user.client.ui.HTML;
+import com.google.gwt.user.client.ui.VerticalPanel;
+import com.google.gwt.user.client.ui.Widget;
+
+import java.util.Set;
+
+/**
+ * Example file.
+ *
+ * @gwt.CSS .cw-DictionaryExample
+ */
+public class CwDictionaryExample extends ContentWidget {
+ /**
+ * The constants used in this Content Widget.
+ *
+ * @gwt.SRC
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String cwDictionaryExampleDescription();
+
+ String cwDictionaryExampleLinkText();
+
+ String cwDictionaryExampleName();
+ }
+
+ /**
+ * An instance of the constants.
+ *
+ * @gwt.DATA
+ */
+ private CwConstants constants;
+
+ /**
+ * Constructor.
+ *
+ * @param constants the constants
+ */
+ public CwDictionaryExample(CwConstants constants) {
+ super(constants);
+ this.constants = constants;
+ }
+
+ @Override
+ public String getDescription() {
+ return constants.cwDictionaryExampleDescription();
+ }
+
+ @Override
+ public String getName() {
+ return constants.cwDictionaryExampleName();
+ }
+
+ /**
+ * Initialize this example.
+ *
+ * @gwt.SRC
+ */
+ @Override
+ public Widget onInitialize() {
+ // Create a vertical panel to layout the contents
+ VerticalPanel layout = new VerticalPanel();
+
+ // Show the HTML variable that defines the dictionary
+ HTML source = new HTML("<pre>var userInfo = {\n"
+ + " name: \"Amelie Crutcher\",\n"
+ + " timeZone: \"EST\",\n" + " userID: \"123\",\n"
+ + " lastLogOn: \"2/2/2006\"\n" + "};</pre>\n");
+ layout.add(new HTML(constants.cwDictionaryExampleLinkText()));
+ layout.add(source);
+
+ // Create the Dictionary of data
+ FlexTable userInfoGrid = new FlexTable();
+ Dictionary userInfo = Dictionary.getDictionary("userInfo");
+ Set<String> keySet = userInfo.keySet();
+ int columnCount = 0;
+ for (String key : keySet) {
+ // Get the value from the set
+ String value = userInfo.get(key);
+
+ // Add a column with the data
+ userInfoGrid.setHTML(0, columnCount, key);
+ userInfoGrid.setHTML(1, columnCount, value);
+
+ // Go to the next column
+ columnCount++;
+ }
+ userInfoGrid.getRowFormatter().setStyleName(0,
+ "cw-DictionaryExample-headerRow");
+ userInfoGrid.getRowFormatter().setStyleName(1,
+ "cw-DictionaryExample-dataRow");
+ layout.add(new HTML("<br><br>"));
+ layout.add(userInfoGrid);
+
+ // Return the layout Widget
+ return layout;
+ }
+}
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/CwMessagesExample.java b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/CwMessagesExample.java
new file mode 100644
index 0000000..73a6486
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/CwMessagesExample.java
@@ -0,0 +1,271 @@
+/*
+ * Copyright 2008 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.showcase.client.content.i18n;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.i18n.client.Constants;
+import com.google.gwt.sample.showcase.client.ContentWidget;
+import com.google.gwt.user.client.ui.ClickListener;
+import com.google.gwt.user.client.ui.FlexTable;
+import com.google.gwt.user.client.ui.HTML;
+import com.google.gwt.user.client.ui.HasVerticalAlignment;
+import com.google.gwt.user.client.ui.HorizontalPanel;
+import com.google.gwt.user.client.ui.KeyboardListenerAdapter;
+import com.google.gwt.user.client.ui.SourcesTabEvents;
+import com.google.gwt.user.client.ui.TextBox;
+import com.google.gwt.user.client.ui.Widget;
+import com.google.gwt.user.client.ui.FlexTable.FlexCellFormatter;
+
+/**
+ * Example file.
+ */
+public class CwMessagesExample extends ContentWidget {
+ /**
+ * The constants used in this Content Widget.
+ *
+ * @gwt.SRC
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String cwMessagesExampleArg0Label();
+
+ String cwMessagesExampleArg1Label();
+
+ String cwMessagesExampleArg2Label();
+
+ String cwMessagesExampleDescription();
+
+ String cwMessagesExampleFormattedLabel();
+
+ String cwMessagesExampleLinkText();
+
+ String cwMessagesExampleName();
+
+ String cwMessagesExampleTemplateLabel();
+ }
+
+ /**
+ * The {@link TextBox} where the user enters argument 0.
+ *
+ * @gwt.DATA
+ */
+ private TextBox arg0Box = null;
+
+ /**
+ * The {@link TextBox} where the user enters argument 1.
+ *
+ * @gwt.DATA
+ */
+ private TextBox arg1Box = null;
+
+ /**
+ * The {@link TextBox} where the user enters argument 2.
+ *
+ * @gwt.DATA
+ */
+ private TextBox arg2Box = null;
+
+ /**
+ * An instance of the constants.
+ *
+ * @gwt.DATA
+ */
+ private CwConstants constants;
+
+ /**
+ * The error messages used in this example.
+ *
+ * @gwt.DATA
+ */
+ private ErrorMessages errorMessages = null;
+
+ /**
+ * The {@link HTML} used to display the message.
+ *
+ * @gwt.DATA
+ */
+ private HTML formattedMessage = null;
+
+ /**
+ * Indicates whether or not we have loaded the {@link ErrorMessages} java
+ * source yet.
+ */
+ private boolean javaLoaded = false;
+
+ /**
+ * The widget used to display {@link ErrorMessages} java source.
+ */
+ private HTML javaWidget = null;
+
+ /**
+ * Indicates whether or not we have loaded the {@link ErrorMessages}
+ * properties source yet.
+ */
+ private boolean propertiesLoaded = false;
+
+ /**
+ * The widget used to display {@link ErrorMessages} properties source.
+ */
+ private HTML propertiesWidget = null;
+
+ /**
+ * Constructor.
+ *
+ * @param constants the constants
+ */
+ public CwMessagesExample(CwConstants constants) {
+ super(constants);
+ this.constants = constants;
+ }
+
+ @Override
+ public String getDescription() {
+ return constants.cwMessagesExampleDescription();
+ }
+
+ @Override
+ public String getName() {
+ return constants.cwMessagesExampleName();
+ }
+
+ @Override
+ public boolean hasStyle() {
+ return false;
+ }
+
+ /**
+ * Initialize this example.
+ *
+ * @gwt.SRC
+ */
+ @Override
+ public Widget onInitialize() {
+ // Create the internationalized error messages
+ errorMessages = GWT.create(ErrorMessages.class);
+
+ // Use a FlexTable to layout the content
+ FlexTable layout = new FlexTable();
+ FlexCellFormatter formatter = layout.getFlexCellFormatter();
+ layout.setCellSpacing(5);
+
+ // Add a link to the source code of the Interface
+ HTML link = new HTML(" <a href=\"javascript:void(0);\">ErrorMessages</a>");
+ link.addClickListener(new ClickListener() {
+ public void onClick(Widget sender) {
+ selectTab(2);
+ }
+ });
+ HorizontalPanel linkPanel = new HorizontalPanel();
+ linkPanel.setSpacing(3);
+ linkPanel.add(new HTML(constants.cwMessagesExampleLinkText()));
+ linkPanel.add(link);
+ layout.setWidget(0, 0, linkPanel);
+ formatter.setColSpan(0, 0, 2);
+
+ // Show the template for reference
+ String template = errorMessages.permissionDenied("{0}", "{1}", "{2}");
+ layout.setHTML(1, 0, constants.cwMessagesExampleTemplateLabel());
+ layout.setHTML(1, 1, template);
+
+ // Add argument 0
+ arg0Box = new TextBox();
+ arg0Box.setText("amelie");
+ layout.setHTML(2, 0, constants.cwMessagesExampleArg0Label());
+ layout.setWidget(2, 1, arg0Box);
+
+ // Add argument 1
+ arg1Box = new TextBox();
+ arg1Box.setText("guest");
+ layout.setHTML(3, 0, constants.cwMessagesExampleArg1Label());
+ layout.setWidget(3, 1, arg1Box);
+
+ // Add argument 2
+ arg2Box = new TextBox();
+ arg2Box.setText("/secure/blueprints.xml");
+ layout.setHTML(4, 0, constants.cwMessagesExampleArg2Label());
+ layout.setWidget(4, 1, arg2Box);
+
+ // Add the formatted message
+ formattedMessage = new HTML();
+ layout.setHTML(5, 0, constants.cwMessagesExampleFormattedLabel());
+ layout.setWidget(5, 1, formattedMessage);
+ formatter.setVerticalAlignment(5, 0, HasVerticalAlignment.ALIGN_TOP);
+
+ // Add listeners to all of the argument boxes
+ KeyboardListenerAdapter keyListener = new KeyboardListenerAdapter() {
+ @Override
+ public void onKeyUp(Widget sender, char keyCode, int modifiers) {
+ updateMessage();
+ }
+ };
+ arg0Box.addKeyboardListener(keyListener);
+ arg1Box.addKeyboardListener(keyListener);
+ arg2Box.addKeyboardListener(keyListener);
+
+ // Return the layout Widget
+ updateMessage();
+ return layout;
+ }
+
+ @Override
+ public void onInitializeComplete() {
+ addMessagesTab();
+ }
+
+ @Override
+ public void onTabSelected(SourcesTabEvents sender, int tabIndex) {
+ super.onTabSelected(sender, tabIndex);
+
+ if (!javaLoaded && tabIndex == 2) {
+ // Load ErrorMessages.java
+ javaLoaded = true;
+ String className = ErrorMessages.class.getName().replaceAll("_", "");
+ requestFileContents("raw/" + className + ".java.html", javaWidget,
+ "Source code not available.");
+ } else if (!propertiesLoaded && tabIndex == 3) {
+ // Load ErrorMessages.properties
+ propertiesLoaded = true;
+ String className = ErrorMessages.class.getName().replaceAll("_", "");
+ requestFileContents("raw/" + className + ".properties.html",
+ propertiesWidget, "Source code not available.");
+ }
+ }
+
+ /**
+ * Add a tab to this example to show the {@link ErrorMessages} source code.
+ */
+ private void addMessagesTab() {
+ // Add a tab to show the interface
+ javaWidget = new HTML();
+ add(javaWidget, "ErrorMessages.java");
+
+ // Add a tab to show the properties
+ propertiesWidget = new HTML();
+ add(propertiesWidget, "ErrorMessages.properties");
+ }
+
+ /**
+ * Update the formatted message.
+ *
+ * @gwt.SRC
+ */
+ private void updateMessage() {
+ String arg0 = arg0Box.getText().trim();
+ String arg1 = arg1Box.getText().trim();
+ String arg2 = arg2Box.getText().trim();
+ formattedMessage.setText(errorMessages.permissionDenied(arg0, arg1, arg2));
+ }
+}
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/CwNumberFormat.java b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/CwNumberFormat.java
new file mode 100644
index 0000000..91662e6
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/CwNumberFormat.java
@@ -0,0 +1,258 @@
+/*
+ * Copyright 2008 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.showcase.client.content.i18n;
+
+import com.google.gwt.i18n.client.Constants;
+import com.google.gwt.i18n.client.NumberFormat;
+import com.google.gwt.sample.showcase.client.ContentWidget;
+import com.google.gwt.user.client.ui.ChangeListener;
+import com.google.gwt.user.client.ui.Grid;
+import com.google.gwt.user.client.ui.KeyboardListenerAdapter;
+import com.google.gwt.user.client.ui.Label;
+import com.google.gwt.user.client.ui.ListBox;
+import com.google.gwt.user.client.ui.TextBox;
+import com.google.gwt.user.client.ui.Widget;
+
+/**
+ * Example file.
+ *
+ * @gwt.CSS .cw-RedText
+ */
+public class CwNumberFormat extends ContentWidget {
+ /**
+ * The constants used in this Content Widget.
+ *
+ * @gwt.SRC
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String cwNumberFormatDescription();
+
+ String cwNumberFormatFailedToParseInput();
+
+ String cwNumberFormatFormattedLabel();
+
+ String cwNumberFormatInvalidPattern();
+
+ String cwNumberFormatName();
+
+ String cwNumberFormatPatternLabel();
+
+ String[] cwNumberFormatPatterns();
+
+ String cwNumberFormatValueLabel();
+ }
+
+ /**
+ * The {@link NumberFormat} that is currently being applied.
+ */
+ private NumberFormat activeFormat = null;
+
+ /**
+ * An instance of the constants.
+ *
+ * @gwt.DATA
+ */
+ private CwConstants constants;
+
+ /**
+ * The {@link Label} where the formatted value is displayed.
+ *
+ * @gwt.DATA
+ */
+ private Label formattedBox = null;
+
+ /**
+ * The {@link TextBox} that displays the current pattern.
+ *
+ * @gwt.DATA
+ */
+ private TextBox patternBox = null;
+
+ /**
+ * The {@link ListBox} that holds the patterns.
+ *
+ * @gwt.DATA
+ */
+ private ListBox patternList = null;
+
+ /**
+ * The {@link TextBox} where the user enters a value.
+ *
+ * @gwt.DATA
+ */
+ private TextBox valueBox = null;
+
+ /**
+ * Constructor.
+ *
+ * @param constants the constants
+ */
+ public CwNumberFormat(CwConstants constants) {
+ super(constants);
+ this.constants = constants;
+ }
+
+ @Override
+ public String getDescription() {
+ return constants.cwNumberFormatDescription();
+ }
+
+ @Override
+ public String getName() {
+ return constants.cwNumberFormatName();
+ }
+
+ /**
+ * Initialize this example.
+ *
+ * @gwt.SRC
+ */
+ @Override
+ public Widget onInitialize() {
+ // Use a Grid to layout the content
+ Grid layout = new Grid(4, 2);
+ layout.setCellSpacing(5);
+
+ // Add a field to select the pattern
+ patternList = new ListBox();
+ patternList.setWidth("17em");
+ String[] patterns = constants.cwNumberFormatPatterns();
+ for (String pattern : patterns) {
+ patternList.addItem(pattern);
+ }
+ patternList.addChangeListener(new ChangeListener() {
+ public void onChange(Widget sender) {
+ updatePattern();
+ }
+ });
+ layout.setHTML(0, 0, constants.cwNumberFormatPatternLabel());
+ layout.setWidget(0, 1, patternList);
+
+ // Add a field to display the pattern
+ patternBox = new TextBox();
+ patternBox.setWidth("17em");
+ patternBox.addKeyboardListener(new KeyboardListenerAdapter() {
+ @Override
+ public void onKeyUp(Widget sender, char keyCode, int modifiers) {
+ updatePattern();
+ }
+ });
+ layout.setWidget(1, 1, patternBox);
+
+ // Add a field to set the value
+ valueBox = new TextBox();
+ valueBox.setWidth("17em");
+ valueBox.setText("31415926535.897932");
+ valueBox.addKeyboardListener(new KeyboardListenerAdapter() {
+ @Override
+ public void onKeyUp(Widget sender, char keyCode, int modifiers) {
+ updateFormattedValue();
+ }
+ });
+ layout.setHTML(2, 0, constants.cwNumberFormatValueLabel());
+ layout.setWidget(2, 1, valueBox);
+
+ // Add a field to display the formatted value
+ formattedBox = new Label();
+ formattedBox.setWidth("17em");
+ layout.setHTML(3, 0, constants.cwNumberFormatFormattedLabel());
+ layout.setWidget(3, 1, formattedBox);
+
+ // Return the layout Widget
+ updatePattern();
+ return layout;
+ }
+
+ /**
+ * Show an error message. Pass in null to clear the error message.
+ *
+ * @param errorMsg the error message
+ * @gwt.SRC
+ */
+ private void showErrorMessage(String errorMsg) {
+ if (errorMsg == null) {
+ formattedBox.removeStyleName("cw-RedText");
+ } else {
+ formattedBox.setText(errorMsg);
+ formattedBox.addStyleName("cw-RedText");
+ }
+ }
+
+ /**
+ * Update the formatted value based on the user entered value and pattern.
+ *
+ * @gwt.SRC
+ */
+ private void updateFormattedValue() {
+ String sValue = valueBox.getText();
+ if (!sValue.equals("")) {
+ try {
+ double value = Double.parseDouble(sValue);
+ String formattedValue = activeFormat.format(value);
+ formattedBox.setText(formattedValue);
+ showErrorMessage(null);
+ } catch (NumberFormatException e) {
+ showErrorMessage(constants.cwNumberFormatFailedToParseInput());
+ }
+ } else {
+ formattedBox.setText("<None>");
+ }
+ }
+
+ /**
+ * Update the selected pattern based on the pattern in the list.
+ *
+ * @gwt.SRC
+ */
+ private void updatePattern() {
+ switch (patternList.getSelectedIndex()) {
+ case 0:
+ activeFormat = NumberFormat.getDecimalFormat();
+ patternBox.setText(activeFormat.getPattern());
+ patternBox.setEnabled(false);
+ break;
+ case 1:
+ activeFormat = NumberFormat.getCurrencyFormat();
+ patternBox.setText(activeFormat.getPattern());
+ patternBox.setEnabled(false);
+ break;
+ case 2:
+ activeFormat = NumberFormat.getScientificFormat();
+ patternBox.setText(activeFormat.getPattern());
+ patternBox.setEnabled(false);
+ break;
+ case 3:
+ activeFormat = NumberFormat.getPercentFormat();
+ patternBox.setText(activeFormat.getPattern());
+ patternBox.setEnabled(false);
+ break;
+ case 4:
+ patternBox.setEnabled(true);
+ String pattern = patternBox.getText();
+ try {
+ activeFormat = NumberFormat.getFormat(pattern);
+ } catch (IllegalArgumentException e) {
+ showErrorMessage(constants.cwNumberFormatInvalidPattern());
+ return;
+ }
+ break;
+ }
+
+ // Update the formatted value
+ updateFormattedValue();
+ }
+}
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/ErrorMessages.java b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/ErrorMessages.java
new file mode 100644
index 0000000..f2260e6
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/ErrorMessages.java
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2008 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.showcase.client.content.i18n;
+
+import com.google.gwt.i18n.client.Messages;
+
+/**
+ * Internationalized messages.
+ * @gwt.RAW
+ */
+public interface ErrorMessages extends Messages {
+ String permissionDenied(String username, String securityClearance,
+ String inaccessibleResource);
+}
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/ErrorMessages.properties b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/ErrorMessages.properties
new file mode 100644
index 0000000..ac1b86d
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/ErrorMessages.properties
@@ -0,0 +1,17 @@
+#
+# Copyright 2008 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.
+#
+# @gwt.RAW
+permissionDenied = User ''{0}'' has security clearance ''{1}'' and cannot access ''{2}''
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/ErrorMessages_ar.properties b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/ErrorMessages_ar.properties
new file mode 100644
index 0000000..272ab57
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/ErrorMessages_ar.properties
@@ -0,0 +1,17 @@
+#
+# Copyright 2008 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.
+#
+# @gwt.RAW
+permissionDenied = مستخدم ''{0}'' لقد التصريح الامني ''{1}'' والذين لا يستطيعون الوصول الى ''{2}''
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/ErrorMessages_fr.properties b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/ErrorMessages_fr.properties
new file mode 100644
index 0000000..82fa2f4
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/ErrorMessages_fr.properties
@@ -0,0 +1,17 @@
+#
+# Copyright 2008 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.
+#
+# @gwt.RAW
+permissionDenied = Utilisateur ''{0}'' a de sécurité ''{1}'' et ne peuvent accéder aux ''{2}''
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/ErrorMessages_zh.properties b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/ErrorMessages_zh.properties
new file mode 100644
index 0000000..d0b2a4c
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/ErrorMessages_zh.properties
@@ -0,0 +1,17 @@
+#
+# Copyright 2008 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.
+#
+# @gwt.RAW
+permissionDenied = 用户''{0}''已安全过关''{1}''并不能获得''{2}''
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/ExampleConstants.java b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/ExampleConstants.java
new file mode 100644
index 0000000..0d6040c
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/ExampleConstants.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2008 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.showcase.client.content.i18n;
+
+import com.google.gwt.i18n.client.Constants;
+
+import java.util.Map;
+
+/**
+ * Internationalized constants used to demonstrate {@link Constants}.
+ * @gwt.RAW
+ */
+public interface ExampleConstants extends Constants {
+ Map<String, String> colorMap();
+
+ String favoriteColor();
+
+ String firstName();
+
+ String lastName();
+}
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/ExampleConstants.properties b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/ExampleConstants.properties
new file mode 100644
index 0000000..ffdafe9
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/ExampleConstants.properties
@@ -0,0 +1,31 @@
+#
+# Copyright 2008 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.
+#
+# @gwt.RAW
+
+firstName = <b>First Name:</b>
+lastName = <b>Last Name:</b>
+favoriteColor = <b>Favorite color:</b>
+
+red = Red
+green = Green
+yellow = Yellow
+blue = Blue
+black = Black
+white = White
+grey = Grey
+lightGrey = Light Grey
+
+colorMap = red, white, yellow, black, blue, green, grey, lightGrey
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/ExampleConstants_ar.properties b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/ExampleConstants_ar.properties
new file mode 100644
index 0000000..cfb33b3
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/ExampleConstants_ar.properties
@@ -0,0 +1,31 @@
+#
+# Copyright 2008 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.
+#
+# @gwt.RAW
+
+firstName = <b>الاسم الأول:</b>
+lastName = <b>الاسم الأخير:</b>
+favoriteColor = <b>اللون المفضل:</b>
+
+red = الاحمر
+green = الخضراء
+yellow = الاصفر
+blue = زرقاء
+black = أسود
+white = أبيض
+grey = الرمادية
+lightGrey = ضوء الرمادية
+
+colorMap = red, white, yellow, black, blue, green, grey, lightGrey
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/ExampleConstants_fr.properties b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/ExampleConstants_fr.properties
new file mode 100644
index 0000000..aedc166
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/ExampleConstants_fr.properties
@@ -0,0 +1,32 @@
+#
+# Copyright 2008 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.
+#
+# @gwt.RAW
+
+
+firstName = <b>Prénom:</b>
+lastName = <b>Nom:</b>
+favoriteColor = <b>Couleur Préférée:</b>
+
+red = Rouge
+green = Vert
+yellow = Jaune
+blue = Bleu
+black = Noir
+white = Blanc
+grey = Gris
+lightGrey = Lumière Gris
+
+colorMap = red, white, yellow, black, blue, green, grey, lightGrey
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/ExampleConstants_zh.properties b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/ExampleConstants_zh.properties
new file mode 100644
index 0000000..adf4e4e
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/ExampleConstants_zh.properties
@@ -0,0 +1,31 @@
+#
+# Copyright 2008 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.
+#
+# @gwt.RAW
+
+firstName = <b>名字:</b>
+lastName = <b>去年名称:</b>
+favoriteColor = <b>最喜爱的颜色:</b>
+
+red =红
+green =绿
+yellow =黄色
+blue =蓝
+black =黑色
+white =白
+grey =灰色
+lightGrey =浅灰色
+
+colorMap = red, white, yellow, black, blue, green, grey, lightGrey
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/lists/CwListBox.java b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/lists/CwListBox.java
new file mode 100644
index 0000000..38aefb5
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/lists/CwListBox.java
@@ -0,0 +1,168 @@
+/*
+ * Copyright 2008 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.showcase.client.content.lists;
+
+import com.google.gwt.i18n.client.Constants;
+import com.google.gwt.sample.showcase.client.ContentWidget;
+import com.google.gwt.user.client.ui.ChangeListener;
+import com.google.gwt.user.client.ui.HTML;
+import com.google.gwt.user.client.ui.HorizontalPanel;
+import com.google.gwt.user.client.ui.ListBox;
+import com.google.gwt.user.client.ui.VerticalPanel;
+import com.google.gwt.user.client.ui.Widget;
+
+/**
+ * Example file.
+ *
+ * @gwt.CSS .gwt-ListBox
+ */
+public class CwListBox extends ContentWidget {
+ /**
+ * The constants used in this Content Widget.
+ *
+ * @gwt.SRC
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String[] cwListBoxCategories();
+
+ String cwListBoxDescription();
+
+ String cwListBoxName();
+
+ String cwListBoxSelectAll();
+
+ String cwListBoxSelectCategory();
+
+ String[] cwListBoxSports();
+
+ String[] cwListBoxVacations();
+ }
+
+ /**
+ * The data for each type of list.
+ *
+ * @gwt.DATA
+ */
+ private static final String[] carTypes = {
+ "Acura", "Audi", "BMW", "Buick", "Chevrolet", "Dodge", "Ford", "Honda",
+ "KIA", "Lexus", "Lincoln", "Mercedes", "Porsche", "Saturn", "Toyota",
+ "Volkswagen", "Volvo"};
+
+ /**
+ * An instance of the constants.
+ *
+ * @gwt.DATA
+ */
+ private CwConstants constants;
+
+ /**
+ * Constructor.
+ *
+ * @param constants the constants
+ */
+ public CwListBox(CwConstants constants) {
+ super(constants);
+ this.constants = constants;
+ }
+
+ @Override
+ public String getDescription() {
+ return constants.cwListBoxDescription();
+ }
+
+ @Override
+ public String getName() {
+ return constants.cwListBoxName();
+ }
+
+ /**
+ * Initialize this example.
+ *
+ * @gwt.SRC
+ */
+ @Override
+ public Widget onInitialize() {
+ // Create a panel to align the Widgets
+ HorizontalPanel hPanel = new HorizontalPanel();
+ hPanel.setSpacing(20);
+
+ // Add a drop box with the list types
+ final ListBox dropBox = new ListBox(false);
+ String[] listTypes = constants.cwListBoxCategories();
+ for (int i = 0; i < listTypes.length; i++) {
+ dropBox.addItem(listTypes[i]);
+ }
+ dropBox.ensureDebugId("cwListBox-dropBox");
+ VerticalPanel dropBoxPanel = new VerticalPanel();
+ dropBoxPanel.setSpacing(4);
+ dropBoxPanel.add(new HTML(constants.cwListBoxSelectCategory()));
+ dropBoxPanel.add(dropBox);
+ hPanel.add(dropBoxPanel);
+
+ // Add a list box with multiple selection enabled
+ final ListBox multiBox = new ListBox(true);
+ multiBox.ensureDebugId("cwListBox-multiBox");
+ multiBox.setWidth("11em");
+ multiBox.setVisibleItemCount(10);
+ VerticalPanel multiBoxPanel = new VerticalPanel();
+ multiBoxPanel.setSpacing(4);
+ multiBoxPanel.add(new HTML(constants.cwListBoxSelectAll()));
+ multiBoxPanel.add(multiBox);
+ hPanel.add(multiBoxPanel);
+
+ // Add a listener to handle drop box events
+ dropBox.addChangeListener(new ChangeListener() {
+ public void onChange(Widget sender) {
+ showCategory(multiBox, dropBox.getSelectedIndex());
+ multiBox.ensureDebugId("cwListBox-multiBox");
+ }
+ });
+
+ // Show default category
+ showCategory(multiBox, 0);
+ multiBox.ensureDebugId("cwListBox-multiBox");
+
+ // Return the panel
+ return hPanel;
+ }
+
+ /**
+ * Display the options for a given category in the list box.
+ *
+ * @param listBox the ListBox to add the options to
+ * @param category the category index
+ * @gwt.SRC
+ */
+ private void showCategory(ListBox listBox, int category) {
+ listBox.clear();
+ String[] listData = null;
+ switch (category) {
+ case 0:
+ listData = carTypes;
+ break;
+ case 1:
+ listData = constants.cwListBoxSports();
+ break;
+ case 2:
+ listData = constants.cwListBoxVacations();
+ break;
+ }
+ for (int i = 0; i < listData.length; i++) {
+ listBox.addItem(listData[i]);
+ }
+ }
+}
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/lists/CwMenuBar.java b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/lists/CwMenuBar.java
new file mode 100644
index 0000000..2544f50
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/lists/CwMenuBar.java
@@ -0,0 +1,165 @@
+/*
+ * Copyright 2008 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.showcase.client.content.lists;
+
+import com.google.gwt.i18n.client.Constants;
+import com.google.gwt.sample.showcase.client.ContentWidget;
+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;
+import com.google.gwt.user.client.ui.Widget;
+
+/**
+ * Example file.
+ *
+ * @gwt.CSS .gwt-MenuBar
+ * @gwt.CSS .gwt-MenuBarPopup
+ * @gwt.CSS html>body .gwt-MenuBarPopup
+ * @gwt.CSS * html .gwt-MenuBarPopup
+ */
+public class CwMenuBar extends ContentWidget {
+ /**
+ * The constants used in this Content Widget.
+ *
+ * @gwt.SRC
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String cwMenuBarDescription();
+
+ String cwMenuBarEditCategory();
+
+ String[] cwMenuBarEditOptions();
+
+ String cwMenuBarFileCategory();
+
+ String[] cwMenuBarFileOptions();
+
+ String[] cwMenuBarFileRecents();
+
+ String[] cwMenuBarGWTOptions();
+
+ String cwMenuBarHelpCategory();
+
+ String[] cwMenuBarHelpOptions();
+
+ String cwMenuBarName();
+
+ String[] cwMenuBarPrompts();
+ }
+
+ /**
+ * An instance of the constants.
+ *
+ * @gwt.DATA
+ */
+ private CwConstants constants;
+
+ /**
+ * Constructor.
+ *
+ * @param constants the constants
+ */
+ public CwMenuBar(CwConstants constants) {
+ super(constants);
+ this.constants = constants;
+ }
+
+ @Override
+ public String getDescription() {
+ return constants.cwMenuBarDescription();
+ }
+
+ @Override
+ public String getName() {
+ return constants.cwMenuBarName();
+ }
+
+ /**
+ * Initialize this example.
+ *
+ * @gwt.SRC
+ */
+ @Override
+ public Widget onInitialize() {
+ // Create a command that will execute on menu item selection
+ Command menuCommand = new Command() {
+ private int curPhrase = 0;
+ private final String[] phrases = constants.cwMenuBarPrompts();
+
+ public void execute() {
+ Window.alert(phrases[curPhrase]);
+ curPhrase = (curPhrase + 1) % phrases.length;
+ }
+ };
+
+ // Create a menu bar
+ MenuBar menu = new MenuBar();
+ menu.setAutoOpen(true);
+ menu.setWidth("500px");
+
+ // Create a sub menu of recent documents
+ MenuBar recentDocsMenu = new MenuBar(true);
+ String[] recentDocs = constants.cwMenuBarFileRecents();
+ for (int i = 0; i < recentDocs.length; i++) {
+ recentDocsMenu.addItem(recentDocs[i], menuCommand);
+ }
+
+ // Create the file menu
+ MenuBar fileMenu = new MenuBar(true);
+ menu.addItem(new MenuItem(constants.cwMenuBarFileCategory(), fileMenu));
+ String[] fileOptions = constants.cwMenuBarFileOptions();
+ for (int i = 0; i < fileOptions.length; i++) {
+ if (i == 3) {
+ fileMenu.addSeparator();
+ fileMenu.addItem(fileOptions[i], recentDocsMenu);
+ fileMenu.addSeparator();
+ } else {
+ fileMenu.addItem(fileOptions[i], menuCommand);
+ }
+ }
+
+ // Create the edit menu
+ MenuBar editMenu = new MenuBar(true);
+ menu.addItem(new MenuItem(constants.cwMenuBarEditCategory(), editMenu));
+ String[] editOptions = constants.cwMenuBarEditOptions();
+ for (int i = 0; i < editOptions.length; i++) {
+ editMenu.addItem(editOptions[i], menuCommand);
+ }
+
+ // Create the GWT menu
+ MenuBar gwtMenu = new MenuBar(true);
+ menu.addItem(new MenuItem("GWT", true, gwtMenu));
+ String[] gwtOptions = constants.cwMenuBarGWTOptions();
+ for (int i = 0; i < gwtOptions.length; i++) {
+ gwtMenu.addItem(gwtOptions[i], menuCommand);
+ }
+
+ // Create the help menu
+ MenuBar helpMenu = new MenuBar(true);
+ menu.addSeparator();
+ menu.addItem(new MenuItem(constants.cwMenuBarHelpCategory(), helpMenu));
+ String[] helpOptions = constants.cwMenuBarHelpOptions();
+ for (int i = 0; i < helpOptions.length; i++) {
+ helpMenu.addItem(helpOptions[i], menuCommand);
+ }
+
+ // Return the menu
+ menu.ensureDebugId("cwMenuBar");
+ return menu;
+ }
+}
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/lists/CwStackPanel.java b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/lists/CwStackPanel.java
new file mode 100644
index 0000000..7f8d70c
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/lists/CwStackPanel.java
@@ -0,0 +1,209 @@
+/*
+ * Copyright 2008 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.showcase.client.content.lists;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.i18n.client.Constants;
+import com.google.gwt.sample.showcase.client.ContentWidget;
+import com.google.gwt.user.client.ui.AbstractImagePrototype;
+import com.google.gwt.user.client.ui.CheckBox;
+import com.google.gwt.user.client.ui.HTML;
+import com.google.gwt.user.client.ui.HasVerticalAlignment;
+import com.google.gwt.user.client.ui.HorizontalPanel;
+import com.google.gwt.user.client.ui.StackPanel;
+import com.google.gwt.user.client.ui.Tree;
+import com.google.gwt.user.client.ui.TreeImages;
+import com.google.gwt.user.client.ui.TreeItem;
+import com.google.gwt.user.client.ui.VerticalPanel;
+import com.google.gwt.user.client.ui.Widget;
+
+/**
+ * Example file.
+ *
+ * @gwt.CSS .gwt-StackPanel
+ * @gwt.CSS .gwt-StackPanelItem
+ * @gwt.CSS html>body .gwt-StackPanelItem
+ * @gwt.CSS * html .gwt-StackPanelItem
+ * @gwt.CSS .cw-StackPanelHeader
+ */
+public class CwStackPanel extends ContentWidget {
+ /**
+ * The constants used in this Content Widget.
+ *
+ * @gwt.SRC
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String[] cwStackPanelContacts();
+
+ String cwStackPanelContactsHeader();
+
+ String cwStackPanelDescription();
+
+ String[] cwStackPanelFilters();
+
+ String cwStackPanelFiltersHeader();
+
+ String[] cwStackPanelMailFolders();
+
+ String cwStackPanelMailHeader();
+
+ String cwStackPanelName();
+ }
+
+ /**
+ * Specifies the images that will be bundled for this example.
+ *
+ * We will override the leaf image used in the tree. Instead of using a blank
+ * 16x16 image, we will use a blank 1x1 image so it does not take up any
+ * space. Each TreeItem will use its own custom image.
+ *
+ * @gwt.SRC
+ */
+ public interface Images extends TreeImages {
+ AbstractImagePrototype contactsgroup();
+
+ AbstractImagePrototype drafts();
+
+ AbstractImagePrototype filtersgroup();
+
+ AbstractImagePrototype inbox();
+
+ AbstractImagePrototype mailgroup();
+
+ AbstractImagePrototype sent();
+
+ AbstractImagePrototype templates();
+
+ AbstractImagePrototype trash();
+
+ /**
+ * Use noimage.png, which is a blank 1x1 image.
+ *
+ * @gwt.resource noimage.png
+ */
+ AbstractImagePrototype treeLeaf();
+ }
+
+ /**
+ * An instance of the constants.
+ *
+ * @gwt.DATA
+ */
+ private CwConstants constants;
+
+ /**
+ * Constructor.
+ *
+ * @param constants the constants
+ */
+ public CwStackPanel(CwConstants constants) {
+ super(constants);
+ this.constants = constants;
+ }
+
+ @Override
+ public String getDescription() {
+ return constants.cwStackPanelDescription();
+ }
+
+ @Override
+ public String getName() {
+ return constants.cwStackPanelName();
+ }
+
+ @Override
+ public boolean hasStyle() {
+ return true;
+ }
+
+ /**
+ * Initialize this example.
+ *
+ * @gwt.SRC
+ */
+ @Override
+ public Widget onInitialize() {
+ // Get the images
+ Images images = (Images) GWT.create(Images.class);
+
+ // Create a new stack panel
+ StackPanel stackPanel = new StackPanel();
+ stackPanel.setWidth("200px");
+
+ // Add links to Mail folders
+ Tree mailPanel = new Tree(images);
+ TreeItem mailPanelRoot = mailPanel.addItem("foo@example.com");
+ String[] mailFolders = constants.cwStackPanelMailFolders();
+ mailPanelRoot.addItem(images.inbox().getHTML() + " " + mailFolders[0]);
+ mailPanelRoot.addItem(images.drafts().getHTML() + " " + mailFolders[1]);
+ mailPanelRoot.addItem(images.templates().getHTML() + " " + mailFolders[2]);
+ mailPanelRoot.addItem(images.sent().getHTML() + " " + mailFolders[3]);
+ mailPanelRoot.addItem(images.trash().getHTML() + " " + mailFolders[4]);
+ mailPanelRoot.setState(true);
+ String mailHeader = getHeaderString(constants.cwStackPanelMailHeader(),
+ images.mailgroup());
+ stackPanel.add(mailPanel, mailHeader, true);
+
+ // Add a list of filters
+ VerticalPanel filtersPanel = new VerticalPanel();
+ filtersPanel.setSpacing(4);
+ for (String filter : constants.cwStackPanelFilters()) {
+ filtersPanel.add(new CheckBox(filter));
+ }
+ String filtersHeader = getHeaderString(
+ constants.cwStackPanelFiltersHeader(), images.filtersgroup());
+ stackPanel.add(filtersPanel, filtersHeader, true);
+
+ // Add links to each contact
+ VerticalPanel contactsPanel = new VerticalPanel();
+ contactsPanel.setSpacing(4);
+ for (String contact : constants.cwStackPanelContacts()) {
+ contactsPanel.add(new HTML("<a href=\"javascript:void;\">" + contact
+ + "</a>"));
+ }
+ String contactsHeader = getHeaderString(
+ constants.cwStackPanelContactsHeader(), images.contactsgroup());
+ stackPanel.add(contactsPanel, contactsHeader, true);
+
+ // Return the stack panel
+ stackPanel.ensureDebugId("cwStackPanel");
+ return stackPanel;
+ }
+
+ /**
+ * Get a string representation of the header that includes an image and some
+ * text.
+ *
+ * @param text the header text
+ * @param image the {@link AbstractImagePrototype} to add next to the header
+ * @return the header as a string
+ * @gwt.SRC
+ */
+ private String getHeaderString(String text, AbstractImagePrototype image) {
+ // Add the image and text to a horizontal panel
+ HorizontalPanel hPanel = new HorizontalPanel();
+ hPanel.setSpacing(0);
+ hPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
+ hPanel.add(image.createImage());
+ HTML headerText = new HTML(text);
+ headerText.setStyleName("cw-StackPanelHeader");
+ hPanel.add(headerText);
+
+ // Return the HTML string for the panel
+ return hPanel.toString();
+ }
+}
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/lists/CwSuggestBox.java b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/lists/CwSuggestBox.java
new file mode 100644
index 0000000..841f330
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/lists/CwSuggestBox.java
@@ -0,0 +1,102 @@
+/*
+ * Copyright 2008 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.showcase.client.content.lists;
+
+import com.google.gwt.i18n.client.Constants;
+import com.google.gwt.sample.showcase.client.ContentWidget;
+import com.google.gwt.user.client.ui.HTML;
+import com.google.gwt.user.client.ui.MultiWordSuggestOracle;
+import com.google.gwt.user.client.ui.SuggestBox;
+import com.google.gwt.user.client.ui.VerticalPanel;
+import com.google.gwt.user.client.ui.Widget;
+
+/**
+ * Example file.
+ *
+ * @gwt.CSS .gwt-SuggestBox
+ * @gwt.CSS .gwt-SuggestBoxPopup
+ * @gwt.CSS html>body .gwt-SuggestBoxPopup
+ * @gwt.CSS * html .gwt-SuggestBoxPopup
+ */
+public class CwSuggestBox extends ContentWidget {
+ /**
+ * The constants used in this Content Widget.
+ *
+ * @gwt.SRC
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String cwSuggestBoxDescription();
+
+ String cwSuggestBoxLabel();
+
+ String cwSuggestBoxName();
+
+ String[] cwSuggestBoxWords();
+ }
+
+ /**
+ * An instance of the constants.
+ *
+ * @gwt.DATA
+ */
+ private CwConstants constants;
+
+ /**
+ * Constructor.
+ *
+ * @param constants the constants
+ */
+ public CwSuggestBox(CwConstants constants) {
+ super(constants);
+ this.constants = constants;
+ }
+
+ @Override
+ public String getDescription() {
+ return constants.cwSuggestBoxDescription();
+ }
+
+ @Override
+ public String getName() {
+ return constants.cwSuggestBoxName();
+ }
+
+ /**
+ * Initialize this example.
+ *
+ * @gwt.SRC
+ */
+ @Override
+ public Widget onInitialize() {
+ // Define the oracle that finds suggestions
+ MultiWordSuggestOracle oracle = new MultiWordSuggestOracle();
+ String[] words = constants.cwSuggestBoxWords();
+ for (int i = 0; i < words.length; ++i) {
+ oracle.add(words[i]);
+ }
+
+ // Create the suggest box
+ final SuggestBox suggestBox = new SuggestBox(oracle);
+ suggestBox.ensureDebugId("cwSuggestBox");
+ VerticalPanel suggestPanel = new VerticalPanel();
+ suggestPanel.add(new HTML(constants.cwSuggestBoxLabel()));
+ suggestPanel.add(suggestBox);
+
+ // Return the panel
+ return suggestPanel;
+ }
+}
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/lists/CwTree.java b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/lists/CwTree.java
new file mode 100644
index 0000000..a9987de
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/lists/CwTree.java
@@ -0,0 +1,244 @@
+/*
+ * Copyright 2008 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.showcase.client.content.lists;
+
+import com.google.gwt.i18n.client.Constants;
+import com.google.gwt.sample.showcase.client.ContentWidget;
+import com.google.gwt.user.client.Random;
+import com.google.gwt.user.client.ui.DecoratorPanel;
+import com.google.gwt.user.client.ui.Grid;
+import com.google.gwt.user.client.ui.HasVerticalAlignment;
+import com.google.gwt.user.client.ui.ScrollPanel;
+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.Widget;
+
+/**
+ * Example file.
+ *
+ * @gwt.CSS .gwt-Tree
+ */
+public class CwTree extends ContentWidget {
+ /**
+ * The constants used in this Content Widget.
+ *
+ * @gwt.SRC
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String cwTreeDescription();
+
+ String cwTreeDynamicLabel();
+
+ String cwTreeItem();
+
+ String cwTreeName();
+
+ String cwTreeStaticLabel();
+ }
+
+ /**
+ * An instance of the constants.
+ *
+ * @gwt.DATA
+ */
+ private CwConstants constants;
+
+ /**
+ * Constructor.
+ *
+ * @param constants the constants
+ */
+ public CwTree(CwConstants constants) {
+ super(constants);
+ this.constants = constants;
+ }
+
+ @Override
+ public String getDescription() {
+ return constants.cwTreeDescription();
+ }
+
+ @Override
+ public String getName() {
+ return constants.cwTreeName();
+ }
+
+ /**
+ * Initialize this example.
+ *
+ * @gwt.SRC
+ */
+ @Override
+ public Widget onInitialize() {
+ // Create a static tree and a container to hold it
+ Tree staticTree = createStaticTree();
+ staticTree.ensureDebugId("cwTree-staticTree");
+ ScrollPanel staticTreeWrapper = new ScrollPanel(staticTree);
+ staticTreeWrapper.ensureDebugId("cwTree-staticTree-Wrapper");
+ staticTreeWrapper.setSize("300px", "300px");
+
+ // Wrap the static tree in a DecoratorPanel
+ DecoratorPanel staticDecorator = new DecoratorPanel();
+ staticDecorator.setWidget(staticTreeWrapper);
+
+ // Create a dynamically generated tree and a container to hold it
+ final Tree dynamicTree = createDynamicTree();
+ dynamicTree.ensureDebugId("cwTree-dynamicTree");
+ ScrollPanel dynamicTreeWrapper = new ScrollPanel(dynamicTree);
+ dynamicTreeWrapper.ensureDebugId("cwTree-dynamicTree-Wrapper");
+ dynamicTreeWrapper.setSize("300px", "300px");
+
+ // Wrap the dynamic tree in a DecoratorPanel
+ DecoratorPanel dynamicDecorator = new DecoratorPanel();
+ dynamicDecorator.setWidget(dynamicTreeWrapper);
+
+ // Combine trees onto the page
+ Grid grid = new Grid(2, 3);
+ grid.setCellPadding(2);
+ grid.getRowFormatter().setVerticalAlign(1, HasVerticalAlignment.ALIGN_TOP);
+ grid.setHTML(0, 0, constants.cwTreeStaticLabel());
+ grid.setHTML(0, 1, " ");
+ grid.setHTML(0, 2, constants.cwTreeDynamicLabel());
+ grid.setWidget(1, 0, staticDecorator);
+ grid.setHTML(1, 1, " ");
+ grid.setWidget(1, 2, dynamicDecorator);
+
+ // Wrap the trees in DecoratorPanels
+ return grid;
+ }
+
+ /**
+ * Create a dynamic tree that will add a random number of children to each
+ * node as it is clicked.
+ *
+ * @return the new tree
+ * @gwt.SRC
+ */
+ private Tree createDynamicTree() {
+ // Create a new tree
+ Tree dynamicTree = new Tree();
+
+ // Add some default tree items
+ for (int i = 0; i < 5; i++) {
+ TreeItem item = dynamicTree.addItem(constants.cwTreeItem() + " " + i);
+
+ // Temporarily add an item so we can expand this node
+ item.addItem("");
+ }
+
+ // Add a listener that automatically generates some children
+ dynamicTree.addTreeListener(new TreeListener() {
+ public void onTreeItemSelected(TreeItem item) {
+ }
+
+ public void onTreeItemStateChanged(TreeItem item) {
+ if (item.getState() && item.getChildCount() == 1) {
+ // Close the item immediately
+ item.setState(false, false);
+
+ // Add a random number of children to the item
+ String itemText = item.getText();
+ int numChildren = Random.nextInt(5) + 2;
+ for (int i = 0; i < numChildren; i++) {
+ TreeItem child = item.addItem(itemText + "." + i);
+ child.addItem("");
+ }
+
+ // Remove the temporary item when we finish loading
+ item.getChild(0).remove();
+
+ // Reopen the item
+ item.setState(true, false);
+ }
+ }
+ });
+
+ // Return the tree
+ return dynamicTree;
+ }
+
+ /**
+ * Create a static tree with some data in it.
+ *
+ * @return the new tree
+ * @gwt.SRC
+ */
+ private Tree createStaticTree() {
+ // Create the tree
+ Tree staticTree = new Tree();
+
+ // Add some of Beethoven's music
+ TreeItem c1 = staticTree.addItem("Beethoven");
+ TreeItem c1g1 = c1.addItem("Concertos");
+ c1g1.addItem("No. 1 - C");
+ c1g1.addItem("No. 2 - B-Flat Major");
+ c1g1.addItem("No. 3 - C Minor");
+ c1g1.addItem("No. 4 - G Major");
+ c1g1.addItem("No. 5 - E-Flat Major");
+ TreeItem c1g2 = c1.addItem("Quartets");
+ c1g2.addItem("Six String Quartets");
+ c1g2.addItem("Three String Quartets");
+ c1g2.addItem("Grosse Fugue for String Quartets");
+ TreeItem c1g3 = c1.addItem("Sonatas");
+ c1g3.addItem("Sonata in A Minor");
+ c1g3.addItem("Sonata in F Major");
+ TreeItem c1g4 = c1.addItem("Symphonies");
+ c1g4.addItem("No. 2 - D Major");
+ c1g4.addItem("No. 2 - D Major");
+ c1g4.addItem("No. 3 - E-Flat Major");
+ c1g4.addItem("No. 4 - B-Flat Major");
+ c1g4.addItem("No. 5 - C Minor");
+ c1g4.addItem("No. 6 - F Major");
+ c1g4.addItem("No. 7 - A Major");
+ c1g4.addItem("No. 8 - F Major");
+ c1g4.addItem("No. 9 - D Minor");
+
+ // Add some of Brahms's music
+ TreeItem c2 = staticTree.addItem("Brahms");
+ TreeItem c2g1 = c2.addItem("Concertos");
+ c2g1.addItem("Violin Concerto");
+ c2g1.addItem("Double Concerto - A Minor");
+ c2g1.addItem("Piano Concerto No. 1 - D Minor");
+ c2g1.addItem("Piano Concerto No. 2 - B-Flat Major");
+ TreeItem c2g2 = c2.addItem("Quartets");
+ c2g2.addItem("Piano Quartet No. 1 - G Minor");
+ c2g2.addItem("Piano Quartet No. 2 - A Major");
+ c2g2.addItem("Piano Quartet No. 3 - C Minor");
+ c2g2.addItem("String Quartet No. 3 - B-Flat Minor");
+ TreeItem c2g3 = c2.addItem("Sonatas");
+ c2g3.addItem("Two Sonatas for Clarinet - F Minor");
+ c2g3.addItem("Two Sonatas for Clarinet - E-Flat Major");
+ TreeItem c2g4 = c2.addItem("Symphonies");
+ c2g4.addItem("No. 1 - C Minor");
+ c2g4.addItem("No. 2 - D Minor");
+ c2g4.addItem("No. 3 - F Major");
+ c2g4.addItem("No. 4 - E Minor");
+
+ // Add some of Mozart's music
+ TreeItem c3 = staticTree.addItem("Mozart");
+ TreeItem c3g1 = c3.addItem("Concertos");
+ c3g1.addItem("Piano Concerto No. 12");
+ c3g1.addItem("Piano Concerto No. 17");
+ c3g1.addItem("Clarinet Concerto");
+ c3g1.addItem("Violin Concerto No. 5");
+ c3g1.addItem("Violin Concerto No. 4");
+
+ // Return the tree
+ return staticTree;
+ }
+}
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/lists/bundle.png b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/lists/bundle.png
new file mode 100644
index 0000000..376adfc
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/lists/bundle.png
Binary files differ
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/lists/contactsgroup.gif b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/lists/contactsgroup.gif
new file mode 100644
index 0000000..d4f9720
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/lists/contactsgroup.gif
Binary files differ
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/lists/drafts.gif b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/lists/drafts.gif
new file mode 100644
index 0000000..59ac3be
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/lists/drafts.gif
Binary files differ
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/lists/filtersgroup.gif b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/lists/filtersgroup.gif
new file mode 100644
index 0000000..488e65a
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/lists/filtersgroup.gif
Binary files differ
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/lists/inbox.gif b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/lists/inbox.gif
new file mode 100644
index 0000000..d8c83b7
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/lists/inbox.gif
Binary files differ
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/lists/mailgroup.gif b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/lists/mailgroup.gif
new file mode 100644
index 0000000..e040bf8
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/lists/mailgroup.gif
Binary files differ
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/lists/noimage.png b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/lists/noimage.png
new file mode 100644
index 0000000..d125de3
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/lists/noimage.png
Binary files differ
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/lists/sent.gif b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/lists/sent.gif
new file mode 100644
index 0000000..c5cb72a
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/lists/sent.gif
Binary files differ
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/lists/templates.gif b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/lists/templates.gif
new file mode 100644
index 0000000..2fdad7a
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/lists/templates.gif
Binary files differ
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/lists/trash.gif b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/lists/trash.gif
new file mode 100644
index 0000000..82c4585
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/lists/trash.gif
Binary files differ
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/other/CwAnimation.java b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/other/CwAnimation.java
new file mode 100644
index 0000000..eef9c79
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/other/CwAnimation.java
@@ -0,0 +1,285 @@
+/*
+ * Copyright 2008 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.showcase.client.content.other;
+
+import com.google.gwt.i18n.client.Constants;
+import com.google.gwt.sample.showcase.client.ContentWidget;
+import com.google.gwt.sample.showcase.client.Showcase;
+import com.google.gwt.user.client.animation.Animation;
+import com.google.gwt.user.client.ui.AbsolutePanel;
+import com.google.gwt.user.client.ui.Button;
+import com.google.gwt.user.client.ui.ClickListener;
+import com.google.gwt.user.client.ui.DecoratorPanel;
+import com.google.gwt.user.client.ui.HTML;
+import com.google.gwt.user.client.ui.HasHorizontalAlignment;
+import com.google.gwt.user.client.ui.HorizontalPanel;
+import com.google.gwt.user.client.ui.VerticalPanel;
+import com.google.gwt.user.client.ui.Widget;
+
+/**
+ * Example file.
+ */
+public class CwAnimation extends ContentWidget {
+ /**
+ * The constants used in this Content Widget.
+ *
+ * @gwt.SRC
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String cwAnimationDescription();
+
+ String cwAnimationName();
+ }
+
+ /**
+ * A custom animation that moves a small image around a circle in an
+ * {@link AbsolutePanel}.
+ *
+ * @gwt.SRC
+ */
+ public class CustomAnimation extends Animation {
+ /**
+ * The x-coordinate of the center of the circle.
+ */
+ private int centerX = 120;
+
+ /**
+ * The y-coordinate of the center of the circle.
+ */
+ private int centerY = 120;
+
+ /**
+ * The radius of the circle.
+ */
+ private int radius = 100;
+
+ @Override
+ public void onCancel() {
+ onComplete();
+ }
+
+ @Override
+ public void onComplete() {
+ onUpdate(1.0);
+ startButton.setEnabled(true);
+ cancelButton.setEnabled(false);
+ }
+
+ @Override
+ public void onStart() {
+ onUpdate(1.0);
+ startButton.setEnabled(false);
+ cancelButton.setEnabled(true);
+ }
+
+ @Override
+ public void onUpdate(double progress) {
+ double radian = 2 * Math.PI * progress;
+ updatePosition(animateeLeft, radian, 0);
+ updatePosition(animateeBottom, radian, 0.5 * Math.PI);
+ updatePosition(animateeRight, radian, Math.PI);
+ updatePosition(animateeTop, radian, 1.5 * Math.PI);
+ }
+
+ /**
+ * Update the position of the widget, adding a rotational offset.
+ *
+ * @param w the widget to move
+ * @param radian the progress in radian
+ * @param offset the offset in radian
+ */
+ private void updatePosition(Widget w, double radian, double offset) {
+ radian += offset;
+ double x = radius * Math.cos(radian) + centerX;
+ double y = radius * Math.sin(radian) + centerY;
+ absolutePanel.setWidgetPosition(w, (int) x, (int) y);
+ }
+ }
+
+ /**
+ * The absolute panel used in the example.
+ *
+ * @gwt.DATA
+ */
+ private AbsolutePanel absolutePanel = null;
+
+ /**
+ * The widget that is being animated.
+ *
+ * @gwt.DATA
+ */
+ private Widget animateeBottom = null;
+
+ /**
+ * The widget that is being animated.
+ *
+ * @gwt.DATA
+ */
+ private Widget animateeLeft = null;
+
+ /**
+ * The widget that is being animated.
+ *
+ * @gwt.DATA
+ */
+ private Widget animateeRight = null;
+
+ /**
+ * The widget that is being animated.
+ *
+ * @gwt.DATA
+ */
+ private Widget animateeTop = null;
+
+ /**
+ * The instance of an animation.
+ *
+ * @gwt.DATA
+ */
+ private CustomAnimation animation = null;
+
+ /**
+ * The {@link Button} used to cancel the {@link Animation}.
+ *
+ * @gwt.DATA
+ */
+ private Button cancelButton = null;
+
+ /**
+ * An instance of the constants.
+ *
+ * @gwt.DATA
+ */
+ private CwConstants constants;
+
+ /**
+ * The {@link Button} used to start the {@link Animation}.
+ *
+ * @gwt.DATA
+ */
+ private Button startButton = null;
+
+ /**
+ * Constructor.
+ *
+ * @param constants the constants
+ */
+ public CwAnimation(CwConstants constants) {
+ super(constants);
+ this.constants = constants;
+ }
+
+ @Override
+ public String getDescription() {
+ return constants.cwAnimationDescription();
+ }
+
+ @Override
+ public String getName() {
+ return constants.cwAnimationName();
+ }
+
+ @Override
+ public boolean hasStyle() {
+ return false;
+ }
+
+ /**
+ * Initialize this example.
+ *
+ * @gwt.SRC
+ */
+ @Override
+ public Widget onInitialize() {
+ // Create a new panel
+ absolutePanel = new AbsolutePanel();
+ absolutePanel.setSize("250px", "250px");
+ absolutePanel.ensureDebugId("cwAbsolutePanel");
+
+ // Add a widget that we will animate
+ animateeTop = Showcase.images.gwtLogoThumb().createImage();
+ animateeBottom = Showcase.images.gwtLogoThumb().createImage();
+ animateeLeft = Showcase.images.gwtLogoThumb().createImage();
+ animateeRight = Showcase.images.gwtLogoThumb().createImage();
+ absolutePanel.add(animateeTop);
+ absolutePanel.add(animateeBottom);
+ absolutePanel.add(animateeLeft);
+ absolutePanel.add(animateeRight);
+
+ // Wrap the absolute panel in a DecoratorPanel
+ DecoratorPanel absolutePanelWrapper = new DecoratorPanel();
+ absolutePanelWrapper.setWidget(absolutePanel);
+
+ // Create the options bar
+ DecoratorPanel optionsWrapper = new DecoratorPanel();
+ optionsWrapper.setWidget(createOptionsBar());
+
+ // Add the components to a panel and return it
+ HorizontalPanel mainLayout = new HorizontalPanel();
+ mainLayout.setSpacing(10);
+ mainLayout.add(optionsWrapper);
+ mainLayout.add(absolutePanelWrapper);
+
+ // Create the custom animation
+ animation = new CustomAnimation();
+
+ // Set the start position of the widgets
+ animation.onComplete();
+
+ // Return the layout
+ return mainLayout;
+ }
+
+ /**
+ * Create an options panel that allows users to select a widget and reposition
+ * it.
+ *
+ * @return the new options panel
+ * @GWT.SRC
+ */
+ private Widget createOptionsBar() {
+ // Create a panel to move components around
+ VerticalPanel optionsBar = new VerticalPanel();
+ optionsBar.setSpacing(5);
+ optionsBar.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
+
+ // Add a title
+ optionsBar.add(new HTML("<b>Animation Options</b>"));
+
+ // Add start button
+ startButton = new Button("Start");
+ startButton.addClickListener(new ClickListener() {
+ public void onClick(Widget sender) {
+ animation.run(2000);
+ }
+ });
+ optionsBar.add(startButton);
+
+ // Add cancel button
+ cancelButton = new Button("Cancel");
+ cancelButton.addClickListener(new ClickListener() {
+ public void onClick(Widget sender) {
+ animation.cancel();
+ }
+ });
+ optionsBar.add(cancelButton);
+
+ // Return the options bar
+ return optionsBar;
+ }
+
+}
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/other/CwCookies.java b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/other/CwCookies.java
new file mode 100644
index 0000000..fbd4bdc
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/other/CwCookies.java
@@ -0,0 +1,250 @@
+/*
+ * Copyright 2008 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.showcase.client.content.other;
+
+import com.google.gwt.i18n.client.Constants;
+import com.google.gwt.sample.showcase.client.ContentWidget;
+import com.google.gwt.user.client.Command;
+import com.google.gwt.user.client.Cookies;
+import com.google.gwt.user.client.DeferredCommand;
+import com.google.gwt.user.client.Window;
+import com.google.gwt.user.client.ui.Button;
+import com.google.gwt.user.client.ui.ChangeListener;
+import com.google.gwt.user.client.ui.ClickListener;
+import com.google.gwt.user.client.ui.Grid;
+import com.google.gwt.user.client.ui.ListBox;
+import com.google.gwt.user.client.ui.TextBox;
+import com.google.gwt.user.client.ui.Widget;
+
+import java.util.Collection;
+import java.util.Date;
+
+/**
+ * Example file.
+ */
+public class CwCookies extends ContentWidget {
+ /**
+ * The constants used in this Content Widget.
+ *
+ * @gwt.SRC
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String cwCookiesDeleteCookie();
+
+ String cwCookiesDescription();
+
+ String cwCookiesExistingLabel();
+
+ String cwCookiesInvalidCookie();
+
+ String cwCookiesName();
+
+ String cwCookiesNameLabel();
+
+ String cwCookiesSetCookie();
+
+ String cwCookiesValueLabel();
+ }
+
+ /**
+ * The timeout before a cookie expires, in milliseconds. Current one year.
+ *
+ * @gwt.DATA
+ */
+ private static final int COOKIE_TIMOUT = 1000 * 60 * 60 * 24 * 365;
+
+ /**
+ * An instance of the constants.
+ *
+ * @gwt.DATA
+ */
+ private CwConstants constants;
+
+ /**
+ * A {@link TextBox} that holds the name of the cookie.
+ *
+ * @gwt.DATA
+ */
+ private TextBox cookieNameBox = null;
+
+ /**
+ * A {@link TextBox} that holds the value of the cookie.
+ *
+ * @gwt.DATA
+ */
+ private TextBox cookieValueBox = null;
+
+ /**
+ * The {@link ListBox} containing existing cookies.
+ *
+ * @gwt.DATA
+ */
+ private ListBox existingCookiesBox = null;
+
+ /**
+ * Constructor.
+ *
+ * @param constants the constants
+ */
+ public CwCookies(CwConstants constants) {
+ super(constants);
+ this.constants = constants;
+ }
+
+ @Override
+ public String getDescription() {
+ return constants.cwCookiesDescription();
+ }
+
+ @Override
+ public String getName() {
+ return constants.cwCookiesName();
+ }
+
+ @Override
+ public boolean hasStyle() {
+ return false;
+ }
+
+ /**
+ * Initialize this example.
+ *
+ * @gwt.SRC
+ */
+ @Override
+ public Widget onInitialize() {
+ // Create the panel used to layout the content
+ Grid mainLayout = new Grid(3, 3);
+
+ // Display the existing cookies
+ existingCookiesBox = new ListBox();
+ Button deleteCookieButton = new Button(constants.cwCookiesDeleteCookie());
+ mainLayout.setHTML(0, 0, "<b>" + constants.cwCookiesExistingLabel()
+ + "</b>");
+ mainLayout.setWidget(0, 1, existingCookiesBox);
+ mainLayout.setWidget(0, 2, deleteCookieButton);
+
+ // Display the name of the cookie
+ cookieNameBox = new TextBox();
+ mainLayout.setHTML(1, 0, "<b>" + constants.cwCookiesNameLabel() + "</b>");
+ mainLayout.setWidget(1, 1, cookieNameBox);
+
+ // Display the name of the cookie
+ cookieValueBox = new TextBox();
+ Button setCookieButton = new Button(constants.cwCookiesSetCookie());
+ mainLayout.setHTML(2, 0, "<b>" + constants.cwCookiesValueLabel() + "</b>");
+ mainLayout.setWidget(2, 1, cookieValueBox);
+ mainLayout.setWidget(2, 2, setCookieButton);
+
+ // Add a listener to set the cookie value
+ setCookieButton.addClickListener(new ClickListener() {
+ public void onClick(Widget sender) {
+ String name = cookieNameBox.getText();
+ String value = cookieValueBox.getText();
+ Date expires = new Date((new Date()).getTime() + COOKIE_TIMOUT);
+
+ // Verify the name is valid
+ if (name.length() < 1) {
+ Window.alert(constants.cwCookiesInvalidCookie());
+ return;
+ }
+
+ // Set the cookie value
+ Cookies.setCookie(name, value, expires);
+ refreshExistingCookies(name);
+ }
+ });
+
+ // Add a listener to select an existing cookie
+ existingCookiesBox.addChangeListener(new ChangeListener() {
+ public void onChange(Widget sender) {
+ updateExstingCookie();
+ }
+ });
+
+ // Add a listener to delete an existing cookie
+ deleteCookieButton.addClickListener(new ClickListener() {
+ public void onClick(Widget sender) {
+ int selectedIndex = existingCookiesBox.getSelectedIndex();
+ String cookieName = existingCookiesBox.getValue(selectedIndex);
+ Cookies.removeCookie(cookieName);
+ existingCookiesBox.removeItem(selectedIndex);
+ updateExstingCookie();
+ }
+ });
+
+ // Return the main layout
+ refreshExistingCookies(null);
+ return mainLayout;
+ }
+
+ /**
+ * Refresh the list of existing cookies.
+ *
+ * @param selectedCookie the cookie to select by default
+ * @gwt.SRC
+ */
+ private void refreshExistingCookies(String selectedCookie) {
+ // Clear the existing cookies
+ existingCookiesBox.clear();
+
+ // Add the cookies
+ int selectedIndex = 0;
+ Collection<String> cookies = Cookies.getCookieNames();
+ for (String cookie : cookies) {
+ existingCookiesBox.addItem(cookie);
+ if (cookie.equals(selectedCookie)) {
+ selectedIndex = existingCookiesBox.getItemCount() - 1;
+ }
+ }
+
+ // Select the index of the selectedCookie. Use a DeferredCommand to give
+ // the options time to register in Opera.
+ final int selectedIndexFinal = selectedIndex;
+ DeferredCommand.addCommand(new Command() {
+ public void execute() {
+ // Select the default cookie
+ if (selectedIndexFinal < existingCookiesBox.getItemCount()) {
+ existingCookiesBox.setSelectedIndex(selectedIndexFinal);
+ }
+
+ // Display the selected cookie value
+ updateExstingCookie();
+ }
+ });
+ }
+
+ /**
+ * Retrieve the value of the existing cookie and put it into to value label.
+ *
+ * @gwt.SRC
+ */
+ private void updateExstingCookie() {
+ // Cannot update if there are no items
+ if (existingCookiesBox.getItemCount() < 1) {
+ cookieNameBox.setText("");
+ cookieValueBox.setText("");
+ return;
+ }
+
+ int selectedIndex = existingCookiesBox.getSelectedIndex();
+ String cookieName = existingCookiesBox.getValue(selectedIndex);
+ String cookieValue = Cookies.getCookie(cookieName);
+ cookieNameBox.setText(cookieName);
+ cookieValueBox.setText(cookieValue);
+ }
+}
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/other/CwFrame.java b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/other/CwFrame.java
new file mode 100644
index 0000000..79b3574
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/other/CwFrame.java
@@ -0,0 +1,123 @@
+/*
+ * Copyright 2008 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.showcase.client.content.other;
+
+import com.google.gwt.i18n.client.Constants;
+import com.google.gwt.sample.showcase.client.ContentWidget;
+import com.google.gwt.user.client.ui.Button;
+import com.google.gwt.user.client.ui.ClickListener;
+import com.google.gwt.user.client.ui.Frame;
+import com.google.gwt.user.client.ui.HorizontalPanel;
+import com.google.gwt.user.client.ui.KeyboardListenerAdapter;
+import com.google.gwt.user.client.ui.TextBox;
+import com.google.gwt.user.client.ui.VerticalPanel;
+import com.google.gwt.user.client.ui.Widget;
+
+/**
+ * Example file.
+ */
+public class CwFrame extends ContentWidget {
+ /**
+ * The constants used in this Content Widget.
+ *
+ * @gwt.SRC
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String cwFrameDescription();
+
+ String cwFrameName();
+
+ String cwFrameSetLocation();
+ }
+
+ /**
+ * An instance of the constants.
+ *
+ * @gwt.DATA
+ */
+ private CwConstants constants;
+
+ /**
+ * Constructor.
+ *
+ * @param constants the constants
+ */
+ public CwFrame(CwConstants constants) {
+ super(constants);
+ this.constants = constants;
+ }
+
+ @Override
+ public String getDescription() {
+ return constants.cwFrameDescription();
+ }
+
+ @Override
+ public String getName() {
+ return constants.cwFrameName();
+ }
+
+ @Override
+ public boolean hasStyle() {
+ return false;
+ }
+
+ /**
+ * Initialize this example.
+ *
+ * @gwt.SRC
+ */
+ @Override
+ public Widget onInitialize() {
+ // Create a new frame
+ final Frame frame = new Frame("http://www.google.com");
+ frame.setSize("700px", "300px");
+ frame.ensureDebugId("cwFrame");
+
+ // Create a form to set the location of the frame
+ final TextBox locationBox = new TextBox();
+ locationBox.setText(frame.getUrl());
+ Button setLocationButton = new Button(constants.cwFrameSetLocation());
+ HorizontalPanel optionsPanel = new HorizontalPanel();
+ optionsPanel.setSpacing(8);
+ optionsPanel.add(locationBox);
+ optionsPanel.add(setLocationButton);
+
+ // Change the location when the user clicks the button
+ setLocationButton.addClickListener(new ClickListener() {
+ public void onClick(Widget sender) {
+ frame.setUrl(locationBox.getText());
+ }
+ });
+
+ // Change the location when the user presses enter
+ locationBox.addKeyboardListener(new KeyboardListenerAdapter() {
+ @Override
+ public void onKeyPress(Widget sender, char keyCode, int modifiers) {
+ if (keyCode == KEY_ENTER) {
+ frame.setUrl(locationBox.getText());
+ }
+ }
+ });
+
+ // Add everything to a panel and return it
+ VerticalPanel vPanel = new VerticalPanel();
+ vPanel.add(optionsPanel);
+ vPanel.add(frame);
+ return vPanel;
+ }
+}
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/panels/CwAbsolutePanel.java b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/panels/CwAbsolutePanel.java
new file mode 100644
index 0000000..28405f9
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/panels/CwAbsolutePanel.java
@@ -0,0 +1,273 @@
+/*
+ * Copyright 2008 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.showcase.client.content.panels;
+
+import com.google.gwt.i18n.client.Constants;
+import com.google.gwt.sample.showcase.client.ContentWidget;
+import com.google.gwt.sample.showcase.client.Showcase;
+import com.google.gwt.user.client.Command;
+import com.google.gwt.user.client.DeferredCommand;
+import com.google.gwt.user.client.ui.AbsolutePanel;
+import com.google.gwt.user.client.ui.Button;
+import com.google.gwt.user.client.ui.ChangeListener;
+import com.google.gwt.user.client.ui.DecoratorPanel;
+import com.google.gwt.user.client.ui.FlexTable;
+import com.google.gwt.user.client.ui.Grid;
+import com.google.gwt.user.client.ui.HTML;
+import com.google.gwt.user.client.ui.HorizontalPanel;
+import com.google.gwt.user.client.ui.KeyboardListenerAdapter;
+import com.google.gwt.user.client.ui.ListBox;
+import com.google.gwt.user.client.ui.TextBox;
+import com.google.gwt.user.client.ui.Widget;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Example file.
+ */
+public class CwAbsolutePanel extends ContentWidget {
+ /**
+ * The constants used in this Content Widget.
+ *
+ * @gwt.SRC
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String cwAbsolutePanelClickMe();
+
+ String cwAbsolutePanelDescription();
+
+ String cwAbsolutePanelHelloWorld();
+
+ String cwAbsolutePanelItemsToMove();
+
+ String cwAbsolutePanelLeft();
+
+ String cwAbsolutePanelName();
+
+ String cwAbsolutePanelTop();
+
+ String[] cwAbsolutePanelWidgetNames();
+ }
+
+ /**
+ * The absolute panel used in the example.
+ */
+ private AbsolutePanel absolutePanel = null;
+
+ /**
+ * An instance of the constants.
+ *
+ * @gwt.DATA
+ */
+ private CwConstants constants;
+
+ /**
+ * The input field used to set the left position of a {@link Widget}.
+ *
+ * @gwt.DATA
+ */
+ private TextBox leftPosBox = null;
+
+ /**
+ * The list box of items that can be repositioned.
+ *
+ * @gwt.DATA
+ */
+ private ListBox listBox = new ListBox();
+
+ /**
+ * The input field used to set the top position of a {@link Widget}.
+ *
+ * @gwt.DATA
+ */
+ private TextBox topPosBox = null;
+
+ /**
+ * A mapping between the name of a {@link Widget} and the widget in the
+ * {@link AbsolutePanel}.
+ *
+ * @gwt.DATA
+ */
+ private Map<String, Widget> widgetMap = null;
+
+ /**
+ * Constructor.
+ *
+ * @param constants the constants
+ */
+ public CwAbsolutePanel(CwConstants constants) {
+ super(constants);
+ this.constants = constants;
+ }
+
+ @Override
+ public String getDescription() {
+ return constants.cwAbsolutePanelDescription();
+ }
+
+ @Override
+ public String getName() {
+ return constants.cwAbsolutePanelName();
+ }
+
+ @Override
+ public boolean hasStyle() {
+ return false;
+ }
+
+ /**
+ * Initialize this example.
+ *
+ * @gwt.SRC
+ */
+ @Override
+ public Widget onInitialize() {
+ // Create a new panel
+ widgetMap = new HashMap<String, Widget>();
+ absolutePanel = new AbsolutePanel();
+ absolutePanel.setSize("250px", "250px");
+ absolutePanel.ensureDebugId("cwAbsolutePanel");
+
+ // Add an HTML widget to the panel
+ String[] widgetNames = constants.cwAbsolutePanelWidgetNames();
+ HTML text = new HTML(constants.cwAbsolutePanelHelloWorld());
+ absolutePanel.add(text, 10, 20);
+ widgetMap.put(widgetNames[0], text);
+
+ // Add a Button to the panel
+ Button button = new Button(constants.cwAbsolutePanelClickMe());
+ absolutePanel.add(button, 80, 45);
+ widgetMap.put(widgetNames[1], button);
+
+ // Add a Button to the panel
+ Grid grid = new Grid(2, 3);
+ grid.setBorderWidth(1);
+ for (int i = 0; i < 3; i++) {
+ grid.setHTML(0, i, i + "");
+ grid.setWidget(1, i, Showcase.images.gwtLogoThumb().createImage());
+ }
+ absolutePanel.add(grid, 60, 100);
+ widgetMap.put(widgetNames[2], grid);
+
+ // Wrap the absolute panel in a DecoratorPanel
+ DecoratorPanel absolutePanelWrapper = new DecoratorPanel();
+ absolutePanelWrapper.setWidget(absolutePanel);
+
+ // Create the options bar
+ DecoratorPanel optionsWrapper = new DecoratorPanel();
+ optionsWrapper.setWidget(createOptionsBar());
+
+ // Add the components to a panel and return it
+ HorizontalPanel mainLayout = new HorizontalPanel();
+ mainLayout.setSpacing(10);
+ mainLayout.add(optionsWrapper);
+ mainLayout.add(absolutePanelWrapper);
+
+ return mainLayout;
+ }
+
+ /**
+ * Create an options panel that allows users to select a widget and reposition
+ * it.
+ *
+ * @return the new options panel
+ * @GWT.SRC
+ */
+ private Widget createOptionsBar() {
+ // Create a panel to move components around
+ FlexTable optionsBar = new FlexTable();
+ topPosBox = new TextBox();
+ topPosBox.setWidth("3em");
+ topPosBox.setText("100");
+ leftPosBox = new TextBox();
+ leftPosBox.setWidth("3em");
+ leftPosBox.setText("60");
+ listBox = new ListBox();
+ optionsBar.setHTML(0, 0, constants.cwAbsolutePanelItemsToMove());
+ optionsBar.setWidget(0, 1, listBox);
+ optionsBar.setHTML(1, 0, constants.cwAbsolutePanelTop());
+ optionsBar.setWidget(1, 1, topPosBox);
+ optionsBar.setHTML(2, 0, constants.cwAbsolutePanelLeft());
+ optionsBar.setWidget(2, 1, leftPosBox);
+
+ // Add the widgets to the list box
+ for (String name : widgetMap.keySet()) {
+ listBox.addItem(name);
+ }
+
+ // Set the current item position when the user selects an item
+ listBox.addChangeListener(new ChangeListener() {
+ public void onChange(Widget sender) {
+ updateSelectedItem();
+ }
+ });
+
+ // Move the item as the user changes the value in the left and top boxes
+ KeyboardListenerAdapter repositionListener = new KeyboardListenerAdapter() {
+ @Override
+ public void onKeyPress(Widget sender, char keyCode, int modifiers) {
+ repositionItem();
+ }
+ };
+ topPosBox.addKeyboardListener(repositionListener);
+ leftPosBox.addKeyboardListener(repositionListener);
+
+ // Return the options bar
+ return optionsBar;
+ }
+
+ /**
+ * Reposition an item when the user changes the value in the top or left
+ * position text boxes.
+ *
+ * @gwt.SRC
+ */
+ private void repositionItem() {
+ // Use a DeferredCommand to allow the key to take effect in the browser
+ DeferredCommand.addCommand(new Command() {
+ public void execute() {
+ // Get the selected item to move
+ String name = listBox.getValue(listBox.getSelectedIndex());
+ Widget item = widgetMap.get(name);
+
+ // Reposition the item
+ try {
+ int top = Integer.parseInt(topPosBox.getText());
+ int left = Integer.parseInt(leftPosBox.getText());
+ absolutePanel.setWidgetPosition(item, left, top);
+ } catch (NumberFormatException e) {
+ // Ignore invalid user input
+ return;
+ }
+ }
+ });
+ }
+
+ /**
+ * Update the top and left position text fields when the user selects a new
+ * item to move.
+ *
+ * @gwt.SRC
+ */
+ private void updateSelectedItem() {
+ String name = listBox.getValue(listBox.getSelectedIndex());
+ Widget item = widgetMap.get(name);
+ topPosBox.setText((absolutePanel.getWidgetTop(item) - 1) + "");
+ leftPosBox.setText((absolutePanel.getWidgetLeft(item) - 1) + "");
+ }
+}
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/panels/CwDecoratorPanel.java b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/panels/CwDecoratorPanel.java
new file mode 100644
index 0000000..992c84a
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/panels/CwDecoratorPanel.java
@@ -0,0 +1,103 @@
+/*
+ * Copyright 2008 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.showcase.client.content.panels;
+
+import com.google.gwt.i18n.client.Constants;
+import com.google.gwt.sample.showcase.client.ContentWidget;
+import com.google.gwt.user.client.ui.DecoratorPanel;
+import com.google.gwt.user.client.ui.FlexTable;
+import com.google.gwt.user.client.ui.HasHorizontalAlignment;
+import com.google.gwt.user.client.ui.TextBox;
+import com.google.gwt.user.client.ui.Widget;
+import com.google.gwt.user.client.ui.FlexTable.FlexCellFormatter;
+
+/**
+ * Example file.
+ *
+ * @gwt.CSS .gwt-DecoratorPanel
+ * @gwt.CSS html>body .gwt-DecoratorPanel
+ * @gwt.CSS * html .gwt-DecoratorPanel
+ */
+public class CwDecoratorPanel extends ContentWidget {
+ /**
+ * The constants used in this Content Widget.
+ *
+ * @gwt.SRC
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String cwDecoratorPanelDescription();
+
+ String cwDecoratorPanelName();
+ }
+
+ /**
+ * An instance of the constants.
+ *
+ * @gwt.DATA
+ */
+ private CwConstants constants;
+
+ /**
+ * Constructor.
+ *
+ * @param constants the constants
+ */
+ public CwDecoratorPanel(CwConstants constants) {
+ super(constants);
+ this.constants = constants;
+ }
+
+ @Override
+ public String getDescription() {
+ return constants.cwDecoratorPanelDescription();
+ }
+
+ @Override
+ public String getName() {
+ return constants.cwDecoratorPanelName();
+ }
+
+ /**
+ * Initialize this example.
+ *
+ * @gwt.SRC
+ */
+ @Override
+ public Widget onInitialize() {
+ // Create a table to layout the form options
+ FlexTable layout = new FlexTable();
+ layout.setCellSpacing(6);
+ FlexCellFormatter cellFormatter = layout.getFlexCellFormatter();
+
+ // Add a title to the form
+ layout.setHTML(0, 0, "Enter Serch Criteria");
+ cellFormatter.setColSpan(0, 0, 2);
+ cellFormatter.setHorizontalAlignment(0, 0,
+ HasHorizontalAlignment.ALIGN_CENTER);
+
+ // Add some standard form options
+ layout.setHTML(1, 0, "Name:");
+ layout.setWidget(1, 1, new TextBox());
+ layout.setHTML(2, 0, "Description:");
+ layout.setWidget(2, 1, new TextBox());
+
+ // Wrap the content in a DecoratorPanel
+ DecoratorPanel decPanel = new DecoratorPanel();
+ decPanel.setWidget(layout);
+ return decPanel;
+ }
+}
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/panels/CwDisclosurePanel.java b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/panels/CwDisclosurePanel.java
new file mode 100644
index 0000000..e1e8169
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/panels/CwDisclosurePanel.java
@@ -0,0 +1,157 @@
+/*
+ * Copyright 2008 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.showcase.client.content.panels;
+
+import com.google.gwt.i18n.client.Constants;
+import com.google.gwt.sample.showcase.client.ContentWidget;
+import com.google.gwt.user.client.ui.DecoratorPanel;
+import com.google.gwt.user.client.ui.DisclosurePanel;
+import com.google.gwt.user.client.ui.FlexTable;
+import com.google.gwt.user.client.ui.Grid;
+import com.google.gwt.user.client.ui.HasHorizontalAlignment;
+import com.google.gwt.user.client.ui.HorizontalPanel;
+import com.google.gwt.user.client.ui.RadioButton;
+import com.google.gwt.user.client.ui.TextBox;
+import com.google.gwt.user.client.ui.VerticalPanel;
+import com.google.gwt.user.client.ui.Widget;
+import com.google.gwt.user.client.ui.FlexTable.FlexCellFormatter;
+
+/**
+ * Example file.
+ *
+ * @gwt.CSS .gwt-DisclosurePanel
+ */
+public class CwDisclosurePanel extends ContentWidget {
+ /**
+ * The constants used in this Content Widget.
+ *
+ * @gwt.SRC
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String cwDisclosurePanelDescription();
+
+ String cwDisclosurePanelFormAdvancedCriteria();
+
+ String cwDisclosurePanelFormDescription();
+
+ String cwDisclosurePanelFormGender();
+
+ String[] cwDisclosurePanelFormGenderOptions();
+
+ String cwDisclosurePanelFormLocation();
+
+ String cwDisclosurePanelFormName();
+
+ String cwDisclosurePanelFormTitle();
+
+ String cwDisclosurePanelName();
+ }
+
+ /**
+ * An instance of the constants.
+ *
+ * @gwt.DATA
+ */
+ private CwConstants constants;
+
+ /**
+ * Constructor.
+ *
+ * @param constants the constants
+ */
+ public CwDisclosurePanel(CwConstants constants) {
+ super(constants);
+ this.constants = constants;
+ }
+
+ @Override
+ public String getDescription() {
+ return constants.cwDisclosurePanelDescription();
+ }
+
+ @Override
+ public String getName() {
+ return constants.cwDisclosurePanelName();
+ }
+
+ /**
+ * Initialize this example.
+ *
+ * @gwt.SRC
+ */
+ @Override
+ public Widget onInitialize() {
+ // Add the disclosure panels to a panel
+ VerticalPanel vPanel = new VerticalPanel();
+ vPanel.setSpacing(8);
+ vPanel.add(createAdvancedForm());
+
+ // Return the panel
+ return vPanel;
+ }
+
+ /**
+ * Create a form that contains undisclosed advanced options.
+ *
+ * @gwt.SRC
+ */
+ private Widget createAdvancedForm() {
+ // Create a table to layout the form options
+ FlexTable layout = new FlexTable();
+ layout.setCellSpacing(6);
+ layout.setWidth("300px");
+ FlexCellFormatter cellFormatter = layout.getFlexCellFormatter();
+
+ // Add a title to the form
+ layout.setHTML(0, 0, constants.cwDisclosurePanelFormTitle());
+ cellFormatter.setColSpan(0, 0, 2);
+ cellFormatter.setHorizontalAlignment(0, 0,
+ HasHorizontalAlignment.ALIGN_CENTER);
+
+ // Add some standard form options
+ layout.setHTML(1, 0, constants.cwDisclosurePanelFormName());
+ layout.setWidget(1, 1, new TextBox());
+ layout.setHTML(2, 0, constants.cwDisclosurePanelFormDescription());
+ layout.setWidget(2, 1, new TextBox());
+
+ // Create some advanced options
+ HorizontalPanel genderPanel = new HorizontalPanel();
+ String[] genderOptions = constants.cwDisclosurePanelFormGenderOptions();
+ for (int i = 0; i < genderOptions.length; i++) {
+ genderPanel.add(new RadioButton("gender", genderOptions[i]));
+ }
+ Grid advancedOptions = new Grid(2, 2);
+ advancedOptions.setCellSpacing(6);
+ advancedOptions.setHTML(0, 0, constants.cwDisclosurePanelFormLocation());
+ advancedOptions.setWidget(0, 1, new TextBox());
+ advancedOptions.setHTML(1, 0, constants.cwDisclosurePanelFormGender());
+ advancedOptions.setWidget(1, 1, genderPanel);
+
+ // Add advanced options to form in a disclosure panel
+ DisclosurePanel advancedDisclosure = new DisclosurePanel(
+ constants.cwDisclosurePanelFormAdvancedCriteria());
+ advancedDisclosure.ensureDebugId("cwDisclosurePanel");
+ advancedDisclosure.setContent(advancedOptions);
+ layout.setWidget(3, 0, advancedDisclosure);
+ cellFormatter.setColSpan(3, 0, 2);
+
+ // Wrap the contents in a DecoratorPanel
+ DecoratorPanel decPanel = new DecoratorPanel();
+ decPanel.setWidget(layout);
+ return decPanel;
+ }
+}
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/panels/CwDockPanel.java b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/panels/CwDockPanel.java
new file mode 100644
index 0000000..86b538f
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/panels/CwDockPanel.java
@@ -0,0 +1,116 @@
+/*
+ * Copyright 2008 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.showcase.client.content.panels;
+
+import com.google.gwt.i18n.client.Constants;
+import com.google.gwt.sample.showcase.client.ContentWidget;
+import com.google.gwt.user.client.ui.DockPanel;
+import com.google.gwt.user.client.ui.HTML;
+import com.google.gwt.user.client.ui.ScrollPanel;
+import com.google.gwt.user.client.ui.Widget;
+
+/**
+ * Example file.
+ *
+ * @gwt.CSS .cw-DockPanel
+ */
+public class CwDockPanel extends ContentWidget {
+ /**
+ * The constants used in this Content Widget.
+ *
+ * @gwt.SRC
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+
+ String cwDockPanelCenter();
+
+ String cwDockPanelDescription();
+
+ String cwDockPanelEast();
+
+ String cwDockPanelName();
+
+ String cwDockPanelNorth1();
+
+ String cwDockPanelNorth2();
+
+ String cwDockPanelSouth1();
+
+ String cwDockPanelSouth2();
+
+ String cwDockPanelWest();
+ }
+
+ /**
+ * An instance of the constants.
+ *
+ * @gwt.DATA
+ */
+ private CwConstants constants;
+
+ /**
+ * Constructor.
+ *
+ * @param constants the constants
+ */
+ public CwDockPanel(CwConstants constants) {
+ super(constants);
+ this.constants = constants;
+ }
+
+ @Override
+ public String getDescription() {
+ return constants.cwDockPanelDescription();
+ }
+
+ @Override
+ public String getName() {
+ return constants.cwDockPanelName();
+ }
+
+ /**
+ * Initialize this example.
+ *
+ * @gwt.SRC
+ */
+ @Override
+ public Widget onInitialize() {
+ // Create a Dock Panel
+ DockPanel dock = new DockPanel();
+ dock.setStyleName("cw-DockPanel");
+ dock.setSpacing(4);
+ dock.setHorizontalAlignment(DockPanel.ALIGN_CENTER);
+
+ // Add text all around
+ dock.add(new HTML(constants.cwDockPanelNorth1()), DockPanel.NORTH);
+ dock.add(new HTML(constants.cwDockPanelSouth1()), DockPanel.SOUTH);
+ dock.add(new HTML(constants.cwDockPanelEast()), DockPanel.EAST);
+ dock.add(new HTML(constants.cwDockPanelWest()), DockPanel.WEST);
+ dock.add(new HTML(constants.cwDockPanelNorth2()), DockPanel.NORTH);
+ dock.add(new HTML(constants.cwDockPanelSouth2()), DockPanel.SOUTH);
+
+ // Add scrollable text in the center
+ HTML contents = new HTML(constants.cwDockPanelCenter());
+ ScrollPanel scroller = new ScrollPanel(contents);
+ scroller.setSize("400px", "100px");
+ dock.add(scroller, DockPanel.CENTER);
+
+ // Return the content
+ dock.ensureDebugId("cwDockPanel");
+ return dock;
+ }
+}
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/panels/CwFlowPanel.java b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/panels/CwFlowPanel.java
new file mode 100644
index 0000000..fe0a5ad
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/panels/CwFlowPanel.java
@@ -0,0 +1,92 @@
+/*
+ * Copyright 2008 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.showcase.client.content.panels;
+
+import com.google.gwt.i18n.client.Constants;
+import com.google.gwt.sample.showcase.client.ContentWidget;
+import com.google.gwt.user.client.ui.CheckBox;
+import com.google.gwt.user.client.ui.FlowPanel;
+import com.google.gwt.user.client.ui.Widget;
+
+/**
+ * Example file.
+ *
+ * @gwt.CSS .cw-FlowPanel-checkBox
+ */
+public class CwFlowPanel extends ContentWidget {
+ /**
+ * The constants used in this Content Widget.
+ *
+ * @gwt.SRC
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String cwFlowPanelDescription();
+
+ String cwFlowPanelItem();
+
+ String cwFlowPanelName();
+ }
+
+ /**
+ * An instance of the constants.
+ *
+ * @gwt.DATA
+ */
+ private CwConstants constants;
+
+ /**
+ * Constructor.
+ *
+ * @param constants the constants
+ */
+ public CwFlowPanel(CwConstants constants) {
+ super(constants);
+ this.constants = constants;
+ }
+
+ @Override
+ public String getDescription() {
+ return constants.cwFlowPanelDescription();
+ }
+
+ @Override
+ public String getName() {
+ return constants.cwFlowPanelName();
+ }
+
+ /**
+ * Initialize this example.
+ *
+ * @gwt.SRC
+ */
+ @Override
+ public Widget onInitialize() {
+ // Create a Flow Panel
+ FlowPanel flowPanel = new FlowPanel();
+ flowPanel.ensureDebugId("cwFlowPanel");
+
+ // Add some content to the panel
+ for (int i = 0; i < 30; i++) {
+ CheckBox checkbox = new CheckBox(constants.cwFlowPanelItem() + " " + i);
+ checkbox.addStyleName("cw-FlowPanel-checkBox");
+ flowPanel.add(checkbox);
+ }
+
+ // Return the content
+ return flowPanel;
+ }
+}
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/panels/CwHorizontalPanel.java b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/panels/CwHorizontalPanel.java
new file mode 100644
index 0000000..c9a27b1
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/panels/CwHorizontalPanel.java
@@ -0,0 +1,94 @@
+/*
+ * Copyright 2008 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.showcase.client.content.panels;
+
+import com.google.gwt.i18n.client.Constants;
+import com.google.gwt.sample.showcase.client.ContentWidget;
+import com.google.gwt.user.client.ui.Button;
+import com.google.gwt.user.client.ui.HorizontalPanel;
+import com.google.gwt.user.client.ui.Widget;
+
+/**
+ * Example file.
+ */
+public class CwHorizontalPanel extends ContentWidget {
+ /**
+ * The constants used in this Content Widget.
+ *
+ * @gwt.SRC
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String cwHorizontalPanelButton();
+
+ String cwHorizontalPanelDescription();
+
+ String cwHorizontalPanelName();
+ }
+
+ /**
+ * An instance of the constants.
+ *
+ * @gwt.DATA
+ */
+ private CwConstants constants;
+
+ /**
+ * Constructor.
+ *
+ * @param constants the constants
+ */
+ public CwHorizontalPanel(CwConstants constants) {
+ super(constants);
+ this.constants = constants;
+ }
+
+ @Override
+ public String getDescription() {
+ return constants.cwHorizontalPanelDescription();
+ }
+
+ @Override
+ public String getName() {
+ return constants.cwHorizontalPanelName();
+ }
+
+ @Override
+ public boolean hasStyle() {
+ return false;
+ }
+
+ /**
+ * Initialize this example.
+ *
+ * @gwt.SRC
+ */
+ @Override
+ public Widget onInitialize() {
+ // Create a Horizontal Panel
+ HorizontalPanel hPanel = new HorizontalPanel();
+ hPanel.setSpacing(5);
+
+ // Add some content to the panel
+ for (int i = 1; i < 5; i++) {
+ hPanel.add(new Button(constants.cwHorizontalPanelButton() + " " + i));
+ }
+
+ // Return the content
+ hPanel.ensureDebugId("cwHorizontalPanel");
+ return hPanel;
+ }
+}
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/panels/CwHorizontalSplitPanel.java b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/panels/CwHorizontalSplitPanel.java
new file mode 100644
index 0000000..abb68e5
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/panels/CwHorizontalSplitPanel.java
@@ -0,0 +1,100 @@
+/*
+ * Copyright 2008 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.showcase.client.content.panels;
+
+import com.google.gwt.i18n.client.Constants;
+import com.google.gwt.sample.showcase.client.ContentWidget;
+import com.google.gwt.user.client.ui.DecoratorPanel;
+import com.google.gwt.user.client.ui.HTML;
+import com.google.gwt.user.client.ui.HorizontalSplitPanel;
+import com.google.gwt.user.client.ui.Widget;
+
+/**
+ * Example file.
+ *
+ * @gwt.CSS .gwt-HorizontalSplitPanel
+ */
+public class CwHorizontalSplitPanel extends ContentWidget {
+ /**
+ * The constants used in this Content Widget.
+ *
+ * @gwt.SRC
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String cwHorizontalSplitPanelDescription();
+
+ String cwHorizontalSplitPanelName();
+
+ String cwHorizontalSplitPanelText();
+ }
+
+ /**
+ * An instance of the constants.
+ *
+ * @gwt.DATA
+ */
+ private CwConstants constants;
+
+ /**
+ * Constructor.
+ *
+ * @param constants the constants
+ */
+ public CwHorizontalSplitPanel(CwConstants constants) {
+ super(constants);
+ this.constants = constants;
+ }
+
+ @Override
+ public String getDescription() {
+ return constants.cwHorizontalSplitPanelDescription();
+ }
+
+ @Override
+ public String getName() {
+ return constants.cwHorizontalSplitPanelName();
+ }
+
+ /**
+ * Initialize this example.
+ *
+ * @gwt.SRC
+ */
+ @Override
+ public Widget onInitialize() {
+ // Create a Horizontal Split Panel
+ HorizontalSplitPanel hSplit = new HorizontalSplitPanel();
+ hSplit.ensureDebugId("cwHorizontalSplitPanel");
+ hSplit.setSize("500px", "350px");
+ hSplit.setSplitPosition("30%");
+
+ // Add some content
+ String randomText = constants.cwHorizontalSplitPanelText();
+ for (int i = 0; i < 2; i++) {
+ randomText += randomText;
+ }
+ hSplit.setRightWidget(new HTML(randomText));
+ hSplit.setLeftWidget(new HTML(randomText));
+
+ // Wrap the split panel in a decorator panel
+ DecoratorPanel decPanel = new DecoratorPanel();
+ decPanel.setWidget(hSplit);
+
+ // Return the content
+ return decPanel;
+ }
+}
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/panels/CwTabPanel.java b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/panels/CwTabPanel.java
new file mode 100644
index 0000000..0362fe7
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/panels/CwTabPanel.java
@@ -0,0 +1,113 @@
+/*
+ * Copyright 2008 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.showcase.client.content.panels;
+
+import com.google.gwt.i18n.client.Constants;
+import com.google.gwt.sample.showcase.client.ContentWidget;
+import com.google.gwt.sample.showcase.client.Showcase;
+import com.google.gwt.user.client.ui.HTML;
+import com.google.gwt.user.client.ui.TabPanel;
+import com.google.gwt.user.client.ui.VerticalPanel;
+import com.google.gwt.user.client.ui.Widget;
+
+/**
+ * Example file.
+ *
+ * @gwt.CSS .gwt-TabBar
+ * @gwt.CSS html>body .gwt-TabBar
+ * @gwt.CSS * html .gwt-TabBar
+ * @gwt.CSS .gwt-TabPanel
+ */
+public class CwTabPanel extends ContentWidget {
+ /**
+ * The constants used in this Content Widget.
+ *
+ * @gwt.SRC
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String cwTabPanelDescription();
+
+ String cwTabPanelName();
+
+ String cwTabPanelTab0();
+
+ String cwTabPanelTab2();
+
+ String[] cwTabPanelTabs();
+ }
+
+ /**
+ * An instance of the constants.
+ *
+ * @gwt.DATA
+ */
+ private CwConstants constants;
+
+ /**
+ * Constructor.
+ *
+ * @param constants the constants
+ */
+ public CwTabPanel(CwConstants constants) {
+ super(constants);
+ this.constants = constants;
+ }
+
+ @Override
+ public String getDescription() {
+ return constants.cwTabPanelDescription();
+ }
+
+ @Override
+ public String getName() {
+ return constants.cwTabPanelName();
+ }
+
+ /**
+ * Initialize this example.
+ *
+ * @gwt.SRC
+ */
+ @Override
+ public Widget onInitialize() {
+ // Create a tab panel
+ TabPanel tabPanel = new TabPanel();
+ tabPanel.setWidth("400px");
+
+ // Unlike most widgets, animations are disabled by default
+ tabPanel.getDeckPanel().setAnimationEnabled(true);
+
+ // Add a home tab
+ String[] tabTitles = constants.cwTabPanelTabs();
+ HTML homeText = new HTML(constants.cwTabPanelTab0());
+ tabPanel.add(homeText, tabTitles[0]);
+
+ // Add a tab with an image
+ VerticalPanel vPanel = new VerticalPanel();
+ vPanel.add(Showcase.images.gwtLogo().createImage());
+ tabPanel.add(vPanel, tabTitles[1]);
+
+ // Add a tab
+ HTML moreInfo = new HTML(constants.cwTabPanelTab2());
+ tabPanel.add(moreInfo, tabTitles[2]);
+
+ // Return the content
+ tabPanel.selectTab(0);
+ tabPanel.ensureDebugId("cwTabPanel");
+ return tabPanel;
+ }
+}
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/panels/CwVerticalPanel.java b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/panels/CwVerticalPanel.java
new file mode 100644
index 0000000..e956037
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/panels/CwVerticalPanel.java
@@ -0,0 +1,94 @@
+/*
+ * Copyright 2008 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.showcase.client.content.panels;
+
+import com.google.gwt.i18n.client.Constants;
+import com.google.gwt.sample.showcase.client.ContentWidget;
+import com.google.gwt.user.client.ui.Button;
+import com.google.gwt.user.client.ui.VerticalPanel;
+import com.google.gwt.user.client.ui.Widget;
+
+/**
+ * Example file.
+ */
+public class CwVerticalPanel extends ContentWidget {
+ /**
+ * The constants used in this Content Widget.
+ *
+ * @gwt.SRC
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String cwVerticalPanelButton();
+
+ String cwVerticalPanelDescription();
+
+ String cwVerticalPanelName();
+ }
+
+ /**
+ * An instance of the constants.
+ *
+ * @gwt.DATA
+ */
+ private CwConstants constants;
+
+ /**
+ * Constructor.
+ *
+ * @param constants the constants
+ */
+ public CwVerticalPanel(CwConstants constants) {
+ super(constants);
+ this.constants = constants;
+ }
+
+ @Override
+ public String getDescription() {
+ return constants.cwVerticalPanelDescription();
+ }
+
+ @Override
+ public String getName() {
+ return constants.cwVerticalPanelName();
+ }
+
+ @Override
+ public boolean hasStyle() {
+ return false;
+ }
+
+ /**
+ * Initialize this example.
+ *
+ * @gwt.SRC
+ */
+ @Override
+ public Widget onInitialize() {
+ // Create a Vertical Panel
+ VerticalPanel vPanel = new VerticalPanel();
+ vPanel.setSpacing(5);
+
+ // Add some content to the panel
+ for (int i = 1; i < 10; i++) {
+ vPanel.add(new Button(constants.cwVerticalPanelButton() + "" + i));
+ }
+
+ // Return the content
+ vPanel.ensureDebugId("cwVerticalPanel");
+ return vPanel;
+ }
+}
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/panels/CwVerticalSplitPanel.java b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/panels/CwVerticalSplitPanel.java
new file mode 100644
index 0000000..3646d7d
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/panels/CwVerticalSplitPanel.java
@@ -0,0 +1,100 @@
+/*
+ * Copyright 2008 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.showcase.client.content.panels;
+
+import com.google.gwt.i18n.client.Constants;
+import com.google.gwt.sample.showcase.client.ContentWidget;
+import com.google.gwt.user.client.ui.DecoratorPanel;
+import com.google.gwt.user.client.ui.HTML;
+import com.google.gwt.user.client.ui.VerticalSplitPanel;
+import com.google.gwt.user.client.ui.Widget;
+
+/**
+ * Example file.
+ *
+ * @gwt.CSS .gwt-VerticalSplitPanel
+ */
+public class CwVerticalSplitPanel extends ContentWidget {
+ /**
+ * The constants used in this Content Widget.
+ *
+ * @gwt.SRC
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String cwVerticalSplitPanelDescription();
+
+ String cwVerticalSplitPanelName();
+
+ String cwVerticalSplitPanelText();
+ }
+
+ /**
+ * An instance of the constants.
+ *
+ * @gwt.DATA
+ */
+ private CwConstants constants;
+
+ /**
+ * Constructor.
+ *
+ * @param constants the constants
+ */
+ public CwVerticalSplitPanel(CwConstants constants) {
+ super(constants);
+ this.constants = constants;
+ }
+
+ @Override
+ public String getDescription() {
+ return constants.cwVerticalSplitPanelDescription();
+ }
+
+ @Override
+ public String getName() {
+ return constants.cwVerticalSplitPanelName();
+ }
+
+ /**
+ * Initialize this example.
+ *
+ * @gwt.SRC
+ */
+ @Override
+ public Widget onInitialize() {
+ // Create a Vertical Split Panel
+ VerticalSplitPanel vSplit = new VerticalSplitPanel();
+ vSplit.ensureDebugId("cwVerticalSplitPanel");
+ vSplit.setSize("500px", "350px");
+ vSplit.setSplitPosition("30%");
+
+ // Add some content
+ String randomText = constants.cwVerticalSplitPanelText() + " ";
+ for (int i = 0; i < 2; i++) {
+ randomText += randomText;
+ }
+ vSplit.setTopWidget(new HTML(randomText));
+ vSplit.setBottomWidget(new HTML(randomText));
+
+ // Wrap the split panel in a decorator panel
+ DecoratorPanel decPanel = new DecoratorPanel();
+ decPanel.setWidget(vSplit);
+
+ // Return the content
+ return decPanel;
+ }
+}
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/popups/CwBasicPopup.java b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/popups/CwBasicPopup.java
new file mode 100644
index 0000000..04df7e6
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/popups/CwBasicPopup.java
@@ -0,0 +1,141 @@
+/*
+ * Copyright 2008 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.showcase.client.content.popups;
+
+import com.google.gwt.i18n.client.Constants;
+import com.google.gwt.sample.showcase.client.ContentWidget;
+import com.google.gwt.sample.showcase.client.Showcase;
+import com.google.gwt.user.client.ui.Button;
+import com.google.gwt.user.client.ui.ClickListener;
+import com.google.gwt.user.client.ui.HTML;
+import com.google.gwt.user.client.ui.Image;
+import com.google.gwt.user.client.ui.PopupPanel;
+import com.google.gwt.user.client.ui.VerticalPanel;
+import com.google.gwt.user.client.ui.Widget;
+
+/**
+ * Example file.
+ *
+ * @gwt.CSS .gwt-PopupPanel
+ * @gwt.CSS html>body .gwt-PopupPanel
+ * @gwt.CSS * html .gwt-PopupPanel
+ */
+public class CwBasicPopup extends ContentWidget {
+ /**
+ * The constants used in this Content Widget.
+ *
+ * @gwt.SRC
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String cwBasicPopupClickOutsideInstructions();
+
+ String cwBasicPopupDescription();
+
+ String cwBasicPopupInstructions();
+
+ String cwBasicPopupName();
+
+ String cwBasicPopupShowButton();
+ }
+
+ /**
+ * An instance of the constants.
+ *
+ * @gwt.DATA
+ */
+ private CwConstants constants;
+
+ /**
+ * Constructor.
+ *
+ * @param constants the constants
+ */
+ public CwBasicPopup(CwConstants constants) {
+ super(constants);
+ this.constants = constants;
+ }
+
+ @Override
+ public String getDescription() {
+ return constants.cwBasicPopupDescription();
+ }
+
+ @Override
+ public String getName() {
+ return constants.cwBasicPopupName();
+ }
+
+ /**
+ * Initialize this example.
+ *
+ * @gwt.SRC
+ */
+ @Override
+ public Widget onInitialize() {
+ // Create a basic popup widget
+ final PopupPanel simplePopup = new PopupPanel(true);
+ simplePopup.ensureDebugId("cwBasicPopup-simplePopup");
+ simplePopup.setWidth("128px");
+ simplePopup.setWidget(new HTML(
+ constants.cwBasicPopupClickOutsideInstructions()));
+
+ // Create a button to show the popup
+ Button openButton = new Button(constants.cwBasicPopupShowButton(),
+ new ClickListener() {
+ public void onClick(Widget sender) {
+ // Reposition the popup relative to the button
+ int left = sender.getAbsoluteLeft() + 10;
+ int top = sender.getAbsoluteTop() + 10;
+ simplePopup.setPopupPosition(left, top);
+
+ // Show the popup
+ simplePopup.show();
+ }
+ });
+
+ // Create a popup to show the full size image
+ Image jimmyFull = Showcase.images.jimmy().createImage();
+ final PopupPanel imagePopup = new PopupPanel(true);
+ imagePopup.ensureDebugId("cwBasicPopup-imagePopup");
+ imagePopup.setWidget(jimmyFull);
+ jimmyFull.addClickListener(new ClickListener() {
+ public void onClick(Widget sender) {
+ imagePopup.hide();
+ }
+ });
+
+ // Add an image thumbnail
+ Image jimmyThumb = Showcase.images.jimmyThumb().createImage();
+ jimmyThumb.ensureDebugId("cwBasicPopup-thumb");
+ jimmyThumb.addStyleName("cw-BasicPopup-thumb");
+ jimmyThumb.addClickListener(new ClickListener() {
+ public void onClick(Widget sender) {
+ imagePopup.center();
+ }
+ });
+
+ // Add the widgets to a panel
+ VerticalPanel vPanel = new VerticalPanel();
+ vPanel.setSpacing(5);
+ vPanel.add(openButton);
+ vPanel.add(new HTML("<br><br><br>" + constants.cwBasicPopupInstructions()));
+ vPanel.add(jimmyThumb);
+
+ // Return the panel
+ return vPanel;
+ }
+}
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/popups/CwDialogBox.java b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/popups/CwDialogBox.java
new file mode 100644
index 0000000..4d79687
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/popups/CwDialogBox.java
@@ -0,0 +1,194 @@
+/*
+ * Copyright 2008 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.showcase.client.content.popups;
+
+import com.google.gwt.i18n.client.Constants;
+import com.google.gwt.sample.showcase.client.ContentWidget;
+import com.google.gwt.sample.showcase.client.Showcase;
+import com.google.gwt.user.client.ui.Button;
+import com.google.gwt.user.client.ui.CheckBox;
+import com.google.gwt.user.client.ui.ClickListener;
+import com.google.gwt.user.client.ui.DialogBox;
+import com.google.gwt.user.client.ui.HTML;
+import com.google.gwt.user.client.ui.HasHorizontalAlignment;
+import com.google.gwt.user.client.ui.Image;
+import com.google.gwt.user.client.ui.ListBox;
+import com.google.gwt.user.client.ui.VerticalPanel;
+import com.google.gwt.user.client.ui.Widget;
+
+/**
+ * Example file.
+ *
+ * @gwt.CSS .gwt-DialogBox
+ * @gwt.CSS html>body .gwt-DialogBox
+ * @gwt.CSS * html .gwt-DialogBox
+ * @gwt.CSS .cw-DialogBox
+ */
+public class CwDialogBox extends ContentWidget {
+ /**
+ * The constants used in this Content Widget.
+ *
+ * @gwt.SRC
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String cwDialogBoxCaption();
+
+ String cwDialogBoxClose();
+
+ String cwDialogBoxDescription();
+
+ String cwDialogBoxDetails();
+
+ String cwDialogBoxItem();
+
+ String cwDialogBoxListBoxInfo();
+
+ String cwDialogBoxMakeTransparent();
+
+ String cwDialogBoxName();
+
+ String cwDialogBoxShowButton();
+ }
+
+ /**
+ * An instance of the constants.
+ *
+ * @gwt.DATA
+ */
+ private CwConstants constants;
+
+ /**
+ * Constructor.
+ *
+ * @param constants the constants
+ */
+ public CwDialogBox(CwConstants constants) {
+ super(constants);
+ this.constants = constants;
+ }
+
+ @Override
+ public String getDescription() {
+ return constants.cwDialogBoxDescription();
+ }
+
+ @Override
+ public String getName() {
+ return constants.cwDialogBoxName();
+ }
+
+ /**
+ * Initialize this example.
+ *
+ * @gwt.SRC
+ */
+ @Override
+ public Widget onInitialize() {
+ // Create the dialog box
+ final DialogBox dialogBox = createDialogBox();
+
+ // Create a button to show the dialog Box
+ Button openButton = new Button(constants.cwDialogBoxShowButton(),
+ new ClickListener() {
+ public void onClick(Widget sender) {
+ dialogBox.center();
+ dialogBox.show();
+ }
+ });
+
+ // Create a ListBox
+ HTML listDesc = new HTML("<br><br><br>"
+ + constants.cwDialogBoxListBoxInfo());
+
+ ListBox list = new ListBox();
+ list.setVisibleItemCount(1);
+ for (int i = 10; i > 0; i--) {
+ list.addItem(constants.cwDialogBoxItem() + " " + i);
+ }
+
+ // Add the button and list to a panel
+ VerticalPanel vPanel = new VerticalPanel();
+ vPanel.setSpacing(8);
+ vPanel.add(openButton);
+ vPanel.add(listDesc);
+ vPanel.add(list);
+
+ // Return the panel
+ return vPanel;
+ }
+
+ /**
+ * Create the dialog box for this example.
+ *
+ * @return the new dialog box
+ * @gwt.SRC
+ */
+ private DialogBox createDialogBox() {
+ // Create a dialog box and set the caption text
+ final DialogBox dialogBox = new DialogBox();
+ dialogBox.ensureDebugId("cwDialogBox");
+ dialogBox.setText(constants.cwDialogBoxCaption());
+
+ // Create a table to layout the content
+ VerticalPanel dialogContents = new VerticalPanel();
+ dialogContents.setWidth("100%");
+ dialogContents.setSpacing(4);
+ dialogBox.setWidget(dialogContents);
+
+ // Add some text to the top of the dialog
+ HTML details = new HTML(constants.cwDialogBoxDetails());
+ dialogContents.add(details);
+ dialogContents.setCellHorizontalAlignment(details,
+ HasHorizontalAlignment.ALIGN_CENTER);
+
+ // Add an image to the dialog
+ Image image = Showcase.images.jimmy().createImage();
+ dialogContents.add(image);
+ dialogContents.setCellHorizontalAlignment(image,
+ HasHorizontalAlignment.ALIGN_CENTER);
+
+ // Add option to make transparent
+ final CheckBox opacityOption = new CheckBox(
+ constants.cwDialogBoxMakeTransparent());
+ dialogContents.add(opacityOption);
+
+ // Listen for changes in opacity option
+ opacityOption.addClickListener(new ClickListener() {
+ public void onClick(Widget sender) {
+ if (opacityOption.isChecked()) {
+ dialogBox.addStyleName("cw-DialogBox");
+ } else {
+ dialogBox.removeStyleName("cw-DialogBox");
+ }
+ }
+ });
+
+ // Add a close button at the bottom of the dialog
+ Button closeButton = new Button(constants.cwDialogBoxClose(),
+ new ClickListener() {
+ public void onClick(Widget sender) {
+ dialogBox.hide();
+ }
+ });
+ dialogContents.add(closeButton);
+ dialogContents.setCellHorizontalAlignment(closeButton,
+ HasHorizontalAlignment.ALIGN_RIGHT);
+
+ // Return the dialog box
+ return dialogBox;
+ }
+}
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/tables/CwFlexTable.java b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/tables/CwFlexTable.java
new file mode 100644
index 0000000..9085184
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/tables/CwFlexTable.java
@@ -0,0 +1,155 @@
+/*
+ * Copyright 2008 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.showcase.client.content.tables;
+
+import com.google.gwt.i18n.client.Constants;
+import com.google.gwt.sample.showcase.client.ContentWidget;
+import com.google.gwt.sample.showcase.client.Showcase;
+import com.google.gwt.user.client.ui.Button;
+import com.google.gwt.user.client.ui.ClickListener;
+import com.google.gwt.user.client.ui.FlexTable;
+import com.google.gwt.user.client.ui.HasHorizontalAlignment;
+import com.google.gwt.user.client.ui.HasVerticalAlignment;
+import com.google.gwt.user.client.ui.VerticalPanel;
+import com.google.gwt.user.client.ui.Widget;
+import com.google.gwt.user.client.ui.FlexTable.FlexCellFormatter;
+
+/**
+ * Example file.
+ *
+ * @gwt.CSS .cw-FlexTable
+ */
+public class CwFlexTable extends ContentWidget {
+ /**
+ * The constants used in this Content Widget.
+ *
+ * @gwt.SRC
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String cwFlexTableAddRow();
+
+ String cwFlexTableDescription();
+
+ String cwFlexTableDetails();
+
+ String cwFlexTableName();
+
+ String cwFlexTableRemoveRow();
+ }
+
+ /**
+ * An instance of the constants.
+ *
+ * @gwt.DATA
+ */
+ private CwConstants constants;
+
+ /**
+ * Constructor.
+ *
+ * @param constants the constants
+ */
+ public CwFlexTable(CwConstants constants) {
+ super(constants);
+ this.constants = constants;
+ }
+
+ @Override
+ public String getDescription() {
+ return constants.cwFlexTableDescription();
+ }
+
+ @Override
+ public String getName() {
+ return constants.cwFlexTableName();
+ }
+
+ /**
+ * Initialize this example.
+ *
+ * @gwt.SRC
+ */
+ @Override
+ public Widget onInitialize() {
+ // Create a Flex Table
+ final FlexTable flexTable = new FlexTable();
+ FlexCellFormatter cellFormatter = flexTable.getFlexCellFormatter();
+ flexTable.addStyleName("cw-FlexTable");
+ flexTable.setWidth("350px");
+ flexTable.setCellSpacing(5);
+ flexTable.setCellPadding(3);
+
+ // Add some text
+ cellFormatter.setHorizontalAlignment(0, 1,
+ HasHorizontalAlignment.ALIGN_LEFT);
+ flexTable.setHTML(0, 0, constants.cwFlexTableDetails());
+ cellFormatter.setColSpan(0, 0, 2);
+
+ // Add a button that will add more rows to the table
+ Button addRowButton = new Button(constants.cwFlexTableAddRow(),
+ new ClickListener() {
+ public void onClick(Widget sender) {
+ addRow(flexTable);
+ }
+ });
+ Button removeRowButton = new Button(constants.cwFlexTableRemoveRow(),
+ new ClickListener() {
+ public void onClick(Widget sender) {
+ removeRow(flexTable);
+ }
+ });
+ VerticalPanel buttonPanel = new VerticalPanel();
+ buttonPanel.setStyleName("cw-FlexTable-buttonPanel");
+ buttonPanel.add(addRowButton);
+ buttonPanel.add(removeRowButton);
+ flexTable.setWidget(0, 1, buttonPanel);
+ cellFormatter.setVerticalAlignment(0, 1, HasVerticalAlignment.ALIGN_TOP);
+
+ // Add two rows to start
+ addRow(flexTable);
+ addRow(flexTable);
+
+ // Return the panel
+ flexTable.ensureDebugId("cwFlexTable");
+ return flexTable;
+ }
+
+ /**
+ * Add a row to the flex table.
+ *
+ * @gwt.SRC
+ */
+ private void addRow(FlexTable flexTable) {
+ int numRows = flexTable.getRowCount();
+ flexTable.setWidget(numRows, 0, Showcase.images.gwtLogo().createImage());
+ flexTable.setWidget(numRows, 1, Showcase.images.gwtLogo().createImage());
+ flexTable.getFlexCellFormatter().setRowSpan(0, 1, numRows + 1);
+ }
+
+ /**
+ * Remove a row from the flex table.
+ *
+ * @gwt.SRC
+ */
+ private void removeRow(FlexTable flexTable) {
+ int numRows = flexTable.getRowCount();
+ if (numRows > 1) {
+ flexTable.removeRow(numRows - 1);
+ flexTable.getFlexCellFormatter().setRowSpan(0, 1, numRows - 1);
+ }
+ }
+}
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/tables/CwGrid.java b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/tables/CwGrid.java
new file mode 100644
index 0000000..77bfa5a
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/tables/CwGrid.java
@@ -0,0 +1,95 @@
+/*
+ * Copyright 2008 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.showcase.client.content.tables;
+
+import com.google.gwt.i18n.client.Constants;
+import com.google.gwt.sample.showcase.client.ContentWidget;
+import com.google.gwt.sample.showcase.client.Showcase;
+import com.google.gwt.user.client.ui.Grid;
+import com.google.gwt.user.client.ui.Widget;
+
+/**
+ * Example file.
+ */
+public class CwGrid extends ContentWidget {
+ /**
+ * The constants used in this Content Widget.
+ *
+ * @gwt.SRC
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String cwGridDescription();
+
+ String cwGridName();
+ }
+
+ /**
+ * An instance of the constants.
+ *
+ * @gwt.DATA
+ */
+ private CwConstants constants;
+
+ /**
+ * Constructor.
+ *
+ * @param constants the constants
+ */
+ public CwGrid(CwConstants constants) {
+ super(constants);
+ this.constants = constants;
+ }
+
+ @Override
+ public String getDescription() {
+ return constants.cwGridDescription();
+ }
+
+ @Override
+ public String getName() {
+ return constants.cwGridName();
+ }
+
+ @Override
+ public boolean hasStyle() {
+ return false;
+ }
+
+ /**
+ * Initialize this example.
+ *
+ * @gwt.SRC
+ */
+ @Override
+ public Widget onInitialize() {
+ // Create a grid
+ Grid grid = new Grid(4, 4);
+
+ // Add images to the grid
+ int numRows = grid.getRowCount();
+ int numColumns = grid.getColumnCount();
+ for (int row = 0; row < numRows; row++) {
+ for (int col = 0; col < numColumns; col++) {
+ grid.setWidget(row, col, Showcase.images.gwtLogo().createImage());
+ }
+ }
+
+ // Return the panel
+ grid.ensureDebugId("cwGrid");
+ return grid;
+ }
+}
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/CwBasicText.java b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/CwBasicText.java
new file mode 100644
index 0000000..0eef7d5
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/CwBasicText.java
@@ -0,0 +1,187 @@
+/*
+ * Copyright 2008 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.showcase.client.content.text;
+
+import com.google.gwt.i18n.client.Constants;
+import com.google.gwt.sample.showcase.client.ContentWidget;
+import com.google.gwt.user.client.ui.ClickListener;
+import com.google.gwt.user.client.ui.HTML;
+import com.google.gwt.user.client.ui.HorizontalPanel;
+import com.google.gwt.user.client.ui.KeyboardListenerAdapter;
+import com.google.gwt.user.client.ui.Label;
+import com.google.gwt.user.client.ui.PasswordTextBox;
+import com.google.gwt.user.client.ui.TextArea;
+import com.google.gwt.user.client.ui.TextBox;
+import com.google.gwt.user.client.ui.TextBoxBase;
+import com.google.gwt.user.client.ui.VerticalPanel;
+import com.google.gwt.user.client.ui.Widget;
+
+/**
+ * Example file.
+ *
+ * @gwt.CSS .gwt-TextBox
+ * @gwt.CSS .gwt-PasswordTextBox
+ * @gwt.CSS .gwt-TextArea
+ */
+public class CwBasicText extends ContentWidget {
+ /**
+ * The constants used in this Content Widget.
+ *
+ * @gwt.SRC
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String cwBasicTextAreaLabel();
+
+ String cwBasicTextDescription();
+
+ String cwBasicTextName();
+
+ String cwBasicTextNormalLabel();
+
+ String cwBasicTextPasswordLabel();
+
+ String cwBasicTextReadOnly();
+
+ String cwBasicTextSelected();
+ }
+
+ /**
+ * An instance of the constants.
+ *
+ * @gwt.DATA
+ */
+ private CwConstants constants;
+
+ /**
+ * Constructor.
+ *
+ * @param constants the constants
+ */
+ public CwBasicText(CwConstants constants) {
+ super(constants);
+ this.constants = constants;
+ }
+
+ @Override
+ public String getDescription() {
+ return constants.cwBasicTextDescription();
+ }
+
+ @Override
+ public String getName() {
+ return constants.cwBasicTextName();
+ }
+
+ /**
+ * Initialize this example.
+ *
+ * @gwt.SRC
+ */
+ @Override
+ public Widget onInitialize() {
+ // Create a panel to layout the widgets
+ VerticalPanel vpanel = new VerticalPanel();
+ vpanel.setSpacing(5);
+
+ // Add a normal and disabled text box
+ TextBox normalText = new TextBox();
+ normalText.ensureDebugId("cwBasicText-textbox");
+ TextBox disabledText = new TextBox();
+ disabledText.ensureDebugId("cwBasicText-textbox-disabled");
+ disabledText.setText(constants.cwBasicTextReadOnly());
+ disabledText.setEnabled(false);
+ vpanel.add(new HTML(constants.cwBasicTextNormalLabel()));
+ vpanel.add(createTextExample(normalText, true));
+ vpanel.add(createTextExample(disabledText, false));
+
+ // Add a normal and disabled password text box
+ PasswordTextBox normalPassword = new PasswordTextBox();
+ normalPassword.ensureDebugId("cwBasicText-password");
+ PasswordTextBox disabledPassword = new PasswordTextBox();
+ disabledPassword.ensureDebugId("cwBasicText-password-disabled");
+ disabledPassword.setText(constants.cwBasicTextReadOnly());
+ disabledPassword.setEnabled(false);
+ vpanel.add(new HTML("<br><br>" + constants.cwBasicTextPasswordLabel()));
+ vpanel.add(createTextExample(normalPassword, true));
+ vpanel.add(createTextExample(disabledPassword, false));
+
+ // Add a text area
+ TextArea textArea = new TextArea();
+ textArea.ensureDebugId("cwBasicText-textarea");
+ vpanel.add(new HTML("<br><br>" + constants.cwBasicTextAreaLabel()));
+ vpanel.add(createTextExample(textArea, true));
+
+ // Return the panel
+ return vpanel;
+ }
+
+ /**
+ * Create a TextBox example that includes the text box and an optional
+ * listener that updates a Label with the currently selected text.
+ *
+ * @param textBox the text box to listen to
+ * @param addSelection add listeners to update label
+ * @return the Label that will be updated
+ * @gwt.SRC
+ */
+ private HorizontalPanel createTextExample(final TextBoxBase textBox,
+ boolean addSelection) {
+ // Add the text box and label to a panel
+ HorizontalPanel hPanel = new HorizontalPanel();
+ hPanel.setSpacing(4);
+ hPanel.add(textBox);
+
+ // Add listeners
+ if (addSelection) {
+ // Create the new label
+ final Label label = new Label(constants.cwBasicTextSelected() + ": 0, 0");
+
+ // Add a KeyboardListener
+ textBox.addKeyboardListener(new KeyboardListenerAdapter() {
+ @Override
+ public void onKeyUp(Widget sender, char keyCode, int modifiers) {
+ updateSelectionLabel(textBox, label);
+ }
+ });
+
+ // Add a ClickListener
+ textBox.addClickListener(new ClickListener() {
+ public void onClick(Widget sender) {
+ updateSelectionLabel(textBox, label);
+ }
+ });
+
+ // Add the label to the box
+ hPanel.add(label);
+ }
+
+ // Return the panel
+ return hPanel;
+ }
+
+ /**
+ * Update the text in one of the selection labels.
+ *
+ * @param textBox the text box
+ * @param label the label to update
+ * @gwt.SRC
+ */
+ private void updateSelectionLabel(TextBoxBase textBox, Label label) {
+ label.setText(constants.cwBasicTextSelected() + ": "
+ + textBox.getCursorPos() + ", " + textBox.getSelectionLength());
+ }
+}
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/CwRichText.java b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/CwRichText.java
new file mode 100644
index 0000000..3c7e00d
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/CwRichText.java
@@ -0,0 +1,94 @@
+/*
+ * Copyright 2008 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.showcase.client.content.text;
+
+import com.google.gwt.i18n.client.Constants;
+import com.google.gwt.sample.showcase.client.ContentWidget;
+import com.google.gwt.user.client.ui.Grid;
+import com.google.gwt.user.client.ui.RichTextArea;
+import com.google.gwt.user.client.ui.Widget;
+
+/**
+ * Example file.
+ *
+ * @gwt.CSS .gwt-RichTextArea
+ * @gwt.CSS .hasRichTextToolbar
+ * @gwt.CSS .gwt-RichTextToolbar
+ * @gwt.CSS .cw-RichText
+ */
+public class CwRichText extends ContentWidget {
+ /**
+ * The constants used in this Content Widget.
+ *
+ * @gwt.SRC
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String cwRichTextDescription();
+
+ String cwRichTextName();
+ }
+
+ /**
+ * An instance of the constants.
+ *
+ * @gwt.DATA
+ */
+ private CwConstants constants;
+
+ /**
+ * Constructor.
+ *
+ * @param constants the constants
+ */
+ public CwRichText(CwConstants constants) {
+ super(constants);
+ this.constants = constants;
+ }
+
+ @Override
+ public String getDescription() {
+ return constants.cwRichTextDescription();
+ }
+
+ @Override
+ public String getName() {
+ return constants.cwRichTextName();
+ }
+
+ /**
+ * Initialize this example.
+ *
+ * @gwt.SRC
+ */
+ @Override
+ public Widget onInitialize() {
+ // Create the text area and toolbar
+ RichTextArea area = new RichTextArea();
+ area.ensureDebugId("cwRichText-area");
+ area.setSize("100%", "14em");
+ RichTextToolbar toolbar = new RichTextToolbar(area);
+ toolbar.ensureDebugId("cwRichText-toolbar");
+ toolbar.setWidth("100%");
+
+ // Add the components to a panel
+ Grid grid = new Grid(2, 1);
+ grid.setStyleName("cw-RichText");
+ grid.setWidget(0, 0, toolbar);
+ grid.setWidget(1, 0, area);
+ return grid;
+ }
+}
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/RichTextToolbar$Strings.properties b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/RichTextToolbar$Strings.properties
new file mode 100644
index 0000000..363b704
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/RichTextToolbar$Strings.properties
@@ -0,0 +1,35 @@
+bold = Toggle Bold
+createLink = Create Link
+hr = Insert Horizontal Rule
+indent = Indent Right
+insertImage = Insert Image
+italic = Toggle Italic
+justifyCenter = Center
+justifyLeft = Left Justify
+justifyRight = Right Justify
+ol = Insert Ordered List
+outdent = Indent Left
+removeFormat = Remove Formatting
+removeLink = Remove Link
+strikeThrough = Toggle Strikethrough
+subscript = Toggle Subscript
+superscript = Toggle Superscript
+ul = Insert Unordered List
+underline = Toggle Underline
+color = Color
+black = Black
+white = White
+red = Red
+green = Green
+yellow = Yellow
+blue = Blue
+font = Font
+normal = Normal
+size = Size
+xxsmall = XX-Small
+xsmall = X-Small
+small = Small
+medium = Medium
+large = Large
+xlarge = X-Large
+xxlarge = XX-Large
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/RichTextToolbar.java b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/RichTextToolbar.java
new file mode 100644
index 0000000..ae064b6
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/RichTextToolbar.java
@@ -0,0 +1,493 @@
+/*
+ * Copyright 2008 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.showcase.client.content.text;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.i18n.client.Constants;
+import com.google.gwt.user.client.Window;
+import com.google.gwt.user.client.ui.AbstractImagePrototype;
+import com.google.gwt.user.client.ui.ChangeListener;
+import com.google.gwt.user.client.ui.ClickListener;
+import com.google.gwt.user.client.ui.Composite;
+import com.google.gwt.user.client.ui.HorizontalPanel;
+import com.google.gwt.user.client.ui.ImageBundle;
+import com.google.gwt.user.client.ui.KeyboardListener;
+import com.google.gwt.user.client.ui.ListBox;
+import com.google.gwt.user.client.ui.PushButton;
+import com.google.gwt.user.client.ui.RichTextArea;
+import com.google.gwt.user.client.ui.ToggleButton;
+import com.google.gwt.user.client.ui.VerticalPanel;
+import com.google.gwt.user.client.ui.Widget;
+
+/**
+ * A sample toolbar for use with {@link RichTextArea}. It provides a simple UI
+ * for all rich text formatting, dynamically displayed only for the available
+ * functionality.
+ */
+public class RichTextToolbar extends Composite {
+
+ /**
+ * This {@link ImageBundle} is used for all the button icons. Using an image
+ * bundle allows all of these images to be packed into a single image, which
+ * saves a lot of HTTP requests, drastically improving startup time.
+ */
+ public interface Images extends ImageBundle {
+
+ /**
+ * @gwt.resource bold.gif
+ */
+ AbstractImagePrototype bold();
+
+ /**
+ * @gwt.resource createLink.gif
+ */
+ AbstractImagePrototype createLink();
+
+ /**
+ * @gwt.resource hr.gif
+ */
+ AbstractImagePrototype hr();
+
+ /**
+ * @gwt.resource indent.gif
+ */
+ AbstractImagePrototype indent();
+
+ /**
+ * @gwt.resource insertImage.gif
+ */
+ AbstractImagePrototype insertImage();
+
+ /**
+ * @gwt.resource italic.gif
+ */
+ AbstractImagePrototype italic();
+
+ /**
+ * @gwt.resource justifyCenter.gif
+ */
+ AbstractImagePrototype justifyCenter();
+
+ /**
+ * @gwt.resource justifyLeft.gif
+ */
+ AbstractImagePrototype justifyLeft();
+
+ /**
+ * @gwt.resource justifyRight.gif
+ */
+ AbstractImagePrototype justifyRight();
+
+ /**
+ * @gwt.resource ol.gif
+ */
+ AbstractImagePrototype ol();
+
+ /**
+ * @gwt.resource outdent.gif
+ */
+ AbstractImagePrototype outdent();
+
+ /**
+ * @gwt.resource removeFormat.gif
+ */
+ AbstractImagePrototype removeFormat();
+
+ /**
+ * @gwt.resource removeLink.gif
+ */
+ AbstractImagePrototype removeLink();
+
+ /**
+ * @gwt.resource strikeThrough.gif
+ */
+ AbstractImagePrototype strikeThrough();
+
+ /**
+ * @gwt.resource subscript.gif
+ */
+ AbstractImagePrototype subscript();
+
+ /**
+ * @gwt.resource superscript.gif
+ */
+ AbstractImagePrototype superscript();
+
+ /**
+ * @gwt.resource ul.gif
+ */
+ AbstractImagePrototype ul();
+
+ /**
+ * @gwt.resource underline.gif
+ */
+ AbstractImagePrototype underline();
+ }
+
+ /**
+ * This {@link Constants} interface is used to make the toolbar's strings
+ * internationalizable.
+ */
+ public interface Strings extends Constants {
+
+ String black();
+
+ String blue();
+
+ String bold();
+
+ String color();
+
+ String createLink();
+
+ String font();
+
+ String green();
+
+ String hr();
+
+ String indent();
+
+ String insertImage();
+
+ String italic();
+
+ String justifyCenter();
+
+ String justifyLeft();
+
+ String justifyRight();
+
+ String large();
+
+ String medium();
+
+ String normal();
+
+ String ol();
+
+ String outdent();
+
+ String red();
+
+ String removeFormat();
+
+ String removeLink();
+
+ String size();
+
+ String small();
+
+ String strikeThrough();
+
+ String subscript();
+
+ String superscript();
+
+ String ul();
+
+ String underline();
+
+ String white();
+
+ String xlarge();
+
+ String xsmall();
+
+ String xxlarge();
+
+ String xxsmall();
+
+ String yellow();
+ }
+
+ /**
+ * We use an inner EventListener class to avoid exposing event methods on the
+ * RichTextToolbar itself.
+ */
+ private class EventListener implements ClickListener, ChangeListener,
+ KeyboardListener {
+
+ public void onChange(Widget sender) {
+ if (sender == backColors) {
+ basic.setBackColor(backColors.getValue(backColors.getSelectedIndex()));
+ backColors.setSelectedIndex(0);
+ } else if (sender == foreColors) {
+ basic.setForeColor(foreColors.getValue(foreColors.getSelectedIndex()));
+ foreColors.setSelectedIndex(0);
+ } else if (sender == fonts) {
+ basic.setFontName(fonts.getValue(fonts.getSelectedIndex()));
+ fonts.setSelectedIndex(0);
+ } else if (sender == fontSizes) {
+ basic.setFontSize(fontSizesConstants[fontSizes.getSelectedIndex() - 1]);
+ fontSizes.setSelectedIndex(0);
+ }
+ }
+
+ public void onClick(Widget sender) {
+ if (sender == bold) {
+ basic.toggleBold();
+ } else if (sender == italic) {
+ basic.toggleItalic();
+ } else if (sender == underline) {
+ basic.toggleUnderline();
+ } else if (sender == subscript) {
+ basic.toggleSubscript();
+ } else if (sender == superscript) {
+ basic.toggleSuperscript();
+ } else if (sender == strikethrough) {
+ extended.toggleStrikethrough();
+ } else if (sender == indent) {
+ extended.rightIndent();
+ } else if (sender == outdent) {
+ extended.leftIndent();
+ } else if (sender == justifyLeft) {
+ basic.setJustification(RichTextArea.Justification.LEFT);
+ } else if (sender == justifyCenter) {
+ basic.setJustification(RichTextArea.Justification.CENTER);
+ } else if (sender == justifyRight) {
+ basic.setJustification(RichTextArea.Justification.RIGHT);
+ } else if (sender == insertImage) {
+ String url = Window.prompt("Enter an image URL:", "http://");
+ if (url != null) {
+ extended.insertImage(url);
+ }
+ } else if (sender == createLink) {
+ String url = Window.prompt("Enter a link URL:", "http://");
+ if (url != null) {
+ extended.createLink(url);
+ }
+ } else if (sender == removeLink) {
+ extended.removeLink();
+ } else if (sender == hr) {
+ extended.insertHorizontalRule();
+ } else if (sender == ol) {
+ extended.insertOrderedList();
+ } else if (sender == ul) {
+ extended.insertUnorderedList();
+ } else if (sender == removeFormat) {
+ extended.removeFormat();
+ } else if (sender == richText) {
+ // We use the RichTextArea's onKeyUp event to update the toolbar status.
+ // This will catch any cases where the user moves the cursur using the
+ // keyboard, or uses one of the browser's built-in keyboard shortcuts.
+ updateStatus();
+ }
+ }
+
+ public void onKeyDown(Widget sender, char keyCode, int modifiers) {
+ }
+
+ public void onKeyPress(Widget sender, char keyCode, int modifiers) {
+ }
+
+ public void onKeyUp(Widget sender, char keyCode, int modifiers) {
+ if (sender == richText) {
+ // We use the RichTextArea's onKeyUp event to update the toolbar status.
+ // This will catch any cases where the user moves the cursur using the
+ // keyboard, or uses one of the browser's built-in keyboard shortcuts.
+ updateStatus();
+ }
+ }
+ }
+
+ private static final RichTextArea.FontSize[] fontSizesConstants = new RichTextArea.FontSize[] {
+ RichTextArea.FontSize.XX_SMALL, RichTextArea.FontSize.X_SMALL,
+ RichTextArea.FontSize.SMALL, RichTextArea.FontSize.MEDIUM,
+ RichTextArea.FontSize.LARGE, RichTextArea.FontSize.X_LARGE,
+ RichTextArea.FontSize.XX_LARGE};
+
+ private Images images = (Images) GWT.create(Images.class);
+ private Strings strings = (Strings) GWT.create(Strings.class);
+ private EventListener listener = new EventListener();
+
+ private RichTextArea richText;
+ private RichTextArea.BasicFormatter basic;
+ private RichTextArea.ExtendedFormatter extended;
+
+ private VerticalPanel outer = new VerticalPanel();
+ private HorizontalPanel topPanel = new HorizontalPanel();
+ private HorizontalPanel bottomPanel = new HorizontalPanel();
+ private ToggleButton bold;
+ private ToggleButton italic;
+ private ToggleButton underline;
+ private ToggleButton subscript;
+ private ToggleButton superscript;
+ private ToggleButton strikethrough;
+ private PushButton indent;
+ private PushButton outdent;
+ private PushButton justifyLeft;
+ private PushButton justifyCenter;
+ private PushButton justifyRight;
+ private PushButton hr;
+ private PushButton ol;
+ private PushButton ul;
+ private PushButton insertImage;
+ private PushButton createLink;
+ private PushButton removeLink;
+ private PushButton removeFormat;
+
+ private ListBox backColors;
+ private ListBox foreColors;
+ private ListBox fonts;
+ private ListBox fontSizes;
+
+ /**
+ * Creates a new toolbar that drives the given rich text area.
+ *
+ * @param richText the rich text area to be controlled
+ */
+ public RichTextToolbar(RichTextArea richText) {
+ this.richText = richText;
+ this.basic = richText.getBasicFormatter();
+ this.extended = richText.getExtendedFormatter();
+
+ outer.add(topPanel);
+ outer.add(bottomPanel);
+ topPanel.setWidth("100%");
+ bottomPanel.setWidth("100%");
+
+ initWidget(outer);
+ setStyleName("gwt-RichTextToolbar");
+ richText.addStyleName("hasRichTextToolbar");
+
+ if (basic != null) {
+ topPanel.add(bold = createToggleButton(images.bold(), strings.bold()));
+ topPanel.add(italic = createToggleButton(images.italic(), strings.italic()));
+ topPanel.add(underline = createToggleButton(images.underline(),
+ strings.underline()));
+ topPanel.add(subscript = createToggleButton(images.subscript(),
+ strings.subscript()));
+ topPanel.add(superscript = createToggleButton(images.superscript(),
+ strings.superscript()));
+ topPanel.add(justifyLeft = createPushButton(images.justifyLeft(),
+ strings.justifyLeft()));
+ topPanel.add(justifyCenter = createPushButton(images.justifyCenter(),
+ strings.justifyCenter()));
+ topPanel.add(justifyRight = createPushButton(images.justifyRight(),
+ strings.justifyRight()));
+ }
+
+ if (extended != null) {
+ topPanel.add(strikethrough = createToggleButton(images.strikeThrough(),
+ strings.strikeThrough()));
+ topPanel.add(indent = createPushButton(images.indent(), strings.indent()));
+ topPanel.add(outdent = createPushButton(images.outdent(), strings.outdent()));
+ topPanel.add(hr = createPushButton(images.hr(), strings.hr()));
+ topPanel.add(ol = createPushButton(images.ol(), strings.ol()));
+ topPanel.add(ul = createPushButton(images.ul(), strings.ul()));
+ topPanel.add(insertImage = createPushButton(images.insertImage(),
+ strings.insertImage()));
+ topPanel.add(createLink = createPushButton(images.createLink(),
+ strings.createLink()));
+ topPanel.add(removeLink = createPushButton(images.removeLink(),
+ strings.removeLink()));
+ topPanel.add(removeFormat = createPushButton(images.removeFormat(),
+ strings.removeFormat()));
+ }
+
+ if (basic != null) {
+ bottomPanel.add(backColors = createColorList("Background"));
+ bottomPanel.add(foreColors = createColorList("Foreground"));
+ bottomPanel.add(fonts = createFontList());
+ bottomPanel.add(fontSizes = createFontSizes());
+
+ // We only use these listeners for updating status, so don't hook them up
+ // unless at least basic editing is supported.
+ richText.addKeyboardListener(listener);
+ richText.addClickListener(listener);
+ }
+ }
+
+ private ListBox createColorList(String caption) {
+ ListBox lb = new ListBox();
+ lb.addChangeListener(listener);
+ lb.setVisibleItemCount(1);
+
+ lb.addItem(caption);
+ lb.addItem(strings.white(), "white");
+ lb.addItem(strings.black(), "black");
+ lb.addItem(strings.red(), "red");
+ lb.addItem(strings.green(), "green");
+ lb.addItem(strings.yellow(), "yellow");
+ lb.addItem(strings.blue(), "blue");
+ return lb;
+ }
+
+ private ListBox createFontList() {
+ ListBox lb = new ListBox();
+ lb.addChangeListener(listener);
+ lb.setVisibleItemCount(1);
+
+ lb.addItem(strings.font(), "");
+ lb.addItem(strings.normal(), "");
+ lb.addItem("Times New Roman", "Times New Roman");
+ lb.addItem("Arial", "Arial");
+ lb.addItem("Courier New", "Courier New");
+ lb.addItem("Georgia", "Georgia");
+ lb.addItem("Trebuchet", "Trebuchet");
+ lb.addItem("Verdana", "Verdana");
+ return lb;
+ }
+
+ private ListBox createFontSizes() {
+ ListBox lb = new ListBox();
+ lb.addChangeListener(listener);
+ lb.setVisibleItemCount(1);
+
+ lb.addItem(strings.size());
+ lb.addItem(strings.xxsmall());
+ lb.addItem(strings.xsmall());
+ lb.addItem(strings.small());
+ lb.addItem(strings.medium());
+ lb.addItem(strings.large());
+ lb.addItem(strings.xlarge());
+ lb.addItem(strings.xxlarge());
+ return lb;
+ }
+
+ private PushButton createPushButton(AbstractImagePrototype img, String tip) {
+ PushButton pb = new PushButton(img.createImage());
+ pb.addClickListener(listener);
+ pb.setTitle(tip);
+ return pb;
+ }
+
+ private ToggleButton createToggleButton(AbstractImagePrototype img, String tip) {
+ ToggleButton tb = new ToggleButton(img.createImage());
+ tb.addClickListener(listener);
+ tb.setTitle(tip);
+ return tb;
+ }
+
+ /**
+ * Updates the status of all the stateful buttons.
+ */
+ private void updateStatus() {
+ if (basic != null) {
+ bold.setDown(basic.isBold());
+ italic.setDown(basic.isItalic());
+ underline.setDown(basic.isUnderlined());
+ subscript.setDown(basic.isSubscript());
+ superscript.setDown(basic.isSuperscript());
+ }
+
+ if (extended != null) {
+ strikethrough.setDown(extended.isStrikethrough());
+ }
+ }
+}
+
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/backColors.gif b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/backColors.gif
new file mode 100644
index 0000000..ddfc1ce
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/backColors.gif
Binary files differ
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/bold.gif b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/bold.gif
new file mode 100644
index 0000000..249e5af
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/bold.gif
Binary files differ
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/createLink.gif b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/createLink.gif
new file mode 100644
index 0000000..3ab9e59
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/createLink.gif
Binary files differ
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/fontSizes.gif b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/fontSizes.gif
new file mode 100644
index 0000000..c2f4c8c
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/fontSizes.gif
Binary files differ
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/fonts.gif b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/fonts.gif
new file mode 100644
index 0000000..1629cab
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/fonts.gif
Binary files differ
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/foreColors.gif b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/foreColors.gif
new file mode 100644
index 0000000..2bb89ef
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/foreColors.gif
Binary files differ
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/hr.gif b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/hr.gif
new file mode 100644
index 0000000..3fb1607
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/hr.gif
Binary files differ
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/indent.gif b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/indent.gif
new file mode 100644
index 0000000..8b837f0
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/indent.gif
Binary files differ
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/insertImage.gif b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/insertImage.gif
new file mode 100644
index 0000000..db61c9a
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/insertImage.gif
Binary files differ
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/italic.gif b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/italic.gif
new file mode 100644
index 0000000..2b0a5a0
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/italic.gif
Binary files differ
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/justifyCenter.gif b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/justifyCenter.gif
new file mode 100644
index 0000000..7d22640
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/justifyCenter.gif
Binary files differ
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/justifyLeft.gif b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/justifyLeft.gif
new file mode 100644
index 0000000..3c0f350
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/justifyLeft.gif
Binary files differ
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/justifyRight.gif b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/justifyRight.gif
new file mode 100644
index 0000000..99ee258
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/justifyRight.gif
Binary files differ
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/ol.gif b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/ol.gif
new file mode 100644
index 0000000..833bb40
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/ol.gif
Binary files differ
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/outdent.gif b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/outdent.gif
new file mode 100644
index 0000000..be86624
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/outdent.gif
Binary files differ
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/removeFormat.gif b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/removeFormat.gif
new file mode 100644
index 0000000..a4339c0
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/removeFormat.gif
Binary files differ
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/removeLink.gif b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/removeLink.gif
new file mode 100644
index 0000000..522ab4b
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/removeLink.gif
Binary files differ
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/strikeThrough.gif b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/strikeThrough.gif
new file mode 100644
index 0000000..6b174c8
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/strikeThrough.gif
Binary files differ
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/subscript.gif b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/subscript.gif
new file mode 100644
index 0000000..04bba05
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/subscript.gif
Binary files differ
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/superscript.gif b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/superscript.gif
new file mode 100644
index 0000000..ac478ee
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/superscript.gif
Binary files differ
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/ul.gif b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/ul.gif
new file mode 100644
index 0000000..01380db
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/ul.gif
Binary files differ
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/underline.gif b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/underline.gif
new file mode 100644
index 0000000..82bae11
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/text/underline.gif
Binary files differ
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/widgets/CwBasicButton.java b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/widgets/CwBasicButton.java
new file mode 100644
index 0000000..8baf61b
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/widgets/CwBasicButton.java
@@ -0,0 +1,107 @@
+/*
+ * Copyright 2008 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.showcase.client.content.widgets;
+
+import com.google.gwt.i18n.client.Constants;
+import com.google.gwt.sample.showcase.client.ContentWidget;
+import com.google.gwt.user.client.Window;
+import com.google.gwt.user.client.ui.Button;
+import com.google.gwt.user.client.ui.ClickListener;
+import com.google.gwt.user.client.ui.HorizontalPanel;
+import com.google.gwt.user.client.ui.Widget;
+
+/**
+ * Example file.
+ *
+ * @gwt.CSS .gwt-Button
+ */
+public class CwBasicButton extends ContentWidget {
+ /**
+ * The constants used in this Content Widget.
+ *
+ * @gwt.SRC
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String cwBasicButtonClickMessage();
+
+ String cwBasicButtonDescription();
+
+ String cwBasicButtonDisabled();
+
+ String cwBasicButtonName();
+
+ String cwBasicButtonNormal();
+ }
+
+ /**
+ * An instance of the constants.
+ *
+ * @gwt.DATA
+ */
+ private CwConstants constants;
+
+ /**
+ * Constructor.
+ *
+ * @param constants the constants
+ */
+ public CwBasicButton(CwConstants constants) {
+ super(constants);
+ this.constants = constants;
+ }
+
+ @Override
+ public String getDescription() {
+ return constants.cwBasicButtonDescription();
+ }
+
+ @Override
+ public String getName() {
+ return constants.cwBasicButtonName();
+ }
+
+ /**
+ * Initialize this example.
+ *
+ * @gwt.SRC
+ */
+ @Override
+ public Widget onInitialize() {
+ // Create a panel to align the widgets
+ HorizontalPanel hPanel = new HorizontalPanel();
+ hPanel.setSpacing(10);
+
+ // Add a normal button
+ Button normalButton = new Button(constants.cwBasicButtonNormal(),
+ new ClickListener() {
+ public void onClick(Widget sender) {
+ Window.alert(constants.cwBasicButtonClickMessage());
+ }
+ });
+ normalButton.ensureDebugId("cwBasicButton-normal");
+ hPanel.add(normalButton);
+
+ // Add a disabled button
+ Button disabledButton = new Button(constants.cwBasicButtonDisabled());
+ disabledButton.ensureDebugId("cwBasicButton-disabled");
+ disabledButton.setEnabled(false);
+ hPanel.add(disabledButton);
+
+ // Return the panel
+ return hPanel;
+ }
+}
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/widgets/CwCheckBox.java b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/widgets/CwCheckBox.java
new file mode 100644
index 0000000..fb06977
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/widgets/CwCheckBox.java
@@ -0,0 +1,110 @@
+/*
+ * Copyright 2008 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.showcase.client.content.widgets;
+
+import com.google.gwt.i18n.client.Constants;
+import com.google.gwt.sample.showcase.client.ContentWidget;
+import com.google.gwt.user.client.ui.CheckBox;
+import com.google.gwt.user.client.ui.HTML;
+import com.google.gwt.user.client.ui.VerticalPanel;
+import com.google.gwt.user.client.ui.Widget;
+
+/**
+ * Example file.
+ *
+ * @gwt.CSS .gwt-CheckBox
+ */
+public class CwCheckBox extends ContentWidget {
+ /**
+ * The constants used in this Content Widget.
+ *
+ * @gwt.SRC
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String cwCheckBoxCheckAll();
+
+ String cwCheckBoxDescription();
+
+ String cwCheckBoxFemale();
+
+ String cwCheckBoxMale();
+
+ String cwCheckBoxName();
+
+ String cwCheckBoxUnknown();
+ }
+
+ /**
+ * An instance of the constants.
+ *
+ * @gwt.DATA
+ */
+ private CwConstants constants;
+
+ /**
+ * Constructor.
+ *
+ * @param constants the constants
+ */
+ public CwCheckBox(CwConstants constants) {
+ super(constants);
+ this.constants = constants;
+ }
+
+ @Override
+ public String getDescription() {
+ return constants.cwCheckBoxDescription();
+ }
+
+ @Override
+ public String getName() {
+ return constants.cwCheckBoxName();
+ }
+
+ /**
+ * Initialize this example.
+ *
+ * @gwt.SRC
+ */
+ @Override
+ public Widget onInitialize() {
+ // Create a vertical panel to align the check boxes
+ VerticalPanel vPanel = new VerticalPanel();
+ HTML label = new HTML(constants.cwCheckBoxCheckAll());
+ label.ensureDebugId("cwCheckBox-label");
+ vPanel.add(label);
+
+ // Add a male checkbox
+ CheckBox maleCheckBox = new CheckBox(constants.cwCheckBoxMale());
+ maleCheckBox.ensureDebugId("cwCheckBox-male");
+ vPanel.add(maleCheckBox);
+
+ // Add a female checkbox
+ CheckBox femaleCheckBox = new CheckBox(constants.cwCheckBoxFemale());
+ femaleCheckBox.ensureDebugId("cwCheckBox-female");
+ vPanel.add(femaleCheckBox);
+
+ // Add one disabled checkbox
+ CheckBox disabledCheckBox = new CheckBox(constants.cwCheckBoxUnknown());
+ disabledCheckBox.ensureDebugId("cwCheckBox-disabled");
+ disabledCheckBox.setEnabled(false);
+ vPanel.add(disabledCheckBox);
+
+ // Return the panel of checkboxes
+ return vPanel;
+ }
+}
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/widgets/CwCustomButton.java b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/widgets/CwCustomButton.java
new file mode 100644
index 0000000..166f6c3
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/widgets/CwCustomButton.java
@@ -0,0 +1,127 @@
+/*
+ * Copyright 2008 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.showcase.client.content.widgets;
+
+import com.google.gwt.i18n.client.Constants;
+import com.google.gwt.sample.showcase.client.ContentWidget;
+import com.google.gwt.sample.showcase.client.Showcase;
+import com.google.gwt.user.client.ui.HTML;
+import com.google.gwt.user.client.ui.HorizontalPanel;
+import com.google.gwt.user.client.ui.PushButton;
+import com.google.gwt.user.client.ui.ToggleButton;
+import com.google.gwt.user.client.ui.VerticalPanel;
+import com.google.gwt.user.client.ui.Widget;
+
+/**
+ * Example file.
+ *
+ * @gwt.CSS .gwt-PushButton
+ * @gwt.CSS .gwt-ToggleButton
+ */
+public class CwCustomButton extends ContentWidget {
+ /**
+ * The constants used in this Content Widget.
+ *
+ * @gwt.SRC
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String cwCustomButtonDescription();
+
+ String cwCustomButtonName();
+
+ String cwCustomButtonPush();
+
+ String cwCustomButtonToggle();
+ }
+
+ /**
+ * An instance of the constants.
+ *
+ * @gwt.DATA
+ */
+ private CwConstants constants;
+
+ /**
+ * Constructor.
+ *
+ * @param constants the constants
+ */
+ public CwCustomButton(CwConstants constants) {
+ super(constants);
+ this.constants = constants;
+ }
+
+ @Override
+ public String getDescription() {
+ return constants.cwCustomButtonDescription();
+ }
+
+ @Override
+ public String getName() {
+ return constants.cwCustomButtonName();
+ }
+
+ /**
+ * Initialize this example.
+ *
+ * @gwt.SRC
+ */
+ @Override
+ public Widget onInitialize() {
+ // Create a panel to layout the widgets
+ VerticalPanel vpanel = new VerticalPanel();
+ HorizontalPanel pushPanel = new HorizontalPanel();
+ pushPanel.setSpacing(10);
+ HorizontalPanel togglePanel = new HorizontalPanel();
+ togglePanel.setSpacing(10);
+
+ // Combine all the panels
+ vpanel.add(new HTML(constants.cwCustomButtonPush()));
+ vpanel.add(pushPanel);
+ vpanel.add(new HTML("<br><br>" + constants.cwCustomButtonToggle()));
+ vpanel.add(togglePanel);
+
+ // Add a normal PushButton
+ PushButton normalPushButton = new PushButton(
+ Showcase.images.gwtLogo().createImage());
+ normalPushButton.ensureDebugId("cwCustomButton-push-normal");
+ pushPanel.add(normalPushButton);
+
+ // Add a disabled PushButton
+ PushButton disabledPushButton = new PushButton(
+ Showcase.images.gwtLogo().createImage());
+ disabledPushButton.ensureDebugId("cwCustomButton-push-disabled");
+ disabledPushButton.setEnabled(false);
+ pushPanel.add(disabledPushButton);
+
+ // Add a normal ToggleButton
+ ToggleButton normalToggleButton = new ToggleButton(
+ Showcase.images.gwtLogo().createImage());
+ normalToggleButton.ensureDebugId("cwCustomButton-toggle-normal");
+ togglePanel.add(normalToggleButton);
+
+ // Add a disabled ToggleButton
+ ToggleButton disabledToggleButton = new ToggleButton(
+ Showcase.images.gwtLogo().createImage());
+ disabledToggleButton.ensureDebugId("cwCustomButton-toggle-disabled");
+ disabledToggleButton.setEnabled(false);
+ togglePanel.add(disabledToggleButton);
+
+ // Return the panel
+ return vpanel;
+ }
+}
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/widgets/CwFileUpload.java b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/widgets/CwFileUpload.java
new file mode 100644
index 0000000..7a893e8
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/widgets/CwFileUpload.java
@@ -0,0 +1,117 @@
+/*
+ * Copyright 2008 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.showcase.client.content.widgets;
+
+import com.google.gwt.i18n.client.Constants;
+import com.google.gwt.sample.showcase.client.ContentWidget;
+import com.google.gwt.user.client.Window;
+import com.google.gwt.user.client.ui.Button;
+import com.google.gwt.user.client.ui.ClickListener;
+import com.google.gwt.user.client.ui.FileUpload;
+import com.google.gwt.user.client.ui.HTML;
+import com.google.gwt.user.client.ui.VerticalPanel;
+import com.google.gwt.user.client.ui.Widget;
+
+/**
+ * Example file.
+ *
+ * @gwt.CSS .gwt-FileUpload
+ */
+public class CwFileUpload extends ContentWidget {
+ /**
+ * The constants used in this Content Widget.
+ *
+ * @gwt.SRC
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String cwFileUploadButton();
+
+ String cwFileUploadDescription();
+
+ String cwFileUploadName();
+
+ String cwFileUploadNoFileError();
+
+ String cwFileUploadSelectFile();
+
+ String cwFileUploadSuccessful();
+ }
+
+ /**
+ * An instance of the constants.
+ *
+ * @gwt.DATA
+ */
+ private CwConstants constants;
+
+ /**
+ * Constructor.
+ *
+ * @param constants the constants
+ */
+ public CwFileUpload(CwConstants constants) {
+ super(constants);
+ this.constants = constants;
+ }
+
+ @Override
+ public String getDescription() {
+ return constants.cwFileUploadDescription();
+ }
+
+ @Override
+ public String getName() {
+ return constants.cwFileUploadName();
+ }
+
+ /**
+ * Initialize this example.
+ *
+ * @gwt.SRC
+ */
+ @Override
+ public Widget onInitialize() {
+ // Create a vertical panel to align the content
+ VerticalPanel vPanel = new VerticalPanel();
+
+ // Add a label
+ vPanel.add(new HTML(constants.cwFileUploadSelectFile()));
+
+ // Add a file upload widget
+ final FileUpload fileUpload = new FileUpload();
+ fileUpload.ensureDebugId("cwFileUpload");
+ vPanel.add(fileUpload);
+
+ // Add a button to upload the file
+ Button uploadButton = new Button(constants.cwFileUploadButton());
+ uploadButton.addClickListener(new ClickListener() {
+ public void onClick(Widget sender) {
+ String filename = fileUpload.getFilename();
+ if (filename.length() == 0) {
+ Window.alert(constants.cwFileUploadNoFileError());
+ } else {
+ Window.alert(constants.cwFileUploadSuccessful());
+ }
+ }
+ });
+ vPanel.add(new HTML("<br>"));
+ vPanel.add(uploadButton);
+
+ // Return the layout panel
+ return vPanel;
+ }
+}
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/widgets/CwHyperlink.java b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/widgets/CwHyperlink.java
new file mode 100644
index 0000000..a94d1d3
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/widgets/CwHyperlink.java
@@ -0,0 +1,118 @@
+/*
+ * Copyright 2008 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.showcase.client.content.widgets;
+
+import com.google.gwt.i18n.client.Constants;
+import com.google.gwt.sample.showcase.client.ContentWidget;
+import com.google.gwt.sample.showcase.client.ShowcaseConstants;
+import com.google.gwt.user.client.ui.HTML;
+import com.google.gwt.user.client.ui.Hyperlink;
+import com.google.gwt.user.client.ui.VerticalPanel;
+import com.google.gwt.user.client.ui.Widget;
+
+/**
+ * Example file.
+ *
+ * @gwt.CSS .gwt-Hyperlink
+ */
+public class CwHyperlink extends ContentWidget {
+ /**
+ * The constants used in this Content Widget.
+ *
+ * @gwt.SRC
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String cwHyperlinkChoose();
+
+ String cwHyperlinkDescription();
+
+ String cwHyperlinkName();
+ }
+
+ /**
+ * An instance of the constants.
+ *
+ * @gwt.DATA
+ */
+ private CwConstants constants;
+
+ /**
+ * Constructor.
+ *
+ * @param constants the constants
+ */
+ public CwHyperlink(CwConstants constants) {
+ super(constants);
+ this.constants = constants;
+ }
+
+ @Override
+ public String getDescription() {
+ return constants.cwHyperlinkDescription();
+ }
+
+ @Override
+ public String getName() {
+ return constants.cwHyperlinkName();
+ }
+
+ /**
+ * Initialize this example.
+ *
+ * @gwt.SRC
+ */
+ @Override
+ public Widget onInitialize() {
+ // Add a label
+ VerticalPanel vPanel = new VerticalPanel();
+ vPanel.add(new HTML(constants.cwHyperlinkChoose()));
+ vPanel.setSpacing(5);
+
+ // Add a hyper link to each section in the Widgets category
+ ShowcaseConstants allConstants = (ShowcaseConstants) constants;
+ vPanel.add(getHyperlink(CwCheckBox.class, allConstants.cwCheckBoxName()));
+ vPanel.add(getHyperlink(CwRadioButton.class,
+ allConstants.cwRadioButtonName()));
+ vPanel.add(getHyperlink(CwBasicButton.class,
+ allConstants.cwBasicButtonName()));
+ vPanel.add(getHyperlink(CwCustomButton.class,
+ allConstants.cwCustomButtonName()));
+ vPanel.add(getHyperlink(CwFileUpload.class, allConstants.cwFileUploadName()));
+
+ // Return the panel
+ return vPanel;
+ }
+
+ /**
+ * Get a {@link Hyperlink} to a section based on the name of the
+ * {@link ContentWidget} example.
+ *
+ * @param cwClass the {@link ContentWidget} class
+ * @param name the name to display for the link
+ * @return a {@link Hyperlink}
+ */
+ private Hyperlink getHyperlink(Class<?> cwClass, String name) {
+ // Get the class name of the content widget
+ String className = cwClass.getName();
+ className = className.substring(className.lastIndexOf('.') + 1);
+
+ // Convert to a hyper link
+ Hyperlink link = new Hyperlink(name, className);
+ link.ensureDebugId("cwHyperlink-" + className);
+ return link;
+ }
+}
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/content/widgets/CwRadioButton.java b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/widgets/CwRadioButton.java
new file mode 100644
index 0000000..ae91525
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/content/widgets/CwRadioButton.java
@@ -0,0 +1,119 @@
+/*
+ * Copyright 2008 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.showcase.client.content.widgets;
+
+import com.google.gwt.i18n.client.Constants;
+import com.google.gwt.sample.showcase.client.ContentWidget;
+import com.google.gwt.user.client.ui.HTML;
+import com.google.gwt.user.client.ui.RadioButton;
+import com.google.gwt.user.client.ui.VerticalPanel;
+import com.google.gwt.user.client.ui.Widget;
+
+/**
+ * Example file.
+ *
+ * @gwt.CSS .gwt-RadioButton
+ */
+public class CwRadioButton extends ContentWidget {
+ /**
+ * The constants used in this Content Widget.
+ *
+ * @gwt.SRC
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String[] cwRadioButtonColors();
+
+ String cwRadioButtonDescription();
+
+ String cwRadioButtonName();
+
+ String cwRadioButtonSelectColor();
+
+ String cwRadioButtonSelectSport();
+
+ String[] cwRadioButtonSports();
+ }
+
+ /**
+ * An instance of the constants.
+ *
+ * @gwt.DATA
+ */
+ private CwConstants constants;
+
+ /**
+ * Constructor.
+ *
+ * @param constants the constants
+ */
+ public CwRadioButton(CwConstants constants) {
+ super(constants);
+ this.constants = constants;
+ }
+
+ @Override
+ public String getDescription() {
+ return constants.cwRadioButtonDescription();
+ }
+
+ @Override
+ public String getName() {
+ return constants.cwRadioButtonName();
+ }
+
+ /**
+ * Initialize this example.
+ *
+ * @gwt.SRC
+ */
+ @Override
+ public Widget onInitialize() {
+ // Create a vertical panel to align the radio buttons
+ VerticalPanel vPanel = new VerticalPanel();
+ vPanel.add(new HTML(constants.cwRadioButtonSelectColor()));
+
+ // Add some radio buttons to a group called 'color'
+ String[] colors = constants.cwRadioButtonColors();
+ for (int i = 0; i < colors.length; i++) {
+ String color = colors[i];
+ RadioButton radioButton = new RadioButton("color", color);
+ radioButton.ensureDebugId("cwRadioButton-color-" + color);
+ if (i == 2) {
+ radioButton.setEnabled(false);
+ }
+ vPanel.add(radioButton);
+ }
+
+ // Add a new header to select your favorite sport
+ vPanel.add(new HTML("<br>" + constants.cwRadioButtonSelectSport()));
+
+ // Add some radio buttons to a group called 'sport'
+ String[] sports = constants.cwRadioButtonSports();
+ for (int i = 0; i < sports.length; i++) {
+ String sport = sports[i];
+ RadioButton radioButton = new RadioButton("sport", sport);
+ radioButton.ensureDebugId("cwRadioButton-sport-"
+ + sport.replaceAll(" ", ""));
+ if (i == 2) {
+ radioButton.setChecked(true);
+ }
+ vPanel.add(radioButton);
+ }
+
+ return vPanel;
+ }
+}
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/gwtLogo.png b/samples/showcase/src/com/google/gwt/sample/showcase/client/gwtLogo.png
new file mode 100644
index 0000000..e0fb4f1
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/gwtLogo.png
Binary files differ
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/gwtLogoThumb.png b/samples/showcase/src/com/google/gwt/sample/showcase/client/gwtLogoThumb.png
new file mode 100644
index 0000000..776bcee
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/gwtLogoThumb.png
Binary files differ
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/jimmy.jpg b/samples/showcase/src/com/google/gwt/sample/showcase/client/jimmy.jpg
new file mode 100755
index 0000000..10d1989
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/jimmy.jpg
Binary files differ
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/jimmyThumb.jpg b/samples/showcase/src/com/google/gwt/sample/showcase/client/jimmyThumb.jpg
new file mode 100644
index 0000000..9356c98
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/jimmyThumb.jpg
Binary files differ
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/noimage.png b/samples/showcase/src/com/google/gwt/sample/showcase/client/noimage.png
new file mode 100644
index 0000000..d125de3
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/noimage.png
Binary files differ
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/propertieschanges.txt b/samples/showcase/src/com/google/gwt/sample/showcase/client/propertieschanges.txt
new file mode 100644
index 0000000..7cb06f2
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/propertieschanges.txt
@@ -0,0 +1,2 @@
+cwDecoratorPanelName
+cwDecoratorPanelDescription
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/generator/ShowcaseGenerator.java b/samples/showcase/src/com/google/gwt/sample/showcase/generator/ShowcaseGenerator.java
new file mode 100644
index 0000000..dd5be6d
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/generator/ShowcaseGenerator.java
@@ -0,0 +1,499 @@
+/*
+ * Copyright 2008 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.showcase.generator;
+
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * A generator that parses the example files used in the
+ * {@link com.google.gwt.sample.showcase.client.Showcase} and generates data
+ * files that contain the example source code and example style definitions.
+ */
+public class ShowcaseGenerator {
+ /**
+ * The names of the CSS files to parse.
+ */
+ private static final String[] CSS_FILES = {"GWT-default.css", "Showcase.css"};
+
+ /**
+ * The root of all files.
+ */
+ private static final String FILE_ROOT = "../../../samples/showcase/src/";
+
+ /**
+ * The destination folder for raw files.
+ */
+ private static final String DST_RAW = FILE_ROOT
+ + "com/google/gwt/sample/showcase/public/raw/";
+
+ /**
+ * The destination folder for parsed source code.
+ */
+ private static final String DST_SOURCE = FILE_ROOT
+ + "com/google/gwt/sample/showcase/public/source/";
+
+ /**
+ * The destination folder for parse style code.
+ */
+ private static final String DST_STYLE = FILE_ROOT
+ + "com/google/gwt/sample/showcase/public/style/";
+
+ /**
+ * The root of content widget files.
+ */
+ private static final String SRC_CONTENT = FILE_ROOT
+ + "com/google/gwt/sample/showcase/client/content/";
+
+ /**
+ * The path to the folder containing all CSS style sheets.
+ */
+ private static final String SRC_CSS = FILE_ROOT
+ + "com/google/gwt/sample/showcase/public/";
+
+ /**
+ * The root of properties files.
+ */
+ private static final String SRC_PROP = FILE_ROOT
+ + "com/google/gwt/sample/showcase/client/";
+
+ /**
+ * The tag used to denote required CSS files.
+ */
+ private static final String TAG_CSS = "@gwt.CSS";
+
+ /**
+ * The tag used to denote data to include in the source.
+ */
+ private static final String TAG_DATA = "@gwt.DATA";
+
+ /**
+ * The tag used to denote a file to include as raw code.
+ */
+ private static final String TAG_RAW = "@gwt.RAW";
+
+ /**
+ * The tag used to denote methods to include in the source.
+ */
+ private static final String TAG_SRC = "@gwt.SRC";
+
+ /**
+ * The contents of the CSS file.
+ */
+ private static String cssFileContents = null;
+
+ /**
+ * Update all properties files so that the names of in the translated files
+ * have the same case as the names in the default properties file. This is
+ * required do to a problem in translation that converts all names to lower
+ * case.
+ */
+ public static void generatePropertiesFiles() {
+ // Get a full list of properties from the default file
+ List<String> propNames = new ArrayList<String>();
+ String filename = SRC_PROP + "ShowcaseConstants.properties";
+ StringBuffer fileContentsBuf = new StringBuffer();
+ BufferedReader br = null;
+ try {
+ br = new BufferedReader(new FileReader(filename));
+ String temp;
+ while ((temp = br.readLine()) != null) {
+ int end = temp.indexOf('=');
+ if (end > 0) {
+ String propName = temp.substring(0, end - 1);
+ propNames.add(propName.trim());
+ }
+ }
+ } catch (FileNotFoundException e) {
+ System.out.println("Cannot find file: " + filename);
+ } catch (IOException e) {
+ System.out.println("Cannot read file: " + filename);
+ } finally {
+ if (br != null) {
+ try {
+ br.close();
+ } catch (IOException e) {
+ }
+ }
+ }
+
+ // Get all properties files
+ File defaultFile = new File(filename);
+ File root = new File(SRC_PROP);
+ File[] files = root.listFiles();
+ for (int i = 0; i < files.length; i++) {
+ if (!files[i].equals(defaultFile) && isFileType(files[i], "properties")) {
+ String fileContents = getFileContents(files[i]);
+ for (String propName : propNames) {
+ fileContents = fileContents.replaceAll("(?i)" + propName, propName);
+ }
+ setFileContents(files[i], fileContents);
+ }
+ }
+ }
+
+ /**
+ * Generate all raw files and put them into a safe directory.
+ */
+ public static void generateRawFiles() {
+ // Remove all existing raw files
+ clearFolder(DST_RAW);
+
+ // Generate new raw files
+ generateRawFiles(new File(SRC_CONTENT));
+ }
+
+ /**
+ * Generate all source files and put them into a safe directory.
+ */
+ public static void generateSourceFiles() {
+ // Remove all existing source files
+ clearFolder(DST_SOURCE);
+
+ // Generate new source files
+ generateSourceFiles(new File(SRC_CONTENT));
+ }
+
+ public static void generateStyleFiles() {
+ // Remove all existing style files
+ clearFolder(DST_STYLE);
+
+ // Combine the contents of all CSS files into one string
+ cssFileContents = "";
+ for (int i = 0; i < CSS_FILES.length; i++) {
+ File cssFile = new File(SRC_CSS + CSS_FILES[i]);
+ cssFileContents += getFileContents(cssFile) + "\n\n";
+ }
+
+ // Generate new style files
+ generateStyleFiles(new File(SRC_CONTENT));
+ }
+
+ public static void main(String[] args) {
+ // Generate required source files
+ System.out.print("Generating source files...");
+ generateSourceFiles();
+ System.out.println("done");
+
+ // Generate required source files
+ System.out.print("Generating raw files...");
+ generateRawFiles();
+ System.out.println("done");
+
+ // Generate required style files
+ System.out.print("Generating style files...");
+ generateStyleFiles();
+ System.out.println("done");
+
+ // Generate required properties files
+ System.out.print("Generating properties files...");
+ generatePropertiesFiles();
+ System.out.println("done");
+ }
+
+ /**
+ * Clear the contents of a folder.
+ *
+ * @param path the path to the folder
+ */
+ private static void clearFolder(String path) {
+ File root = new File(path);
+ File[] files = root.listFiles();
+ for (int i = 0; i < files.length; i++) {
+ if (files[i].isFile()) {
+ files[i].delete();
+ }
+ }
+ }
+
+ /**
+ * Recursively iterate the files in a directory and generate the source code
+ * for each.
+ */
+ private static void generateRawFiles(File root) {
+ if (root.isDirectory()) {
+ // Recurse the directory
+ File[] subFiles = root.listFiles();
+ for (int i = 0; i < subFiles.length; i++) {
+ generateRawFiles(subFiles[i]);
+ }
+ } else if (root.isFile()) {
+ String fileContents = getFileContents(root);
+ int rawTagIndex = fileContents.indexOf(TAG_RAW);
+ if (fileContents == "" || rawTagIndex < 0) {
+ return;
+ }
+
+ // Remove line with gwt.RAW
+ int startLine = fileContents.lastIndexOf("\n", rawTagIndex);
+ int endLine = fileContents.indexOf("\n", rawTagIndex);
+ fileContents = fileContents.substring(0, startLine + 1)
+ + fileContents.substring(endLine + 1);
+
+ // Make the source pretty
+ fileContents = fileContents.replace("<", "<");
+ fileContents = fileContents.replace(">", ">");
+ fileContents = fileContents.replace("* \n */\n", "*/\n");
+ fileContents = "<pre>" + fileContents + "</pre>";
+
+ // Save the source code to a file
+ String saveFile = root.getPath().substring(FILE_ROOT.length()) + ".html";
+ saveFile = saveFile.replace('/', '.');
+ saveFile = DST_RAW + saveFile;
+ setFileContents(saveFile, fileContents);
+ }
+ }
+
+ /**
+ * Recursively iterate the files in a directory and generate the source code
+ * for each.
+ */
+ private static void generateSourceFiles(File root) {
+ if (root.isDirectory()) {
+ // Recurse the directory
+ File[] subFiles = root.listFiles();
+ for (int i = 0; i < subFiles.length; i++) {
+ generateSourceFiles(subFiles[i]);
+ }
+ } else if (root.isFile()) {
+ // Get the file contents
+ if (!isFileType(root, "java")) {
+ return;
+ }
+ String fileContents = getFileContents(root);
+ if (fileContents == "" || fileContents.indexOf(TAG_RAW) >= 0) {
+ return;
+ }
+
+ // Get each data code block
+ String formattedSource = "";
+ int dataTagIndex = fileContents.indexOf(TAG_DATA);
+ int srcTagIndex = fileContents.indexOf(TAG_SRC);
+ while (dataTagIndex >= 0 || srcTagIndex >= 0) {
+ if (dataTagIndex >= 0
+ && (dataTagIndex < srcTagIndex || srcTagIndex < 0)) {
+ // Get the boundaries of a DATA tag
+ int beginIndex = fileContents.lastIndexOf(" /*", dataTagIndex);
+ int beginTagIndex = fileContents.lastIndexOf("\n", dataTagIndex) + 1;
+ int endTagIndex = fileContents.indexOf("\n", dataTagIndex) + 1;
+ int endIndex = fileContents.indexOf(";", beginIndex) + 1;
+
+ // Add to the formatted source
+ String srcData = fileContents.substring(beginIndex, beginTagIndex)
+ + fileContents.substring(endTagIndex, endIndex);
+ formattedSource += srcData + "\n\n";
+
+ // Get next tag
+ dataTagIndex = fileContents.indexOf(TAG_DATA, endIndex + 1);
+ } else {
+ // Get the boundaries of a SRC tag
+ int beginIndex = fileContents.lastIndexOf("/*", srcTagIndex) - 2;
+ int beginTagIndex = fileContents.lastIndexOf("\n", srcTagIndex) + 1;
+ int endTagIndex = fileContents.indexOf("\n", srcTagIndex) + 1;
+ int endIndex = fileContents.indexOf("\n }", beginIndex) + 4;
+
+ // Add to the formatted source
+ String srcCode = fileContents.substring(beginIndex, beginTagIndex)
+ + fileContents.substring(endTagIndex, endIndex);
+ formattedSource += srcCode + "\n\n";
+
+ // Get the next tag
+ srcTagIndex = fileContents.indexOf(TAG_SRC, endIndex + 1);
+ }
+ }
+
+ // Make the source pretty
+ formattedSource = formattedSource.replace("<", "<");
+ formattedSource = formattedSource.replace(">", ">");
+ formattedSource = formattedSource.replace("* \n */\n", "*/\n");
+ formattedSource = "<pre>" + formattedSource + "</pre>";
+
+ // Save the source code to a file
+ String saveFile = root.getPath().substring(FILE_ROOT.length());
+ saveFile = saveFile.replaceAll(".java", ".html");
+ saveFile = saveFile.replace('/', '.');
+ saveFile = DST_SOURCE + saveFile;
+ setFileContents(saveFile, formattedSource);
+ }
+ }
+
+ /**
+ * Recursively iterate the files in a directory and generate the style code
+ * for each.
+ */
+ private static void generateStyleFiles(File root) {
+ if (root.isDirectory()) {
+ // Recurse the directory
+ File[] subFiles = root.listFiles();
+ for (int i = 0; i < subFiles.length; i++) {
+ generateStyleFiles(subFiles[i]);
+ }
+ } else if (root.isFile()) {
+ // Get the file contents
+ if (!isFileType(root, "java")) {
+ return;
+ }
+ String fileContents = getFileContents(root);
+ if (fileContents == "") {
+ return;
+ }
+
+ // Get the class names from the file
+ List<String> styleNames = new ArrayList<String>();
+ int tagIndex = fileContents.indexOf(TAG_CSS);
+ while (tagIndex >= 0) {
+ // Get the style name
+ int beginIndex = fileContents.indexOf(" ", tagIndex);
+ int endIndex = fileContents.indexOf("\n", tagIndex);
+ String styleName = fileContents.substring(beginIndex, endIndex).trim();
+ styleNames.add(styleName);
+
+ // Get next tag
+ tagIndex = fileContents.indexOf(TAG_CSS, tagIndex + 1);
+ }
+
+ // Iterate through the style names
+ Map<String, String> styleDefs = new LinkedHashMap<String, String>();
+ for (String styleName : styleNames) {
+ // Get the start location of the style code in the source file
+ boolean foundStyle = false;
+ int start = cssFileContents.indexOf("\n" + styleName);
+ while (start >= 0) {
+ // Get the matched string name pattern
+ int end = cssFileContents.indexOf("{", start);
+ String matchedName = cssFileContents.substring(start, end).trim();
+
+ // Get the style code
+ end = cssFileContents.indexOf("}", start) + 1;
+ String styleDef = "<pre>" + cssFileContents.substring(start, end)
+ + "</pre>";
+ styleDefs.put(matchedName, styleDef);
+
+ // Goto the next match
+ foundStyle = true;
+ start = cssFileContents.indexOf("\n" + styleName, end);
+ }
+
+ // No style exists
+ if (!foundStyle) {
+ styleDefs.put(styleName, "<pre>" + styleName + " {\n}</pre>");
+ }
+ }
+
+ // Combine all of the styles
+ String formattedStyle = "";
+ for (String styleDef : styleDefs.values()) {
+ formattedStyle += styleDef;
+ }
+
+ // Save the source code to a file
+ String saveFile = root.getPath().substring(FILE_ROOT.length());
+ saveFile = saveFile.replaceAll(".java", ".html");
+ saveFile = saveFile.replace('/', '.');
+ saveFile = DST_STYLE + saveFile;
+ setFileContents(saveFile, formattedStyle);
+ }
+ }
+
+ /**
+ * Get the full contents of a file.
+ *
+ * @param file the file
+ * @return the contents of the file
+ */
+ private static String getFileContents(File file) {
+ String filename = file.getPath();
+ StringBuffer fileContentsBuf = new StringBuffer();
+ BufferedReader br = null;
+ try {
+ br = new BufferedReader(new FileReader(filename));
+ String temp;
+ while ((temp = br.readLine()) != null) {
+ fileContentsBuf.append(temp).append('\n');
+ }
+ } catch (FileNotFoundException e) {
+ System.out.println("Cannot find file: " + filename);
+ } catch (IOException e) {
+ System.out.println("Cannot read file: " + filename);
+ } finally {
+ if (br != null) {
+ try {
+ br.close();
+ } catch (IOException e) {
+ }
+ }
+ }
+
+ // Return the file contents as a string
+ return fileContentsBuf.toString();
+ }
+
+ /**
+ * Verifies that the {@link File} is of the correct type.
+ *
+ * @param file the {@link File} to check
+ * @param filetype the file type, without the .
+ * @return true if file type is correct
+ */
+ private static boolean isFileType(File file, String filetype) {
+ String ext = "." + filetype;
+ String path = file.getPath();
+ return path.substring(path.length() - ext.length()).equals(ext);
+ }
+
+ /**
+ * Set the full contents of a file.
+ *
+ * @param file the {@link File}
+ * @param contents the file contents
+ */
+ private static void setFileContents(File file, String contents) {
+ setFileContents(file.getPath(), contents);
+ }
+
+ /**
+ * Set the full contents of a file.
+ *
+ * @param filename the filename
+ * @param contents the file contents
+ */
+ private static void setFileContents(String filename, String contents) {
+ BufferedWriter out = null;
+ try {
+ FileWriter fstream = new FileWriter(filename);
+ out = new BufferedWriter(fstream);
+ out.write(contents);
+ } catch (IOException e) {
+ System.out.println("Cannot save file: " + filename);
+ } finally {
+ if (out != null) {
+ try {
+ out.close();
+ } catch (IOException e) {
+ }
+ }
+ }
+ }
+}
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/GWT-default.css b/samples/showcase/src/com/google/gwt/sample/showcase/public/GWT-default.css
new file mode 100644
index 0000000..30645b9
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/GWT-default.css
@@ -0,0 +1,1129 @@
+/**
+ * Applied to the entire page.
+ */
+body {
+ color: black;
+ font-family: Helvetica, Arial, sans-serif;
+ font-size: small;
+ margin: 0px;
+ border: 0px;
+ padding: 0px;
+ direction: ltr;
+}
+
+table td, pre {
+ font-size: small;
+}
+
+a, a:visited, a:hover {
+ color: #0000AA;
+}
+
+/**
+ * Applied to buttons.
+ */
+.gwt-Button {
+}
+
+.gwt-Button:active {
+}
+
+.gwt-Button[disabled] {
+ color: #888;
+}
+
+/**
+ * Applied to the checkbox and text next to the checkbox.
+ */
+.gwt-CheckBox {
+}
+
+.gwt-CheckBox-disabled {
+ color: #888;
+}
+
+/**
+ * Applied to the decorator panel.
+ */
+.gwt-DecoratorPanel .topCenter,
+.gwt-DecoratorPanel .bottomCenter {
+ background: url(images/hborder.png) repeat-x;
+}
+.gwt-DecoratorPanel .middleLeft,
+.gwt-DecoratorPanel .middleRight {
+ background: url(images/vborder.png) repeat-y;
+}
+.gwt-DecoratorPanel .topLeft,
+.gwt-DecoratorPanel .topRight,
+.gwt-DecoratorPanel .bottomLeft,
+.gwt-DecoratorPanel .bottomRight {
+ width: 5px;
+ height: 5px;
+ zoom: 1;
+}
+html>body .gwt-DecoratorPanel .topLeft {
+ background: url(images/corner.png) no-repeat 0px 0px;
+}
+html>body .gwt-DecoratorPanel .topRight {
+ background: url(images/corner.png) no-repeat -5px 0px;
+}
+html>body .gwt-DecoratorPanel .bottomLeft {
+ background: url(images/corner.png) no-repeat 0px -5px;
+}
+html>body .gwt-DecoratorPanel .bottomRight {
+ background: url(images/corner.png) no-repeat -5px -5px;
+}
+* html .gwt-DecoratorPanel .topLeftInner {
+ width: 5px;
+ height: 5px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}
+* html .gwt-DecoratorPanel .topRightInner {
+ width: 10px;
+ height: 5px;
+ margin-left: -5px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}
+* html .gwt-DecoratorPanel .bottomLeftInner {
+ width: 5px;
+ height: 10px;
+ margin-left: 0px;
+ margin-top: -5px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}
+* html .gwt-DecoratorPanel .bottomRightInner {
+ width: 10px;
+ height: 10px;
+ margin-left: -5px;
+ margin-top: -5px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}
+
+/**
+ * Applied to the dialog box.
+ */
+.gwt-DialogBox .Caption {
+ background: #93c2f1 url(images/bg_listgradient.png) repeat-x;
+ padding: 4px 4px 4px 8px;
+ cursor: default;
+ border-bottom: 1px solid #bbbbbb;
+}
+.gwt-DialogBox .content {
+}
+.gwt-DialogBox .middleCenter {
+ padding: 3px;
+ background: white;
+}
+html>body .gwt-DialogBox .bottomCenter {
+ background: url(images/hborder.png) repeat-x;
+}
+* html .gwt-DialogBox .bottomCenter {
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/ie6/hborder_blue_shadow.png',sizingMethod='scale');
+}
+.gwt-DialogBox .middleLeft {
+ background: url(images/vborder.png) repeat-y;
+}
+html>body .gwt-DialogBox .middleRight {
+ background: url(images/vborder.png) repeat-y;
+}
+* html .gwt-DialogBox .middleRight {
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/ie6/vborder_blue_shadow.png',sizingMethod='scale');
+}
+.gwt-DialogBox .topLeft,
+.gwt-DialogBox .topRight,
+.gwt-DialogBox .bottomLeft,
+.gwt-DialogBox .bottomRight {
+ zoom: 1;
+}
+html>body .gwt-DialogBox .topLeft {
+ width: 5px;
+ background: url(images/corner.png) no-repeat -13px 0px;
+}
+html>body .gwt-DialogBox .topRight {
+ width: 8px;
+ background: url(images/corner.png) no-repeat -18px 0px;
+}
+html>body .gwt-DialogBox .bottomLeft {
+ width: 5px;
+ height: 8px;
+ background: url(images/corner.png) no-repeat 0px -15px;
+}
+html>body .gwt-DialogBox .bottomRight {
+ width: 8px;
+ height: 8px;
+ background: url(images/corner.png) no-repeat -5px -15px;
+}
+* html .gwt-DialogBox .topLeft {
+ width: 5px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/ie6/corner_dialog_topleft.png',sizingMethod='crop');
+}
+* html .gwt-DialogBox .topRight {
+ width: 8px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/ie6/corner_dialog_topright.png',sizingMethod='crop');
+}
+* html .gwt-DialogBox .bottomLeftInner {
+ width: 5px;
+ height: 23px;
+ margin-top: -15px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}
+* html .gwt-DialogBox .bottomRightInner {
+ width: 13px;
+ height: 23px;
+ margin-left: -5px;
+ margin-top: -15px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}
+
+/**
+ * Applied to the disclosure panel, which shows or hides content when the user
+ * toggles the header.
+ */
+.gwt-DisclosurePanel {
+}
+
+.gwt-DisclosurePanel a {
+ text-decoration: none; /* Remove underline from header */
+}
+
+.gwt-DisclosurePanel-open {
+}
+
+.gwt-DisclosurePanel-closed {
+}
+
+.gwt-DisclosurePanel .header {
+}
+
+.gwt-DisclosurePanel .content {
+ border-left: 3px solid #e8eef7;
+ padding: 4px 0px 4px 8px;
+ margin-left: 6px;
+}
+
+/**
+ * Applied to the File Upload.
+ */
+.gwt-FileUpload {
+}
+
+/**
+ * Applied to the Frame widget, which is an iframe wrapper.
+ */
+.gwt-Frame {
+}
+
+/**
+ * Applied to split panels.
+ */
+.gwt-HorizontalSplitPanel {
+}
+.gwt-HorizontalSplitPanel .hsplitter {
+ cursor: move;
+ border: 0px;
+ background: #91c0ef url(images/vborder.png) -9px 0px repeat-y;
+}
+.gwt-VerticalSplitPanel {
+}
+.gwt-VerticalSplitPanel .vsplitter {
+ cursor: move;
+ border: 0px;
+ background: #91c0ef url(images/hborder.png) 0px -9px repeat-x;
+}
+
+/**
+ * Applied to all HTML label elements.
+ */
+.gwt-HTML {
+}
+
+/**
+ * Applied to all Hyperlinks.
+ */
+.gwt-Hyperlink {
+}
+
+/**
+ * Applied to all Images
+ */
+.gwt-Image {
+}
+
+/**
+ * Applied to all Label elements.
+ */
+.gwt-Label {
+}
+
+/**
+ * Applied to list boxes.
+ */
+.gwt-ListBox {
+}
+
+/**
+ * Applied to the menu bar.
+ */
+.gwt-MenuBar {
+ cursor: default;
+}
+
+.gwt-MenuBar .gwt-MenuItem {
+ cursor: default;
+}
+
+.gwt-MenuBar .gwt-MenuItem-selected {
+ background: #E0EDFE;
+}
+
+.gwt-MenuBar-horizontal {
+ background: #e3e8f3 url(images/bg_headergradient.png) repeat-x;
+ border: 1px solid #BBBBBB;
+}
+
+.gwt-MenuBar-horizontal .gwt-MenuItem {
+ padding: 0px 10px;
+ vertical-align: bottom;
+ color: #666666;
+ font-weight: bold;
+}
+
+.gwt-MenuBar-horizontal .gwt-MenuItemSeparator {
+ width: 1px;
+ padding: 0px;
+ margin: 0px;
+ border: 0px;
+ border-left: 1px solid #888888;
+ background: white;
+}
+
+.gwt-MenuBar-horizontal .gwt-MenuItemSeparator .content {
+ width: 1px;
+ background: white;
+}
+
+.gwt-MenuBar-vertical {
+ margin-top: 0px;
+ margin-left: 0px;
+ background: white;
+}
+
+.gwt-MenuBar-vertical table {
+ border-collapse: collapse;
+}
+
+.gwt-MenuBar-vertical .gwt-MenuItem {
+ padding: 4px 14px 4px 1px;
+}
+
+.gwt-MenuBar-vertical .gwt-MenuItemSeparator {
+ padding: 2px 0px;
+}
+
+.gwt-MenuBar-vertical .gwt-MenuItemSeparator .content {
+ height: 1px;
+ padding: 0px;
+ border: 0px;
+ border-top: 1px solid #777777;
+ background: #ddddee;
+ overflow: hidden;
+}
+.gwt-MenuBar-vertical .subMenuIcon {
+ padding-right: 4px;
+}
+.gwt-MenuBar-vertical .subMenuIcon-selected {
+ background: #E0EDFE;
+}
+.gwt-MenuBarPopup {
+ margin: 0px 0px 0px 3px;
+}
+.gwt-MenuBarPopup .topCenter {
+ background: url(images/hborder.png) 0px -17px repeat-x;
+}
+html>body .gwt-MenuBarPopup .bottomCenter {
+ background: url(images/hborder.png) 0px -18px repeat-x;
+}
+* html .gwt-MenuBarPopup .bottomCenter {
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/ie6/hborder_gray_shadow.png',sizingMethod='scale');
+}
+.gwt-MenuBarPopup .middleLeft {
+ background: url(images/vborder.png) -17px 0px repeat-y;
+}
+html>body .gwt-MenuBarPopup .middleRight {
+ background: url(images/vborder.png) -18px 0px repeat-y;
+}
+* html .gwt-MenuBarPopup .middleRight {
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/ie6/vborder_gray_shadow.png',sizingMethod='scale');
+}
+html>body .gwt-MenuBarPopup .topLeft {
+ width: 5px;
+ height: 5px;
+ background: url(images/corner.png) no-repeat 0px -36px;
+}
+html>body .gwt-MenuBarPopup .topRight {
+ width: 8px;
+ height: 5px;
+ background: url(images/corner.png) no-repeat -5px -36px;
+}
+html>body .gwt-MenuBarPopup .bottomLeft {
+ width: 5px;
+ height: 8px;
+ background: url(images/corner.png) no-repeat 0px -41px;
+}
+html>body .gwt-MenuBarPopup .bottomRight {
+ width: 8px;
+ height: 8px;
+ background: url(images/corner.png) no-repeat -5px -41px;
+}
+* html .gwt-MenuBarPopup .topLeftInner {
+ width: 5px;
+ height: 41px;
+ margin-top: -36px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}
+* html .gwt-MenuBarPopup .topRightInner {
+ width: 13px;
+ height: 41px;
+ margin-left: -5px;
+ margin-top: -36px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}
+* html .gwt-MenuBarPopup .bottomLeftInner {
+ width: 5px;
+ height: 49px;
+ margin-top: -41px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}
+* html .gwt-MenuBarPopup .bottomRightInner {
+ width: 13px;
+ height: 49px;
+ margin-left: -5px;
+ margin-top: -41px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}
+
+/**
+ * Applied to the password input box.
+ */
+.gwt-PasswordTextBox {
+ padding: 2px;
+}
+.gwt-PasswordTextBox-readonly {
+ color: #888;
+}
+
+/**
+ * Applied to the decorator panel.
+ */
+.gwt-PopupPanel .content {
+}
+.gwt-PopupPanel .middleCenter {
+ padding: 3px;
+ background: white;
+}
+.gwt-PopupPanel .topCenter {
+ background: url(images/hborder.png) repeat-x;
+}
+html>body .gwt-PopupPanel .bottomCenter {
+ background: url(images/hborder.png) repeat-x;
+}
+* html .gwt-PopupPanel .bottomCenter {
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/ie6/hborder_blue_shadow.png',sizingMethod='scale');
+}
+.gwt-PopupPanel .middleLeft {
+ background: url(images/vborder.png) repeat-y;
+}
+html>body .gwt-PopupPanel .middleRight {
+ background: url(images/vborder.png) repeat-y;
+}
+* html .gwt-PopupPanel .middleRight {
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/ie6/vborder_blue_shadow.png',sizingMethod='scale');
+}
+.gwt-PopupPanel .topLeft,
+.gwt-PopupPanel .topRight,
+.gwt-PopupPanel .bottomLeft,
+.gwt-PopupPanel .bottomRight {
+ zoom: 1;
+}
+html>body .gwt-PopupPanel .topLeft {
+ width: 5px;
+ height: 5px;
+ background: url(images/corner.png) no-repeat 0px -10px;
+}
+html>body .gwt-PopupPanel .topRight {
+ width: 8px;
+ height: 5px;
+ background: url(images/corner.png) no-repeat -5px -10px;
+}
+html>body .gwt-PopupPanel .bottomLeft {
+ width: 5px;
+ height: 8px;
+ background: url(images/corner.png) no-repeat 0px -15px;
+}
+html>body .gwt-PopupPanel .bottomRight {
+ width: 8px;
+ height: 8px;
+ background: url(images/corner.png) no-repeat -5px -15px;
+}
+* html .gwt-PopupPanel .topLeftInner {
+ width: 5px;
+ height: 15px;
+ margin-top: -10px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}
+* html .gwt-PopupPanel .topRightInner {
+ width: 13px;
+ height: 15px;
+ margin-left: -5px;
+ margin-top: -10px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}
+* html .gwt-PopupPanel .bottomLeftInner {
+ width: 5px;
+ height: 23px;
+ margin-top: -15px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}
+* html .gwt-PopupPanel .bottomRightInner {
+ width: 13px;
+ height: 23px;
+ margin-left: -5px;
+ margin-top: -15px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}
+
+/**
+ * Applied to the push button, a customizable button that can be pressed
+ * and released.
+ */
+.gwt-PushButton-up {
+ padding: 2px;
+ background-color: #efebe7;
+ border: 2px solid #faf9f7;
+ border-right: 2px solid #848280;
+ border-bottom: 2px solid #848280;
+ cursor: pointer;
+ cursor: hand;
+}
+
+.gwt-PushButton-up-hovering {
+ padding: 2px;
+ background-color: #efebe7;
+ border: 2px solid #faf9f7;
+ border-right: 2px solid #848280;
+ border-bottom: 2px solid #848280;
+ cursor: pointer;
+ cursor: hand;
+}
+
+.gwt-PushButton-up-disabled {
+ padding: 2px;
+ background-color: #efebe7;
+ border: 2px solid #e7e4e0;
+ border-right: 2px solid #625b54;
+ border-bottom: 2px solid #625b54;
+ cursor: default;
+ opacity: 0.5;
+}
+
+.gwt-PushButton-up-disabled .gwt-Image {
+ filter: alpha(opacity=30);
+}
+
+.gwt-PushButton-down {
+ padding: 2px 1px 2px 3px;
+ background-color: #efebe7;
+ border: 2px solid #848280;
+ border-right: 2px solid #faf9f7;
+ border-bottom: 2px solid #faf9f7;
+ cursor: pointer;
+ cursor: hand;
+}
+
+.gwt-PushButton-down-hovering {
+ padding: 2px 1px 2px 3px;
+ background-color: #efebe7;
+ border: 2px solid #848280;
+ border-right: 2px solid #faf9f7;
+ border-bottom: 2px solid #faf9f7;
+ cursor: pointer;
+ cursor: hand;
+}
+
+.gwt-PushButton-down-disabled {
+ padding: 2px 1px 2px 3px;
+ background-color: #efebe7;
+ border: 2px solid #e7e4e0;
+ border-right: 2px solid #625b54;
+ border-bottom: 2px solid #625b54;
+ cursor: default;
+ opacity: 0.5;
+}
+
+.gwt-PushButton-down-disabled .gwt-Image {
+ filter: alpha(opacity=30);
+}
+
+/**
+ * Applied to radio buttons and the text next to them.
+ */
+.gwt-RadioButton {
+ padding: 4px 4px 3px 3px;
+}
+
+.gwt-RadioButton-disabled {
+ color: #888;
+}
+
+/**
+ * Applied to the Rich Text Area.
+ */
+.gwt-RichTextArea {
+}
+
+.hasRichTextToolbar {
+ border: 0px;
+}
+
+.gwt-RichTextToolbar {
+ background: #e3e8f3 url(images/bg_headergradient.png) repeat-x;
+ border-bottom: 1px solid #BBBBBB;
+ padding: 3px;
+ margin: 0px;
+}
+
+.gwt-RichTextToolbar .gwt-PushButton-up {
+ padding: 0px 1px 0px 0px;
+ margin-right: 4px;
+ margin-bottom: 4px;
+ border-width: 1px;
+}
+
+.gwt-RichTextToolbar .gwt-PushButton-up-hovering {
+ margin-right: 4px;
+ margin-bottom: 4px;
+ padding: 0px 1px 0px 0px;
+ border-width: 1px;
+}
+
+.gwt-RichTextToolbar .gwt-PushButton-down {
+ margin-right: 4px;
+ margin-bottom: 4px;
+ padding: 0px 0px 0px 1px;
+ border-width: 1px;
+}
+
+.gwt-RichTextToolbar .gwt-PushButton-down-hovering {
+ margin-right: 4px;
+ margin-bottom: 4px;
+ padding: 0px 0px 0px 1px;
+ border-width: 1px;
+}
+
+.gwt-RichTextToolbar .gwt-ToggleButton-up {
+ margin-right: 4px;
+ margin-bottom: 4px;
+ padding: 0px 1px 0px 0px;
+ border-width: 1px;
+}
+
+.gwt-RichTextToolbar .gwt-ToggleButton-up-hovering {
+ margin-right: 4px;
+ margin-bottom: 4px;
+ padding: 0px 1px 0px 0px;
+ border-width: 1px;
+}
+
+.gwt-RichTextToolbar .gwt-ToggleButton-down {
+ margin-right: 4px;
+ margin-bottom: 4px;
+ padding: 0px 0px 0px 1px;
+ border-width: 1px;
+}
+
+.gwt-RichTextToolbar .gwt-ToggleButton-down-hovering {
+ margin-right: 4px;
+ margin-bottom: 4px;
+ padding: 0px 0px 0px 1px;
+ border-width: 1px;
+}
+
+/**
+ * Applied to the stack panel, a vertical menu widget that reveals one
+ * category at a time.
+ */
+.gwt-StackPanel {
+ border-bottom: 1px solid #bbbbbb;
+}
+.gwt-StackPanel .gwt-StackPanelContent {
+ border: 1px solid #bbbbbb;
+ border-bottom: 0px;
+ background: white;
+ padding: 2px 2px 10px 5px;
+}
+.gwt-StackPanelItem {
+ cursor: pointer;
+ cursor: hand;
+}
+.gwt-StackPanelItem .topLeft,
+.gwt-StackPanelItem .topRight {
+ height: 6px;
+ width: 6px;
+ zoom: 1;
+}
+html>body .gwt-StackPanelItem .topLeft {
+ background: #d3def6 url(images/corner.png) no-repeat 0px -49px;
+ border-left: 1px solid #bbbbbb;
+}
+html>body .gwt-StackPanelItem .topRight {
+ background: #d3def6 url(images/corner.png) no-repeat -6px -49px;
+ border-right: 1px solid #bbbbbb;
+}
+.gwt-StackPanelItem .topLeftInner,
+.gwt-StackPanelItem .topRightInner {
+ width: 1px;
+ height: 1px;
+}
+* html .gwt-StackPanelItem .topLeftInner {
+ width: 6px;
+ height: 55px;
+ margin-top: -49px;
+ overflow: hidden;
+ border-left: 1px solid #bbbbbb;
+ background-color: #d3def6;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}
+* html .gwt-StackPanelItem .topRightInner {
+ width: 12px;
+ height: 55px;
+ margin-top: -49px;
+ margin-left: -6px;
+ overflow: hidden;
+ border-right: 1px solid #bbbbbb;
+ background-color: #d3def6;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}
+.gwt-StackPanelItem .topCenter {
+ background: url(images/hborder.png) 0px -26px repeat-x;
+}
+.gwt-StackPanelItem .middleLeft {
+ background: #d3def6 url(images/bg_stackpanel.png) repeat-x;
+ border-left: 1px solid #bbbbbb;
+}
+.gwt-StackPanelItem .middleLeftInner,
+.gwt-StackPanelItem .middleRightInner {
+ width: 1px;
+ height: 1px;
+}
+.gwt-StackPanelItem .middleRight {
+ background: #d3def6 url(images/bg_stackpanel.png) repeat-x;
+ border-right: 1px solid #bbbbbb;
+}
+.gwt-StackPanelItem .middleCenter {
+ font-weight: bold;
+ font-size: 1.3em;
+ background: #d3def6 url(images/bg_stackpanel.png) repeat-x;
+}
+html>body .gwt-StackPanelItem-first .topRight,
+html>body .gwt-StackPanelItem-first .topLeft {
+ border: 0px;
+ background-color: white;
+}
+html>body .gwt-StackPanelItem-below-selected .topLeft,
+html>body .gwt-StackPanelItem-below-selected .topRight {
+ background-color: white;
+}
+* html .gwt-StackPanelItem-first .topLeftInner,
+* html .gwt-StackPanelItem-first .topRightInner {
+ border: 0px;
+ background-color: white;
+}
+* html .gwt-StackPanelItem-first .topLeftInner {
+ padding-left: 1px;
+}
+* html .gwt-StackPanelItem-below-selected .topLeftInner,
+* html .gwt-StackPanelItem-below-selected .topRightInner {
+ background-color: white;
+}
+
+/**
+ * Applied to the suggest box.
+ */
+.gwt-SuggestBox {
+ padding: 2px;
+}
+.gwt-SuggestBoxPopup {
+ margin-left: 3px;
+}
+.gwt-SuggestBoxPopup .item {
+ padding: 2px 6px;
+ color: #424242;
+ cursor: default;
+}
+.gwt-SuggestBoxPopup .item-selected {
+ background: #b7d6f6;
+}
+.gwt-SuggestBoxPopup .middleCenter {
+ background: white;
+}
+.gwt-SuggestBoxPopup .topCenter {
+ background: url(images/hborder.png) repeat-x;
+}
+html>body .gwt-SuggestBoxPopup .bottomCenter {
+ background: url(images/hborder.png) repeat-x;
+}
+* html .gwt-SuggestBoxPopup .bottomCenter {
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/ie6/hborder_blue_shadow.png',sizingMethod='scale');
+}
+.gwt-SuggestBoxPopup .middleLeft {
+ background: url(images/vborder.png) repeat-y;
+}
+html>body .gwt-SuggestBoxPopup .middleRight {
+ background: url(images/vborder.png) repeat-y;
+}
+* html .gwt-SuggestBoxPopup .middleRight {
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/ie6/vborder_blue_shadow.png',sizingMethod='scale');
+}
+html>body .gwt-SuggestBoxPopup .topLeft {
+ width: 5px;
+ height: 5px;
+ background: url(images/corner.png) no-repeat 0px -23px;
+}
+html>body .gwt-SuggestBoxPopup .topRight {
+ width: 8px;
+ height: 5px;
+ background: url(images/corner.png) no-repeat -5px -23px;
+}
+html>body .gwt-SuggestBoxPopup .bottomLeft {
+ width: 5px;
+ height: 8px;
+ background: url(images/corner.png) no-repeat 0px -28px;
+}
+html>body .gwt-SuggestBoxPopup .bottomRight {
+ width: 8px;
+ height: 8px;
+ background: url(images/corner.png) no-repeat -5px -28px;
+}
+* html .gwt-SuggestBoxPopup .topLeftInner {
+ width: 5px;
+ height: 28px;
+ margin-top: -23px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}
+* html .gwt-SuggestBoxPopup .topRightInner {
+ width: 13px;
+ height: 28px;
+ margin-left: -5px;
+ margin-top: -23px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}
+* html .gwt-SuggestBoxPopup .bottomLeftInner {
+ width: 5px;
+ height: 36px;
+ margin-top: -28px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}
+* html .gwt-SuggestBoxPopup .bottomRightInner {
+ width: 13px;
+ height: 36px;
+ margin-left: -5px;
+ margin-top: -28px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}
+
+/**
+ * Applied to the tab panel. The tab panel provides CSS access to
+ * the tab bar element and the table cell that wraps the tab bar element,
+ * which allows for rounded edges via the sliding window method.
+ */
+.gwt-TabBar {
+}
+.gwt-TabBar .gwt-TabBarFirst {
+ width: 5px; /* first tab distance from the left */
+}
+.gwt-TabBar .gwt-TabBarRest {
+}
+.gwt-TabBar .gwt-TabBarItem {
+ border-collapse: collapse;
+ margin-left: 6px;
+}
+.gwt-TabBar .gwt-TabBarItem .topCenter {
+ padding: 0px;
+ background: url(images/hborder.png) 0px -32px repeat-x;
+}
+.gwt-TabBar .gwt-TabBarItem .topLeft,
+.gwt-TabBar .gwt-TabBarItem .topRight {
+ padding: 0px;
+ zoom: 1;
+}
+.gwt-TabBar .gwt-TabBarItem .topLeftInner,
+.gwt-TabBar .gwt-TabBarItem .topRightInner {
+ width: 6px;
+ height: 6px;
+}
+html>body .gwt-TabBar .gwt-TabBarItem .topLeft {
+ background: url(images/corner.png) no-repeat 0px -55px;
+}
+html>body .gwt-TabBar .gwt-TabBarItem .topRight {
+ background: url(images/corner.png) no-repeat -6px -55px;
+}
+* html .gwt-TabBar .gwt-TabBarItem .topLeftInner {
+ width: 5px;
+ height: 61px;
+ margin-top: -55px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}
+* html .gwt-TabBar .gwt-TabBarItem .topRightInner {
+ width: 12px;
+ height: 61px;
+ margin-top: -55px;
+ margin-left: -6px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}
+.gwt-TabBar .gwt-TabBarItem .middleLeft,
+.gwt-TabBar .gwt-TabBarItem .middleRight {
+ width: 6px;
+ padding: 0px;
+ background: #e4e9f3 url(images/bg_tab.png) repeat-x;
+}
+.gwt-StackPanelItem .middleLeftInner,
+.gwt-StackPanelItem .middleRightInner {
+ width: 1px;
+ height: 1px;
+}
+.gwt-TabBar .gwt-TabBarItem .middleCenter {
+ padding: 0px 4px 2px 4px;
+ cursor: pointer;
+ cursor: hand;
+ color: black;
+ font-weight: bold;
+ text-align: center;
+ background: #e4e9f3 url(images/bg_tab.png) repeat-x;
+}
+.gwt-TabBar .gwt-TabBarItem .topCenter {
+ padding: 0px;
+ background: url(images/hborder.png) 0px -32px repeat-x;
+}
+.gwt-TabBar .gwt-TabBarItem .topLeft,
+.gwt-TabBar .gwt-TabBarItem .topRight {
+ padding: 0px;
+ zoom: 1;
+}
+.gwt-TabBar .gwt-TabBarItem .topLeftInner,
+.gwt-TabBar .gwt-TabBarItem .topRightInner {
+ width: 6px;
+ height: 6px;
+}
+html>body .gwt-TabBar .gwt-TabBarItem .topLeft {
+ background: url(images/corner.png) no-repeat 0px -55px;
+}
+html>body .gwt-TabBar .gwt-TabBarItem .topRight {
+ background: url(images/corner.png) no-repeat -6px -55px;
+}
+* html .gwt-TabBar .gwt-TabBarItem .topLeftInner {
+ width: 5px;
+ height: 61px;
+ margin-top: -55px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}
+* html .gwt-TabBar .gwt-TabBarItem .topRightInner {
+ width: 12px;
+ height: 61px;
+ margin-top: -55px;
+ margin-left: -6px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}
+.gwt-TabBar .gwt-TabBarItem .middleLeft,
+.gwt-TabBar .gwt-TabBarItem .middleRight {
+ width: 6px;
+ padding: 0px;
+ background: #e4e9f3 url(images/bg_tab.png) repeat-x;
+}
+.gwt-StackPanelItem .middleLeftInner,
+.gwt-StackPanelItem .middleRightInner {
+ width: 1px;
+ height: 1px;
+}
+.gwt-TabBar .gwt-TabBarItem .middleCenter {
+ padding: 0px 4px 2px 4px;
+ cursor: pointer;
+ cursor: hand;
+ font-weight: bold;
+ text-align: center;
+ background: #e4e9f3 url(images/bg_tab.png) repeat-x;
+}
+.gwt-TabBar .gwt-TabBarItem-selected .topCenter {
+ background: url(images/hborder.png) 0px -38px repeat-x;
+}
+html>body .gwt-TabBar .gwt-TabBarItem-selected .topLeft {
+ background-position: 0px -61px;
+}
+html>body .gwt-TabBar .gwt-TabBarItem-selected .topRight {
+ background-position: -6px -61px;
+}
+* html .gwt-TabBar .gwt-TabBarItem-selected .topLeftInner {
+ width: 5px;
+ height: 67px;
+ margin-top: -61px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}
+* html .gwt-TabBar .gwt-TabBarItem-selected .topRightInner {
+ width: 12px;
+ height: 67px;
+ margin-top: -61px;
+ margin-left: -6px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}
+.gwt-TabBar .gwt-TabBarItem-selected .middleLeft,
+.gwt-TabBar .gwt-TabBarItem-selected .middleRight {
+ background: #92c1f0 url(images/bg_tab_selected.png) repeat-x;
+}
+.gwt-TabBar .gwt-TabBarItem-selected .middleCenter {
+ cursor: default;
+ background: #92c1f0 url(images/bg_tab_selected.png) repeat-x;
+}
+.gwt-TabPanel {
+}
+.gwt-TabPanelBottom {
+ border-color: #92c1f0;
+ border-style: solid;
+ border-width: 3px 2px 2px;
+ overflow: hidden;
+ padding: 6px;
+}
+
+/**
+ * Applied to general text areas.
+ */
+.gwt-TextArea {
+ padding: 2px;
+}
+
+.gwt-TextArea-readonly {
+ color: #888;
+}
+
+/**
+ * Applied to text boxes.
+ */
+.gwt-TextBox {
+ padding: 2px;
+}
+
+.gwt-TextBox-readonly {
+ color: #888;
+}
+
+/**
+ * Applied to toggle buttons, a customizable button that can be toggled
+ * between two states (similar to a checkbox).
+ */
+.gwt-ToggleButton-up {
+ padding: 2px;
+ background-color: #efebe7;
+ border: 2px solid #faf9f7;
+ border-right: 2px solid #848280;
+ border-bottom: 2px solid #848280;
+ cursor: pointer;
+ cursor: hand;
+}
+
+.gwt-ToggleButton-up-hovering {
+ padding: 2px;
+ background-color: #efebe7;
+ border: 2px solid #faf9f7;
+ border-right: 2px solid #848280;
+ border-bottom: 2px solid #848280;
+ cursor: pointer;
+ cursor: hand;
+}
+
+.gwt-ToggleButton-up-disabled {
+ padding: 2px;
+ background-color: #efebe7;
+ border: 2px solid #e7e4e0;
+ border-right: 2px solid #625b54;
+ border-bottom: 2px solid #625b54;
+ cursor: default;
+ opacity: 0.5;
+}
+
+.gwt-ToggleButton-up-disabled .gwt-Image {
+ filter: alpha(opacity=30);
+}
+
+.gwt-ToggleButton-down {
+ padding: 2px 1px 2px 3px;
+ background-color: #f5f5f5;
+ border: 2px solid #848280;
+ border-right: 2px solid #faf9f7;
+ border-bottom: 2px solid #faf9f7;
+ cursor: pointer;
+ cursor: hand;
+}
+
+.gwt-ToggleButton-down-hovering {
+ padding: 2px 1px 2px 3px;
+ background-color: #f5f5f5;
+ border: 2px solid #848280;
+ border-right: 2px solid #faf9f7;
+ border-bottom: 2px solid #faf9f7;
+ cursor: pointer;
+ cursor: hand;
+}
+
+.gwt-ToggleButton-down-disabled {
+ padding: 2px 1px 2px 3px;
+ background-color: #efebe7;
+ border: 2px solid #e7e4e0;
+ border-right: 2px solid #625b54;
+ border-bottom: 2px solid #625b54;
+ cursor: default;
+ opacity: 0.5;
+}
+
+.gwt-ToggleButton-down-disabled .gwt-Image {
+ filter: alpha(opacity=30);
+}
+
+/**
+ * Applied to the Tree.
+ */
+.gwt-Tree .gwt-TreeItem {
+ padding: 1px;
+ margin: 0px;
+ white-space: nowrap;
+ cursor: hand;
+ cursor: pointer;
+}
+.gwt-Tree .gwt-TreeItem-selected {
+ padding: 0px;
+ border: 1px dotted #888;
+ background: #93c2f1 url(images/bg_listgradient.png) repeat-x;
+}
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/GWT-default.rtl.css b/samples/showcase/src/com/google/gwt/sample/showcase/public/GWT-default.rtl.css
new file mode 100644
index 0000000..ed0b3a2
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/GWT-default.rtl.css
@@ -0,0 +1,1201 @@
+/**
+ * Applied to the entire page.
+ */
+body {
+ color: black;
+ font-family: Helvetica, Arial, sans-serif;
+ font-size: small;
+ margin: 0px;
+ border: 0px;
+ padding: 0px;
+ background: #e2e8f2 url(images/bg_gradient.png) repeat-x;
+ direction: rtl;
+}
+
+table td, pre {
+ font-size: small;
+}
+
+a, a:visited, a:hover {
+ color: #0000AA;
+}
+
+/**
+ * Applied to buttons.
+ */
+.gwt-Button {
+}
+
+.gwt-Button:active {
+}
+
+.gwt-Button[disabled] {
+ color: #888;
+}
+
+/**
+ * Applied to the checkbox and text next to the checkbox.
+ */
+.gwt-CheckBox {
+}
+
+.gwt-CheckBox-disabled {
+ color: #888;
+}
+
+/**
+ * Applied to the decorator panel.
+ */
+.gwt-DecoratorPanel {
+ border-collapse: collapse;
+}
+.gwt-DecoratorPanel .middleCenter {
+ padding: 0px;
+}
+.gwt-DecoratorPanel .topCenter,
+.gwt-DecoratorPanel .bottomCenter {
+ padding: 0px;
+ background: url(images/hborder.png) repeat-x;
+}
+.gwt-DecoratorPanel .middleLeft,
+.gwt-DecoratorPanel .middleRight {
+ padding: 0px;
+ background: url(images/vborder.png) repeat-y;
+}
+.gwt-DecoratorPanel .topLeft,
+.gwt-DecoratorPanel .topRight,
+.gwt-DecoratorPanel .bottomLeft,
+.gwt-DecoratorPanel .bottomRight {
+ width: 5px;
+ height: 5px;
+ padding: 0px;
+ zoom: 1;
+}
+html>body .gwt-DecoratorPanel .topLeft {
+ background: url(images/corner.png) no-repeat 0px 0px;
+}
+html>body .gwt-DecoratorPanel .topRight {
+ background: url(images/corner.png) no-repeat -5px 0px;
+}
+html>body .gwt-DecoratorPanel .bottomLeft {
+ background: url(images/corner.png) no-repeat 0px -5px;
+}
+html>body .gwt-DecoratorPanel .bottomRight {
+ background: url(images/corner.png) no-repeat -5px -5px;
+}
+* html .gwt-DecoratorPanel .topLeftInner {
+ width: 5px;
+ height: 5px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}
+* html .gwt-DecoratorPanel .topRightInner {
+ width: 10px;
+ height: 5px;
+ margin-right: -5px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}
+* html .gwt-DecoratorPanel .bottomLeftInner {
+ width: 5px;
+ height: 10px;
+ margin-right: 0px;
+ margin-top: -5px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}
+* html .gwt-DecoratorPanel .bottomRightInner {
+ width: 10px;
+ height: 10px;
+ margin-right: -5px;
+ margin-top: -5px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}
+
+/**
+ * Applied to the dialog box.
+ */
+.gwt-DialogBox .Caption {
+ background: #93c2f1 url(images/bg_listgradient.png) repeat-x;
+ padding: 4px 8px 4px 4px;
+ cursor: default;
+ border-bottom: 1px solid #bbbbbb;
+}
+.gwt-DialogBox {
+ border-collapse: collapse;
+}
+.gwt-DialogBox .Content {
+}
+.gwt-DialogBox .middleCenter {
+ padding: 3px;
+ background: white;
+}
+.gwt-DialogBox .topCenter {
+ padding: 0px;
+}
+html>body .gwt-DialogBox .bottomCenter {
+ padding: 0px;
+ background: url(images/hborder.png) repeat-x;
+}
+* html .gwt-DialogBox .bottomCenter {
+ padding: 0px;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/ie6/hborder_blue_shadow.png',sizingMethod='scale');
+}
+.gwt-DialogBox .middleLeft {
+ padding: 0px;
+ background: url(images/vborder.png) repeat-y;
+}
+html>body .gwt-DialogBox .middleRight {
+ padding: 0px;
+ background: url(images/vborder.png) repeat-y;
+}
+* html .gwt-DialogBox .middleRight {
+ padding: 0px;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/ie6/vborder_blue_shadow.png',sizingMethod='scale');
+}
+.gwt-DialogBox .topLeft,
+.gwt-DialogBox .topRight,
+.gwt-DialogBox .bottomLeft,
+.gwt-DialogBox .bottomRight {
+ padding: 0px;
+ zoom: 1;
+}
+html>body .gwt-DialogBox .topLeft {
+ width: 5px;
+ background: url(images/corner.png) no-repeat -13px 0px;
+}
+html>body .gwt-DialogBox .topRight {
+ width: 8px;
+ background: url(images/corner.png) no-repeat -18px 0px;
+}
+html>body .gwt-DialogBox .bottomLeft {
+ width: 5px;
+ height: 8px;
+ background: url(images/corner.png) no-repeat 0px -15px;
+}
+html>body .gwt-DialogBox .bottomRight {
+ width: 8px;
+ height: 8px;
+ background: url(images/corner.png) no-repeat -5px -15px;
+}
+* html .gwt-DialogBox .topLeft {
+ width: 5px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/ie6/corner_dialog_topleft.png',sizingMethod='crop');
+}
+* html .gwt-DialogBox .topRight {
+ width: 8px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/ie6/corner_dialog_topright.png',sizingMethod='crop');
+}
+* html .gwt-DialogBox .bottomLeftInner {
+ width: 5px;
+ height: 23px;
+ margin-top: -15px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}
+* html .gwt-DialogBox .bottomRightInner {
+ width: 13px;
+ height: 23px;
+ margin-right: -5px;
+ margin-top: -15px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}
+
+/**
+ * Applied to the disclosure panel, which shows or hides content when the user
+ * toggles the header.
+ */
+.gwt-DisclosurePanel {
+}
+
+.gwt-DisclosurePanel a {
+ text-decoration: none; /* Remove underline from header */
+}
+
+.gwt-DisclosurePanel-open {
+}
+
+.gwt-DisclosurePanel-closed {
+}
+
+.gwt-DisclosurePanel .header {
+}
+
+.gwt-DisclosurePanel .content {
+ border-right: 3px solid #e8eef7;
+ padding: 4px 8px 4px 0px;
+ margin-right: 6px;
+}
+
+/**
+ * Applied to the File Upload.
+ */
+.gwt-FileUpload {
+}
+
+/**
+ * Applied to the Frame widget, which is an iframe wrapper.
+ */
+.gwt-Frame {
+}
+
+/**
+ * Applied to split panels.
+ */
+.gwt-HorizontalSplitPanel {
+}
+.gwt-HorizontalSplitPanel .hsplitter {
+ cursor: move;
+ border: 0px;
+ background: #91c0ef url(images/vborder.png) -9px 0px repeat-y;
+}
+.gwt-VerticalSplitPanel {
+}
+.gwt-VerticalSplitPanel .vsplitter {
+ cursor: move;
+ border: 0px;
+ background: #91c0ef url(images/hborder.png) 0px -9px repeat-x;
+}
+
+/**
+ * Applied to all HTML label elements.
+ */
+.gwt-HTML {
+}
+
+/**
+ * Applied to all Hyperlinks.
+ */
+.gwt-Hyperlink {
+}
+
+/**
+ * Applied to all Images
+ */
+.gwt-Image {
+}
+
+/**
+ * Applied to all Label elements.
+ */
+.gwt-Label {
+}
+
+/**
+ * Applied to list boxes.
+ */
+.gwt-ListBox {
+}
+
+/**
+ * Applied to the menu bar.
+ */
+.gwt-MenuBar {
+ cursor: default;
+}
+
+.gwt-MenuBar .gwt-MenuItem {
+ cursor: default;
+}
+
+.gwt-MenuBar .gwt-MenuItem-selected {
+ background: #E0EDFE;
+}
+
+.gwt-MenuBar-horizontal {
+ background: #e3e8f3 url(images/bg_headergradient.png) repeat-x;
+ border: 1px solid #BBBBBB;
+}
+
+.gwt-MenuBar-horizontal .gwt-MenuItem {
+ padding: 0px 10px;
+ vertical-align: bottom;
+ color: #666666;
+ font-weight: bold;
+}
+
+.gwt-MenuBar-horizontal .gwt-MenuItemSeparator {
+ width: 1px;
+ padding: 0px;
+ margin: 0px;
+ border: 0px;
+ border-right: 1px solid #888888;
+ background: white;
+}
+
+.gwt-MenuBar-horizontal .gwt-MenuItemSeparator .content {
+ width: 1px;
+ background: white;
+}
+
+.gwt-MenuBar-vertical {
+ margin-top: 0px;
+ margin-right: 0px;
+ background: white;
+}
+
+.gwt-MenuBar-vertical table {
+ border-collapse: collapse;
+}
+
+.gwt-MenuBar-vertical .gwt-MenuItem {
+ padding: 4px 1px 4px 14px;
+}
+
+.gwt-MenuBar-vertical .gwt-MenuItemSeparator {
+ padding: 2px 0px;
+}
+
+.gwt-MenuBar-vertical .gwt-MenuItemSeparator .content {
+ height: 1px;
+ padding: 0px;
+ border: 0px;
+ border-top: 1px solid #777777;
+ background: #ddddee;
+ overflow: hidden;
+}
+.gwt-MenuBar-vertical .subMenuIcon {
+ padding-left: 4px;
+}
+.gwt-MenuBar-vertical .subMenuIcon-selected {
+ background: #E0EDFE;
+}
+.gwt-MenuBarPopup {
+ border-collapse: collapse;
+ margin: 0px 3px 0px 0px;
+}
+.gwt-MenuBarPopup .middleCenter {
+ padding: 0px;
+}
+.gwt-MenuBarPopup .topCenter {
+ background: url(images/hborder.png) 0px -17px repeat-x;
+ padding: 0px;
+}
+html>body .gwt-MenuBarPopup .bottomCenter {
+ background: url(images/hborder.png) 0px -18px repeat-x;
+ padding: 0px;
+}
+* html .gwt-MenuBarPopup .bottomCenter {
+ padding: 0px;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/ie6/hborder_gray_shadow.png',sizingMethod='scale');
+}
+.gwt-MenuBarPopup .middleLeft {
+ background: url(images/vborder.png) -17px 0px repeat-y;
+}
+html>body .gwt-MenuBarPopup .middleRight {
+ background: url(images/vborder.png) -18px 0px repeat-y;
+ padding: 0px;
+}
+* html .gwt-MenuBarPopup .middleRight {
+ padding: 0px;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/ie6/vborder_gray_shadow.png',sizingMethod='scale');
+}
+.gwt-MenuBarPopup .topLeft,
+.gwt-MenuBarPopup .topRight,
+.gwt-MenuBarPopup .bottomLeft,
+.gwt-MenuBarPopup .bottomRight {
+ padding: 0px;
+}
+html>body .gwt-MenuBarPopup .topLeft {
+ width: 5px;
+ height: 5px;
+ background: url(images/corner.png) no-repeat 0px -36px;
+}
+html>body .gwt-MenuBarPopup .topRight {
+ width: 8px;
+ height: 5px;
+ background: url(images/corner.png) no-repeat -5px -36px;
+}
+html>body .gwt-MenuBarPopup .bottomLeft {
+ width: 5px;
+ height: 8px;
+ background: url(images/corner.png) no-repeat 0px -41px;
+}
+html>body .gwt-MenuBarPopup .bottomRight {
+ width: 8px;
+ height: 8px;
+ background: url(images/corner.png) no-repeat -5px -41px;
+}
+* html .gwt-MenuBarPopup .topLeftInner {
+ width: 5px;
+ height: 41px;
+ margin-top: -36px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}
+* html .gwt-MenuBarPopup .topRightInner {
+ width: 13px;
+ height: 41px;
+ margin-right: -5px;
+ margin-top: -36px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}
+* html .gwt-MenuBarPopup .bottomLeftInner {
+ width: 5px;
+ height: 49px;
+ margin-top: -41px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}
+* html .gwt-MenuBarPopup .bottomRightInner {
+ width: 13px;
+ height: 49px;
+ margin-right: -5px;
+ margin-top: -41px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}
+
+/**
+ * Applied to the password input box.
+ */
+.gwt-PasswordTextBox {
+ padding: 2px;
+}
+.gwt-PasswordTextBox-readonly {
+ color: #888;
+}
+
+/**
+ * Applied to the decorator panel.
+ */
+.gwt-PopupPanel {
+ border-collapse: collapse;
+}
+.gwt-PopupPanel .Content {
+}
+.gwt-PopupPanel .middleCenter {
+ padding: 3px;
+ background: white;
+}
+.gwt-PopupPanel .topCenter {
+ padding: 0px;
+ background: url(images/hborder.png) repeat-x;
+}
+html>body .gwt-PopupPanel .bottomCenter {
+ padding: 0px;
+ background: url(images/hborder.png) repeat-x;
+}
+* html .gwt-PopupPanel .bottomCenter {
+ padding: 0px;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/ie6/hborder_blue_shadow.png',sizingMethod='scale');
+}
+.gwt-PopupPanel .middleLeft {
+ padding: 0px;
+ background: url(images/vborder.png) repeat-y;
+}
+html>body .gwt-PopupPanel .middleRight {
+ padding: 0px;
+ background: url(images/vborder.png) repeat-y;
+}
+* html .gwt-PopupPanel .middleRight {
+ padding: 0px;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/ie6/vborder_blue_shadow.png',sizingMethod='scale');
+}
+.gwt-PopupPanel .topLeft,
+.gwt-PopupPanel .topRight,
+.gwt-PopupPanel .bottomLeft,
+.gwt-PopupPanel .bottomRight {
+ padding: 0px;
+ zoom: 1;
+}
+html>body .gwt-PopupPanel .topLeft {
+ width: 5px;
+ height: 5px;
+ background: url(images/corner.png) no-repeat 0px -10px;
+}
+html>body .gwt-PopupPanel .topRight {
+ width: 8px;
+ height: 5px;
+ background: url(images/corner.png) no-repeat -5px -10px;
+}
+html>body .gwt-PopupPanel .bottomLeft {
+ width: 5px;
+ height: 8px;
+ background: url(images/corner.png) no-repeat 0px -15px;
+}
+html>body .gwt-PopupPanel .bottomRight {
+ width: 8px;
+ height: 8px;
+ background: url(images/corner.png) no-repeat -5px -15px;
+}
+* html .gwt-PopupPanel .topLeftInner {
+ width: 5px;
+ height: 15px;
+ margin-top: -10px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}
+* html .gwt-PopupPanel .topRightInner {
+ width: 13px;
+ height: 15px;
+ margin-right: -5px;
+ margin-top: -10px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}
+* html .gwt-PopupPanel .bottomLeftInner {
+ width: 5px;
+ height: 23px;
+ margin-top: -15px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}
+* html .gwt-PopupPanel .bottomRightInner {
+ width: 13px;
+ height: 23px;
+ margin-right: -5px;
+ margin-top: -15px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}
+
+/**
+ * Applied to the push button, a customizable button that can be pressed
+ * and released.
+ */
+.gwt-PushButton-up {
+ padding: 2px;
+ background-color: #efebe7;
+ border: 2px solid #faf9f7;
+ border-left: 2px solid #848280;
+ border-bottom: 2px solid #848280;
+ cursor: pointer;
+ cursor: hand;
+}
+
+.gwt-PushButton-up-hovering {
+ padding: 2px;
+ background-color: #efebe7;
+ border: 2px solid #faf9f7;
+ border-left: 2px solid #848280;
+ border-bottom: 2px solid #848280;
+ cursor: pointer;
+ cursor: hand;
+}
+
+.gwt-PushButton-up-disabled {
+ padding: 2px;
+ background-color: #efebe7;
+ border: 2px solid #e7e4e0;
+ border-left: 2px solid #625b54;
+ border-bottom: 2px solid #625b54;
+ cursor: default;
+ opacity: 0.5;
+}
+
+.gwt-PushButton-up-disabled .gwt-Image {
+ filter: alpha(opacity=30);
+}
+
+.gwt-PushButton-down {
+ padding: 2px 3px 2px 1px;
+ background-color: #efebe7;
+ border: 2px solid #848280;
+ border-left: 2px solid #faf9f7;
+ border-bottom: 2px solid #faf9f7;
+ cursor: pointer;
+ cursor: hand;
+}
+
+.gwt-PushButton-down-hovering {
+ padding: 2px 3px 2px 1px;
+ background-color: #efebe7;
+ border: 2px solid #848280;
+ border-left: 2px solid #faf9f7;
+ border-bottom: 2px solid #faf9f7;
+ cursor: pointer;
+ cursor: hand;
+}
+
+.gwt-PushButton-down-disabled {
+ padding: 2px 3px 2px 1px;
+ background-color: #efebe7;
+ border: 2px solid #e7e4e0;
+ border-left: 2px solid #625b54;
+ border-bottom: 2px solid #625b54;
+ cursor: default;
+ opacity: 0.5;
+}
+
+.gwt-PushButton-down-disabled .gwt-Image {
+ filter: alpha(opacity=30);
+}
+
+/**
+ * Applied to radio buttons and the text next to them.
+ */
+.gwt-RadioButton {
+ padding: 4px 3px 3px 4px;
+}
+
+.gwt-RadioButton-disabled {
+ color: #888;
+}
+
+/**
+ * Applied to the Rich Text Area.
+ */
+.gwt-RichTextArea {
+}
+
+.hasRichTextToolbar {
+ border: 0px;
+}
+
+.gwt-RichTextToolbar {
+ background: #e3e8f3 url(images/bg_headergradient.png) repeat-x;
+ border-bottom: 1px solid #BBBBBB;
+ padding: 3px;
+ margin: 0px;
+}
+
+.gwt-RichTextToolbar .gwt-PushButton-up {
+ padding: 0px 0px 0px 1px;
+ margin-left: 4px;
+ margin-bottom: 4px;
+ border-width: 1px;
+}
+
+.gwt-RichTextToolbar .gwt-PushButton-up-hovering {
+ margin-left: 4px;
+ margin-bottom: 4px;
+ padding: 0px 0px 0px 1px;
+ border-width: 1px;
+}
+
+.gwt-RichTextToolbar .gwt-PushButton-down {
+ margin-left: 4px;
+ margin-bottom: 4px;
+ padding: 0px 1px 0px 0px;
+ border-width: 1px;
+}
+
+.gwt-RichTextToolbar .gwt-PushButton-down-hovering {
+ margin-left: 4px;
+ margin-bottom: 4px;
+ padding: 0px 1px 0px 0px;
+ border-width: 1px;
+}
+
+.gwt-RichTextToolbar .gwt-ToggleButton-up {
+ margin-left: 4px;
+ margin-bottom: 4px;
+ padding: 0px 0px 0px 1px;
+ border-width: 1px;
+}
+
+.gwt-RichTextToolbar .gwt-ToggleButton-up-hovering {
+ margin-left: 4px;
+ margin-bottom: 4px;
+ padding: 0px 0px 0px 1px;
+ border-width: 1px;
+}
+
+.gwt-RichTextToolbar .gwt-ToggleButton-down {
+ margin-left: 4px;
+ margin-bottom: 4px;
+ padding: 0px 1px 0px 0px;
+ border-width: 1px;
+}
+
+.gwt-RichTextToolbar .gwt-ToggleButton-down-hovering {
+ margin-left: 4px;
+ margin-bottom: 4px;
+ padding: 0px 1px 0px 0px;
+ border-width: 1px;
+}
+
+/**
+ * Applied to the stack panel, a vertical menu widget that reveals one
+ * category at a time.
+ */
+.gwt-StackPanel {
+ border-bottom: 1px solid #bbbbbb;
+}
+.gwt-StackPanel .gwt-StackPanelContent {
+ border: 1px solid #bbbbbb;
+ border-bottom: 0px;
+ background: white;
+ padding: 2px 5px 10px 2px;
+}
+.gwt-StackPanelItem {
+ cursor: pointer;
+ cursor: hand;
+}
+.gwt-StackPanelItem .topLeft,
+.gwt-StackPanelItem .topRight {
+ height: 6px;
+ width: 6px;
+ zoom: 1;
+}
+html>body .gwt-StackPanelItem .topLeft {
+ background: #d3def6 url(images/corner.png) no-repeat 0px -49px;
+ border-right: 1px solid #bbbbbb;
+}
+html>body .gwt-StackPanelItem .topRight {
+ background: #d3def6 url(images/corner.png) no-repeat -6px -49px;
+ border-left: 1px solid #bbbbbb;
+}
+.gwt-StackPanelItem .topLeftInner,
+.gwt-StackPanelItem .topRightInner {
+ width: 1px;
+ height: 1px;
+}
+* html .gwt-StackPanelItem .topLeftInner {
+ width: 6px;
+ height: 55px;
+ margin-top: -49px;
+ overflow: hidden;
+ border-right: 1px solid #bbbbbb;
+ background-color: #d3def6;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}
+* html .gwt-StackPanelItem .topRightInner {
+ width: 12px;
+ height: 55px;
+ margin-top: -49px;
+ margin-right: -6px;
+ overflow: hidden;
+ border-left: 1px solid #bbbbbb;
+ background-color: #d3def6;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}
+.gwt-StackPanelItem .topCenter {
+ background: url(images/hborder.png) 0px -26px repeat-x;
+}
+.gwt-StackPanelItem .middleLeft {
+ background: #d3def6 url(images/bg_stackpanel.png) repeat-x;
+ border-right: 1px solid #bbbbbb;
+}
+.gwt-StackPanelItem .middleLeftInner,
+.gwt-StackPanelItem .middleRightInner {
+ width: 1px;
+ height: 1px;
+}
+.gwt-StackPanelItem .middleRight {
+ background: #d3def6 url(images/bg_stackpanel.png) repeat-x;
+ border-left: 1px solid #bbbbbb;
+}
+.gwt-StackPanelItem .middleCenter {
+ font-weight: bold;
+ font-size: 1.3em;
+ background: #d3def6 url(images/bg_stackpanel.png) repeat-x;
+}
+html>body .gwt-StackPanelItem-first .topRight,
+html>body .gwt-StackPanelItem-first .topLeft {
+ border: 0px;
+ background-color: white;
+}
+html>body .gwt-StackPanelItem-below-selected .topLeft,
+html>body .gwt-StackPanelItem-below-selected .topRight {
+ background-color: white;
+}
+* html .gwt-StackPanelItem-first .topLeftInner,
+* html .gwt-StackPanelItem-first .topRightInner {
+ border: 0px;
+ background-color: white;
+}
+* html .gwt-StackPanelItem-first .topLeftInner {
+ padding-right: 1px;
+}
+* html .gwt-StackPanelItem-below-selected .topLeftInner,
+* html .gwt-StackPanelItem-below-selected .topRightInner {
+ background-color: white;
+}
+
+/**
+ * Applied to the suggest box.
+ */
+.gwt-SuggestBox {
+ padding: 2px;
+}
+.gwt-SuggestBoxPopup {
+ margin-right: 3px;
+}
+.gwt-SuggestBoxPopup .item {
+ padding: 2px 6px;
+ color: #424242;
+ cursor: default;
+}
+.gwt-SuggestBoxPopup .item-selected {
+ background: #b7d6f6;
+}
+.gwt-SuggestBoxPopup {
+ border-collapse: collapse;
+ border-spacing: 0px;
+}
+.gwt-SuggestBoxPopup .middleCenter {
+ padding: 0px;
+ background: white;
+}
+.gwt-SuggestBoxPopup .topCenter {
+ background: url(images/hborder.png) repeat-x;
+ padding: 0px;
+}
+html>body .gwt-SuggestBoxPopup .bottomCenter {
+ background: url(images/hborder.png) repeat-x;
+ padding: 0px;
+}
+* html .gwt-SuggestBoxPopup .bottomCenter {
+ padding: 0px;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/ie6/hborder_blue_shadow.png',sizingMethod='scale');
+}
+.gwt-SuggestBoxPopup .middleLeft {
+ padding: 0px;
+ background: url(images/vborder.png) repeat-y;
+}
+html>body .gwt-SuggestBoxPopup .middleRight {
+ padding: 0px;
+ background: url(images/vborder.png) repeat-y;
+}
+* html .gwt-SuggestBoxPopup .middleRight {
+ padding: 0px;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/ie6/vborder_blue_shadow.png',sizingMethod='scale');
+}
+.gwt-SuggestBoxPopup .topLeft,
+.gwt-SuggestBoxPopup .topRight,
+.gwt-SuggestBoxPopup .bottomLeft,
+.gwt-SuggestBoxPopup .bottomRight {
+ padding: 0px;
+}
+html>body .gwt-SuggestBoxPopup .topLeft {
+ width: 5px;
+ height: 5px;
+ background: url(images/corner.png) no-repeat 0px -23px;
+}
+html>body .gwt-SuggestBoxPopup .topRight {
+ width: 8px;
+ height: 5px;
+ background: url(images/corner.png) no-repeat -5px -23px;
+}
+html>body .gwt-SuggestBoxPopup .bottomLeft {
+ width: 5px;
+ height: 8px;
+ background: url(images/corner.png) no-repeat 0px -28px;
+}
+html>body .gwt-SuggestBoxPopup .bottomRight {
+ width: 8px;
+ height: 8px;
+ background: url(images/corner.png) no-repeat -5px -28px;
+}
+* html .gwt-SuggestBoxPopup .topLeftInner {
+ width: 5px;
+ height: 28px;
+ margin-top: -23px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}
+* html .gwt-SuggestBoxPopup .topRightInner {
+ width: 13px;
+ height: 28px;
+ margin-right: -5px;
+ margin-top: -23px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}
+* html .gwt-SuggestBoxPopup .bottomLeftInner {
+ width: 5px;
+ height: 36px;
+ margin-top: -28px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLsvn statuoader(src='images/corner.png',sizingMethod='crop');
+}
+* html .gwt-SuggestBoxPopup .bottomRightInner {
+ width: 13px;
+ height: 36px;
+ margin-right: -5px;
+ margin-top: -28px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}
+
+/**
+ * Applied to the tab panel. The tab panel provides CSS access to
+ * the tab bar element and the table cell that wraps the tab bar element,
+ * which allows for rounded edges via the sliding window method.
+ */
+.gwt-TabBar {
+}
+.gwt-TabBar .gwt-TabBarFirst {
+ width: 5px; /* first tab distance from the left */
+}
+.gwt-TabBar .gwt-TabBarRest {
+}
+.gwt-TabBar .gwt-TabBarItem {
+ border-collapse: collapse;
+ margin-right: 6px;
+}
+.gwt-TabBar .gwt-TabBarItem .topCenter {
+ padding: 0px;
+ background: url(images/hborder.png) 0px -32px repeat-x;
+}
+.gwt-TabBar .gwt-TabBarItem .topLeft,
+.gwt-TabBar .gwt-TabBarItem .topRight {
+ padding: 0px;
+ zoom: 1;
+}
+.gwt-TabBar .gwt-TabBarItem .topLeftInner,
+.gwt-TabBar .gwt-TabBarItem .topRightInner {
+ width: 6px;
+ height: 6px;
+}
+html>body .gwt-TabBar .gwt-TabBarItem .topLeft {
+ background: url(images/corner.png) no-repeat 0px -55px;
+}
+html>body .gwt-TabBar .gwt-TabBarItem .topRight {
+ background: url(images/corner.png) no-repeat -6px -55px;
+}
+* html .gwt-TabBar .gwt-TabBarItem .topLeftInner {
+ width: 5px;
+ height: 61px;
+ margin-top: -55px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}
+* html .gwt-TabBar .gwt-TabBarItem .topRightInner {
+ width: 12px;
+ height: 61px;
+ margin-top: -55px;
+ margin-right: -6px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}
+.gwt-TabBar .gwt-TabBarItem .middleLeft,
+.gwt-TabBar .gwt-TabBarItem .middleRight {
+ width: 6px;
+ padding: 0px;
+ background: #e4e9f3 url(images/bg_tab.png) repeat-x;
+}
+.gwt-StackPanelItem .middleLeftInner,
+.gwt-StackPanelItem .middleRightInner {
+ width: 1px;
+ height: 1px;
+}
+.gwt-TabBar .gwt-TabBarItem .middleCenter {
+ padding: 0px 4px 2px 4px;
+ cursor: pointer;
+ cursor: hand;
+ color: black;
+ font-weight: bold;
+ text-align: center;
+ background: #e4e9f3 url(images/bg_tab.png) repeat-x;
+}
+.gwt-TabBar .gwt-TabBarItem .topCenter {
+ padding: 0px;
+ background: url(images/hborder.png) 0px -32px repeat-x;
+}
+.gwt-TabBar .gwt-TabBarItem .topLeft,
+.gwt-TabBar .gwt-TabBarItem .topRight {
+ padding: 0px;
+ zoom: 1;
+}
+.gwt-TabBar .gwt-TabBarItem .topLeftInner,
+.gwt-TabBar .gwt-TabBarItem .topRightInner {
+ width: 6px;
+ height: 6px;
+}
+html>body .gwt-TabBar .gwt-TabBarItem .topLeft {
+ background: url(images/corner.png) no-repeat 0px -55px;
+}
+html>body .gwt-TabBar .gwt-TabBarItem .topRight {
+ background: url(images/corner.png) no-repeat -6px -55px;
+}
+* html .gwt-TabBar .gwt-TabBarItem .topLeftInner {
+ width: 5px;
+ height: 61px;
+ margin-top: -55px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}
+* html .gwt-TabBar .gwt-TabBarItem .topRightInner {
+ width: 12px;
+ height: 61px;
+ margin-top: -55px;
+ margin-right: -6px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}
+.gwt-TabBar .gwt-TabBarItem .middleLeft,
+.gwt-TabBar .gwt-TabBarItem .middleRight {
+ width: 6px;
+ padding: 0px;
+ background: #e4e9f3 url(images/bg_tab.png) repeat-x;
+}
+.gwt-StackPanelItem .middleLeftInner,
+.gwt-StackPanelItem .middleRightInner {
+ width: 1px;
+ height: 1px;
+}
+.gwt-TabBar .gwt-TabBarItem .middleCenter {
+ padding: 0px 4px 2px 4px;
+ cursor: pointer;
+ cursor: hand;
+ font-weight: bold;
+ text-align: center;
+ background: #e4e9f3 url(images/bg_tab.png) repeat-x;
+}
+.gwt-TabBar .gwt-TabBarItem-selected .topCenter {
+ background: url(images/hborder.png) 0px -38px repeat-x;
+}
+html>body .gwt-TabBar .gwt-TabBarItem-selected .topLeft {
+ background-position: 0px -61px;
+}
+html>body .gwt-TabBar .gwt-TabBarItem-selected .topRight {
+ background-position: -6px -61px;
+}
+* html .gwt-TabBar .gwt-TabBarItem-selected .topLeftInner {
+ width: 5px;
+ height: 67px;
+ margin-top: -61px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}
+* html .gwt-TabBar .gwt-TabBarItem-selected .topRightInner {
+ width: 12px;
+ height: 67px;
+ margin-top: -61px;
+ margin-right: -6px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}
+.gwt-TabBar .gwt-TabBarItem-selected .middleLeft,
+.gwt-TabBar .gwt-TabBarItem-selected .middleRight {
+ background: #92c1f0 url(images/bg_tab_selected.png) repeat-x;
+}
+.gwt-TabBar .gwt-TabBarItem-selected .middleCenter {
+ cursor: default;
+ background: #92c1f0 url(images/bg_tab_selected.png) repeat-x;
+}
+.gwt-TabPanel {
+}
+.gwt-TabPanelBottom {
+ border-color: #92c1f0;
+ border-style: solid;
+ border-width: 3px 2px 2px;
+ overflow: hidden;
+ padding: 6px;
+}
+
+/**
+ * Applied to general text areas.
+ */
+.gwt-TextArea {
+ padding: 2px;
+}
+
+.gwt-TextArea-readonly {
+ color: #888;
+}
+
+/**
+ * Applied to text boxes.
+ */
+.gwt-TextBox {
+ padding: 2px;
+}
+
+.gwt-TextBox-readonly {
+ color: #888;
+}
+
+/**
+ * Applied to toggle buttons, a customizable button that can be toggled
+ * between two states (similar to a checkbox).
+ */
+.gwt-ToggleButton-up {
+ padding: 2px;
+ background-color: #efebe7;
+ border: 2px solid #faf9f7;
+ border-left: 2px solid #848280;
+ border-bottom: 2px solid #848280;
+ cursor: pointer;
+ cursor: hand;
+}
+
+.gwt-ToggleButton-up-hovering {
+ padding: 2px;
+ background-color: #efebe7;
+ border: 2px solid #faf9f7;
+ border-left: 2px solid #848280;
+ border-bottom: 2px solid #848280;
+ cursor: pointer;
+ cursor: hand;
+}
+
+.gwt-ToggleButton-up-disabled {
+ padding: 2px;
+ background-color: #efebe7;
+ border: 2px solid #e7e4e0;
+ border-left: 2px solid #625b54;
+ border-bottom: 2px solid #625b54;
+ cursor: default;
+ opacity: 0.5;
+}
+
+.gwt-ToggleButton-up-disabled .gwt-Image {
+ filter: alpha(opacity=30);
+}
+
+.gwt-ToggleButton-down {
+ padding: 2px 3px 2px 1px;
+ background-color: #f5f5f5;
+ border: 2px solid #848280;
+ border-left: 2px solid #faf9f7;
+ border-bottom: 2px solid #faf9f7;
+ cursor: pointer;
+ cursor: hand;
+}
+
+.gwt-ToggleButton-down-hovering {
+ padding: 2px 3px 2px 1px;
+ background-color: #f5f5f5;
+ border: 2px solid #848280;
+ border-left: 2px solid #faf9f7;
+ border-bottom: 2px solid #faf9f7;
+ cursor: pointer;
+ cursor: hand;
+}
+
+.gwt-ToggleButton-down-disabled {
+ padding: 2px 3px 2px 1px;
+ background-color: #efebe7;
+ border: 2px solid #e7e4e0;
+ border-left: 2px solid #625b54;
+ border-bottom: 2px solid #625b54;
+ cursor: default;
+ opacity: 0.5;
+}
+
+.gwt-ToggleButton-down-disabled .gwt-Image {
+ filter: alpha(opacity=30);
+}
+
+/**
+ * Applied to the Tree.
+ */
+.gwt-Tree {
+ background: white;
+}
+
+.gwt-Tree .gwt-TreeItem {
+ padding: 0px;
+ margin: 0px;
+ border: 1px solid white;
+ white-space: nowrap;
+ cursor: hand;
+ cursor: pointer;
+}
+
+.gwt-Tree .gwt-TreeItem-hovering {
+}
+
+.gwt-Tree .gwt-TreeItem-selected {
+ background: #93c2f1 url(images/bg_listgradient.png) repeat-x;
+ border: 1px dotted #888;
+}
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/Showcase.css b/samples/showcase/src/com/google/gwt/sample/showcase/public/Showcase.css
new file mode 100644
index 0000000..166c808
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/Showcase.css
@@ -0,0 +1,155 @@
+/**
+ * Applied to the main layout of the page.
+ */
+.Application-top {
+ width: 100%;
+ background-color: #EBEBEB;
+ background: url(images/bg_headergradient.png) repeat-x #e3e8f3;
+ border-bottom: 2px solid #bbcdf3;
+}
+.Application-title {
+ padding: 0px 0px 0px 10px;
+}
+.Application-title h1 {
+ color: #67A7E3;
+ margin: 0px;
+ padding: 0px 0px 0px 4px;
+ font-size: 1.7em;
+}
+.Application-title h2 {
+ color: #888;
+ margin: 0px;
+ padding: 0px 0px 0px 4px;
+ font-size: 1.1em;
+}
+.Application-links {
+ padding: 6px 10px;
+}
+.Application-menu-title {
+ padding: 4px 0px 3px 6px;
+ font-weight: bold;
+ white-space: nowrap;
+ text-align: left;
+ background: url(images/bg_headergradient.png) repeat-x;
+ border-right: 2px solid #bbcdf3;
+ border-bottom: 2px solid #bbcdf3;
+}
+.Application-menu-wrapper {
+ border-right: 2px solid #bbcdf3;
+ text-align: left;
+}
+
+/**
+ * Applied to widgets in the content area.
+ */
+.Application-content-title {
+ padding: 4px 0px 3px 6px;
+ text-align: left;
+ background: url(images/bg_headergradient.png) repeat-x;
+ border-bottom: 2px solid #bbcdf3;
+}
+.Application-content-title .gwt-TabBarItem .top,
+.Application-content-title .gwt-TabBarItem .topLeft,
+.Application-content-title .gwt-TabBarItem .topRight,
+.Application-content-title .gwt-TabBarItem .middleLeft,
+.Application-content-title .gwt-TabBarItem .middleRight {
+ display: none;
+}
+.Application-content-title .gwt-TabBarItem .middleCenter {
+ background: none;
+ padding: 0px;
+}
+.Application-content-title .gwt-TabBarItem .gwt-Label {
+ padding-right: 20px;
+ color: #888888;
+}
+.Application-content-title .gwt-TabBarItem-selected .gwt-Label {
+ color: black;
+}
+.Application-content-wrapper {
+ text-align: left;
+}
+.sc-ContentWidget {
+ padding: 10px 20px;
+ position: relative;
+}
+.sc-ContentWidget-name {
+ font-size: 1.5em;
+ font-weight: bold;
+ padding-bottom: 15px;
+}
+.sc-ContentWidget-description {
+ padding-bottom: 15px;
+ border-bottom: 1px solid #7aa5d6;
+ margin-bottom: 15px;
+}
+.sc-ContentWidget pre {
+ border: 1px solid #888;
+ background: #eeeeee;
+ padding: 10px 2px;
+ margin: 10px 0px;
+ font-size: medium;
+}
+
+/**
+ * Applied to specific components in Content Widgets.
+ */
+.cw-BasicPopup-thumb {
+ cursor: pointer;
+ cursor: hand;
+}
+
+.cw-DialogBox {
+ opacity: 0.8;
+ filter: alpha(opacity=80);
+}
+
+.cw-DictionaryExample-headerRow td {
+ color: #7aa5d6;
+ text-decoration: underline;
+ font-weight: bold;
+ padding-left: 20px;
+}
+.cw-DictionaryExample-dataRow td {
+ padding-left: 20px;
+}
+
+.cw-DockPanel td {
+ border: 1px solid #BBBBBB;
+ padding: 3px;
+}
+
+.cw-FlexTable td {
+ border: 1px solid #BBBBBB;
+ padding: 3px;
+}
+
+.cw-FlexTable-buttonPanel td {
+ border: 0px;
+}
+
+.cw-FlowPanel-checkBox {
+ margin-right: 20px;
+}
+
+.cw-RedText {
+ color: red;
+}
+
+.cw-RichText {
+ border: 1px solid #BBBBBB;
+ border-spacing: 0px;
+}
+
+.cw-StackPanelHeader {
+ padding-left: 7px;
+ font-weight: bold;
+ font-size: 1.4em;
+}
+
+/**
+ * Make all buttons the same size.
+ */
+.gwt-Button {
+ width: 10em;
+}
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/Showcase.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/Showcase.html
new file mode 100644
index 0000000..a7dbcd5
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/Showcase.html
@@ -0,0 +1,26 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+ <head>
+ <title>Showcase of GWT Features</title>
+ <style>
+ body,td,a,div,.p{font-family:arial,sans-serif}
+ div,td{color:#000000}
+ a:link,.w,.w a:link{color:#0000cc}
+ a:visited{color:#551a8b}
+ a:active{color:#ff0000}
+ </style>
+ <script language='javascript'>
+ // Used in the Dictionary Example
+ var userInfo = {
+ name: "Amelie Crutcher",
+ timeZone: "EST",
+ userID: "123",
+ lastLogOn: "2/2/2006"
+ };
+ </script>
+ <script language='javascript' src='com.google.gwt.sample.showcase.Showcase.nocache.js'></script>
+ </head>
+ <body>
+ <iframe src="javascript:''" id="__gwt_historyFrame" style="position:absolute;width:0;height:0;border:0"></iframe>
+ </body>
+</html>
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/Showcase.rtl.css b/samples/showcase/src/com/google/gwt/sample/showcase/public/Showcase.rtl.css
new file mode 100644
index 0000000..b1aa0c2
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/Showcase.rtl.css
@@ -0,0 +1,164 @@
+/**
+ * Applied to the main layout of the page.
+ */
+.Application-title {
+ top: 6px;
+ right: 10px;
+}
+.Application-title td {
+ padding: 0px 10px 0px 0px;
+}
+.Application-title h1 {
+ color: #67A7E3;
+ margin: 0px;
+ padding: 0px;
+ line-height: 1.3em;
+}
+.Application-title h2 {
+ color: #888;
+ margin: 0px;
+ padding: 0px;
+}
+.Application-links {
+ top: 6px;
+ left: 10px;
+}
+.Application-menu-title {
+ padding: 3px 4px 3px 0px;
+ background: #e3e8f3 url(images/bg_headergradient.png) repeat-x;
+ font-weight: bold;
+ border: 1px solid #BBBBBB;
+ white-space: nowrap;
+ overflow: hidden;
+ right: 14px;
+ width: 250px;
+}
+.Application-menu-wrapper {
+ padding: 2px 4px 0px 0px;
+ background: white;
+ border-right: 1px solid #BBBBBB;
+ border-left: 1px solid #BBBBBB;
+ right: 14px;
+ width: 250px;
+}
+.Application-content-title {
+ background: #e3e8f3 url(images/bg_headergradient.png) repeat-x;
+ font-weight: bold;
+ border: 1px solid #BBBBBB;
+ border-left: 0px;
+ right: 284px;
+ left: 1px;
+}
+.Application-content-wrapper {
+ padding: 2px 0px 0px 0px;
+ background: white;
+ border-right: 1px solid #BBBBBB;
+ right: 284px;
+ left: 1px;
+}
+
+/**
+ * Applied to widgets in the content area.
+ */
+.sc-ContentWidgetTabBar .gwt-TabBarItem {
+ cursor: pointer;
+ cursor: hand;
+ margin-right: 10px;
+ border-collapse: collapse;
+}
+.sc-ContentWidgetTabBar .gwt-TabBarItem .gwt-Label {
+ padding: 1px 0px;
+ color: #888888;
+}
+.sc-ContentWidgetTabBar .gwt-TabBarItem-selected .gwt-Label {
+ color: black;
+}
+.sc-ContentWidgetTabPanelBottom {
+ border: 0px;
+ border-top: 20px solid white;
+ border-bottom: 5px solid white;
+ padding: 0px;
+}
+.sc-ContentWidget .sc-ContentWidgetContents {
+ padding: 0px 20px;
+}
+.sc-ContentWidgetName {
+ font-size: 1.5em;
+ font-weight: bold;
+ padding-bottom: 15px;
+}
+.sc-ContentWidgetDescription {
+ padding-bottom: 15px;
+ border-bottom: 1px solid #7aa5d6;
+ margin-bottom: 15px;
+}
+.sc-ContentWidget pre {
+ border: 1px solid #888;
+ background: #eeeeee;
+ margin: 0px 20px;
+ padding: 10px;
+ font-size: medium;
+}
+
+/**
+ * Applied to specific components in Content Widgets.
+ */
+.cw-BasicPopup-thumb {
+ cursor: pointer;
+ cursor: hand;
+}
+
+.cw-DialogBox {
+ opacity: 0.8;
+ filter: alpha(opacity=80);
+}
+
+.cw-DictionaryExample-headerRow td {
+ color: #7aa5d6;
+ text-decoration: underline;
+ font-weight: bold;
+ padding-right: 20px;
+}
+.cw-DictionaryExample-dataRow td {
+ padding-right: 20px;
+}
+
+.cw-DockPanel td {
+ border: 1px solid #BBBBBB;
+ padding: 3px;
+}
+
+.cw-FlexTable td {
+ border: 1px solid #BBBBBB;
+ padding: 3px;
+}
+
+.cw-FlexTable-buttonPanel td {
+ border: 0px;
+}
+
+.cw-FlowPanel-checkBox {
+ margin-left: 20px;
+}
+
+.cw-RedText {
+ color: red;
+}
+
+.cw-RichText {
+ border: 1px solid #BBBBBB;
+ border-spacing: 0px;
+}
+
+.cw-StackPanelHeader {
+ padding-right: 7px;
+ font-weight: bold;
+ font-size: 1.4em;
+}
+
+/**
+ * Make all buttons the same size.
+ */
+.gwt-Button {
+ width: 10em;
+}
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/images/bg_headergradient.png b/samples/showcase/src/com/google/gwt/sample/showcase/public/images/bg_headergradient.png
new file mode 100644
index 0000000..3c95f34
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/images/bg_headergradient.png
Binary files differ
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/images/bg_listgradient.png b/samples/showcase/src/com/google/gwt/sample/showcase/public/images/bg_listgradient.png
new file mode 100644
index 0000000..3d5865c
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/images/bg_listgradient.png
Binary files differ
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/images/bg_stackpanel.png b/samples/showcase/src/com/google/gwt/sample/showcase/public/images/bg_stackpanel.png
new file mode 100644
index 0000000..dbf06b4
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/images/bg_stackpanel.png
Binary files differ
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/images/bg_tab.png b/samples/showcase/src/com/google/gwt/sample/showcase/public/images/bg_tab.png
new file mode 100644
index 0000000..66bfa70
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/images/bg_tab.png
Binary files differ
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/images/bg_tab_selected.png b/samples/showcase/src/com/google/gwt/sample/showcase/public/images/bg_tab_selected.png
new file mode 100644
index 0000000..063c3fb
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/images/bg_tab_selected.png
Binary files differ
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/images/corner.png b/samples/showcase/src/com/google/gwt/sample/showcase/public/images/corner.png
new file mode 100644
index 0000000..f7a0caf
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/images/corner.png
Binary files differ
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/images/hborder.png b/samples/showcase/src/com/google/gwt/sample/showcase/public/images/hborder.png
new file mode 100644
index 0000000..896911f
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/images/hborder.png
Binary files differ
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/images/ie6/corner_dialog_topleft.png b/samples/showcase/src/com/google/gwt/sample/showcase/public/images/ie6/corner_dialog_topleft.png
new file mode 100644
index 0000000..9b4e8ed
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/images/ie6/corner_dialog_topleft.png
Binary files differ
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/images/ie6/corner_dialog_topright.png b/samples/showcase/src/com/google/gwt/sample/showcase/public/images/ie6/corner_dialog_topright.png
new file mode 100644
index 0000000..0904539
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/images/ie6/corner_dialog_topright.png
Binary files differ
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/images/ie6/hborder_blue_shadow.png b/samples/showcase/src/com/google/gwt/sample/showcase/public/images/ie6/hborder_blue_shadow.png
new file mode 100644
index 0000000..509279a
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/images/ie6/hborder_blue_shadow.png
Binary files differ
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/images/ie6/hborder_gray_shadow.png b/samples/showcase/src/com/google/gwt/sample/showcase/public/images/ie6/hborder_gray_shadow.png
new file mode 100644
index 0000000..f4d1844
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/images/ie6/hborder_gray_shadow.png
Binary files differ
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/images/ie6/vborder_blue_shadow.png b/samples/showcase/src/com/google/gwt/sample/showcase/public/images/ie6/vborder_blue_shadow.png
new file mode 100644
index 0000000..7274534
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/images/ie6/vborder_blue_shadow.png
Binary files differ
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/images/ie6/vborder_gray_shadow.png b/samples/showcase/src/com/google/gwt/sample/showcase/public/images/ie6/vborder_gray_shadow.png
new file mode 100644
index 0000000..fccce49
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/images/ie6/vborder_gray_shadow.png
Binary files differ
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/images/loading.gif b/samples/showcase/src/com/google/gwt/sample/showcase/public/images/loading.gif
new file mode 100644
index 0000000..a0e7007
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/images/loading.gif
Binary files differ
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/images/vborder.png b/samples/showcase/src/com/google/gwt/sample/showcase/public/images/vborder.png
new file mode 100644
index 0000000..8b284c3
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/images/vborder.png
Binary files differ
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/raw/com.google.gwt.sample.showcase.client.content.i18n.ColorConstants.java.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/raw/com.google.gwt.sample.showcase.client.content.i18n.ColorConstants.java.html
new file mode 100644
index 0000000..83cf674
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/raw/com.google.gwt.sample.showcase.client.content.i18n.ColorConstants.java.html
@@ -0,0 +1,41 @@
+<pre>/*
+ * Copyright 2008 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.showcase.client.content.i18n;
+
+import com.google.gwt.i18n.client.ConstantsWithLookup;
+
+/**
+ * Internationalized constants used to demonstrate {@link ConstantsWithLookup}.
+ *
+ */
+public interface ColorConstants extends ConstantsWithLookup {
+ String black();
+
+ String blue();
+
+ String green();
+
+ String grey();
+
+ String lightGrey();
+
+ String red();
+
+ String white();
+
+ String yellow();
+}
+</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/raw/com.google.gwt.sample.showcase.client.content.i18n.ColorConstants.properties.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/raw/com.google.gwt.sample.showcase.client.content.i18n.ColorConstants.properties.html
new file mode 100644
index 0000000..023a817
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/raw/com.google.gwt.sample.showcase.client.content.i18n.ColorConstants.properties.html
@@ -0,0 +1,25 @@
+<pre>#
+# Copyright 2008 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.
+#
+
+red = Red
+green = Green
+yellow = Yellow
+blue = Blue
+black = Black
+white = White
+grey = Grey
+lightGrey = Light Grey
+</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/raw/com.google.gwt.sample.showcase.client.content.i18n.ColorConstants_ar.properties.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/raw/com.google.gwt.sample.showcase.client.content.i18n.ColorConstants_ar.properties.html
new file mode 100644
index 0000000..8f099b0
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/raw/com.google.gwt.sample.showcase.client.content.i18n.ColorConstants_ar.properties.html
@@ -0,0 +1,25 @@
+<pre>#
+# Copyright 2008 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.
+#
+
+red = الاحمر
+green = الخضراء
+yellow = الاصفر
+blue = زرقاء
+black = أسود
+white = أبيض
+grey = الرمادية
+lightGrey = ضوء الرمادية
+</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/raw/com.google.gwt.sample.showcase.client.content.i18n.ColorConstants_fr.properties.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/raw/com.google.gwt.sample.showcase.client.content.i18n.ColorConstants_fr.properties.html
new file mode 100644
index 0000000..6199d86
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/raw/com.google.gwt.sample.showcase.client.content.i18n.ColorConstants_fr.properties.html
@@ -0,0 +1,25 @@
+<pre>#
+# Copyright 2008 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.
+#
+
+red = Rouge
+green = Vert
+yellow = Jaune
+blue = Bleu
+black = Noir
+white = Blanc
+grey = Gris
+lightGrey = Lumière Gris
+</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/raw/com.google.gwt.sample.showcase.client.content.i18n.ColorConstants_zh.properties.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/raw/com.google.gwt.sample.showcase.client.content.i18n.ColorConstants_zh.properties.html
new file mode 100644
index 0000000..453d6e1
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/raw/com.google.gwt.sample.showcase.client.content.i18n.ColorConstants_zh.properties.html
@@ -0,0 +1,25 @@
+<pre>#
+# Copyright 2008 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.
+#
+
+red =红
+green =绿
+yellow =黄色
+blue =蓝
+black =黑色
+white =白
+grey =灰色
+lightGrey =浅灰色
+</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/raw/com.google.gwt.sample.showcase.client.content.i18n.ErrorMessages.java.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/raw/com.google.gwt.sample.showcase.client.content.i18n.ErrorMessages.java.html
new file mode 100644
index 0000000..d7cd190
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/raw/com.google.gwt.sample.showcase.client.content.i18n.ErrorMessages.java.html
@@ -0,0 +1,27 @@
+<pre>/*
+ * Copyright 2008 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.showcase.client.content.i18n;
+
+import com.google.gwt.i18n.client.Messages;
+
+/**
+ * Internationalized messages.
+ */
+public interface ErrorMessages extends Messages {
+ String permissionDenied(String username, String securityClearance,
+ String inaccessibleResource);
+}
+</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/raw/com.google.gwt.sample.showcase.client.content.i18n.ErrorMessages.properties.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/raw/com.google.gwt.sample.showcase.client.content.i18n.ErrorMessages.properties.html
new file mode 100644
index 0000000..6813893
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/raw/com.google.gwt.sample.showcase.client.content.i18n.ErrorMessages.properties.html
@@ -0,0 +1,17 @@
+<pre>#
+# Copyright 2008 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.
+#
+permissionDenied = User ''{0}'' has security clearance ''{1}'' and cannot access ''{2}''
+</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/raw/com.google.gwt.sample.showcase.client.content.i18n.ErrorMessages_ar.properties.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/raw/com.google.gwt.sample.showcase.client.content.i18n.ErrorMessages_ar.properties.html
new file mode 100644
index 0000000..3f818c3
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/raw/com.google.gwt.sample.showcase.client.content.i18n.ErrorMessages_ar.properties.html
@@ -0,0 +1,17 @@
+<pre>#
+# Copyright 2008 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.
+#
+permissionDenied = مستخدم ''{0}'' لقد التصريح الامني ''{1}'' والذين لا يستطيعون الوصول الى ''{2}''
+</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/raw/com.google.gwt.sample.showcase.client.content.i18n.ErrorMessages_fr.properties.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/raw/com.google.gwt.sample.showcase.client.content.i18n.ErrorMessages_fr.properties.html
new file mode 100644
index 0000000..c1ad7af
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/raw/com.google.gwt.sample.showcase.client.content.i18n.ErrorMessages_fr.properties.html
@@ -0,0 +1,17 @@
+<pre>#
+# Copyright 2008 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.
+#
+permissionDenied = Utilisateur ''{0}'' a de sécurité ''{1}'' et ne peuvent accéder aux ''{2}''
+</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/raw/com.google.gwt.sample.showcase.client.content.i18n.ErrorMessages_zh.properties.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/raw/com.google.gwt.sample.showcase.client.content.i18n.ErrorMessages_zh.properties.html
new file mode 100644
index 0000000..6cf142e
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/raw/com.google.gwt.sample.showcase.client.content.i18n.ErrorMessages_zh.properties.html
@@ -0,0 +1,17 @@
+<pre>#
+# Copyright 2008 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.
+#
+permissionDenied = 用户''{0}''已安全过关''{1}''并不能获得''{2}''
+</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/raw/com.google.gwt.sample.showcase.client.content.i18n.ExampleConstants.java.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/raw/com.google.gwt.sample.showcase.client.content.i18n.ExampleConstants.java.html
new file mode 100644
index 0000000..976f7f3
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/raw/com.google.gwt.sample.showcase.client.content.i18n.ExampleConstants.java.html
@@ -0,0 +1,34 @@
+<pre>/*
+ * Copyright 2008 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.showcase.client.content.i18n;
+
+import com.google.gwt.i18n.client.Constants;
+
+import java.util.Map;
+
+/**
+ * Internationalized constants used to demonstrate {@link Constants}.
+ */
+public interface ExampleConstants extends Constants {
+ Map<String, String> colorMap();
+
+ String favoriteColor();
+
+ String firstName();
+
+ String lastName();
+}
+</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/raw/com.google.gwt.sample.showcase.client.content.i18n.ExampleConstants.properties.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/raw/com.google.gwt.sample.showcase.client.content.i18n.ExampleConstants.properties.html
new file mode 100644
index 0000000..1385a2d
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/raw/com.google.gwt.sample.showcase.client.content.i18n.ExampleConstants.properties.html
@@ -0,0 +1,31 @@
+<pre>#
+# Copyright 2008 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.
+#
+
+firstName = <b>First Name:</b>
+lastName = <b>Last Name:</b>
+favoriteColor = <b>Favorite color:</b>
+
+red = Red
+green = Green
+yellow = Yellow
+blue = Blue
+black = Black
+white = White
+grey = Grey
+lightGrey = Light Grey
+
+colorMap = red, white, yellow, black, blue, green, grey, lightGrey
+</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/raw/com.google.gwt.sample.showcase.client.content.i18n.ExampleConstants_ar.properties.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/raw/com.google.gwt.sample.showcase.client.content.i18n.ExampleConstants_ar.properties.html
new file mode 100644
index 0000000..49d44ce
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/raw/com.google.gwt.sample.showcase.client.content.i18n.ExampleConstants_ar.properties.html
@@ -0,0 +1,31 @@
+<pre>#
+# Copyright 2008 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.
+#
+
+firstName = <b>الاسم الأول:</b>
+lastName = <b>الاسم الأخير:</b>
+favoriteColor = <b>اللون المفضل:</b>
+
+red = الاحمر
+green = الخضراء
+yellow = الاصفر
+blue = زرقاء
+black = أسود
+white = أبيض
+grey = الرمادية
+lightGrey = ضوء الرمادية
+
+colorMap = red, white, yellow, black, blue, green, grey, lightGrey
+</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/raw/com.google.gwt.sample.showcase.client.content.i18n.ExampleConstants_fr.properties.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/raw/com.google.gwt.sample.showcase.client.content.i18n.ExampleConstants_fr.properties.html
new file mode 100644
index 0000000..1137259
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/raw/com.google.gwt.sample.showcase.client.content.i18n.ExampleConstants_fr.properties.html
@@ -0,0 +1,32 @@
+<pre>#
+# Copyright 2008 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.
+#
+
+
+firstName = <b>Prénom:</b>
+lastName = <b>Nom:</b>
+favoriteColor = <b>Couleur Préférée:</b>
+
+red = Rouge
+green = Vert
+yellow = Jaune
+blue = Bleu
+black = Noir
+white = Blanc
+grey = Gris
+lightGrey = Lumière Gris
+
+colorMap = red, white, yellow, black, blue, green, grey, lightGrey
+</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/raw/com.google.gwt.sample.showcase.client.content.i18n.ExampleConstants_zh.properties.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/raw/com.google.gwt.sample.showcase.client.content.i18n.ExampleConstants_zh.properties.html
new file mode 100644
index 0000000..7406f67
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/raw/com.google.gwt.sample.showcase.client.content.i18n.ExampleConstants_zh.properties.html
@@ -0,0 +1,31 @@
+<pre>#
+# Copyright 2008 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.
+#
+
+firstName = <b>名字:</b>
+lastName = <b>去年名称:</b>
+favoriteColor = <b>最喜爱的颜色:</b>
+
+red =红
+green =绿
+yellow =黄色
+blue =蓝
+black =黑色
+white =白
+grey =灰色
+lightGrey =浅灰色
+
+colorMap = red, white, yellow, black, blue, green, grey, lightGrey
+</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.i18n.CwConstantsExample.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.i18n.CwConstantsExample.html
new file mode 100644
index 0000000..ee57626
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.i18n.CwConstantsExample.html
@@ -0,0 +1,75 @@
+<pre> /**
+ * The constants used in this Content Widget.
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String cwConstantsExampleDescription();
+
+ String cwConstantsExampleLinkText();
+
+ String cwConstantsExampleName();
+ }
+
+ /**
+ * An instance of the constants.
+ */
+ private CwConstants constants;
+
+ /**
+ * Initialize this example.
+ */
+ @Override
+ public Widget onInitialize() {
+ // Create the internationalized constants
+ ExampleConstants exampleConstants = GWT.create(ExampleConstants.class);
+
+ // Use a FlexTable to layout the content
+ FlexTable layout = new FlexTable();
+ FlexCellFormatter formatter = layout.getFlexCellFormatter();
+ layout.setCellSpacing(5);
+
+ // Add a link to the source code of the Interface
+ HTML link = new HTML(
+ " <a href=\"javascript:void(0);\">ExampleConstants</a>");
+ link.addClickListener(new ClickListener() {
+ public void onClick(Widget sender) {
+ selectTab(2);
+ }
+ });
+ HorizontalPanel linkPanel = new HorizontalPanel();
+ linkPanel.setSpacing(3);
+ linkPanel.add(new HTML(constants.cwConstantsExampleLinkText()));
+ linkPanel.add(link);
+ layout.setWidget(0, 0, linkPanel);
+ formatter.setColSpan(0, 0, 2);
+
+ // Show the first name
+ TextBox firstNameBox = new TextBox();
+ firstNameBox.setText("Amelie");
+ firstNameBox.setWidth("17em");
+ layout.setHTML(1, 0, exampleConstants.firstName());
+ layout.setWidget(1, 1, firstNameBox);
+
+ // Show the last name
+ TextBox lastNameBox = new TextBox();
+ lastNameBox.setText("Crutcher");
+ lastNameBox.setWidth("17em");
+ layout.setHTML(2, 0, exampleConstants.lastName());
+ layout.setWidget(2, 1, lastNameBox);
+
+ // Create a list box of favorite colors
+ ListBox colorBox = new ListBox();
+ Map<String, String> colorMap = exampleConstants.colorMap();
+ for (Map.Entry<String, String> entry : colorMap.entrySet()) {
+ String key = entry.getKey();
+ String value = entry.getValue();
+ colorBox.addItem(value, key);
+ }
+ layout.setHTML(3, 0, exampleConstants.favoriteColor());
+ layout.setWidget(3, 1, colorBox);
+
+ // Return the layout Widget
+ return layout;
+ }
+
+</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.i18n.CwConstantsWithLookupExample.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.i18n.CwConstantsWithLookupExample.html
new file mode 100644
index 0000000..06aead5
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.i18n.CwConstantsWithLookupExample.html
@@ -0,0 +1,107 @@
+<pre> /**
+ * The constants used in this Content Widget.
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String cwConstantsWithLookupExampleDescription();
+
+ String cwConstantsWithLookupExampleLinkText();
+
+ String cwConstantsWithLookupExampleMethodName();
+
+ String cwConstantsWithLookupExampleName();
+
+ String cwConstantsWithLookupExampleNoInput();
+
+ String cwConstantsWithLookupExampleNoMatches();
+
+ String cwConstantsWithLookupExampleResults();
+ }
+
+ /**
+ * A {@link TextBox} where the user can select a color to lookup.
+ */
+ private TextBox colorBox = null;
+
+ /**
+ * A {@link TextBox} where the results of the lookup are displayed.
+ */
+ private TextBox colorResultsBox = null;
+
+ /**
+ * An instance of the constants.
+ */
+ private CwConstants constants;
+
+ /**
+ * Initialize this example.
+ */
+ @Override
+ public Widget onInitialize() {
+ // Create the internationalized constants
+ colorConstants = GWT.create(ColorConstants.class);
+
+ // Use a FlexTable to layout the content
+ FlexTable layout = new FlexTable();
+ FlexCellFormatter formatter = layout.getFlexCellFormatter();
+ layout.setCellSpacing(5);
+
+ // Add a link to the source code of the Interface
+ HTML link = new HTML(" <a href=\"javascript:void(0);\">ColorConstants</a>");
+ link.addClickListener(new ClickListener() {
+ public void onClick(Widget sender) {
+ selectTab(2);
+ }
+ });
+ HorizontalPanel linkPanel = new HorizontalPanel();
+ linkPanel.setSpacing(3);
+ linkPanel.add(new HTML(constants.cwConstantsWithLookupExampleLinkText()));
+ linkPanel.add(link);
+ layout.setWidget(0, 0, linkPanel);
+ formatter.setColSpan(0, 0, 2);
+
+ // Add a field so the user can type a color
+ colorBox = new TextBox();
+ colorBox.setText("red");
+ colorBox.setWidth("17em");
+ layout.setHTML(1, 0, constants.cwConstantsWithLookupExampleMethodName());
+ layout.setWidget(1, 1, colorBox);
+
+ // Show the last name
+ colorResultsBox = new TextBox();
+ colorResultsBox.setEnabled(false);
+ colorResultsBox.setWidth("17em");
+ layout.setHTML(2, 0, constants.cwConstantsWithLookupExampleResults());
+ layout.setWidget(2, 1, colorResultsBox);
+
+ // Add a listener to update the color as the user types a lookup value
+ colorBox.addKeyboardListener(new KeyboardListenerAdapter() {
+ @Override
+ public void onKeyUp(Widget sender, char keyCode, int modifiers) {
+ updateColor();
+ }
+ });
+
+ // Return the layout Widget
+ updateColor();
+ return layout;
+ }
+
+ /**
+ * Lookup the color based on the value the user entered.
+ */
+ private void updateColor() {
+ String key = colorBox.getText().trim();
+ if (key.equals("")) {
+ colorResultsBox.setText(constants.cwConstantsWithLookupExampleNoInput());
+ } else {
+ try {
+ String color = colorConstants.getString(key);
+ colorResultsBox.setText(color);
+ } catch (MissingResourceException e) {
+ colorResultsBox.setText(constants.cwConstantsWithLookupExampleNoMatches());
+ }
+ }
+ }
+
+</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.i18n.CwDateTimeFormat.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.i18n.CwDateTimeFormat.html
new file mode 100644
index 0000000..ac59983
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.i18n.CwDateTimeFormat.html
@@ -0,0 +1,233 @@
+<pre> /**
+ * The constants used in this Content Widget.
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String cwDateTimeFormatDescription();
+
+ String cwDateTimeFormatFailedToParseInput();
+
+ String cwDateTimeFormatFormattedLabel();
+
+ String cwDateTimeFormatInvalidPattern();
+
+ String cwDateTimeFormatName();
+
+ String cwDateTimeFormatPatternLabel();
+
+ String[] cwDateTimeFormatPatterns();
+
+ String cwDateTimeFormatValueLabel();
+ }
+
+ /**
+ * An instance of the constants.
+ */
+ private CwConstants constants;
+
+ /**
+ * The {@link Label} where the formatted value is displayed.
+ */
+ private Label formattedBox = null;
+
+ /**
+ * The {@link TextBox} that displays the current pattern.
+ */
+ private TextBox patternBox = null;
+
+ /**
+ * The {@link ListBox} that holds the patterns.
+ */
+ private ListBox patternList = null;
+
+ /**
+ * The {@link TextBox} where the user enters a value.
+ */
+ private TextBox valueBox = null;
+
+ /**
+ * Initialize this example.
+ */
+ @Override
+ public Widget onInitialize() {
+ // Use a Grid to layout the content
+ Grid layout = new Grid(4, 2);
+ CellFormatter formatter = layout.getCellFormatter();
+ layout.setCellSpacing(5);
+
+ // Add a field to select the pattern
+ patternList = new ListBox();
+ patternList.setWidth("17em");
+ String[] patterns = constants.cwDateTimeFormatPatterns();
+ for (String pattern : patterns) {
+ patternList.addItem(pattern);
+ }
+ patternList.addChangeListener(new ChangeListener() {
+ public void onChange(Widget sender) {
+ updatePattern();
+ }
+ });
+ layout.setHTML(0, 0, constants.cwDateTimeFormatPatternLabel());
+ layout.setWidget(0, 1, patternList);
+
+ // Add a field to display the pattern
+ patternBox = new TextBox();
+ patternBox.setWidth("17em");
+ patternBox.addKeyboardListener(new KeyboardListenerAdapter() {
+ @Override
+ public void onKeyUp(Widget sender, char keyCode, int modifiers) {
+ updatePattern();
+ }
+ });
+ layout.setWidget(1, 1, patternBox);
+
+ // Add a field to set the value
+ valueBox = new TextBox();
+ valueBox.setWidth("17em");
+ valueBox.setText("13 September 1999");
+ valueBox.addKeyboardListener(new KeyboardListenerAdapter() {
+ @Override
+ public void onKeyUp(Widget sender, char keyCode, int modifiers) {
+ updateFormattedValue();
+ }
+ });
+ layout.setHTML(2, 0, constants.cwDateTimeFormatValueLabel());
+ layout.setWidget(2, 1, valueBox);
+
+ // Add a field to display the formatted value
+ formattedBox = new Label();
+ formattedBox.setWidth("17em");
+ layout.setHTML(3, 0, constants.cwDateTimeFormatFormattedLabel());
+ layout.setWidget(3, 1, formattedBox);
+ formatter.setVerticalAlignment(3, 0, HasVerticalAlignment.ALIGN_TOP);
+
+ // Return the layout Widget
+ updatePattern();
+ return layout;
+ }
+
+ /**
+ * Show an error message. Pass in null to clear the error message.
+ *
+ * @param errorMsg the error message
+ */
+ private void showErrorMessage(String errorMsg) {
+ if (errorMsg == null) {
+ formattedBox.removeStyleName("cw-RedText");
+ } else {
+ formattedBox.setText(errorMsg);
+ formattedBox.addStyleName("cw-RedText");
+ }
+ }
+
+ /**
+ * Update the formatted value based on the user entered value and pattern.
+ */
+ private void updateFormattedValue() {
+ String sValue = valueBox.getText();
+ if (!sValue.equals("")) {
+ try {
+ Date date = new Date(sValue);
+ String formattedValue = activeFormat.format(date);
+ formattedBox.setText(formattedValue);
+ showErrorMessage(null);
+ } catch (IllegalArgumentException e) {
+ showErrorMessage(constants.cwDateTimeFormatFailedToParseInput());
+ }
+ } else {
+ formattedBox.setText("<None>");
+ }
+ }
+
+ /**
+ * Update the selected pattern based on the pattern in the list.
+ */
+ private void updatePattern() {
+ switch (patternList.getSelectedIndex()) {
+ // Date + Time
+ case 0:
+ activeFormat = DateTimeFormat.getFullDateTimeFormat();
+ patternBox.setText(activeFormat.getPattern());
+ patternBox.setEnabled(false);
+ break;
+
+ case 1:
+ activeFormat = DateTimeFormat.getLongDateTimeFormat();
+ patternBox.setText(activeFormat.getPattern());
+ patternBox.setEnabled(false);
+ break;
+ case 2:
+ activeFormat = DateTimeFormat.getMediumDateTimeFormat();
+ patternBox.setText(activeFormat.getPattern());
+ patternBox.setEnabled(false);
+ break;
+ case 3:
+ activeFormat = DateTimeFormat.getShortDateTimeFormat();
+ patternBox.setText(activeFormat.getPattern());
+ patternBox.setEnabled(false);
+ break;
+
+ // Date only
+ case 4:
+ activeFormat = DateTimeFormat.getFullDateFormat();
+ patternBox.setText(activeFormat.getPattern());
+ patternBox.setEnabled(false);
+ break;
+
+ case 5:
+ activeFormat = DateTimeFormat.getLongDateFormat();
+ patternBox.setText(activeFormat.getPattern());
+ patternBox.setEnabled(false);
+ break;
+ case 6:
+ activeFormat = DateTimeFormat.getMediumDateFormat();
+ patternBox.setText(activeFormat.getPattern());
+ patternBox.setEnabled(false);
+ break;
+ case 7:
+ activeFormat = DateTimeFormat.getShortDateFormat();
+ patternBox.setText(activeFormat.getPattern());
+ patternBox.setEnabled(false);
+ break;
+
+ // Time only
+ case 8:
+ activeFormat = DateTimeFormat.getFullTimeFormat();
+ patternBox.setText(activeFormat.getPattern());
+ patternBox.setEnabled(false);
+ break;
+
+ case 9:
+ activeFormat = DateTimeFormat.getLongTimeFormat();
+ patternBox.setText(activeFormat.getPattern());
+ patternBox.setEnabled(false);
+ break;
+ case 10:
+ activeFormat = DateTimeFormat.getMediumTimeFormat();
+ patternBox.setText(activeFormat.getPattern());
+ patternBox.setEnabled(false);
+ break;
+ case 11:
+ activeFormat = DateTimeFormat.getShortTimeFormat();
+ patternBox.setText(activeFormat.getPattern());
+ patternBox.setEnabled(false);
+ break;
+
+ // Custom
+ case 12:
+ patternBox.setEnabled(true);
+ String pattern = patternBox.getText();
+ try {
+ activeFormat = DateTimeFormat.getFormat(pattern);
+ } catch (IllegalArgumentException e) {
+ showErrorMessage(constants.cwDateTimeFormatInvalidPattern());
+ return;
+ }
+ break;
+ }
+
+ // Update the formatted value
+ updateFormattedValue();
+ }
+
+</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.i18n.CwDictionaryExample.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.i18n.CwDictionaryExample.html
new file mode 100644
index 0000000..aaa6cdc
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.i18n.CwDictionaryExample.html
@@ -0,0 +1,61 @@
+<pre> /**
+ * The constants used in this Content Widget.
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String cwDictionaryExampleDescription();
+
+ String cwDictionaryExampleLinkText();
+
+ String cwDictionaryExampleName();
+ }
+
+ /**
+ * An instance of the constants.
+ */
+ private CwConstants constants;
+
+ /**
+ * Initialize this example.
+ */
+ @Override
+ public Widget onInitialize() {
+ // Create a vertical panel to layout the contents
+ VerticalPanel layout = new VerticalPanel();
+
+ // Show the HTML variable that defines the dictionary
+ HTML source = new HTML("<pre>var userInfo = {\n"
+ + " name: \"Amelie Crutcher\",\n"
+ + " timeZone: \"EST\",\n" + " userID: \"123\",\n"
+ + " lastLogOn: \"2/2/2006\"\n" + "};</pre>\n");
+ layout.add(new HTML(constants.cwDictionaryExampleLinkText()));
+ layout.add(source);
+
+ // Create the Dictionary of data
+ FlexTable userInfoGrid = new FlexTable();
+ Dictionary userInfo = Dictionary.getDictionary("userInfo");
+ Set<String> keySet = userInfo.keySet();
+ int columnCount = 0;
+ for (String key : keySet) {
+ // Get the value from the set
+ String value = userInfo.get(key);
+
+ // Add a column with the data
+ userInfoGrid.setHTML(0, columnCount, key);
+ userInfoGrid.setHTML(1, columnCount, value);
+
+ // Go to the next column
+ columnCount++;
+ }
+ userInfoGrid.getRowFormatter().setStyleName(0,
+ "cw-DictionaryExample-headerRow");
+ userInfoGrid.getRowFormatter().setStyleName(1,
+ "cw-DictionaryExample-dataRow");
+ layout.add(new HTML("<br><br>"));
+ layout.add(userInfoGrid);
+
+ // Return the layout Widget
+ return layout;
+ }
+
+</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.i18n.CwMessagesExample.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.i18n.CwMessagesExample.html
new file mode 100644
index 0000000..c63db80
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.i18n.CwMessagesExample.html
@@ -0,0 +1,135 @@
+<pre> /**
+ * The constants used in this Content Widget.
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String cwMessagesExampleArg0Label();
+
+ String cwMessagesExampleArg1Label();
+
+ String cwMessagesExampleArg2Label();
+
+ String cwMessagesExampleDescription();
+
+ String cwMessagesExampleFormattedLabel();
+
+ String cwMessagesExampleLinkText();
+
+ String cwMessagesExampleName();
+
+ String cwMessagesExampleTemplateLabel();
+ }
+
+ /**
+ * The {@link TextBox} where the user enters argument 0.
+ */
+ private TextBox arg0Box = null;
+
+ /**
+ * The {@link TextBox} where the user enters argument 1.
+ */
+ private TextBox arg1Box = null;
+
+ /**
+ * The {@link TextBox} where the user enters argument 2.
+ */
+ private TextBox arg2Box = null;
+
+ /**
+ * An instance of the constants.
+ */
+ private CwConstants constants;
+
+ /**
+ * The error messages used in this example.
+ */
+ private ErrorMessages errorMessages = null;
+
+ /**
+ * The {@link HTML} used to display the message.
+ */
+ private HTML formattedMessage = null;
+
+ /**
+ * Initialize this example.
+ */
+ @Override
+ public Widget onInitialize() {
+ // Create the internationalized error messages
+ errorMessages = GWT.create(ErrorMessages.class);
+
+ // Use a FlexTable to layout the content
+ FlexTable layout = new FlexTable();
+ FlexCellFormatter formatter = layout.getFlexCellFormatter();
+ layout.setCellSpacing(5);
+
+ // Add a link to the source code of the Interface
+ HTML link = new HTML(" <a href=\"javascript:void(0);\">ErrorMessages</a>");
+ link.addClickListener(new ClickListener() {
+ public void onClick(Widget sender) {
+ selectTab(2);
+ }
+ });
+ HorizontalPanel linkPanel = new HorizontalPanel();
+ linkPanel.setSpacing(3);
+ linkPanel.add(new HTML(constants.cwMessagesExampleLinkText()));
+ linkPanel.add(link);
+ layout.setWidget(0, 0, linkPanel);
+ formatter.setColSpan(0, 0, 2);
+
+ // Show the template for reference
+ String template = errorMessages.permissionDenied("{0}", "{1}", "{2}");
+ layout.setHTML(1, 0, constants.cwMessagesExampleTemplateLabel());
+ layout.setHTML(1, 1, template);
+
+ // Add argument 0
+ arg0Box = new TextBox();
+ arg0Box.setText("amelie");
+ layout.setHTML(2, 0, constants.cwMessagesExampleArg0Label());
+ layout.setWidget(2, 1, arg0Box);
+
+ // Add argument 1
+ arg1Box = new TextBox();
+ arg1Box.setText("guest");
+ layout.setHTML(3, 0, constants.cwMessagesExampleArg1Label());
+ layout.setWidget(3, 1, arg1Box);
+
+ // Add argument 2
+ arg2Box = new TextBox();
+ arg2Box.setText("/secure/blueprints.xml");
+ layout.setHTML(4, 0, constants.cwMessagesExampleArg2Label());
+ layout.setWidget(4, 1, arg2Box);
+
+ // Add the formatted message
+ formattedMessage = new HTML();
+ layout.setHTML(5, 0, constants.cwMessagesExampleFormattedLabel());
+ layout.setWidget(5, 1, formattedMessage);
+ formatter.setVerticalAlignment(5, 0, HasVerticalAlignment.ALIGN_TOP);
+
+ // Add listeners to all of the argument boxes
+ KeyboardListenerAdapter keyListener = new KeyboardListenerAdapter() {
+ @Override
+ public void onKeyUp(Widget sender, char keyCode, int modifiers) {
+ updateMessage();
+ }
+ };
+ arg0Box.addKeyboardListener(keyListener);
+ arg1Box.addKeyboardListener(keyListener);
+ arg2Box.addKeyboardListener(keyListener);
+
+ // Return the layout Widget
+ updateMessage();
+ return layout;
+ }
+
+ /**
+ * Update the formatted message.
+ */
+ private void updateMessage() {
+ String arg0 = arg0Box.getText().trim();
+ String arg1 = arg1Box.getText().trim();
+ String arg2 = arg2Box.getText().trim();
+ formattedMessage.setText(errorMessages.permissionDenied(arg0, arg1, arg2));
+ }
+
+</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.i18n.CwNumberFormat.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.i18n.CwNumberFormat.html
new file mode 100644
index 0000000..55efa7e
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.i18n.CwNumberFormat.html
@@ -0,0 +1,181 @@
+<pre> /**
+ * The constants used in this Content Widget.
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String cwNumberFormatDescription();
+
+ String cwNumberFormatFailedToParseInput();
+
+ String cwNumberFormatFormattedLabel();
+
+ String cwNumberFormatInvalidPattern();
+
+ String cwNumberFormatName();
+
+ String cwNumberFormatPatternLabel();
+
+ String[] cwNumberFormatPatterns();
+
+ String cwNumberFormatValueLabel();
+ }
+
+ /**
+ * An instance of the constants.
+ */
+ private CwConstants constants;
+
+ /**
+ * The {@link Label} where the formatted value is displayed.
+ */
+ private Label formattedBox = null;
+
+ /**
+ * The {@link TextBox} that displays the current pattern.
+ */
+ private TextBox patternBox = null;
+
+ /**
+ * The {@link ListBox} that holds the patterns.
+ */
+ private ListBox patternList = null;
+
+ /**
+ * The {@link TextBox} where the user enters a value.
+ */
+ private TextBox valueBox = null;
+
+ /**
+ * Initialize this example.
+ */
+ @Override
+ public Widget onInitialize() {
+ // Use a Grid to layout the content
+ Grid layout = new Grid(4, 2);
+ layout.setCellSpacing(5);
+
+ // Add a field to select the pattern
+ patternList = new ListBox();
+ patternList.setWidth("17em");
+ String[] patterns = constants.cwNumberFormatPatterns();
+ for (String pattern : patterns) {
+ patternList.addItem(pattern);
+ }
+ patternList.addChangeListener(new ChangeListener() {
+ public void onChange(Widget sender) {
+ updatePattern();
+ }
+ });
+ layout.setHTML(0, 0, constants.cwNumberFormatPatternLabel());
+ layout.setWidget(0, 1, patternList);
+
+ // Add a field to display the pattern
+ patternBox = new TextBox();
+ patternBox.setWidth("17em");
+ patternBox.addKeyboardListener(new KeyboardListenerAdapter() {
+ @Override
+ public void onKeyUp(Widget sender, char keyCode, int modifiers) {
+ updatePattern();
+ }
+ });
+ layout.setWidget(1, 1, patternBox);
+
+ // Add a field to set the value
+ valueBox = new TextBox();
+ valueBox.setWidth("17em");
+ valueBox.setText("31415926535.897932");
+ valueBox.addKeyboardListener(new KeyboardListenerAdapter() {
+ @Override
+ public void onKeyUp(Widget sender, char keyCode, int modifiers) {
+ updateFormattedValue();
+ }
+ });
+ layout.setHTML(2, 0, constants.cwNumberFormatValueLabel());
+ layout.setWidget(2, 1, valueBox);
+
+ // Add a field to display the formatted value
+ formattedBox = new Label();
+ formattedBox.setWidth("17em");
+ layout.setHTML(3, 0, constants.cwNumberFormatFormattedLabel());
+ layout.setWidget(3, 1, formattedBox);
+
+ // Return the layout Widget
+ updatePattern();
+ return layout;
+ }
+
+ /**
+ * Show an error message. Pass in null to clear the error message.
+ *
+ * @param errorMsg the error message
+ */
+ private void showErrorMessage(String errorMsg) {
+ if (errorMsg == null) {
+ formattedBox.removeStyleName("cw-RedText");
+ } else {
+ formattedBox.setText(errorMsg);
+ formattedBox.addStyleName("cw-RedText");
+ }
+ }
+
+ /**
+ * Update the formatted value based on the user entered value and pattern.
+ */
+ private void updateFormattedValue() {
+ String sValue = valueBox.getText();
+ if (!sValue.equals("")) {
+ try {
+ double value = Double.parseDouble(sValue);
+ String formattedValue = activeFormat.format(value);
+ formattedBox.setText(formattedValue);
+ showErrorMessage(null);
+ } catch (NumberFormatException e) {
+ showErrorMessage(constants.cwNumberFormatFailedToParseInput());
+ }
+ } else {
+ formattedBox.setText("<None>");
+ }
+ }
+
+ /**
+ * Update the selected pattern based on the pattern in the list.
+ */
+ private void updatePattern() {
+ switch (patternList.getSelectedIndex()) {
+ case 0:
+ activeFormat = NumberFormat.getDecimalFormat();
+ patternBox.setText(activeFormat.getPattern());
+ patternBox.setEnabled(false);
+ break;
+ case 1:
+ activeFormat = NumberFormat.getCurrencyFormat();
+ patternBox.setText(activeFormat.getPattern());
+ patternBox.setEnabled(false);
+ break;
+ case 2:
+ activeFormat = NumberFormat.getScientificFormat();
+ patternBox.setText(activeFormat.getPattern());
+ patternBox.setEnabled(false);
+ break;
+ case 3:
+ activeFormat = NumberFormat.getPercentFormat();
+ patternBox.setText(activeFormat.getPattern());
+ patternBox.setEnabled(false);
+ break;
+ case 4:
+ patternBox.setEnabled(true);
+ String pattern = patternBox.getText();
+ try {
+ activeFormat = NumberFormat.getFormat(pattern);
+ } catch (IllegalArgumentException e) {
+ showErrorMessage(constants.cwNumberFormatInvalidPattern());
+ return;
+ }
+ break;
+ }
+
+ // Update the formatted value
+ updateFormattedValue();
+ }
+
+</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.lists.CwListBox.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.lists.CwListBox.html
new file mode 100644
index 0000000..c69b9c7
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.lists.CwListBox.html
@@ -0,0 +1,108 @@
+<pre> /**
+ * The constants used in this Content Widget.
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String[] cwListBoxCategories();
+
+ String cwListBoxDescription();
+
+ String cwListBoxName();
+
+ String cwListBoxSelectAll();
+
+ String cwListBoxSelectCategory();
+
+ String[] cwListBoxSports();
+
+ String[] cwListBoxVacations();
+ }
+
+ /**
+ * The data for each type of list.
+ */
+ private static final String[] carTypes = {
+ "Acura", "Audi", "BMW", "Buick", "Chevrolet", "Dodge", "Ford", "Honda",
+ "KIA", "Lexus", "Lincoln", "Mercedes", "Porsche", "Saturn", "Toyota",
+ "Volkswagen", "Volvo"};
+
+ /**
+ * An instance of the constants.
+ */
+ private CwConstants constants;
+
+ /**
+ * Initialize this example.
+ */
+ @Override
+ public Widget onInitialize() {
+ // Create a panel to align the Widgets
+ HorizontalPanel hPanel = new HorizontalPanel();
+ hPanel.setSpacing(20);
+
+ // Add a drop box with the list types
+ final ListBox dropBox = new ListBox(false);
+ String[] listTypes = constants.cwListBoxCategories();
+ for (int i = 0; i < listTypes.length; i++) {
+ dropBox.addItem(listTypes[i]);
+ }
+ dropBox.ensureDebugId("cwListBox-dropBox");
+ VerticalPanel dropBoxPanel = new VerticalPanel();
+ dropBoxPanel.setSpacing(4);
+ dropBoxPanel.add(new HTML(constants.cwListBoxSelectCategory()));
+ dropBoxPanel.add(dropBox);
+ hPanel.add(dropBoxPanel);
+
+ // Add a list box with multiple selection enabled
+ final ListBox multiBox = new ListBox(true);
+ multiBox.ensureDebugId("cwListBox-multiBox");
+ multiBox.setWidth("11em");
+ multiBox.setVisibleItemCount(10);
+ VerticalPanel multiBoxPanel = new VerticalPanel();
+ multiBoxPanel.setSpacing(4);
+ multiBoxPanel.add(new HTML(constants.cwListBoxSelectAll()));
+ multiBoxPanel.add(multiBox);
+ hPanel.add(multiBoxPanel);
+
+ // Add a listener to handle drop box events
+ dropBox.addChangeListener(new ChangeListener() {
+ public void onChange(Widget sender) {
+ showCategory(multiBox, dropBox.getSelectedIndex());
+ multiBox.ensureDebugId("cwListBox-multiBox");
+ }
+ });
+
+ // Show default category
+ showCategory(multiBox, 0);
+ multiBox.ensureDebugId("cwListBox-multiBox");
+
+ // Return the panel
+ return hPanel;
+ }
+
+ /**
+ * Display the options for a given category in the list box.
+ *
+ * @param listBox the ListBox to add the options to
+ * @param category the category index
+ */
+ private void showCategory(ListBox listBox, int category) {
+ listBox.clear();
+ String[] listData = null;
+ switch (category) {
+ case 0:
+ listData = carTypes;
+ break;
+ case 1:
+ listData = constants.cwListBoxSports();
+ break;
+ case 2:
+ listData = constants.cwListBoxVacations();
+ break;
+ }
+ for (int i = 0; i < listData.length; i++) {
+ listBox.addItem(listData[i]);
+ }
+ }
+
+</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.lists.CwMenuBar.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.lists.CwMenuBar.html
new file mode 100644
index 0000000..1a53608
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.lists.CwMenuBar.html
@@ -0,0 +1,106 @@
+<pre> /**
+ * The constants used in this Content Widget.
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String cwMenuBarDescription();
+
+ String cwMenuBarEditCategory();
+
+ String[] cwMenuBarEditOptions();
+
+ String cwMenuBarFileCategory();
+
+ String[] cwMenuBarFileOptions();
+
+ String[] cwMenuBarFileRecents();
+
+ String[] cwMenuBarGWTOptions();
+
+ String cwMenuBarHelpCategory();
+
+ String[] cwMenuBarHelpOptions();
+
+ String cwMenuBarName();
+
+ String[] cwMenuBarPrompts();
+ }
+
+ /**
+ * An instance of the constants.
+ */
+ private CwConstants constants;
+
+ /**
+ * Initialize this example.
+ */
+ @Override
+ public Widget onInitialize() {
+ // Create a command that will execute on menu item selection
+ Command menuCommand = new Command() {
+ private int curPhrase = 0;
+ private final String[] phrases = constants.cwMenuBarPrompts();
+
+ public void execute() {
+ Window.alert(phrases[curPhrase]);
+ curPhrase = (curPhrase + 1) % phrases.length;
+ }
+ };
+
+ // Create a menu bar
+ MenuBar menu = new MenuBar();
+ menu.setAutoOpen(true);
+ menu.setWidth("500px");
+
+ // Create a sub menu of recent documents
+ MenuBar recentDocsMenu = new MenuBar(true);
+ String[] recentDocs = constants.cwMenuBarFileRecents();
+ for (int i = 0; i < recentDocs.length; i++) {
+ recentDocsMenu.addItem(recentDocs[i], menuCommand);
+ }
+
+ // Create the file menu
+ MenuBar fileMenu = new MenuBar(true);
+ menu.addItem(new MenuItem(constants.cwMenuBarFileCategory(), fileMenu));
+ String[] fileOptions = constants.cwMenuBarFileOptions();
+ for (int i = 0; i < fileOptions.length; i++) {
+ if (i == 3) {
+ fileMenu.addSeparator();
+ fileMenu.addItem(fileOptions[i], recentDocsMenu);
+ fileMenu.addSeparator();
+ } else {
+ fileMenu.addItem(fileOptions[i], menuCommand);
+ }
+ }
+
+ // Create the edit menu
+ MenuBar editMenu = new MenuBar(true);
+ menu.addItem(new MenuItem(constants.cwMenuBarEditCategory(), editMenu));
+ String[] editOptions = constants.cwMenuBarEditOptions();
+ for (int i = 0; i < editOptions.length; i++) {
+ editMenu.addItem(editOptions[i], menuCommand);
+ }
+
+ // Create the GWT menu
+ MenuBar gwtMenu = new MenuBar(true);
+ menu.addItem(new MenuItem("GWT", true, gwtMenu));
+ String[] gwtOptions = constants.cwMenuBarGWTOptions();
+ for (int i = 0; i < gwtOptions.length; i++) {
+ gwtMenu.addItem(gwtOptions[i], menuCommand);
+ }
+
+ // Create the help menu
+ MenuBar helpMenu = new MenuBar(true);
+ menu.addSeparator();
+ menu.addItem(new MenuItem(constants.cwMenuBarHelpCategory(), helpMenu));
+ String[] helpOptions = constants.cwMenuBarHelpOptions();
+ for (int i = 0; i < helpOptions.length; i++) {
+ helpMenu.addItem(helpOptions[i], menuCommand);
+ }
+
+ // Return the menu
+ menu.ensureDebugId("cwMenuBar");
+ return menu;
+ }
+
+</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.lists.CwStackPanel.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.lists.CwStackPanel.html
new file mode 100644
index 0000000..1548043
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.lists.CwStackPanel.html
@@ -0,0 +1,134 @@
+<pre> /**
+ * The constants used in this Content Widget.
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String[] cwStackPanelContacts();
+
+ String cwStackPanelContactsHeader();
+
+ String cwStackPanelDescription();
+
+ String[] cwStackPanelFilters();
+
+ String cwStackPanelFiltersHeader();
+
+ String[] cwStackPanelMailFolders();
+
+ String cwStackPanelMailHeader();
+
+ String cwStackPanelName();
+ }
+
+ /**
+ * Specifies the images that will be bundled for this example.
+ *
+ * We will override the leaf image used in the tree. Instead of using a blank
+ * 16x16 image, we will use a blank 1x1 image so it does not take up any
+ * space. Each TreeItem will use its own custom image.
+ */
+ public interface Images extends TreeImages {
+ AbstractImagePrototype contactsgroup();
+
+ AbstractImagePrototype drafts();
+
+ AbstractImagePrototype filtersgroup();
+
+ AbstractImagePrototype inbox();
+
+ AbstractImagePrototype mailgroup();
+
+ AbstractImagePrototype sent();
+
+ AbstractImagePrototype templates();
+
+ AbstractImagePrototype trash();
+
+ /**
+ * Use noimage.png, which is a blank 1x1 image.
+ *
+ * @gwt.resource noimage.png
+ */
+ AbstractImagePrototype treeLeaf();
+ }
+
+ /**
+ * An instance of the constants.
+ */
+ private CwConstants constants;
+
+ /**
+ * Initialize this example.
+ */
+ @Override
+ public Widget onInitialize() {
+ // Get the images
+ Images images = (Images) GWT.create(Images.class);
+
+ // Create a new stack panel
+ StackPanel stackPanel = new StackPanel();
+ stackPanel.setWidth("200px");
+
+ // Add links to Mail folders
+ Tree mailPanel = new Tree(images);
+ TreeItem mailPanelRoot = mailPanel.addItem("foo@example.com");
+ String[] mailFolders = constants.cwStackPanelMailFolders();
+ mailPanelRoot.addItem(images.inbox().getHTML() + " " + mailFolders[0]);
+ mailPanelRoot.addItem(images.drafts().getHTML() + " " + mailFolders[1]);
+ mailPanelRoot.addItem(images.templates().getHTML() + " " + mailFolders[2]);
+ mailPanelRoot.addItem(images.sent().getHTML() + " " + mailFolders[3]);
+ mailPanelRoot.addItem(images.trash().getHTML() + " " + mailFolders[4]);
+ mailPanelRoot.setState(true);
+ String mailHeader = getHeaderString(constants.cwStackPanelMailHeader(),
+ images.mailgroup());
+ stackPanel.add(mailPanel, mailHeader, true);
+
+ // Add a list of filters
+ VerticalPanel filtersPanel = new VerticalPanel();
+ filtersPanel.setSpacing(4);
+ for (String filter : constants.cwStackPanelFilters()) {
+ filtersPanel.add(new CheckBox(filter));
+ }
+ String filtersHeader = getHeaderString(
+ constants.cwStackPanelFiltersHeader(), images.filtersgroup());
+ stackPanel.add(filtersPanel, filtersHeader, true);
+
+ // Add links to each contact
+ VerticalPanel contactsPanel = new VerticalPanel();
+ contactsPanel.setSpacing(4);
+ for (String contact : constants.cwStackPanelContacts()) {
+ contactsPanel.add(new HTML("<a href=\"javascript:void;\">" + contact
+ + "</a>"));
+ }
+ String contactsHeader = getHeaderString(
+ constants.cwStackPanelContactsHeader(), images.contactsgroup());
+ stackPanel.add(contactsPanel, contactsHeader, true);
+
+ // Return the stack panel
+ stackPanel.ensureDebugId("cwStackPanel");
+ return stackPanel;
+ }
+
+ /**
+ * Get a string representation of the header that includes an image and some
+ * text.
+ *
+ * @param text the header text
+ * @param image the {@link AbstractImagePrototype} to add next to the header
+ * @return the header as a string
+ */
+ private String getHeaderString(String text, AbstractImagePrototype image) {
+ // Add the image and text to a horizontal panel
+ HorizontalPanel hPanel = new HorizontalPanel();
+ hPanel.setSpacing(0);
+ hPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
+ hPanel.add(image.createImage());
+ HTML headerText = new HTML(text);
+ headerText.setStyleName("cw-StackPanelHeader");
+ hPanel.add(headerText);
+
+ // Return the HTML string for the panel
+ return hPanel.toString();
+ }
+
+</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.lists.CwSuggestBox.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.lists.CwSuggestBox.html
new file mode 100644
index 0000000..1ed030f
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.lists.CwSuggestBox.html
@@ -0,0 +1,43 @@
+<pre> /**
+ * The constants used in this Content Widget.
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String cwSuggestBoxDescription();
+
+ String cwSuggestBoxLabel();
+
+ String cwSuggestBoxName();
+
+ String[] cwSuggestBoxWords();
+ }
+
+ /**
+ * An instance of the constants.
+ */
+ private CwConstants constants;
+
+ /**
+ * Initialize this example.
+ */
+ @Override
+ public Widget onInitialize() {
+ // Define the oracle that finds suggestions
+ MultiWordSuggestOracle oracle = new MultiWordSuggestOracle();
+ String[] words = constants.cwSuggestBoxWords();
+ for (int i = 0; i < words.length; ++i) {
+ oracle.add(words[i]);
+ }
+
+ // Create the suggest box
+ final SuggestBox suggestBox = new SuggestBox(oracle);
+ suggestBox.ensureDebugId("cwSuggestBox");
+ VerticalPanel suggestPanel = new VerticalPanel();
+ suggestPanel.add(new HTML(constants.cwSuggestBoxLabel()));
+ suggestPanel.add(suggestBox);
+
+ // Return the panel
+ return suggestPanel;
+ }
+
+</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.lists.CwTree.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.lists.CwTree.html
new file mode 100644
index 0000000..14320c1
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.lists.CwTree.html
@@ -0,0 +1,182 @@
+<pre> /**
+ * The constants used in this Content Widget.
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String cwTreeDescription();
+
+ String cwTreeDynamicLabel();
+
+ String cwTreeItem();
+
+ String cwTreeName();
+
+ String cwTreeStaticLabel();
+ }
+
+ /**
+ * An instance of the constants.
+ */
+ private CwConstants constants;
+
+ /**
+ * Initialize this example.
+ */
+ @Override
+ public Widget onInitialize() {
+ // Create a static tree and a container to hold it
+ Tree staticTree = createStaticTree();
+ staticTree.ensureDebugId("cwTree-staticTree");
+ ScrollPanel staticTreeWrapper = new ScrollPanel(staticTree);
+ staticTreeWrapper.ensureDebugId("cwTree-staticTree-Wrapper");
+ staticTreeWrapper.setSize("300px", "300px");
+
+ // Wrap the static tree in a DecoratorPanel
+ DecoratorPanel staticDecorator = new DecoratorPanel();
+ staticDecorator.setWidget(staticTreeWrapper);
+
+ // Create a dynamically generated tree and a container to hold it
+ final Tree dynamicTree = createDynamicTree();
+ dynamicTree.ensureDebugId("cwTree-dynamicTree");
+ ScrollPanel dynamicTreeWrapper = new ScrollPanel(dynamicTree);
+ dynamicTreeWrapper.ensureDebugId("cwTree-dynamicTree-Wrapper");
+ dynamicTreeWrapper.setSize("300px", "300px");
+
+ // Wrap the dynamic tree in a DecoratorPanel
+ DecoratorPanel dynamicDecorator = new DecoratorPanel();
+ dynamicDecorator.setWidget(dynamicTreeWrapper);
+
+ // Combine trees onto the page
+ Grid grid = new Grid(2, 3);
+ grid.setCellPadding(2);
+ grid.getRowFormatter().setVerticalAlign(1, HasVerticalAlignment.ALIGN_TOP);
+ grid.setHTML(0, 0, constants.cwTreeStaticLabel());
+ grid.setHTML(0, 1, " ");
+ grid.setHTML(0, 2, constants.cwTreeDynamicLabel());
+ grid.setWidget(1, 0, staticDecorator);
+ grid.setHTML(1, 1, " ");
+ grid.setWidget(1, 2, dynamicDecorator);
+
+ // Wrap the trees in DecoratorPanels
+ return grid;
+ }
+
+ /**
+ * Create a dynamic tree that will add a random number of children to each
+ * node as it is clicked.
+ *
+ * @return the new tree
+ */
+ private Tree createDynamicTree() {
+ // Create a new tree
+ Tree dynamicTree = new Tree();
+
+ // Add some default tree items
+ for (int i = 0; i < 5; i++) {
+ TreeItem item = dynamicTree.addItem(constants.cwTreeItem() + " " + i);
+
+ // Temporarily add an item so we can expand this node
+ item.addItem("");
+ }
+
+ // Add a listener that automatically generates some children
+ dynamicTree.addTreeListener(new TreeListener() {
+ public void onTreeItemSelected(TreeItem item) {
+ }
+
+ public void onTreeItemStateChanged(TreeItem item) {
+ if (item.getState() && item.getChildCount() == 1) {
+ // Close the item immediately
+ item.setState(false, false);
+
+ // Add a random number of children to the item
+ String itemText = item.getText();
+ int numChildren = Random.nextInt(5) + 2;
+ for (int i = 0; i < numChildren; i++) {
+ TreeItem child = item.addItem(itemText + "." + i);
+ child.addItem("");
+ }
+
+ // Remove the temporary item when we finish loading
+ item.getChild(0).remove();
+
+ // Reopen the item
+ item.setState(true, false);
+ }
+ }
+ });
+
+ // Return the tree
+ return dynamicTree;
+ }
+
+ /**
+ * Create a static tree with some data in it.
+ *
+ * @return the new tree
+ */
+ private Tree createStaticTree() {
+ // Create the tree
+ Tree staticTree = new Tree();
+
+ // Add some of Beethoven's music
+ TreeItem c1 = staticTree.addItem("Beethoven");
+ TreeItem c1g1 = c1.addItem("Concertos");
+ c1g1.addItem("No. 1 - C");
+ c1g1.addItem("No. 2 - B-Flat Major");
+ c1g1.addItem("No. 3 - C Minor");
+ c1g1.addItem("No. 4 - G Major");
+ c1g1.addItem("No. 5 - E-Flat Major");
+ TreeItem c1g2 = c1.addItem("Quartets");
+ c1g2.addItem("Six String Quartets");
+ c1g2.addItem("Three String Quartets");
+ c1g2.addItem("Grosse Fugue for String Quartets");
+ TreeItem c1g3 = c1.addItem("Sonatas");
+ c1g3.addItem("Sonata in A Minor");
+ c1g3.addItem("Sonata in F Major");
+ TreeItem c1g4 = c1.addItem("Symphonies");
+ c1g4.addItem("No. 2 - D Major");
+ c1g4.addItem("No. 2 - D Major");
+ c1g4.addItem("No. 3 - E-Flat Major");
+ c1g4.addItem("No. 4 - B-Flat Major");
+ c1g4.addItem("No. 5 - C Minor");
+ c1g4.addItem("No. 6 - F Major");
+ c1g4.addItem("No. 7 - A Major");
+ c1g4.addItem("No. 8 - F Major");
+ c1g4.addItem("No. 9 - D Minor");
+
+ // Add some of Brahms's music
+ TreeItem c2 = staticTree.addItem("Brahms");
+ TreeItem c2g1 = c2.addItem("Concertos");
+ c2g1.addItem("Violin Concerto");
+ c2g1.addItem("Double Concerto - A Minor");
+ c2g1.addItem("Piano Concerto No. 1 - D Minor");
+ c2g1.addItem("Piano Concerto No. 2 - B-Flat Major");
+ TreeItem c2g2 = c2.addItem("Quartets");
+ c2g2.addItem("Piano Quartet No. 1 - G Minor");
+ c2g2.addItem("Piano Quartet No. 2 - A Major");
+ c2g2.addItem("Piano Quartet No. 3 - C Minor");
+ c2g2.addItem("String Quartet No. 3 - B-Flat Minor");
+ TreeItem c2g3 = c2.addItem("Sonatas");
+ c2g3.addItem("Two Sonatas for Clarinet - F Minor");
+ c2g3.addItem("Two Sonatas for Clarinet - E-Flat Major");
+ TreeItem c2g4 = c2.addItem("Symphonies");
+ c2g4.addItem("No. 1 - C Minor");
+ c2g4.addItem("No. 2 - D Minor");
+ c2g4.addItem("No. 3 - F Major");
+ c2g4.addItem("No. 4 - E Minor");
+
+ // Add some of Mozart's music
+ TreeItem c3 = staticTree.addItem("Mozart");
+ TreeItem c3g1 = c3.addItem("Concertos");
+ c3g1.addItem("Piano Concerto No. 12");
+ c3g1.addItem("Piano Concerto No. 17");
+ c3g1.addItem("Clarinet Concerto");
+ c3g1.addItem("Violin Concerto No. 5");
+ c3g1.addItem("Violin Concerto No. 4");
+
+ // Return the tree
+ return staticTree;
+ }
+
+</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.other.CwAnimation.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.other.CwAnimation.html
new file mode 100644
index 0000000..100a5a7
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.other.CwAnimation.html
@@ -0,0 +1,163 @@
+<pre> /**
+ * The constants used in this Content Widget.
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String cwAnimationDescription();
+
+ String cwAnimationName();
+ }
+
+ /**
+ * A custom animation that moves a small image around a circle in an
+ * {@link AbsolutePanel}.
+ */
+ public class CustomAnimation extends Animation {
+ /**
+ * The x-coordinate of the center of the circle.
+ */
+ private int centerX = 120;
+
+ /**
+ * The y-coordinate of the center of the circle.
+ */
+ private int centerY = 120;
+
+ /**
+ * The radius of the circle.
+ */
+ private int radius = 100;
+
+ @Override
+ public void onCancel() {
+ onComplete();
+ }
+
+ @Override
+ public void onComplete() {
+ onUpdate(1.0);
+ startButton.setEnabled(true);
+ cancelButton.setEnabled(false);
+ }
+
+ @Override
+ public void onStart() {
+ onUpdate(1.0);
+ startButton.setEnabled(false);
+ cancelButton.setEnabled(true);
+ }
+
+ @Override
+ public void onUpdate(double progress) {
+ double radian = 2 * Math.PI * progress;
+ updatePosition(animateeLeft, radian, 0);
+ updatePosition(animateeBottom, radian, 0.5 * Math.PI);
+ updatePosition(animateeRight, radian, Math.PI);
+ updatePosition(animateeTop, radian, 1.5 * Math.PI);
+ }
+
+ /**
+ * Update the position of the widget, adding a rotational offset.
+ *
+ * @param w the widget to move
+ * @param radian the progress in radian
+ * @param offset the offset in radian
+ */
+ private void updatePosition(Widget w, double radian, double offset) {
+ radian += offset;
+ double x = radius * Math.cos(radian) + centerX;
+ double y = radius * Math.sin(radian) + centerY;
+ absolutePanel.setWidgetPosition(w, (int) x, (int) y);
+ }
+ }
+
+ /**
+ * The absolute panel used in the example.
+ */
+ private AbsolutePanel absolutePanel = null;
+
+ /**
+ * The widget that is being animated.
+ */
+ private Widget animateeBottom = null;
+
+ /**
+ * The widget that is being animated.
+ */
+ private Widget animateeLeft = null;
+
+ /**
+ * The widget that is being animated.
+ */
+ private Widget animateeRight = null;
+
+ /**
+ * The widget that is being animated.
+ */
+ private Widget animateeTop = null;
+
+ /**
+ * The instance of an animation.
+ */
+ private CustomAnimation animation = null;
+
+ /**
+ * The {@link Button} used to cancel the {@link Animation}.
+ */
+ private Button cancelButton = null;
+
+ /**
+ * An instance of the constants.
+ */
+ private CwConstants constants;
+
+ /**
+ * The {@link Button} used to start the {@link Animation}.
+ */
+ private Button startButton = null;
+
+ /**
+ * Initialize this example.
+ */
+ @Override
+ public Widget onInitialize() {
+ // Create a new panel
+ absolutePanel = new AbsolutePanel();
+ absolutePanel.setSize("250px", "250px");
+ absolutePanel.ensureDebugId("cwAbsolutePanel");
+
+ // Add a widget that we will animate
+ animateeTop = Showcase.images.gwtLogoThumb().createImage();
+ animateeBottom = Showcase.images.gwtLogoThumb().createImage();
+ animateeLeft = Showcase.images.gwtLogoThumb().createImage();
+ animateeRight = Showcase.images.gwtLogoThumb().createImage();
+ absolutePanel.add(animateeTop);
+ absolutePanel.add(animateeBottom);
+ absolutePanel.add(animateeLeft);
+ absolutePanel.add(animateeRight);
+
+ // Wrap the absolute panel in a DecoratorPanel
+ DecoratorPanel absolutePanelWrapper = new DecoratorPanel();
+ absolutePanelWrapper.setWidget(absolutePanel);
+
+ // Create the options bar
+ DecoratorPanel optionsWrapper = new DecoratorPanel();
+ optionsWrapper.setWidget(createOptionsBar());
+
+ // Add the components to a panel and return it
+ HorizontalPanel mainLayout = new HorizontalPanel();
+ mainLayout.setSpacing(10);
+ mainLayout.add(optionsWrapper);
+ mainLayout.add(absolutePanelWrapper);
+
+ // Create the custom animation
+ animation = new CustomAnimation();
+
+ // Set the start position of the widgets
+ animation.onComplete();
+
+ // Return the layout
+ return mainLayout;
+ }
+
+</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.other.CwCookies.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.other.CwCookies.html
new file mode 100644
index 0000000..97d7af4
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.other.CwCookies.html
@@ -0,0 +1,171 @@
+<pre> /**
+ * The constants used in this Content Widget.
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String cwCookiesDeleteCookie();
+
+ String cwCookiesDescription();
+
+ String cwCookiesExistingLabel();
+
+ String cwCookiesInvalidCookie();
+
+ String cwCookiesName();
+
+ String cwCookiesNameLabel();
+
+ String cwCookiesSetCookie();
+
+ String cwCookiesValueLabel();
+ }
+
+ /**
+ * The timeout before a cookie expires, in milliseconds. Current one year.
+ */
+ private static final int COOKIE_TIMOUT = 1000 * 60 * 60 * 24 * 365;
+
+ /**
+ * An instance of the constants.
+ */
+ private CwConstants constants;
+
+ /**
+ * A {@link TextBox} that holds the name of the cookie.
+ */
+ private TextBox cookieNameBox = null;
+
+ /**
+ * A {@link TextBox} that holds the value of the cookie.
+ */
+ private TextBox cookieValueBox = null;
+
+ /**
+ * The {@link ListBox} containing existing cookies.
+ */
+ private ListBox existingCookiesBox = null;
+
+ /**
+ * Initialize this example.
+ */
+ @Override
+ public Widget onInitialize() {
+ // Create the panel used to layout the content
+ Grid mainLayout = new Grid(3, 3);
+
+ // Display the existing cookies
+ existingCookiesBox = new ListBox();
+ Button deleteCookieButton = new Button(constants.cwCookiesDeleteCookie());
+ mainLayout.setHTML(0, 0, "<b>" + constants.cwCookiesExistingLabel()
+ + "</b>");
+ mainLayout.setWidget(0, 1, existingCookiesBox);
+ mainLayout.setWidget(0, 2, deleteCookieButton);
+
+ // Display the name of the cookie
+ cookieNameBox = new TextBox();
+ mainLayout.setHTML(1, 0, "<b>" + constants.cwCookiesNameLabel() + "</b>");
+ mainLayout.setWidget(1, 1, cookieNameBox);
+
+ // Display the name of the cookie
+ cookieValueBox = new TextBox();
+ Button setCookieButton = new Button(constants.cwCookiesSetCookie());
+ mainLayout.setHTML(2, 0, "<b>" + constants.cwCookiesValueLabel() + "</b>");
+ mainLayout.setWidget(2, 1, cookieValueBox);
+ mainLayout.setWidget(2, 2, setCookieButton);
+
+ // Add a listener to set the cookie value
+ setCookieButton.addClickListener(new ClickListener() {
+ public void onClick(Widget sender) {
+ String name = cookieNameBox.getText();
+ String value = cookieValueBox.getText();
+ Date expires = new Date((new Date()).getTime() + COOKIE_TIMOUT);
+
+ // Verify the name is valid
+ if (name.length() < 1) {
+ Window.alert(constants.cwCookiesInvalidCookie());
+ return;
+ }
+
+ // Set the cookie value
+ Cookies.setCookie(name, value, expires);
+ refreshExistingCookies(name);
+ }
+ });
+
+ // Add a listener to select an existing cookie
+ existingCookiesBox.addChangeListener(new ChangeListener() {
+ public void onChange(Widget sender) {
+ updateExstingCookie();
+ }
+ });
+
+ // Add a listener to delete an existing cookie
+ deleteCookieButton.addClickListener(new ClickListener() {
+ public void onClick(Widget sender) {
+ int selectedIndex = existingCookiesBox.getSelectedIndex();
+ String cookieName = existingCookiesBox.getValue(selectedIndex);
+ Cookies.removeCookie(cookieName);
+ existingCookiesBox.removeItem(selectedIndex);
+ updateExstingCookie();
+ }
+ });
+
+ // Return the main layout
+ refreshExistingCookies(null);
+ return mainLayout;
+ }
+
+ /**
+ * Refresh the list of existing cookies.
+ *
+ * @param selectedCookie the cookie to select by default
+ */
+ private void refreshExistingCookies(String selectedCookie) {
+ // Clear the existing cookies
+ existingCookiesBox.clear();
+
+ // Add the cookies
+ int selectedIndex = 0;
+ Collection<String> cookies = Cookies.getCookieNames();
+ for (String cookie : cookies) {
+ existingCookiesBox.addItem(cookie);
+ if (cookie.equals(selectedCookie)) {
+ selectedIndex = existingCookiesBox.getItemCount() - 1;
+ }
+ }
+
+ // Select the index of the selectedCookie. Use a DeferredCommand to give
+ // the options time to register in Opera.
+ final int selectedIndexFinal = selectedIndex;
+ DeferredCommand.addCommand(new Command() {
+ public void execute() {
+ // Select the default cookie
+ if (selectedIndexFinal < existingCookiesBox.getItemCount()) {
+ existingCookiesBox.setSelectedIndex(selectedIndexFinal);
+ }
+
+ // Display the selected cookie value
+ updateExstingCookie();
+ }
+ });
+ }
+
+ /**
+ * Retrieve the value of the existing cookie and put it into to value label.
+ */
+ private void updateExstingCookie() {
+ // Cannot update if there are no items
+ if (existingCookiesBox.getItemCount() < 1) {
+ cookieNameBox.setText("");
+ cookieValueBox.setText("");
+ return;
+ }
+
+ int selectedIndex = existingCookiesBox.getSelectedIndex();
+ String cookieName = existingCookiesBox.getValue(selectedIndex);
+ String cookieValue = Cookies.getCookie(cookieName);
+ cookieNameBox.setText(cookieName);
+ cookieValueBox.setText(cookieValue);
+ }
+
+</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.other.CwFrame.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.other.CwFrame.html
new file mode 100644
index 0000000..77fd3c9
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.other.CwFrame.html
@@ -0,0 +1,61 @@
+<pre> /**
+ * The constants used in this Content Widget.
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String cwFrameDescription();
+
+ String cwFrameName();
+
+ String cwFrameSetLocation();
+ }
+
+ /**
+ * An instance of the constants.
+ */
+ private CwConstants constants;
+
+ /**
+ * Initialize this example.
+ */
+ @Override
+ public Widget onInitialize() {
+ // Create a new frame
+ final Frame frame = new Frame("http://www.google.com");
+ frame.setSize("700px", "300px");
+ frame.ensureDebugId("cwFrame");
+
+ // Create a form to set the location of the frame
+ final TextBox locationBox = new TextBox();
+ locationBox.setText(frame.getUrl());
+ Button setLocationButton = new Button(constants.cwFrameSetLocation());
+ HorizontalPanel optionsPanel = new HorizontalPanel();
+ optionsPanel.setSpacing(8);
+ optionsPanel.add(locationBox);
+ optionsPanel.add(setLocationButton);
+
+ // Change the location when the user clicks the button
+ setLocationButton.addClickListener(new ClickListener() {
+ public void onClick(Widget sender) {
+ frame.setUrl(locationBox.getText());
+ }
+ });
+
+ // Change the location when the user presses enter
+ locationBox.addKeyboardListener(new KeyboardListenerAdapter() {
+ @Override
+ public void onKeyPress(Widget sender, char keyCode, int modifiers) {
+ if (keyCode == KEY_ENTER) {
+ frame.setUrl(locationBox.getText());
+ }
+ }
+ });
+
+ // Add everything to a panel and return it
+ VerticalPanel vPanel = new VerticalPanel();
+ vPanel.add(optionsPanel);
+ vPanel.add(frame);
+ return vPanel;
+ }
+
+</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.panels.CwAbsolutePanel.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.panels.CwAbsolutePanel.html
new file mode 100644
index 0000000..2822dc0
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.panels.CwAbsolutePanel.html
@@ -0,0 +1,134 @@
+<pre> /**
+ * The constants used in this Content Widget.
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String cwAbsolutePanelClickMe();
+
+ String cwAbsolutePanelDescription();
+
+ String cwAbsolutePanelHelloWorld();
+
+ String cwAbsolutePanelItemsToMove();
+
+ String cwAbsolutePanelLeft();
+
+ String cwAbsolutePanelName();
+
+ String cwAbsolutePanelTop();
+
+ String[] cwAbsolutePanelWidgetNames();
+ }
+
+ /**
+ * An instance of the constants.
+ */
+ private CwConstants constants;
+
+ /**
+ * The input field used to set the left position of a {@link Widget}.
+ */
+ private TextBox leftPosBox = null;
+
+ /**
+ * The list box of items that can be repositioned.
+ */
+ private ListBox listBox = new ListBox();
+
+ /**
+ * The input field used to set the top position of a {@link Widget}.
+ */
+ private TextBox topPosBox = null;
+
+ /**
+ * A mapping between the name of a {@link Widget} and the widget in the
+ * {@link AbsolutePanel}.
+ */
+ private Map<String, Widget> widgetMap = null;
+
+ /**
+ * Initialize this example.
+ */
+ @Override
+ public Widget onInitialize() {
+ // Create a new panel
+ widgetMap = new HashMap<String, Widget>();
+ absolutePanel = new AbsolutePanel();
+ absolutePanel.setSize("250px", "250px");
+ absolutePanel.ensureDebugId("cwAbsolutePanel");
+
+ // Add an HTML widget to the panel
+ String[] widgetNames = constants.cwAbsolutePanelWidgetNames();
+ HTML text = new HTML(constants.cwAbsolutePanelHelloWorld());
+ absolutePanel.add(text, 10, 20);
+ widgetMap.put(widgetNames[0], text);
+
+ // Add a Button to the panel
+ Button button = new Button(constants.cwAbsolutePanelClickMe());
+ absolutePanel.add(button, 80, 45);
+ widgetMap.put(widgetNames[1], button);
+
+ // Add a Button to the panel
+ Grid grid = new Grid(2, 3);
+ grid.setBorderWidth(1);
+ for (int i = 0; i < 3; i++) {
+ grid.setHTML(0, i, i + "");
+ grid.setWidget(1, i, Showcase.images.gwtLogoThumb().createImage());
+ }
+ absolutePanel.add(grid, 60, 100);
+ widgetMap.put(widgetNames[2], grid);
+
+ // Wrap the absolute panel in a DecoratorPanel
+ DecoratorPanel absolutePanelWrapper = new DecoratorPanel();
+ absolutePanelWrapper.setWidget(absolutePanel);
+
+ // Create the options bar
+ DecoratorPanel optionsWrapper = new DecoratorPanel();
+ optionsWrapper.setWidget(createOptionsBar());
+
+ // Add the components to a panel and return it
+ HorizontalPanel mainLayout = new HorizontalPanel();
+ mainLayout.setSpacing(10);
+ mainLayout.add(optionsWrapper);
+ mainLayout.add(absolutePanelWrapper);
+
+ return mainLayout;
+ }
+
+ /**
+ * Reposition an item when the user changes the value in the top or left
+ * position text boxes.
+ */
+ private void repositionItem() {
+ // Use a DeferredCommand to allow the key to take effect in the browser
+ DeferredCommand.addCommand(new Command() {
+ public void execute() {
+ // Get the selected item to move
+ String name = listBox.getValue(listBox.getSelectedIndex());
+ Widget item = widgetMap.get(name);
+
+ // Reposition the item
+ try {
+ int top = Integer.parseInt(topPosBox.getText());
+ int left = Integer.parseInt(leftPosBox.getText());
+ absolutePanel.setWidgetPosition(item, left, top);
+ } catch (NumberFormatException e) {
+ // Ignore invalid user input
+ return;
+ }
+ }
+ });
+ }
+
+ /**
+ * Update the top and left position text fields when the user selects a new
+ * item to move.
+ */
+ private void updateSelectedItem() {
+ String name = listBox.getValue(listBox.getSelectedIndex());
+ Widget item = widgetMap.get(name);
+ topPosBox.setText((absolutePanel.getWidgetTop(item) - 1) + "");
+ leftPosBox.setText((absolutePanel.getWidgetLeft(item) - 1) + "");
+ }
+
+</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.panels.CwDecoratorPanel.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.panels.CwDecoratorPanel.html
new file mode 100644
index 0000000..fbe7bcc
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.panels.CwDecoratorPanel.html
@@ -0,0 +1,44 @@
+<pre> /**
+ * The constants used in this Content Widget.
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String cwDecoratorPanelDescription();
+
+ String cwDecoratorPanelName();
+ }
+
+ /**
+ * An instance of the constants.
+ */
+ private CwConstants constants;
+
+ /**
+ * Initialize this example.
+ */
+ @Override
+ public Widget onInitialize() {
+ // Create a table to layout the form options
+ FlexTable layout = new FlexTable();
+ layout.setCellSpacing(6);
+ FlexCellFormatter cellFormatter = layout.getFlexCellFormatter();
+
+ // Add a title to the form
+ layout.setHTML(0, 0, "Enter Serch Criteria");
+ cellFormatter.setColSpan(0, 0, 2);
+ cellFormatter.setHorizontalAlignment(0, 0,
+ HasHorizontalAlignment.ALIGN_CENTER);
+
+ // Add some standard form options
+ layout.setHTML(1, 0, "Name:");
+ layout.setWidget(1, 1, new TextBox());
+ layout.setHTML(2, 0, "Description:");
+ layout.setWidget(2, 1, new TextBox());
+
+ // Wrap the content in a DecoratorPanel
+ DecoratorPanel decPanel = new DecoratorPanel();
+ decPanel.setWidget(layout);
+ return decPanel;
+ }
+
+</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.panels.CwDisclosurePanel.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.panels.CwDisclosurePanel.html
new file mode 100644
index 0000000..8909284
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.panels.CwDisclosurePanel.html
@@ -0,0 +1,93 @@
+<pre> /**
+ * The constants used in this Content Widget.
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String cwDisclosurePanelDescription();
+
+ String cwDisclosurePanelFormAdvancedCriteria();
+
+ String cwDisclosurePanelFormDescription();
+
+ String cwDisclosurePanelFormGender();
+
+ String[] cwDisclosurePanelFormGenderOptions();
+
+ String cwDisclosurePanelFormLocation();
+
+ String cwDisclosurePanelFormName();
+
+ String cwDisclosurePanelFormTitle();
+
+ String cwDisclosurePanelName();
+ }
+
+ /**
+ * An instance of the constants.
+ */
+ private CwConstants constants;
+
+ /**
+ * Initialize this example.
+ */
+ @Override
+ public Widget onInitialize() {
+ // Add the disclosure panels to a panel
+ VerticalPanel vPanel = new VerticalPanel();
+ vPanel.setSpacing(8);
+ vPanel.add(createAdvancedForm());
+
+ // Return the panel
+ return vPanel;
+ }
+
+ /**
+ * Create a form that contains undisclosed advanced options.
+ */
+ private Widget createAdvancedForm() {
+ // Create a table to layout the form options
+ FlexTable layout = new FlexTable();
+ layout.setCellSpacing(6);
+ layout.setWidth("300px");
+ FlexCellFormatter cellFormatter = layout.getFlexCellFormatter();
+
+ // Add a title to the form
+ layout.setHTML(0, 0, constants.cwDisclosurePanelFormTitle());
+ cellFormatter.setColSpan(0, 0, 2);
+ cellFormatter.setHorizontalAlignment(0, 0,
+ HasHorizontalAlignment.ALIGN_CENTER);
+
+ // Add some standard form options
+ layout.setHTML(1, 0, constants.cwDisclosurePanelFormName());
+ layout.setWidget(1, 1, new TextBox());
+ layout.setHTML(2, 0, constants.cwDisclosurePanelFormDescription());
+ layout.setWidget(2, 1, new TextBox());
+
+ // Create some advanced options
+ HorizontalPanel genderPanel = new HorizontalPanel();
+ String[] genderOptions = constants.cwDisclosurePanelFormGenderOptions();
+ for (int i = 0; i < genderOptions.length; i++) {
+ genderPanel.add(new RadioButton("gender", genderOptions[i]));
+ }
+ Grid advancedOptions = new Grid(2, 2);
+ advancedOptions.setCellSpacing(6);
+ advancedOptions.setHTML(0, 0, constants.cwDisclosurePanelFormLocation());
+ advancedOptions.setWidget(0, 1, new TextBox());
+ advancedOptions.setHTML(1, 0, constants.cwDisclosurePanelFormGender());
+ advancedOptions.setWidget(1, 1, genderPanel);
+
+ // Add advanced options to form in a disclosure panel
+ DisclosurePanel advancedDisclosure = new DisclosurePanel(
+ constants.cwDisclosurePanelFormAdvancedCriteria());
+ advancedDisclosure.ensureDebugId("cwDisclosurePanel");
+ advancedDisclosure.setContent(advancedOptions);
+ layout.setWidget(3, 0, advancedDisclosure);
+ cellFormatter.setColSpan(3, 0, 2);
+
+ // Wrap the contents in a DecoratorPanel
+ DecoratorPanel decPanel = new DecoratorPanel();
+ decPanel.setWidget(layout);
+ return decPanel;
+ }
+
+</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.panels.CwDockPanel.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.panels.CwDockPanel.html
new file mode 100644
index 0000000..0351054
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.panels.CwDockPanel.html
@@ -0,0 +1,61 @@
+<pre> /**
+ * The constants used in this Content Widget.
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+
+ String cwDockPanelCenter();
+
+ String cwDockPanelDescription();
+
+ String cwDockPanelEast();
+
+ String cwDockPanelName();
+
+ String cwDockPanelNorth1();
+
+ String cwDockPanelNorth2();
+
+ String cwDockPanelSouth1();
+
+ String cwDockPanelSouth2();
+
+ String cwDockPanelWest();
+ }
+
+ /**
+ * An instance of the constants.
+ */
+ private CwConstants constants;
+
+ /**
+ * Initialize this example.
+ */
+ @Override
+ public Widget onInitialize() {
+ // Create a Dock Panel
+ DockPanel dock = new DockPanel();
+ dock.setStyleName("cw-DockPanel");
+ dock.setSpacing(4);
+ dock.setHorizontalAlignment(DockPanel.ALIGN_CENTER);
+
+ // Add text all around
+ dock.add(new HTML(constants.cwDockPanelNorth1()), DockPanel.NORTH);
+ dock.add(new HTML(constants.cwDockPanelSouth1()), DockPanel.SOUTH);
+ dock.add(new HTML(constants.cwDockPanelEast()), DockPanel.EAST);
+ dock.add(new HTML(constants.cwDockPanelWest()), DockPanel.WEST);
+ dock.add(new HTML(constants.cwDockPanelNorth2()), DockPanel.NORTH);
+ dock.add(new HTML(constants.cwDockPanelSouth2()), DockPanel.SOUTH);
+
+ // Add scrollable text in the center
+ HTML contents = new HTML(constants.cwDockPanelCenter());
+ ScrollPanel scroller = new ScrollPanel(contents);
+ scroller.setSize("400px", "100px");
+ dock.add(scroller, DockPanel.CENTER);
+
+ // Return the content
+ dock.ensureDebugId("cwDockPanel");
+ return dock;
+ }
+
+</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.panels.CwFlowPanel.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.panels.CwFlowPanel.html
new file mode 100644
index 0000000..070a76b
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.panels.CwFlowPanel.html
@@ -0,0 +1,38 @@
+<pre> /**
+ * The constants used in this Content Widget.
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String cwFlowPanelDescription();
+
+ String cwFlowPanelItem();
+
+ String cwFlowPanelName();
+ }
+
+ /**
+ * An instance of the constants.
+ */
+ private CwConstants constants;
+
+ /**
+ * Initialize this example.
+ */
+ @Override
+ public Widget onInitialize() {
+ // Create a Flow Panel
+ FlowPanel flowPanel = new FlowPanel();
+ flowPanel.ensureDebugId("cwFlowPanel");
+
+ // Add some content to the panel
+ for (int i = 0; i < 30; i++) {
+ CheckBox checkbox = new CheckBox(constants.cwFlowPanelItem() + " " + i);
+ checkbox.addStyleName("cw-FlowPanel-checkBox");
+ flowPanel.add(checkbox);
+ }
+
+ // Return the content
+ return flowPanel;
+ }
+
+</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.panels.CwHorizontalPanel.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.panels.CwHorizontalPanel.html
new file mode 100644
index 0000000..24329ee
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.panels.CwHorizontalPanel.html
@@ -0,0 +1,37 @@
+<pre> /**
+ * The constants used in this Content Widget.
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String cwHorizontalPanelButton();
+
+ String cwHorizontalPanelDescription();
+
+ String cwHorizontalPanelName();
+ }
+
+ /**
+ * An instance of the constants.
+ */
+ private CwConstants constants;
+
+ /**
+ * Initialize this example.
+ */
+ @Override
+ public Widget onInitialize() {
+ // Create a Horizontal Panel
+ HorizontalPanel hPanel = new HorizontalPanel();
+ hPanel.setSpacing(5);
+
+ // Add some content to the panel
+ for (int i = 1; i < 5; i++) {
+ hPanel.add(new Button(constants.cwHorizontalPanelButton() + " " + i));
+ }
+
+ // Return the content
+ hPanel.ensureDebugId("cwHorizontalPanel");
+ return hPanel;
+ }
+
+</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.panels.CwHorizontalSplitPanel.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.panels.CwHorizontalSplitPanel.html
new file mode 100644
index 0000000..ff64d2a
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.panels.CwHorizontalSplitPanel.html
@@ -0,0 +1,45 @@
+<pre> /**
+ * The constants used in this Content Widget.
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String cwHorizontalSplitPanelDescription();
+
+ String cwHorizontalSplitPanelName();
+
+ String cwHorizontalSplitPanelText();
+ }
+
+ /**
+ * An instance of the constants.
+ */
+ private CwConstants constants;
+
+ /**
+ * Initialize this example.
+ */
+ @Override
+ public Widget onInitialize() {
+ // Create a Horizontal Split Panel
+ HorizontalSplitPanel hSplit = new HorizontalSplitPanel();
+ hSplit.ensureDebugId("cwHorizontalSplitPanel");
+ hSplit.setSize("500px", "350px");
+ hSplit.setSplitPosition("30%");
+
+ // Add some content
+ String randomText = constants.cwHorizontalSplitPanelText();
+ for (int i = 0; i < 2; i++) {
+ randomText += randomText;
+ }
+ hSplit.setRightWidget(new HTML(randomText));
+ hSplit.setLeftWidget(new HTML(randomText));
+
+ // Wrap the split panel in a decorator panel
+ DecoratorPanel decPanel = new DecoratorPanel();
+ decPanel.setWidget(hSplit);
+
+ // Return the content
+ return decPanel;
+ }
+
+</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.panels.CwTabPanel.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.panels.CwTabPanel.html
new file mode 100644
index 0000000..bb83c29
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.panels.CwTabPanel.html
@@ -0,0 +1,54 @@
+<pre> /**
+ * The constants used in this Content Widget.
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String cwTabPanelDescription();
+
+ String cwTabPanelName();
+
+ String cwTabPanelTab0();
+
+ String cwTabPanelTab2();
+
+ String[] cwTabPanelTabs();
+ }
+
+ /**
+ * An instance of the constants.
+ */
+ private CwConstants constants;
+
+ /**
+ * Initialize this example.
+ */
+ @Override
+ public Widget onInitialize() {
+ // Create a tab panel
+ TabPanel tabPanel = new TabPanel();
+ tabPanel.setWidth("400px");
+
+ // Unlike most widgets, animations are disabled by default
+ tabPanel.getDeckPanel().setAnimationEnabled(true);
+
+ // Add a home tab
+ String[] tabTitles = constants.cwTabPanelTabs();
+ HTML homeText = new HTML(constants.cwTabPanelTab0());
+ tabPanel.add(homeText, tabTitles[0]);
+
+ // Add a tab with an image
+ VerticalPanel vPanel = new VerticalPanel();
+ vPanel.add(Showcase.images.gwtLogo().createImage());
+ tabPanel.add(vPanel, tabTitles[1]);
+
+ // Add a tab
+ HTML moreInfo = new HTML(constants.cwTabPanelTab2());
+ tabPanel.add(moreInfo, tabTitles[2]);
+
+ // Return the content
+ tabPanel.selectTab(0);
+ tabPanel.ensureDebugId("cwTabPanel");
+ return tabPanel;
+ }
+
+</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.panels.CwVerticalPanel.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.panels.CwVerticalPanel.html
new file mode 100644
index 0000000..c19dd6c
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.panels.CwVerticalPanel.html
@@ -0,0 +1,37 @@
+<pre> /**
+ * The constants used in this Content Widget.
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String cwVerticalPanelButton();
+
+ String cwVerticalPanelDescription();
+
+ String cwVerticalPanelName();
+ }
+
+ /**
+ * An instance of the constants.
+ */
+ private CwConstants constants;
+
+ /**
+ * Initialize this example.
+ */
+ @Override
+ public Widget onInitialize() {
+ // Create a Vertical Panel
+ VerticalPanel vPanel = new VerticalPanel();
+ vPanel.setSpacing(5);
+
+ // Add some content to the panel
+ for (int i = 1; i < 10; i++) {
+ vPanel.add(new Button(constants.cwVerticalPanelButton() + "" + i));
+ }
+
+ // Return the content
+ vPanel.ensureDebugId("cwVerticalPanel");
+ return vPanel;
+ }
+
+</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.panels.CwVerticalSplitPanel.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.panels.CwVerticalSplitPanel.html
new file mode 100644
index 0000000..1f01b8d
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.panels.CwVerticalSplitPanel.html
@@ -0,0 +1,45 @@
+<pre> /**
+ * The constants used in this Content Widget.
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String cwVerticalSplitPanelDescription();
+
+ String cwVerticalSplitPanelName();
+
+ String cwVerticalSplitPanelText();
+ }
+
+ /**
+ * An instance of the constants.
+ */
+ private CwConstants constants;
+
+ /**
+ * Initialize this example.
+ */
+ @Override
+ public Widget onInitialize() {
+ // Create a Vertical Split Panel
+ VerticalSplitPanel vSplit = new VerticalSplitPanel();
+ vSplit.ensureDebugId("cwVerticalSplitPanel");
+ vSplit.setSize("500px", "350px");
+ vSplit.setSplitPosition("30%");
+
+ // Add some content
+ String randomText = constants.cwVerticalSplitPanelText() + " ";
+ for (int i = 0; i < 2; i++) {
+ randomText += randomText;
+ }
+ vSplit.setTopWidget(new HTML(randomText));
+ vSplit.setBottomWidget(new HTML(randomText));
+
+ // Wrap the split panel in a decorator panel
+ DecoratorPanel decPanel = new DecoratorPanel();
+ decPanel.setWidget(vSplit);
+
+ // Return the content
+ return decPanel;
+ }
+
+</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.popups.CwBasicPopup.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.popups.CwBasicPopup.html
new file mode 100644
index 0000000..3a831ac
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.popups.CwBasicPopup.html
@@ -0,0 +1,80 @@
+<pre> /**
+ * The constants used in this Content Widget.
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String cwBasicPopupClickOutsideInstructions();
+
+ String cwBasicPopupDescription();
+
+ String cwBasicPopupInstructions();
+
+ String cwBasicPopupName();
+
+ String cwBasicPopupShowButton();
+ }
+
+ /**
+ * An instance of the constants.
+ */
+ private CwConstants constants;
+
+ /**
+ * Initialize this example.
+ */
+ @Override
+ public Widget onInitialize() {
+ // Create a basic popup widget
+ final PopupPanel simplePopup = new PopupPanel(true);
+ simplePopup.ensureDebugId("cwBasicPopup-simplePopup");
+ simplePopup.setWidth("128px");
+ simplePopup.setWidget(new HTML(
+ constants.cwBasicPopupClickOutsideInstructions()));
+
+ // Create a button to show the popup
+ Button openButton = new Button(constants.cwBasicPopupShowButton(),
+ new ClickListener() {
+ public void onClick(Widget sender) {
+ // Reposition the popup relative to the button
+ int left = sender.getAbsoluteLeft() + 10;
+ int top = sender.getAbsoluteTop() + 10;
+ simplePopup.setPopupPosition(left, top);
+
+ // Show the popup
+ simplePopup.show();
+ }
+ });
+
+ // Create a popup to show the full size image
+ Image jimmyFull = Showcase.images.jimmy().createImage();
+ final PopupPanel imagePopup = new PopupPanel(true);
+ imagePopup.ensureDebugId("cwBasicPopup-imagePopup");
+ imagePopup.setWidget(jimmyFull);
+ jimmyFull.addClickListener(new ClickListener() {
+ public void onClick(Widget sender) {
+ imagePopup.hide();
+ }
+ });
+
+ // Add an image thumbnail
+ Image jimmyThumb = Showcase.images.jimmyThumb().createImage();
+ jimmyThumb.ensureDebugId("cwBasicPopup-thumb");
+ jimmyThumb.addStyleName("cw-BasicPopup-thumb");
+ jimmyThumb.addClickListener(new ClickListener() {
+ public void onClick(Widget sender) {
+ imagePopup.center();
+ }
+ });
+
+ // Add the widgets to a panel
+ VerticalPanel vPanel = new VerticalPanel();
+ vPanel.setSpacing(5);
+ vPanel.add(openButton);
+ vPanel.add(new HTML("<br><br><br>" + constants.cwBasicPopupInstructions()));
+ vPanel.add(jimmyThumb);
+
+ // Return the panel
+ return vPanel;
+ }
+
+</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.popups.CwDialogBox.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.popups.CwDialogBox.html
new file mode 100644
index 0000000..7b29924
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.popups.CwDialogBox.html
@@ -0,0 +1,128 @@
+<pre> /**
+ * The constants used in this Content Widget.
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String cwDialogBoxCaption();
+
+ String cwDialogBoxClose();
+
+ String cwDialogBoxDescription();
+
+ String cwDialogBoxDetails();
+
+ String cwDialogBoxItem();
+
+ String cwDialogBoxListBoxInfo();
+
+ String cwDialogBoxMakeTransparent();
+
+ String cwDialogBoxName();
+
+ String cwDialogBoxShowButton();
+ }
+
+ /**
+ * An instance of the constants.
+ */
+ private CwConstants constants;
+
+ /**
+ * Initialize this example.
+ */
+ @Override
+ public Widget onInitialize() {
+ // Create the dialog box
+ final DialogBox dialogBox = createDialogBox();
+
+ // Create a button to show the dialog Box
+ Button openButton = new Button(constants.cwDialogBoxShowButton(),
+ new ClickListener() {
+ public void onClick(Widget sender) {
+ dialogBox.center();
+ dialogBox.show();
+ }
+ });
+
+ // Create a ListBox
+ HTML listDesc = new HTML("<br><br><br>"
+ + constants.cwDialogBoxListBoxInfo());
+
+ ListBox list = new ListBox();
+ list.setVisibleItemCount(1);
+ for (int i = 10; i > 0; i--) {
+ list.addItem(constants.cwDialogBoxItem() + " " + i);
+ }
+
+ // Add the button and list to a panel
+ VerticalPanel vPanel = new VerticalPanel();
+ vPanel.setSpacing(8);
+ vPanel.add(openButton);
+ vPanel.add(listDesc);
+ vPanel.add(list);
+
+ // Return the panel
+ return vPanel;
+ }
+
+ /**
+ * Create the dialog box for this example.
+ *
+ * @return the new dialog box
+ */
+ private DialogBox createDialogBox() {
+ // Create a dialog box and set the caption text
+ final DialogBox dialogBox = new DialogBox();
+ dialogBox.ensureDebugId("cwDialogBox");
+ dialogBox.setText(constants.cwDialogBoxCaption());
+
+ // Create a table to layout the content
+ VerticalPanel dialogContents = new VerticalPanel();
+ dialogContents.setWidth("100%");
+ dialogContents.setSpacing(4);
+ dialogBox.setWidget(dialogContents);
+
+ // Add some text to the top of the dialog
+ HTML details = new HTML(constants.cwDialogBoxDetails());
+ dialogContents.add(details);
+ dialogContents.setCellHorizontalAlignment(details,
+ HasHorizontalAlignment.ALIGN_CENTER);
+
+ // Add an image to the dialog
+ Image image = Showcase.images.jimmy().createImage();
+ dialogContents.add(image);
+ dialogContents.setCellHorizontalAlignment(image,
+ HasHorizontalAlignment.ALIGN_CENTER);
+
+ // Add option to make transparent
+ final CheckBox opacityOption = new CheckBox(
+ constants.cwDialogBoxMakeTransparent());
+ dialogContents.add(opacityOption);
+
+ // Listen for changes in opacity option
+ opacityOption.addClickListener(new ClickListener() {
+ public void onClick(Widget sender) {
+ if (opacityOption.isChecked()) {
+ dialogBox.addStyleName("cw-DialogBox");
+ } else {
+ dialogBox.removeStyleName("cw-DialogBox");
+ }
+ }
+ });
+
+ // Add a close button at the bottom of the dialog
+ Button closeButton = new Button(constants.cwDialogBoxClose(),
+ new ClickListener() {
+ public void onClick(Widget sender) {
+ dialogBox.hide();
+ }
+ });
+ dialogContents.add(closeButton);
+ dialogContents.setCellHorizontalAlignment(closeButton,
+ HasHorizontalAlignment.ALIGN_RIGHT);
+
+ // Return the dialog box
+ return dialogBox;
+ }
+
+</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.tables.CwFlexTable.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.tables.CwFlexTable.html
new file mode 100644
index 0000000..f64654c
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.tables.CwFlexTable.html
@@ -0,0 +1,91 @@
+<pre> /**
+ * The constants used in this Content Widget.
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String cwFlexTableAddRow();
+
+ String cwFlexTableDescription();
+
+ String cwFlexTableDetails();
+
+ String cwFlexTableName();
+
+ String cwFlexTableRemoveRow();
+ }
+
+ /**
+ * An instance of the constants.
+ */
+ private CwConstants constants;
+
+ /**
+ * Initialize this example.
+ */
+ @Override
+ public Widget onInitialize() {
+ // Create a Flex Table
+ final FlexTable flexTable = new FlexTable();
+ FlexCellFormatter cellFormatter = flexTable.getFlexCellFormatter();
+ flexTable.addStyleName("cw-FlexTable");
+ flexTable.setWidth("350px");
+ flexTable.setCellSpacing(5);
+ flexTable.setCellPadding(3);
+
+ // Add some text
+ cellFormatter.setHorizontalAlignment(0, 1,
+ HasHorizontalAlignment.ALIGN_LEFT);
+ flexTable.setHTML(0, 0, constants.cwFlexTableDetails());
+ cellFormatter.setColSpan(0, 0, 2);
+
+ // Add a button that will add more rows to the table
+ Button addRowButton = new Button(constants.cwFlexTableAddRow(),
+ new ClickListener() {
+ public void onClick(Widget sender) {
+ addRow(flexTable);
+ }
+ });
+ Button removeRowButton = new Button(constants.cwFlexTableRemoveRow(),
+ new ClickListener() {
+ public void onClick(Widget sender) {
+ removeRow(flexTable);
+ }
+ });
+ VerticalPanel buttonPanel = new VerticalPanel();
+ buttonPanel.setStyleName("cw-FlexTable-buttonPanel");
+ buttonPanel.add(addRowButton);
+ buttonPanel.add(removeRowButton);
+ flexTable.setWidget(0, 1, buttonPanel);
+ cellFormatter.setVerticalAlignment(0, 1, HasVerticalAlignment.ALIGN_TOP);
+
+ // Add two rows to start
+ addRow(flexTable);
+ addRow(flexTable);
+
+ // Return the panel
+ flexTable.ensureDebugId("cwFlexTable");
+ return flexTable;
+ }
+
+ /**
+ * Add a row to the flex table.
+ */
+ private void addRow(FlexTable flexTable) {
+ int numRows = flexTable.getRowCount();
+ flexTable.setWidget(numRows, 0, Showcase.images.gwtLogo().createImage());
+ flexTable.setWidget(numRows, 1, Showcase.images.gwtLogo().createImage());
+ flexTable.getFlexCellFormatter().setRowSpan(0, 1, numRows + 1);
+ }
+
+ /**
+ * Remove a row from the flex table.
+ */
+ private void removeRow(FlexTable flexTable) {
+ int numRows = flexTable.getRowCount();
+ if (numRows > 1) {
+ flexTable.removeRow(numRows - 1);
+ flexTable.getFlexCellFormatter().setRowSpan(0, 1, numRows - 1);
+ }
+ }
+
+</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.tables.CwGrid.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.tables.CwGrid.html
new file mode 100644
index 0000000..01d4767
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.tables.CwGrid.html
@@ -0,0 +1,38 @@
+<pre> /**
+ * The constants used in this Content Widget.
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String cwGridDescription();
+
+ String cwGridName();
+ }
+
+ /**
+ * An instance of the constants.
+ */
+ private CwConstants constants;
+
+ /**
+ * Initialize this example.
+ */
+ @Override
+ public Widget onInitialize() {
+ // Create a grid
+ Grid grid = new Grid(4, 4);
+
+ // Add images to the grid
+ int numRows = grid.getRowCount();
+ int numColumns = grid.getColumnCount();
+ for (int row = 0; row < numRows; row++) {
+ for (int col = 0; col < numColumns; col++) {
+ grid.setWidget(row, col, Showcase.images.gwtLogo().createImage());
+ }
+ }
+
+ // Return the panel
+ grid.ensureDebugId("cwGrid");
+ return grid;
+ }
+
+</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.text.CwBasicText.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.text.CwBasicText.html
new file mode 100644
index 0000000..63e9154
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.text.CwBasicText.html
@@ -0,0 +1,121 @@
+<pre> /**
+ * The constants used in this Content Widget.
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String cwBasicTextAreaLabel();
+
+ String cwBasicTextDescription();
+
+ String cwBasicTextName();
+
+ String cwBasicTextNormalLabel();
+
+ String cwBasicTextPasswordLabel();
+
+ String cwBasicTextReadOnly();
+
+ String cwBasicTextSelected();
+ }
+
+ /**
+ * An instance of the constants.
+ */
+ private CwConstants constants;
+
+ /**
+ * Initialize this example.
+ */
+ @Override
+ public Widget onInitialize() {
+ // Create a panel to layout the widgets
+ VerticalPanel vpanel = new VerticalPanel();
+ vpanel.setSpacing(5);
+
+ // Add a normal and disabled text box
+ TextBox normalText = new TextBox();
+ normalText.ensureDebugId("cwBasicText-textbox");
+ TextBox disabledText = new TextBox();
+ disabledText.ensureDebugId("cwBasicText-textbox-disabled");
+ disabledText.setText(constants.cwBasicTextReadOnly());
+ disabledText.setEnabled(false);
+ vpanel.add(new HTML(constants.cwBasicTextNormalLabel()));
+ vpanel.add(createTextExample(normalText, true));
+ vpanel.add(createTextExample(disabledText, false));
+
+ // Add a normal and disabled password text box
+ PasswordTextBox normalPassword = new PasswordTextBox();
+ normalPassword.ensureDebugId("cwBasicText-password");
+ PasswordTextBox disabledPassword = new PasswordTextBox();
+ disabledPassword.ensureDebugId("cwBasicText-password-disabled");
+ disabledPassword.setText(constants.cwBasicTextReadOnly());
+ disabledPassword.setEnabled(false);
+ vpanel.add(new HTML("<br><br>" + constants.cwBasicTextPasswordLabel()));
+ vpanel.add(createTextExample(normalPassword, true));
+ vpanel.add(createTextExample(disabledPassword, false));
+
+ // Add a text area
+ TextArea textArea = new TextArea();
+ textArea.ensureDebugId("cwBasicText-textarea");
+ vpanel.add(new HTML("<br><br>" + constants.cwBasicTextAreaLabel()));
+ vpanel.add(createTextExample(textArea, true));
+
+ // Return the panel
+ return vpanel;
+ }
+
+ /**
+ * Create a TextBox example that includes the text box and an optional
+ * listener that updates a Label with the currently selected text.
+ *
+ * @param textBox the text box to listen to
+ * @param addSelection add listeners to update label
+ * @return the Label that will be updated
+ */
+ private HorizontalPanel createTextExample(final TextBoxBase textBox,
+ boolean addSelection) {
+ // Add the text box and label to a panel
+ HorizontalPanel hPanel = new HorizontalPanel();
+ hPanel.setSpacing(4);
+ hPanel.add(textBox);
+
+ // Add listeners
+ if (addSelection) {
+ // Create the new label
+ final Label label = new Label(constants.cwBasicTextSelected() + ": 0, 0");
+
+ // Add a KeyboardListener
+ textBox.addKeyboardListener(new KeyboardListenerAdapter() {
+ @Override
+ public void onKeyUp(Widget sender, char keyCode, int modifiers) {
+ updateSelectionLabel(textBox, label);
+ }
+ });
+
+ // Add a ClickListener
+ textBox.addClickListener(new ClickListener() {
+ public void onClick(Widget sender) {
+ updateSelectionLabel(textBox, label);
+ }
+ });
+
+ // Add the label to the box
+ hPanel.add(label);
+ }
+
+ // Return the panel
+ return hPanel;
+ }
+
+ /**
+ * Update the text in one of the selection labels.
+ *
+ * @param textBox the text box
+ * @param label the label to update
+ */
+ private void updateSelectionLabel(TextBoxBase textBox, Label label) {
+ label.setText(constants.cwBasicTextSelected() + ": "
+ + textBox.getCursorPos() + ", " + textBox.getSelectionLength());
+ }
+
+</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.text.CwRichText.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.text.CwRichText.html
new file mode 100644
index 0000000..86544b8
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.text.CwRichText.html
@@ -0,0 +1,37 @@
+<pre> /**
+ * The constants used in this Content Widget.
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String cwRichTextDescription();
+
+ String cwRichTextName();
+ }
+
+ /**
+ * An instance of the constants.
+ */
+ private CwConstants constants;
+
+ /**
+ * Initialize this example.
+ */
+ @Override
+ public Widget onInitialize() {
+ // Create the text area and toolbar
+ RichTextArea area = new RichTextArea();
+ area.ensureDebugId("cwRichText-area");
+ area.setSize("100%", "14em");
+ RichTextToolbar toolbar = new RichTextToolbar(area);
+ toolbar.ensureDebugId("cwRichText-toolbar");
+ toolbar.setWidth("100%");
+
+ // Add the components to a panel
+ Grid grid = new Grid(2, 1);
+ grid.setStyleName("cw-RichText");
+ grid.setWidget(0, 0, toolbar);
+ grid.setWidget(1, 0, area);
+ return grid;
+ }
+
+</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.text.RichTextToolbar.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.text.RichTextToolbar.html
new file mode 100644
index 0000000..a435706
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.text.RichTextToolbar.html
@@ -0,0 +1 @@
+<pre></pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.widgets.CwBasicButton.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.widgets.CwBasicButton.html
new file mode 100644
index 0000000..775ac06
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.widgets.CwBasicButton.html
@@ -0,0 +1,51 @@
+<pre> /**
+ * The constants used in this Content Widget.
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String cwBasicButtonClickMessage();
+
+ String cwBasicButtonDescription();
+
+ String cwBasicButtonDisabled();
+
+ String cwBasicButtonName();
+
+ String cwBasicButtonNormal();
+ }
+
+ /**
+ * An instance of the constants.
+ */
+ private CwConstants constants;
+
+ /**
+ * Initialize this example.
+ */
+ @Override
+ public Widget onInitialize() {
+ // Create a panel to align the widgets
+ HorizontalPanel hPanel = new HorizontalPanel();
+ hPanel.setSpacing(10);
+
+ // Add a normal button
+ Button normalButton = new Button(constants.cwBasicButtonNormal(),
+ new ClickListener() {
+ public void onClick(Widget sender) {
+ Window.alert(constants.cwBasicButtonClickMessage());
+ }
+ });
+ normalButton.ensureDebugId("cwBasicButton-normal");
+ hPanel.add(normalButton);
+
+ // Add a disabled button
+ Button disabledButton = new Button(constants.cwBasicButtonDisabled());
+ disabledButton.ensureDebugId("cwBasicButton-disabled");
+ disabledButton.setEnabled(false);
+ hPanel.add(disabledButton);
+
+ // Return the panel
+ return hPanel;
+ }
+
+</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.widgets.CwCheckBox.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.widgets.CwCheckBox.html
new file mode 100644
index 0000000..e1d2fb3
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.widgets.CwCheckBox.html
@@ -0,0 +1,55 @@
+<pre> /**
+ * The constants used in this Content Widget.
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String cwCheckBoxCheckAll();
+
+ String cwCheckBoxDescription();
+
+ String cwCheckBoxFemale();
+
+ String cwCheckBoxMale();
+
+ String cwCheckBoxName();
+
+ String cwCheckBoxUnknown();
+ }
+
+ /**
+ * An instance of the constants.
+ */
+ private CwConstants constants;
+
+ /**
+ * Initialize this example.
+ */
+ @Override
+ public Widget onInitialize() {
+ // Create a vertical panel to align the check boxes
+ VerticalPanel vPanel = new VerticalPanel();
+ HTML label = new HTML(constants.cwCheckBoxCheckAll());
+ label.ensureDebugId("cwCheckBox-label");
+ vPanel.add(label);
+
+ // Add a male checkbox
+ CheckBox maleCheckBox = new CheckBox(constants.cwCheckBoxMale());
+ maleCheckBox.ensureDebugId("cwCheckBox-male");
+ vPanel.add(maleCheckBox);
+
+ // Add a female checkbox
+ CheckBox femaleCheckBox = new CheckBox(constants.cwCheckBoxFemale());
+ femaleCheckBox.ensureDebugId("cwCheckBox-female");
+ vPanel.add(femaleCheckBox);
+
+ // Add one disabled checkbox
+ CheckBox disabledCheckBox = new CheckBox(constants.cwCheckBoxUnknown());
+ disabledCheckBox.ensureDebugId("cwCheckBox-disabled");
+ disabledCheckBox.setEnabled(false);
+ vPanel.add(disabledCheckBox);
+
+ // Return the panel of checkboxes
+ return vPanel;
+ }
+
+</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.widgets.CwCustomButton.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.widgets.CwCustomButton.html
new file mode 100644
index 0000000..f92af7c
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.widgets.CwCustomButton.html
@@ -0,0 +1,68 @@
+<pre> /**
+ * The constants used in this Content Widget.
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String cwCustomButtonDescription();
+
+ String cwCustomButtonName();
+
+ String cwCustomButtonPush();
+
+ String cwCustomButtonToggle();
+ }
+
+ /**
+ * An instance of the constants.
+ */
+ private CwConstants constants;
+
+ /**
+ * Initialize this example.
+ */
+ @Override
+ public Widget onInitialize() {
+ // Create a panel to layout the widgets
+ VerticalPanel vpanel = new VerticalPanel();
+ HorizontalPanel pushPanel = new HorizontalPanel();
+ pushPanel.setSpacing(10);
+ HorizontalPanel togglePanel = new HorizontalPanel();
+ togglePanel.setSpacing(10);
+
+ // Combine all the panels
+ vpanel.add(new HTML(constants.cwCustomButtonPush()));
+ vpanel.add(pushPanel);
+ vpanel.add(new HTML("<br><br>" + constants.cwCustomButtonToggle()));
+ vpanel.add(togglePanel);
+
+ // Add a normal PushButton
+ PushButton normalPushButton = new PushButton(
+ Showcase.images.gwtLogo().createImage());
+ normalPushButton.ensureDebugId("cwCustomButton-push-normal");
+ pushPanel.add(normalPushButton);
+
+ // Add a disabled PushButton
+ PushButton disabledPushButton = new PushButton(
+ Showcase.images.gwtLogo().createImage());
+ disabledPushButton.ensureDebugId("cwCustomButton-push-disabled");
+ disabledPushButton.setEnabled(false);
+ pushPanel.add(disabledPushButton);
+
+ // Add a normal ToggleButton
+ ToggleButton normalToggleButton = new ToggleButton(
+ Showcase.images.gwtLogo().createImage());
+ normalToggleButton.ensureDebugId("cwCustomButton-toggle-normal");
+ togglePanel.add(normalToggleButton);
+
+ // Add a disabled ToggleButton
+ ToggleButton disabledToggleButton = new ToggleButton(
+ Showcase.images.gwtLogo().createImage());
+ disabledToggleButton.ensureDebugId("cwCustomButton-toggle-disabled");
+ disabledToggleButton.setEnabled(false);
+ togglePanel.add(disabledToggleButton);
+
+ // Return the panel
+ return vpanel;
+ }
+
+</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.widgets.CwFileUpload.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.widgets.CwFileUpload.html
new file mode 100644
index 0000000..9da36e5
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.widgets.CwFileUpload.html
@@ -0,0 +1,59 @@
+<pre> /**
+ * The constants used in this Content Widget.
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String cwFileUploadButton();
+
+ String cwFileUploadDescription();
+
+ String cwFileUploadName();
+
+ String cwFileUploadNoFileError();
+
+ String cwFileUploadSelectFile();
+
+ String cwFileUploadSuccessful();
+ }
+
+ /**
+ * An instance of the constants.
+ */
+ private CwConstants constants;
+
+ /**
+ * Initialize this example.
+ */
+ @Override
+ public Widget onInitialize() {
+ // Create a vertical panel to align the content
+ VerticalPanel vPanel = new VerticalPanel();
+
+ // Add a label
+ vPanel.add(new HTML(constants.cwFileUploadSelectFile()));
+
+ // Add a file upload widget
+ final FileUpload fileUpload = new FileUpload();
+ fileUpload.ensureDebugId("cwFileUpload");
+ vPanel.add(fileUpload);
+
+ // Add a button to upload the file
+ Button uploadButton = new Button(constants.cwFileUploadButton());
+ uploadButton.addClickListener(new ClickListener() {
+ public void onClick(Widget sender) {
+ String filename = fileUpload.getFilename();
+ if (filename.length() == 0) {
+ Window.alert(constants.cwFileUploadNoFileError());
+ } else {
+ Window.alert(constants.cwFileUploadSuccessful());
+ }
+ }
+ });
+ vPanel.add(new HTML("<br>"));
+ vPanel.add(uploadButton);
+
+ // Return the layout panel
+ return vPanel;
+ }
+
+</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.widgets.CwHyperlink.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.widgets.CwHyperlink.html
new file mode 100644
index 0000000..de4dc03
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.widgets.CwHyperlink.html
@@ -0,0 +1,43 @@
+<pre> /**
+ * The constants used in this Content Widget.
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String cwHyperlinkChoose();
+
+ String cwHyperlinkDescription();
+
+ String cwHyperlinkName();
+ }
+
+ /**
+ * An instance of the constants.
+ */
+ private CwConstants constants;
+
+ /**
+ * Initialize this example.
+ */
+ @Override
+ public Widget onInitialize() {
+ // Add a label
+ VerticalPanel vPanel = new VerticalPanel();
+ vPanel.add(new HTML(constants.cwHyperlinkChoose()));
+ vPanel.setSpacing(5);
+
+ // Add a hyper link to each section in the Widgets category
+ ShowcaseConstants allConstants = (ShowcaseConstants) constants;
+ vPanel.add(getHyperlink(CwCheckBox.class, allConstants.cwCheckBoxName()));
+ vPanel.add(getHyperlink(CwRadioButton.class,
+ allConstants.cwRadioButtonName()));
+ vPanel.add(getHyperlink(CwBasicButton.class,
+ allConstants.cwBasicButtonName()));
+ vPanel.add(getHyperlink(CwCustomButton.class,
+ allConstants.cwCustomButtonName()));
+ vPanel.add(getHyperlink(CwFileUpload.class, allConstants.cwFileUploadName()));
+
+ // Return the panel
+ return vPanel;
+ }
+
+</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.widgets.CwRadioButton.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.widgets.CwRadioButton.html
new file mode 100644
index 0000000..411526a
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.widgets.CwRadioButton.html
@@ -0,0 +1,64 @@
+<pre> /**
+ * The constants used in this Content Widget.
+ */
+ public static interface CwConstants extends Constants,
+ ContentWidget.CwConstants {
+ String[] cwRadioButtonColors();
+
+ String cwRadioButtonDescription();
+
+ String cwRadioButtonName();
+
+ String cwRadioButtonSelectColor();
+
+ String cwRadioButtonSelectSport();
+
+ String[] cwRadioButtonSports();
+ }
+
+ /**
+ * An instance of the constants.
+ */
+ private CwConstants constants;
+
+ /**
+ * Initialize this example.
+ */
+ @Override
+ public Widget onInitialize() {
+ // Create a vertical panel to align the radio buttons
+ VerticalPanel vPanel = new VerticalPanel();
+ vPanel.add(new HTML(constants.cwRadioButtonSelectColor()));
+
+ // Add some radio buttons to a group called 'color'
+ String[] colors = constants.cwRadioButtonColors();
+ for (int i = 0; i < colors.length; i++) {
+ String color = colors[i];
+ RadioButton radioButton = new RadioButton("color", color);
+ radioButton.ensureDebugId("cwRadioButton-color-" + color);
+ if (i == 2) {
+ radioButton.setEnabled(false);
+ }
+ vPanel.add(radioButton);
+ }
+
+ // Add a new header to select your favorite sport
+ vPanel.add(new HTML("<br>" + constants.cwRadioButtonSelectSport()));
+
+ // Add some radio buttons to a group called 'sport'
+ String[] sports = constants.cwRadioButtonSports();
+ for (int i = 0; i < sports.length; i++) {
+ String sport = sports[i];
+ RadioButton radioButton = new RadioButton("sport", sport);
+ radioButton.ensureDebugId("cwRadioButton-sport-"
+ + sport.replaceAll(" ", ""));
+ if (i == 2) {
+ radioButton.setChecked(true);
+ }
+ vPanel.add(radioButton);
+ }
+
+ return vPanel;
+ }
+
+</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.i18n.ColorConstants.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.i18n.ColorConstants.html
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.i18n.ColorConstants.html
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.i18n.CwConstantsExample.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.i18n.CwConstantsExample.html
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.i18n.CwConstantsExample.html
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.i18n.CwConstantsWithLookupExample.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.i18n.CwConstantsWithLookupExample.html
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.i18n.CwConstantsWithLookupExample.html
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.i18n.CwDateTimeFormat.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.i18n.CwDateTimeFormat.html
new file mode 100644
index 0000000..4ce825d
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.i18n.CwDateTimeFormat.html
@@ -0,0 +1,4 @@
+<pre>
+.cw-RedText {
+ color: red;
+}</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.i18n.CwDictionaryExample.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.i18n.CwDictionaryExample.html
new file mode 100644
index 0000000..2a4237c
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.i18n.CwDictionaryExample.html
@@ -0,0 +1,10 @@
+<pre>
+.cw-DictionaryExample-headerRow td {
+ color: #7aa5d6;
+ text-decoration: underline;
+ font-weight: bold;
+ padding-left: 20px;
+}</pre><pre>
+.cw-DictionaryExample-dataRow td {
+ padding-left: 20px;
+}</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.i18n.CwMessagesExample.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.i18n.CwMessagesExample.html
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.i18n.CwMessagesExample.html
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.i18n.CwNumberFormat.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.i18n.CwNumberFormat.html
new file mode 100644
index 0000000..4ce825d
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.i18n.CwNumberFormat.html
@@ -0,0 +1,4 @@
+<pre>
+.cw-RedText {
+ color: red;
+}</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.i18n.ErrorMessages.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.i18n.ErrorMessages.html
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.i18n.ErrorMessages.html
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.i18n.ExampleConstants.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.i18n.ExampleConstants.html
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.i18n.ExampleConstants.html
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.lists.CwListBox.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.lists.CwListBox.html
new file mode 100644
index 0000000..76a6318
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.lists.CwListBox.html
@@ -0,0 +1,3 @@
+<pre>
+.gwt-ListBox {
+}</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.lists.CwMenuBar.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.lists.CwMenuBar.html
new file mode 100644
index 0000000..43d8fdf
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.lists.CwMenuBar.html
@@ -0,0 +1,131 @@
+<pre>
+.gwt-MenuBar {
+ cursor: default;
+}</pre><pre>
+.gwt-MenuBar .gwt-MenuItem {
+ cursor: default;
+}</pre><pre>
+.gwt-MenuBar .gwt-MenuItem-selected {
+ background: #E0EDFE;
+}</pre><pre>
+.gwt-MenuBar-horizontal {
+ background: #e3e8f3 url(images/bg_headergradient.png) repeat-x;
+ border: 1px solid #BBBBBB;
+}</pre><pre>
+.gwt-MenuBar-horizontal .gwt-MenuItem {
+ padding: 0px 10px;
+ vertical-align: bottom;
+ color: #666666;
+ font-weight: bold;
+}</pre><pre>
+.gwt-MenuBar-horizontal .gwt-MenuItemSeparator {
+ width: 1px;
+ padding: 0px;
+ margin: 0px;
+ border: 0px;
+ border-left: 1px solid #888888;
+ background: white;
+}</pre><pre>
+.gwt-MenuBar-horizontal .gwt-MenuItemSeparator .content {
+ width: 1px;
+ background: white;
+}</pre><pre>
+.gwt-MenuBar-vertical {
+ margin-top: 0px;
+ margin-left: 0px;
+ background: white;
+}</pre><pre>
+.gwt-MenuBar-vertical table {
+ border-collapse: collapse;
+}</pre><pre>
+.gwt-MenuBar-vertical .gwt-MenuItem {
+ padding: 4px 14px 4px 1px;
+}</pre><pre>
+.gwt-MenuBar-vertical .gwt-MenuItemSeparator {
+ padding: 2px 0px;
+}</pre><pre>
+.gwt-MenuBar-vertical .gwt-MenuItemSeparator .content {
+ height: 1px;
+ padding: 0px;
+ border: 0px;
+ border-top: 1px solid #777777;
+ background: #ddddee;
+ overflow: hidden;
+}</pre><pre>
+.gwt-MenuBar-vertical .subMenuIcon {
+ padding-right: 4px;
+}</pre><pre>
+.gwt-MenuBar-vertical .subMenuIcon-selected {
+ background: #E0EDFE;
+}</pre><pre>
+.gwt-MenuBarPopup {
+ margin: 0px 0px 0px 3px;
+}</pre><pre>
+.gwt-MenuBarPopup .topCenter {
+ background: url(images/hborder.png) 0px -17px repeat-x;
+}</pre><pre>
+.gwt-MenuBarPopup .middleLeft {
+ background: url(images/vborder.png) -17px 0px repeat-y;
+}</pre><pre>
+html>body .gwt-MenuBarPopup .bottomCenter {
+ background: url(images/hborder.png) 0px -18px repeat-x;
+}</pre><pre>
+html>body .gwt-MenuBarPopup .middleRight {
+ background: url(images/vborder.png) -18px 0px repeat-y;
+}</pre><pre>
+html>body .gwt-MenuBarPopup .topLeft {
+ width: 5px;
+ height: 5px;
+ background: url(images/corner.png) no-repeat 0px -36px;
+}</pre><pre>
+html>body .gwt-MenuBarPopup .topRight {
+ width: 8px;
+ height: 5px;
+ background: url(images/corner.png) no-repeat -5px -36px;
+}</pre><pre>
+html>body .gwt-MenuBarPopup .bottomLeft {
+ width: 5px;
+ height: 8px;
+ background: url(images/corner.png) no-repeat 0px -41px;
+}</pre><pre>
+html>body .gwt-MenuBarPopup .bottomRight {
+ width: 8px;
+ height: 8px;
+ background: url(images/corner.png) no-repeat -5px -41px;
+}</pre><pre>
+* html .gwt-MenuBarPopup .bottomCenter {
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/ie6/hborder_gray_shadow.png',sizingMethod='scale');
+}</pre><pre>
+* html .gwt-MenuBarPopup .middleRight {
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/ie6/vborder_gray_shadow.png',sizingMethod='scale');
+}</pre><pre>
+* html .gwt-MenuBarPopup .topLeftInner {
+ width: 5px;
+ height: 41px;
+ margin-top: -36px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}</pre><pre>
+* html .gwt-MenuBarPopup .topRightInner {
+ width: 13px;
+ height: 41px;
+ margin-left: -5px;
+ margin-top: -36px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}</pre><pre>
+* html .gwt-MenuBarPopup .bottomLeftInner {
+ width: 5px;
+ height: 49px;
+ margin-top: -41px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}</pre><pre>
+* html .gwt-MenuBarPopup .bottomRightInner {
+ width: 13px;
+ height: 49px;
+ margin-left: -5px;
+ margin-top: -41px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.lists.CwStackPanel.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.lists.CwStackPanel.html
new file mode 100644
index 0000000..adb25e3
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.lists.CwStackPanel.html
@@ -0,0 +1,99 @@
+<pre>
+.gwt-StackPanel {
+ border-bottom: 1px solid #bbbbbb;
+}</pre><pre>
+.gwt-StackPanel .gwt-StackPanelContent {
+ border: 1px solid #bbbbbb;
+ border-bottom: 0px;
+ background: white;
+ padding: 2px 2px 10px 5px;
+}</pre><pre>
+.gwt-StackPanelItem {
+ cursor: pointer;
+ cursor: hand;
+}</pre><pre>
+.gwt-StackPanelItem .topLeft,
+.gwt-StackPanelItem .topRight {
+ height: 6px;
+ width: 6px;
+ zoom: 1;
+}</pre><pre>
+.gwt-StackPanelItem .topLeftInner,
+.gwt-StackPanelItem .topRightInner {
+ width: 1px;
+ height: 1px;
+}</pre><pre>
+.gwt-StackPanelItem .topCenter {
+ background: url(images/hborder.png) 0px -26px repeat-x;
+}</pre><pre>
+.gwt-StackPanelItem .middleLeft {
+ background: #d3def6 url(images/bg_stackpanel.png) repeat-x;
+ border-left: 1px solid #bbbbbb;
+}</pre><pre>
+.gwt-StackPanelItem .middleLeftInner,
+.gwt-StackPanelItem .middleRightInner {
+ width: 1px;
+ height: 1px;
+}</pre><pre>
+.gwt-StackPanelItem .middleRight {
+ background: #d3def6 url(images/bg_stackpanel.png) repeat-x;
+ border-right: 1px solid #bbbbbb;
+}</pre><pre>
+.gwt-StackPanelItem .middleCenter {
+ font-weight: bold;
+ font-size: 1.3em;
+ background: #d3def6 url(images/bg_stackpanel.png) repeat-x;
+}</pre><pre>
+html>body .gwt-StackPanelItem .topLeft {
+ background: #d3def6 url(images/corner.png) no-repeat 0px -49px;
+ border-left: 1px solid #bbbbbb;
+}</pre><pre>
+html>body .gwt-StackPanelItem .topRight {
+ background: #d3def6 url(images/corner.png) no-repeat -6px -49px;
+ border-right: 1px solid #bbbbbb;
+}</pre><pre>
+html>body .gwt-StackPanelItem-first .topRight,
+html>body .gwt-StackPanelItem-first .topLeft {
+ border: 0px;
+ background-color: white;
+}</pre><pre>
+html>body .gwt-StackPanelItem-below-selected .topLeft,
+html>body .gwt-StackPanelItem-below-selected .topRight {
+ background-color: white;
+}</pre><pre>
+* html .gwt-StackPanelItem .topLeftInner {
+ width: 6px;
+ height: 55px;
+ margin-top: -49px;
+ overflow: hidden;
+ border-left: 1px solid #bbbbbb;
+ background-color: #d3def6;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}</pre><pre>
+* html .gwt-StackPanelItem .topRightInner {
+ width: 12px;
+ height: 55px;
+ margin-top: -49px;
+ margin-left: -6px;
+ overflow: hidden;
+ border-right: 1px solid #bbbbbb;
+ background-color: #d3def6;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}</pre><pre>
+* html .gwt-StackPanelItem-first .topLeftInner,
+* html .gwt-StackPanelItem-first .topRightInner {
+ border: 0px;
+ background-color: white;
+}</pre><pre>
+* html .gwt-StackPanelItem-first .topLeftInner {
+ padding-left: 1px;
+}</pre><pre>
+* html .gwt-StackPanelItem-below-selected .topLeftInner,
+* html .gwt-StackPanelItem-below-selected .topRightInner {
+ background-color: white;
+}</pre><pre>
+.cw-StackPanelHeader {
+ padding-left: 7px;
+ font-weight: bold;
+ font-size: 1.4em;
+}</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.lists.CwSuggestBox.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.lists.CwSuggestBox.html
new file mode 100644
index 0000000..d282b28
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.lists.CwSuggestBox.html
@@ -0,0 +1,86 @@
+<pre>
+.gwt-SuggestBox {
+ padding: 2px;
+}</pre><pre>
+.gwt-SuggestBoxPopup {
+ margin-left: 3px;
+}</pre><pre>
+.gwt-SuggestBoxPopup .item {
+ padding: 2px 6px;
+ color: #424242;
+ cursor: default;
+}</pre><pre>
+.gwt-SuggestBoxPopup .item-selected {
+ background: #b7d6f6;
+}</pre><pre>
+.gwt-SuggestBoxPopup .middleCenter {
+ background: white;
+}</pre><pre>
+.gwt-SuggestBoxPopup .topCenter {
+ background: url(images/hborder.png) repeat-x;
+}</pre><pre>
+.gwt-SuggestBoxPopup .middleLeft {
+ background: url(images/vborder.png) repeat-y;
+}</pre><pre>
+html>body .gwt-SuggestBoxPopup .bottomCenter {
+ background: url(images/hborder.png) repeat-x;
+}</pre><pre>
+html>body .gwt-SuggestBoxPopup .middleRight {
+ background: url(images/vborder.png) repeat-y;
+}</pre><pre>
+html>body .gwt-SuggestBoxPopup .topLeft {
+ width: 5px;
+ height: 5px;
+ background: url(images/corner.png) no-repeat 0px -23px;
+}</pre><pre>
+html>body .gwt-SuggestBoxPopup .topRight {
+ width: 8px;
+ height: 5px;
+ background: url(images/corner.png) no-repeat -5px -23px;
+}</pre><pre>
+html>body .gwt-SuggestBoxPopup .bottomLeft {
+ width: 5px;
+ height: 8px;
+ background: url(images/corner.png) no-repeat 0px -28px;
+}</pre><pre>
+html>body .gwt-SuggestBoxPopup .bottomRight {
+ width: 8px;
+ height: 8px;
+ background: url(images/corner.png) no-repeat -5px -28px;
+}</pre><pre>
+* html .gwt-SuggestBoxPopup .bottomCenter {
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/ie6/hborder_blue_shadow.png',sizingMethod='scale');
+}</pre><pre>
+* html .gwt-SuggestBoxPopup .middleRight {
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/ie6/vborder_blue_shadow.png',sizingMethod='scale');
+}</pre><pre>
+* html .gwt-SuggestBoxPopup .topLeftInner {
+ width: 5px;
+ height: 28px;
+ margin-top: -23px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}</pre><pre>
+* html .gwt-SuggestBoxPopup .topRightInner {
+ width: 13px;
+ height: 28px;
+ margin-left: -5px;
+ margin-top: -23px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}</pre><pre>
+* html .gwt-SuggestBoxPopup .bottomLeftInner {
+ width: 5px;
+ height: 36px;
+ margin-top: -28px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}</pre><pre>
+* html .gwt-SuggestBoxPopup .bottomRightInner {
+ width: 13px;
+ height: 36px;
+ margin-left: -5px;
+ margin-top: -28px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.lists.CwTree.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.lists.CwTree.html
new file mode 100644
index 0000000..30c620b
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.lists.CwTree.html
@@ -0,0 +1,13 @@
+<pre>
+.gwt-Tree .gwt-TreeItem {
+ padding: 1px;
+ margin: 0px;
+ white-space: nowrap;
+ cursor: hand;
+ cursor: pointer;
+}</pre><pre>
+.gwt-Tree .gwt-TreeItem-selected {
+ padding: 0px;
+ border: 1px dotted #888;
+ background: #93c2f1 url(images/bg_listgradient.png) repeat-x;
+}</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.other.CwAnimation.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.other.CwAnimation.html
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.other.CwAnimation.html
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.other.CwCookies.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.other.CwCookies.html
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.other.CwCookies.html
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.other.CwFrame.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.other.CwFrame.html
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.other.CwFrame.html
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.panels.CwAbsolutePanel.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.panels.CwAbsolutePanel.html
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.panels.CwAbsolutePanel.html
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.panels.CwDecoratorPanel.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.panels.CwDecoratorPanel.html
new file mode 100644
index 0000000..73a4aef
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.panels.CwDecoratorPanel.html
@@ -0,0 +1,58 @@
+<pre>
+.gwt-DecoratorPanel .topCenter,
+.gwt-DecoratorPanel .bottomCenter {
+ background: url(images/hborder.png) repeat-x;
+}</pre><pre>
+.gwt-DecoratorPanel .middleLeft,
+.gwt-DecoratorPanel .middleRight {
+ background: url(images/vborder.png) repeat-y;
+}</pre><pre>
+.gwt-DecoratorPanel .topLeft,
+.gwt-DecoratorPanel .topRight,
+.gwt-DecoratorPanel .bottomLeft,
+.gwt-DecoratorPanel .bottomRight {
+ width: 5px;
+ height: 5px;
+ zoom: 1;
+}</pre><pre>
+html>body .gwt-DecoratorPanel .topLeft {
+ background: url(images/corner.png) no-repeat 0px 0px;
+}</pre><pre>
+html>body .gwt-DecoratorPanel .topRight {
+ background: url(images/corner.png) no-repeat -5px 0px;
+}</pre><pre>
+html>body .gwt-DecoratorPanel .bottomLeft {
+ background: url(images/corner.png) no-repeat 0px -5px;
+}</pre><pre>
+html>body .gwt-DecoratorPanel .bottomRight {
+ background: url(images/corner.png) no-repeat -5px -5px;
+}</pre><pre>
+* html .gwt-DecoratorPanel .topLeftInner {
+ width: 5px;
+ height: 5px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}</pre><pre>
+* html .gwt-DecoratorPanel .topRightInner {
+ width: 10px;
+ height: 5px;
+ margin-left: -5px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}</pre><pre>
+* html .gwt-DecoratorPanel .bottomLeftInner {
+ width: 5px;
+ height: 10px;
+ margin-left: 0px;
+ margin-top: -5px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}</pre><pre>
+* html .gwt-DecoratorPanel .bottomRightInner {
+ width: 10px;
+ height: 10px;
+ margin-left: -5px;
+ margin-top: -5px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.panels.CwDisclosurePanel.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.panels.CwDisclosurePanel.html
new file mode 100644
index 0000000..710f271
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.panels.CwDisclosurePanel.html
@@ -0,0 +1,17 @@
+<pre>
+.gwt-DisclosurePanel {
+}</pre><pre>
+.gwt-DisclosurePanel a {
+ text-decoration: none; /* Remove underline from header */
+}</pre><pre>
+.gwt-DisclosurePanel-open {
+}</pre><pre>
+.gwt-DisclosurePanel-closed {
+}</pre><pre>
+.gwt-DisclosurePanel .header {
+}</pre><pre>
+.gwt-DisclosurePanel .content {
+ border-left: 3px solid #e8eef7;
+ padding: 4px 0px 4px 8px;
+ margin-left: 6px;
+}</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.panels.CwDockPanel.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.panels.CwDockPanel.html
new file mode 100644
index 0000000..2fca565
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.panels.CwDockPanel.html
@@ -0,0 +1,5 @@
+<pre>
+.cw-DockPanel td {
+ border: 1px solid #BBBBBB;
+ padding: 3px;
+}</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.panels.CwFlowPanel.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.panels.CwFlowPanel.html
new file mode 100644
index 0000000..842e677
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.panels.CwFlowPanel.html
@@ -0,0 +1,4 @@
+<pre>
+.cw-FlowPanel-checkBox {
+ margin-right: 20px;
+}</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.panels.CwHorizontalPanel.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.panels.CwHorizontalPanel.html
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.panels.CwHorizontalPanel.html
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.panels.CwHorizontalSplitPanel.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.panels.CwHorizontalSplitPanel.html
new file mode 100644
index 0000000..1ed25d2
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.panels.CwHorizontalSplitPanel.html
@@ -0,0 +1,8 @@
+<pre>
+.gwt-HorizontalSplitPanel {
+}</pre><pre>
+.gwt-HorizontalSplitPanel .hsplitter {
+ cursor: move;
+ border: 0px;
+ background: #91c0ef url(images/vborder.png) -9px 0px repeat-y;
+}</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.panels.CwTabPanel.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.panels.CwTabPanel.html
new file mode 100644
index 0000000..aabd25f
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.panels.CwTabPanel.html
@@ -0,0 +1,102 @@
+<pre>
+.gwt-TabBar {
+}</pre><pre>
+.gwt-TabBar .gwt-TabBarFirst {
+ width: 5px; /* first tab distance from the left */
+}</pre><pre>
+.gwt-TabBar .gwt-TabBarRest {
+}</pre><pre>
+.gwt-TabBar .gwt-TabBarItem {
+ border-collapse: collapse;
+ margin-left: 6px;
+}</pre><pre>
+.gwt-TabBar .gwt-TabBarItem .topCenter {
+ padding: 0px;
+ background: url(images/hborder.png) 0px -32px repeat-x;
+}</pre><pre>
+.gwt-TabBar .gwt-TabBarItem .topLeft,
+.gwt-TabBar .gwt-TabBarItem .topRight {
+ padding: 0px;
+ zoom: 1;
+}</pre><pre>
+.gwt-TabBar .gwt-TabBarItem .topLeftInner,
+.gwt-TabBar .gwt-TabBarItem .topRightInner {
+ width: 6px;
+ height: 6px;
+}</pre><pre>
+.gwt-TabBar .gwt-TabBarItem .middleLeft,
+.gwt-TabBar .gwt-TabBarItem .middleRight {
+ width: 6px;
+ padding: 0px;
+ background: #e4e9f3 url(images/bg_tab.png) repeat-x;
+}</pre><pre>
+.gwt-TabBar .gwt-TabBarItem .middleCenter {
+ padding: 0px 4px 2px 4px;
+ cursor: pointer;
+ cursor: hand;
+ font-weight: bold;
+ text-align: center;
+ background: #e4e9f3 url(images/bg_tab.png) repeat-x;
+}</pre><pre>
+.gwt-TabBar .gwt-TabBarItem-selected .topCenter {
+ background: url(images/hborder.png) 0px -38px repeat-x;
+}</pre><pre>
+.gwt-TabBar .gwt-TabBarItem-selected .middleLeft,
+.gwt-TabBar .gwt-TabBarItem-selected .middleRight {
+ background: #92c1f0 url(images/bg_tab_selected.png) repeat-x;
+}</pre><pre>
+.gwt-TabBar .gwt-TabBarItem-selected .middleCenter {
+ cursor: default;
+ background: #92c1f0 url(images/bg_tab_selected.png) repeat-x;
+}</pre><pre>
+html>body .gwt-TabBar .gwt-TabBarItem .topLeft {
+ background: url(images/corner.png) no-repeat 0px -55px;
+}</pre><pre>
+html>body .gwt-TabBar .gwt-TabBarItem .topRight {
+ background: url(images/corner.png) no-repeat -6px -55px;
+}</pre><pre>
+html>body .gwt-TabBar .gwt-TabBarItem-selected .topLeft {
+ background-position: 0px -61px;
+}</pre><pre>
+html>body .gwt-TabBar .gwt-TabBarItem-selected .topRight {
+ background-position: -6px -61px;
+}</pre><pre>
+* html .gwt-TabBar .gwt-TabBarItem .topLeftInner {
+ width: 5px;
+ height: 61px;
+ margin-top: -55px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}</pre><pre>
+* html .gwt-TabBar .gwt-TabBarItem .topRightInner {
+ width: 12px;
+ height: 61px;
+ margin-top: -55px;
+ margin-left: -6px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}</pre><pre>
+* html .gwt-TabBar .gwt-TabBarItem-selected .topLeftInner {
+ width: 5px;
+ height: 67px;
+ margin-top: -61px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}</pre><pre>
+* html .gwt-TabBar .gwt-TabBarItem-selected .topRightInner {
+ width: 12px;
+ height: 67px;
+ margin-top: -61px;
+ margin-left: -6px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}</pre><pre>
+.gwt-TabPanel {
+}</pre><pre>
+.gwt-TabPanelBottom {
+ border-color: #92c1f0;
+ border-style: solid;
+ border-width: 3px 2px 2px;
+ overflow: hidden;
+ padding: 6px;
+}</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.panels.CwVerticalPanel.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.panels.CwVerticalPanel.html
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.panels.CwVerticalPanel.html
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.panels.CwVerticalSplitPanel.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.panels.CwVerticalSplitPanel.html
new file mode 100644
index 0000000..fd85b50
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.panels.CwVerticalSplitPanel.html
@@ -0,0 +1,8 @@
+<pre>
+.gwt-VerticalSplitPanel {
+}</pre><pre>
+.gwt-VerticalSplitPanel .vsplitter {
+ cursor: move;
+ border: 0px;
+ background: #91c0ef url(images/hborder.png) 0px -9px repeat-x;
+}</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.popups.CwBasicPopup.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.popups.CwBasicPopup.html
new file mode 100644
index 0000000..34a94b2
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.popups.CwBasicPopup.html
@@ -0,0 +1,81 @@
+<pre>
+.gwt-PopupPanel .content {
+}</pre><pre>
+.gwt-PopupPanel .middleCenter {
+ padding: 3px;
+ background: white;
+}</pre><pre>
+.gwt-PopupPanel .topCenter {
+ background: url(images/hborder.png) repeat-x;
+}</pre><pre>
+.gwt-PopupPanel .middleLeft {
+ background: url(images/vborder.png) repeat-y;
+}</pre><pre>
+.gwt-PopupPanel .topLeft,
+.gwt-PopupPanel .topRight,
+.gwt-PopupPanel .bottomLeft,
+.gwt-PopupPanel .bottomRight {
+ zoom: 1;
+}</pre><pre>
+html>body .gwt-PopupPanel .bottomCenter {
+ background: url(images/hborder.png) repeat-x;
+}</pre><pre>
+html>body .gwt-PopupPanel .middleRight {
+ background: url(images/vborder.png) repeat-y;
+}</pre><pre>
+html>body .gwt-PopupPanel .topLeft {
+ width: 5px;
+ height: 5px;
+ background: url(images/corner.png) no-repeat 0px -10px;
+}</pre><pre>
+html>body .gwt-PopupPanel .topRight {
+ width: 8px;
+ height: 5px;
+ background: url(images/corner.png) no-repeat -5px -10px;
+}</pre><pre>
+html>body .gwt-PopupPanel .bottomLeft {
+ width: 5px;
+ height: 8px;
+ background: url(images/corner.png) no-repeat 0px -15px;
+}</pre><pre>
+html>body .gwt-PopupPanel .bottomRight {
+ width: 8px;
+ height: 8px;
+ background: url(images/corner.png) no-repeat -5px -15px;
+}</pre><pre>
+* html .gwt-PopupPanel .bottomCenter {
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/ie6/hborder_blue_shadow.png',sizingMethod='scale');
+}</pre><pre>
+* html .gwt-PopupPanel .middleRight {
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/ie6/vborder_blue_shadow.png',sizingMethod='scale');
+}</pre><pre>
+* html .gwt-PopupPanel .topLeftInner {
+ width: 5px;
+ height: 15px;
+ margin-top: -10px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}</pre><pre>
+* html .gwt-PopupPanel .topRightInner {
+ width: 13px;
+ height: 15px;
+ margin-left: -5px;
+ margin-top: -10px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}</pre><pre>
+* html .gwt-PopupPanel .bottomLeftInner {
+ width: 5px;
+ height: 23px;
+ margin-top: -15px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}</pre><pre>
+* html .gwt-PopupPanel .bottomRightInner {
+ width: 13px;
+ height: 23px;
+ margin-left: -5px;
+ margin-top: -15px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.popups.CwDialogBox.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.popups.CwDialogBox.html
new file mode 100644
index 0000000..ff8749d
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.popups.CwDialogBox.html
@@ -0,0 +1,81 @@
+<pre>
+.gwt-DialogBox .Caption {
+ background: #93c2f1 url(images/bg_listgradient.png) repeat-x;
+ padding: 4px 4px 4px 8px;
+ cursor: default;
+ border-bottom: 1px solid #bbbbbb;
+}</pre><pre>
+.gwt-DialogBox .content {
+}</pre><pre>
+.gwt-DialogBox .middleCenter {
+ padding: 3px;
+ background: white;
+}</pre><pre>
+.gwt-DialogBox .middleLeft {
+ background: url(images/vborder.png) repeat-y;
+}</pre><pre>
+.gwt-DialogBox .topLeft,
+.gwt-DialogBox .topRight,
+.gwt-DialogBox .bottomLeft,
+.gwt-DialogBox .bottomRight {
+ zoom: 1;
+}</pre><pre>
+html>body .gwt-DialogBox .bottomCenter {
+ background: url(images/hborder.png) repeat-x;
+}</pre><pre>
+html>body .gwt-DialogBox .middleRight {
+ background: url(images/vborder.png) repeat-y;
+}</pre><pre>
+html>body .gwt-DialogBox .topLeft {
+ width: 5px;
+ background: url(images/corner.png) no-repeat -13px 0px;
+}</pre><pre>
+html>body .gwt-DialogBox .topRight {
+ width: 8px;
+ background: url(images/corner.png) no-repeat -18px 0px;
+}</pre><pre>
+html>body .gwt-DialogBox .bottomLeft {
+ width: 5px;
+ height: 8px;
+ background: url(images/corner.png) no-repeat 0px -15px;
+}</pre><pre>
+html>body .gwt-DialogBox .bottomRight {
+ width: 8px;
+ height: 8px;
+ background: url(images/corner.png) no-repeat -5px -15px;
+}</pre><pre>
+* html .gwt-DialogBox .bottomCenter {
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/ie6/hborder_blue_shadow.png',sizingMethod='scale');
+}</pre><pre>
+* html .gwt-DialogBox .middleRight {
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/ie6/vborder_blue_shadow.png',sizingMethod='scale');
+}</pre><pre>
+* html .gwt-DialogBox .topLeft {
+ width: 5px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/ie6/corner_dialog_topleft.png',sizingMethod='crop');
+}</pre><pre>
+* html .gwt-DialogBox .topRight {
+ width: 8px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/ie6/corner_dialog_topright.png',sizingMethod='crop');
+}</pre><pre>
+* html .gwt-DialogBox .bottomLeftInner {
+ width: 5px;
+ height: 23px;
+ margin-top: -15px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}</pre><pre>
+* html .gwt-DialogBox .bottomRightInner {
+ width: 13px;
+ height: 23px;
+ margin-left: -5px;
+ margin-top: -15px;
+ overflow: hidden;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/corner.png',sizingMethod='crop');
+}</pre><pre>
+.cw-DialogBox {
+ opacity: 0.8;
+ filter: alpha(opacity=80);
+}</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.tables.CwFlexTable.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.tables.CwFlexTable.html
new file mode 100644
index 0000000..ceb5915
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.tables.CwFlexTable.html
@@ -0,0 +1,8 @@
+<pre>
+.cw-FlexTable td {
+ border: 1px solid #BBBBBB;
+ padding: 3px;
+}</pre><pre>
+.cw-FlexTable-buttonPanel td {
+ border: 0px;
+}</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.tables.CwGrid.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.tables.CwGrid.html
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.tables.CwGrid.html
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.text.CwBasicText.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.text.CwBasicText.html
new file mode 100644
index 0000000..c22b121
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.text.CwBasicText.html
@@ -0,0 +1,19 @@
+<pre>
+.gwt-TextBox {
+ padding: 2px;
+}</pre><pre>
+.gwt-TextBox-readonly {
+ color: #888;
+}</pre><pre>
+.gwt-PasswordTextBox {
+ padding: 2px;
+}</pre><pre>
+.gwt-PasswordTextBox-readonly {
+ color: #888;
+}</pre><pre>
+.gwt-TextArea {
+ padding: 2px;
+}</pre><pre>
+.gwt-TextArea-readonly {
+ color: #888;
+}</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.text.CwRichText.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.text.CwRichText.html
new file mode 100644
index 0000000..0927c0c
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.text.CwRichText.html
@@ -0,0 +1,64 @@
+<pre>
+.gwt-RichTextArea {
+}</pre><pre>
+.hasRichTextToolbar {
+ border: 0px;
+}</pre><pre>
+.gwt-RichTextToolbar {
+ background: #e3e8f3 url(images/bg_headergradient.png) repeat-x;
+ border-bottom: 1px solid #BBBBBB;
+ padding: 3px;
+ margin: 0px;
+}</pre><pre>
+.gwt-RichTextToolbar .gwt-PushButton-up {
+ padding: 0px 1px 0px 0px;
+ margin-right: 4px;
+ margin-bottom: 4px;
+ border-width: 1px;
+}</pre><pre>
+.gwt-RichTextToolbar .gwt-PushButton-up-hovering {
+ margin-right: 4px;
+ margin-bottom: 4px;
+ padding: 0px 1px 0px 0px;
+ border-width: 1px;
+}</pre><pre>
+.gwt-RichTextToolbar .gwt-PushButton-down {
+ margin-right: 4px;
+ margin-bottom: 4px;
+ padding: 0px 0px 0px 1px;
+ border-width: 1px;
+}</pre><pre>
+.gwt-RichTextToolbar .gwt-PushButton-down-hovering {
+ margin-right: 4px;
+ margin-bottom: 4px;
+ padding: 0px 0px 0px 1px;
+ border-width: 1px;
+}</pre><pre>
+.gwt-RichTextToolbar .gwt-ToggleButton-up {
+ margin-right: 4px;
+ margin-bottom: 4px;
+ padding: 0px 1px 0px 0px;
+ border-width: 1px;
+}</pre><pre>
+.gwt-RichTextToolbar .gwt-ToggleButton-up-hovering {
+ margin-right: 4px;
+ margin-bottom: 4px;
+ padding: 0px 1px 0px 0px;
+ border-width: 1px;
+}</pre><pre>
+.gwt-RichTextToolbar .gwt-ToggleButton-down {
+ margin-right: 4px;
+ margin-bottom: 4px;
+ padding: 0px 0px 0px 1px;
+ border-width: 1px;
+}</pre><pre>
+.gwt-RichTextToolbar .gwt-ToggleButton-down-hovering {
+ margin-right: 4px;
+ margin-bottom: 4px;
+ padding: 0px 0px 0px 1px;
+ border-width: 1px;
+}</pre><pre>
+.cw-RichText {
+ border: 1px solid #BBBBBB;
+ border-spacing: 0px;
+}</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.text.RichTextToolbar.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.text.RichTextToolbar.html
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.text.RichTextToolbar.html
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.widgets.CwBasicButton.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.widgets.CwBasicButton.html
new file mode 100644
index 0000000..1d2bc57
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.widgets.CwBasicButton.html
@@ -0,0 +1,9 @@
+<pre>
+.gwt-Button {
+ width: 10em;
+}</pre><pre>
+.gwt-Button:active {
+}</pre><pre>
+.gwt-Button[disabled] {
+ color: #888;
+}</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.widgets.CwCheckBox.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.widgets.CwCheckBox.html
new file mode 100644
index 0000000..45de2bf
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.widgets.CwCheckBox.html
@@ -0,0 +1,6 @@
+<pre>
+.gwt-CheckBox {
+}</pre><pre>
+.gwt-CheckBox-disabled {
+ color: #888;
+}</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.widgets.CwCustomButton.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.widgets.CwCustomButton.html
new file mode 100644
index 0000000..ffa90ce
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.widgets.CwCustomButton.html
@@ -0,0 +1,121 @@
+<pre>
+.gwt-PushButton-up {
+ padding: 2px;
+ background-color: #efebe7;
+ border: 2px solid #faf9f7;
+ border-right: 2px solid #848280;
+ border-bottom: 2px solid #848280;
+ cursor: pointer;
+ cursor: hand;
+}</pre><pre>
+.gwt-PushButton-up-hovering {
+ padding: 2px;
+ background-color: #efebe7;
+ border: 2px solid #faf9f7;
+ border-right: 2px solid #848280;
+ border-bottom: 2px solid #848280;
+ cursor: pointer;
+ cursor: hand;
+}</pre><pre>
+.gwt-PushButton-up-disabled {
+ padding: 2px;
+ background-color: #efebe7;
+ border: 2px solid #e7e4e0;
+ border-right: 2px solid #625b54;
+ border-bottom: 2px solid #625b54;
+ cursor: default;
+ opacity: 0.5;
+}</pre><pre>
+.gwt-PushButton-up-disabled .gwt-Image {
+ filter: alpha(opacity=30);
+}</pre><pre>
+.gwt-PushButton-down {
+ padding: 2px 1px 2px 3px;
+ background-color: #efebe7;
+ border: 2px solid #848280;
+ border-right: 2px solid #faf9f7;
+ border-bottom: 2px solid #faf9f7;
+ cursor: pointer;
+ cursor: hand;
+}</pre><pre>
+.gwt-PushButton-down-hovering {
+ padding: 2px 1px 2px 3px;
+ background-color: #efebe7;
+ border: 2px solid #848280;
+ border-right: 2px solid #faf9f7;
+ border-bottom: 2px solid #faf9f7;
+ cursor: pointer;
+ cursor: hand;
+}</pre><pre>
+.gwt-PushButton-down-disabled {
+ padding: 2px 1px 2px 3px;
+ background-color: #efebe7;
+ border: 2px solid #e7e4e0;
+ border-right: 2px solid #625b54;
+ border-bottom: 2px solid #625b54;
+ cursor: default;
+ opacity: 0.5;
+}</pre><pre>
+.gwt-PushButton-down-disabled .gwt-Image {
+ filter: alpha(opacity=30);
+}</pre><pre>
+.gwt-ToggleButton-up {
+ padding: 2px;
+ background-color: #efebe7;
+ border: 2px solid #faf9f7;
+ border-right: 2px solid #848280;
+ border-bottom: 2px solid #848280;
+ cursor: pointer;
+ cursor: hand;
+}</pre><pre>
+.gwt-ToggleButton-up-hovering {
+ padding: 2px;
+ background-color: #efebe7;
+ border: 2px solid #faf9f7;
+ border-right: 2px solid #848280;
+ border-bottom: 2px solid #848280;
+ cursor: pointer;
+ cursor: hand;
+}</pre><pre>
+.gwt-ToggleButton-up-disabled {
+ padding: 2px;
+ background-color: #efebe7;
+ border: 2px solid #e7e4e0;
+ border-right: 2px solid #625b54;
+ border-bottom: 2px solid #625b54;
+ cursor: default;
+ opacity: 0.5;
+}</pre><pre>
+.gwt-ToggleButton-up-disabled .gwt-Image {
+ filter: alpha(opacity=30);
+}</pre><pre>
+.gwt-ToggleButton-down {
+ padding: 2px 1px 2px 3px;
+ background-color: #f5f5f5;
+ border: 2px solid #848280;
+ border-right: 2px solid #faf9f7;
+ border-bottom: 2px solid #faf9f7;
+ cursor: pointer;
+ cursor: hand;
+}</pre><pre>
+.gwt-ToggleButton-down-hovering {
+ padding: 2px 1px 2px 3px;
+ background-color: #f5f5f5;
+ border: 2px solid #848280;
+ border-right: 2px solid #faf9f7;
+ border-bottom: 2px solid #faf9f7;
+ cursor: pointer;
+ cursor: hand;
+}</pre><pre>
+.gwt-ToggleButton-down-disabled {
+ padding: 2px 1px 2px 3px;
+ background-color: #efebe7;
+ border: 2px solid #e7e4e0;
+ border-right: 2px solid #625b54;
+ border-bottom: 2px solid #625b54;
+ cursor: default;
+ opacity: 0.5;
+}</pre><pre>
+.gwt-ToggleButton-down-disabled .gwt-Image {
+ filter: alpha(opacity=30);
+}</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.widgets.CwFileUpload.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.widgets.CwFileUpload.html
new file mode 100644
index 0000000..e9160d9
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.widgets.CwFileUpload.html
@@ -0,0 +1,3 @@
+<pre>
+.gwt-FileUpload {
+}</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.widgets.CwHyperlink.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.widgets.CwHyperlink.html
new file mode 100644
index 0000000..feda287
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.widgets.CwHyperlink.html
@@ -0,0 +1,3 @@
+<pre>
+.gwt-Hyperlink {
+}</pre>
\ No newline at end of file
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.widgets.CwRadioButton.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.widgets.CwRadioButton.html
new file mode 100644
index 0000000..d3ae7d6
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.widgets.CwRadioButton.html
@@ -0,0 +1,7 @@
+<pre>
+.gwt-RadioButton {
+ padding: 4px 4px 3px 3px;
+}</pre><pre>
+.gwt-RadioButton-disabled {
+ color: #888;
+}</pre>
\ No newline at end of file