Replaced the ShowcaseGenerator in the Showcase example with a GWT Generator that runs when the app is compiled. The previous generator was a straight Java app that users needed to run manually in order to generate the Java source and CSS source available in the app, and the source needed to be saved in the trunk. Now, the souce code for each example in the Showcase is added to the public output directory at compile time, so the source is always up to date and does not need to be saved in the trunk. The "@gwt.XXX" tags have been replaced with Java annotations, and the the new generator uses the ClassLoader to read the annotations and open resources instead of using File paths, which can be problematic.
In addition, style code now reflects the current theme and RTL mode. If the user switches themes while the CSS Style tab is displayed, the tab will automatically refresh the CSS to show the styles associated with the new theme.
Path by: jlabanca
Review by: jgw
git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@2746 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/eclipse/samples/Showcase/.classpath b/eclipse/samples/Showcase/.classpath
index 8996e78..a8c5efa 100644
--- a/eclipse/samples/Showcase/.classpath
+++ b/eclipse/samples/Showcase/.classpath
@@ -2,6 +2,7 @@
<classpath>
<classpathentry kind="src" path="core/src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/gwt-dev-linux"/>
<classpathentry combineaccessrules="false" kind="src" path="/gwt-user"/>
<classpathentry kind="output" path="bin"/>
</classpath>
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
index e1d0951..8a06d26 100644
--- a/samples/showcase/src/com/google/gwt/sample/showcase/Showcase.gwt.xml
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/Showcase.gwt.xml
@@ -8,6 +8,11 @@
<inherits name="com.google.gwt.user.Debug"/>
<set-property name="gwt.enableDebugId" value="true"/>
+ <!-- Use a generator to create the source code -->
+ <generate-with class="com.google.gwt.sample.showcase.generator.ShowcaseGenerator">
+ <when-type-assignable class="com.google.gwt.sample.showcase.client.Showcase.GeneratorInfo" />
+ </generate-with>
+
<!-- Specify the app entry point class. -->
<entry-point class='com.google.gwt.sample.showcase.client.Showcase'/>
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
index 3fff25b..dd39a95 100644
--- a/samples/showcase/src/com/google/gwt/sample/showcase/client/ContentWidget.java
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/ContentWidget.java
@@ -15,11 +15,15 @@
*/
package com.google.gwt.sample.showcase.client;
+import com.google.gwt.http.client.Request;
+import com.google.gwt.http.client.RequestBuilder;
+import com.google.gwt.http.client.RequestCallback;
+import com.google.gwt.http.client.RequestException;
+import com.google.gwt.http.client.Response;
import com.google.gwt.i18n.client.Constants;
import com.google.gwt.i18n.client.HasDirection;
+import com.google.gwt.i18n.client.LocaleInfo;
import com.google.gwt.user.client.DOM;
-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;
@@ -30,6 +34,9 @@
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.Widget;
+import java.util.HashMap;
+import java.util.Map;
+
/**
* <p>
* A widget used to show GWT examples in the ContentPanel. It includes a tab bar
@@ -75,8 +82,6 @@
/**
* An instance of the constants.
- *
- * @gwt.DATA
*/
private CwConstants constants;
@@ -102,10 +107,9 @@
private HTML sourceWidget = null;
/**
- * A boolean indicating whether or not the RPC request for the style code has
- * been sent.
+ * A mapping of themes to style definitions.
*/
- private boolean styleLoaded = false;
+ private Map<String, String> styleDefs = null;
/**
* The widget used to display css style.
@@ -215,10 +219,9 @@
// Add style tab
if (hasStyle()) {
+ styleDefs = new HashMap<String, String>();
styleWidget = new HTML();
add(styleWidget, constants.contentWidgetStyle());
- } else {
- styleLoaded = true;
}
// Initialize the widget and add it to the page
@@ -254,16 +257,38 @@
// Show the associated widget in the deck panel
deckPanel.showWidget(tabIndex);
- // Send an RPC request to load the content of the tab
+ // Load the source code
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.");
+ requestSourceContents(ShowcaseConstants.DST_SOURCE_EXAMPLE
+ + this.getClass().getName() + ".html", sourceWidget, null);
+ }
+
+ // Load the style definitions
+ if (hasStyle() && tabHTML.equals(constants.contentWidgetStyle())) {
+ final String theme = Showcase.CUR_THEME;
+ if (styleDefs.containsKey(theme)) {
+ styleWidget.setHTML(styleDefs.get(theme));
+ } else {
+ styleDefs.put(theme, "");
+ RequestCallback callback = new RequestCallback() {
+ public void onError(Request request, Throwable exception) {
+ styleDefs.put(theme, "Style not available.");
+ }
+
+ public void onResponseReceived(Request request, Response response) {
+ styleDefs.put(theme, response.getText());
+ }
+ };
+
+ String srcPath = ShowcaseConstants.DST_SOURCE_STYLE + theme;
+ if (LocaleInfo.getCurrentLocale().isRTL()) {
+ srcPath += "_rtl";
+ }
+ requestSourceContents(srcPath + "/" + this.getClass().getName()
+ + ".html", styleWidget, callback);
+ }
}
}
@@ -290,12 +315,12 @@
/**
* Load the contents of a remote file into the specified widget.
*
- * @param url the URL of the file
+ * @param url the URL of the file relative to the source directory in public
* @param target the target Widget to place the contents
- * @param errorMsg the error message to display if the request fails
+ * @param callback the callback when the call completes
*/
- protected void requestFileContents(String url, final HTML target,
- final String errorMsg) {
+ protected void requestSourceContents(String url, final HTML target,
+ final RequestCallback callback) {
// Show the loading image
if (loadingImage == null) {
loadingImage = new Image("images/loading.gif");
@@ -305,14 +330,30 @@
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);
+ RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, url);
+ RequestCallback realCallback = new RequestCallback() {
+ public void onError(Request request, Throwable exception) {
+ target.setHTML("Cannot find resource");
+ if (callback != null) {
+ callback.onError(request, exception);
}
}
- });
+
+ public void onResponseReceived(Request request, Response response) {
+ target.setHTML(response.getText());
+ if (callback != null) {
+ callback.onResponseReceived(request, response);
+ }
+ }
+ };
+ builder.setCallback(realCallback);
+
+ // Send the request
+ Request request = null;
+ try {
+ request = builder.send();
+ } catch (RequestException e) {
+ realCallback.onError(request, e);
+ }
}
}
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
index 5d52abd..df1d615 100644
--- a/samples/showcase/src/com/google/gwt/sample/showcase/client/Showcase.java
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/Showcase.java
@@ -70,6 +70,7 @@
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.ListBox;
import com.google.gwt.user.client.ui.RootPanel;
+import com.google.gwt.user.client.ui.TabBar;
import com.google.gwt.user.client.ui.ToggleButton;
import com.google.gwt.user.client.ui.Tree;
import com.google.gwt.user.client.ui.TreeItem;
@@ -86,6 +87,13 @@
*/
public class Showcase implements EntryPoint {
/**
+ * The type passed into the
+ * {@link com.google.gwt.sample.showcase.generator.ShowcaseGenerator}.
+ */
+ private static final class GeneratorInfo {
+ }
+
+ /**
* A special version of the ToggleButton that cannot be clicked if down. If
* one theme button is pressed, all of the others are depressed.
*/
@@ -133,19 +141,9 @@
public static final ShowcaseImages images = (ShowcaseImages) GWT.create(ShowcaseImages.class);
/**
- * Link to GWT homepage.
+ * The current style theme.
*/
- 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/";
-
- /**
- * The available style themes that the user can select.
- */
- private static final String[] STYLE_THEMES = {"default", "chrome", "dark"};
+ public static String CUR_THEME = ShowcaseConstants.STYLE_THEMES[0];
/**
* Convenience method for getting the document's head element.
@@ -223,6 +221,9 @@
* This is the entry point method.
*/
public void onModuleLoad() {
+ // Generate the source code and css for the examples
+ GWT.create(GeneratorInfo.class);
+
// Create a widget to test when style sheets are loaded
styleTester = new HTML("<div class=\"topLeftInner\"></div>");
styleTester.setStyleName("gwt-DecoratorPanel");
@@ -254,7 +255,7 @@
// LTR version, so both versions should use the same width for the main nav
// menu.
if (LocaleInfo.getCurrentLocale().isRTL()) {
- updateStyleSheets(STYLE_THEMES[0]);
+ updateStyleSheets();
}
// Add an listener that sets the content widget when a menu item is selected
@@ -327,11 +328,11 @@
*/
private void setupMainLinks(ShowcaseConstants constants) {
// Link to GWT Homepage
- app.addLink(new HTML("<a href=\"" + GWT_HOMEPAGE + "\">"
+ app.addLink(new HTML("<a href=\"" + ShowcaseConstants.GWT_HOMEPAGE + "\">"
+ constants.mainLinkHomepage() + "</a>"));
// Link to More Examples
- app.addLink(new HTML("<a href=\"" + GWT_EXAMPLES + "\">"
+ app.addLink(new HTML("<a href=\"" + ShowcaseConstants.GWT_EXAMPLES + "\">"
+ constants.mainLinkExamples() + "</a>"));
}
@@ -488,12 +489,21 @@
// Add the option to change the style
final HorizontalPanel styleWrapper = new HorizontalPanel();
vPanel.add(styleWrapper);
- for (int i = 0; i < STYLE_THEMES.length; i++) {
- final ThemeButton button = new ThemeButton(STYLE_THEMES[i]);
+ for (int i = 0; i < ShowcaseConstants.STYLE_THEMES.length; i++) {
+ final ThemeButton button = new ThemeButton(
+ ShowcaseConstants.STYLE_THEMES[i]);
styleWrapper.add(button);
button.addClickListener(new ClickListener() {
public void onClick(Widget sender) {
- updateStyleSheets(button.getTheme());
+ // Update the current theme
+ CUR_THEME = button.getTheme();
+
+ // Reload the current tab, loading the new theme if necessary
+ TabBar bar = ((TabBar) app.getContentTitle());
+ bar.selectTab(bar.getSelectedTab());
+
+ // Load the new style sheets
+ updateStyleSheets();
}
});
}
@@ -519,10 +529,8 @@
/**
* Update the style sheets to reflect the current theme and direction.
- *
- * @param theme the current theme
*/
- private void updateStyleSheets(String theme) {
+ private void updateStyleSheets() {
// Remove existing style sheets
boolean isRTL = LocaleInfo.getCurrentLocale().isRTL();
Element headElem = getHeadElement();
@@ -536,8 +544,8 @@
DOM.removeChild(headElem, elem);
// Set the theme
- for (String oldTheme : STYLE_THEMES) {
- href = href.replaceAll("/" + oldTheme + "/", "/" + theme + "/");
+ for (String oldTheme : ShowcaseConstants.STYLE_THEMES) {
+ href = href.replaceAll("/" + oldTheme + "/", "/" + CUR_THEME + "/");
}
// Convert to an rtl suffix
diff --git a/samples/showcase/src/com/google/gwt/sample/showcase/client/ShowcaseAnnotations.java b/samples/showcase/src/com/google/gwt/sample/showcase/client/ShowcaseAnnotations.java
new file mode 100644
index 0000000..f07f1a9
--- /dev/null
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/ShowcaseAnnotations.java
@@ -0,0 +1,50 @@
+/*
+ * 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;
+
+/**
+ * The annotations used in {@link Showcase}.
+ */
+public class ShowcaseAnnotations {
+ /**
+ * Indicates that a class variable should be included as source data in the
+ * example. All data must have a JavaDoc style comment.
+ */
+ public @interface ShowcaseData {
+ }
+
+ /**
+ * Indicates that a method or inner class should be included as source code in
+ * the example. All source must have a JavaDoc style comment.
+ */
+ public @interface ShowcaseSource {
+ }
+
+ /**
+ * Indicates the raw files that be included as raw source in a Showcase
+ * example.
+ */
+ public static @interface ShowcaseRaw {
+ String[] value();
+ }
+
+ /**
+ * Indicates the prefix of a style attribute used in a Showcase example.
+ */
+ public static @interface ShowcaseStyle {
+ String[] value();
+ }
+}
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
index 525b35c..98db527 100644
--- a/samples/showcase/src/com/google/gwt/sample/showcase/client/ShowcaseConstants.java
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/client/ShowcaseConstants.java
@@ -75,6 +75,41 @@
CwDictionaryExample.CwConstants, CwDecoratorPanel.CwConstants,
CwAnimation.CwConstants {
+ /**
+ * The path to source code for examples, raw files, and style definitions.
+ */
+ String DST_SOURCE = "gwtShowcaseSource/";
+
+ /**
+ * The destination folder for parsed source code from Showcase examples.
+ */
+ String DST_SOURCE_EXAMPLE = DST_SOURCE + "java/";
+
+ /**
+ * The destination folder for raw files that are included in entirety.
+ */
+ String DST_SOURCE_RAW = DST_SOURCE + "raw/";
+
+ /**
+ * The destination folder for parsed CSS styles used in Showcase examples.
+ */
+ String DST_SOURCE_STYLE = DST_SOURCE + "css/";
+
+ /**
+ * Link to GWT homepage.
+ */
+ String GWT_HOMEPAGE = "http://code.google.com/webtoolkit/";
+
+ /**
+ * Link to GWT examples page.
+ */
+ String GWT_EXAMPLES = GWT_HOMEPAGE + "examples/";
+
+ /**
+ * The available style themes that the user can select.
+ */
+ String[] STYLE_THEMES = {"default", "chrome", "dark"};
+
String categoryI18N();
String categoryLists();
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
index f6f7e1e..586c67d 100644
--- 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
@@ -19,8 +19,6 @@
/**
* Internationalized constants used to demonstrate {@link ConstantsWithLookup}.
- *
- * @gwt.RAW
*/
public interface ColorConstants extends ConstantsWithLookup {
String black();
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
index 08c58d8..c7baba6 100644
--- 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
@@ -13,7 +13,6 @@
# License for the specific language governing permissions and limitations under
# the License.
#
-# @gwt.RAW
red = Red
green = Green
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
index f3b4cb7..a03d569 100644
--- 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
@@ -13,7 +13,6 @@
# License for the specific language governing permissions and limitations under
# the License.
#
-# @gwt.RAW
red = الاحمر
green = الخضراء
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
index 123f164..5a8e189 100644
--- 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
@@ -13,7 +13,6 @@
# License for the specific language governing permissions and limitations under
# the License.
#
-# @gwt.RAW
red = Rouge
green = Vert
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
index c183888..af0572c 100644
--- 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
@@ -13,7 +13,6 @@
# License for the specific language governing permissions and limitations under
# the License.
#
-# @gwt.RAW
red =红
green =绿
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
index d936017..1eec347 100644
--- 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
@@ -18,6 +18,10 @@
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.sample.showcase.client.ShowcaseConstants;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseData;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseRaw;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseSource;
import com.google.gwt.user.client.ui.ClickListener;
import com.google.gwt.user.client.ui.FlexTable;
import com.google.gwt.user.client.ui.HTML;
@@ -33,12 +37,12 @@
/**
* Example file.
*/
+@ShowcaseRaw({"ExampleConstants.java", "ExampleConstants.properties"})
public class CwConstantsExample extends ContentWidget {
/**
* The constants used in this Content Widget.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
public static interface CwConstants extends Constants,
ContentWidget.CwConstants {
String cwConstantsExampleDescription();
@@ -50,9 +54,8 @@
/**
* An instance of the constants.
- *
- * @gwt.DATA
*/
+ @ShowcaseData
private CwConstants constants;
/**
@@ -104,9 +107,8 @@
/**
* Initialize this example.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
@Override
public Widget onInitialize() {
// Create the internationalized constants
@@ -173,15 +175,15 @@
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.");
+ String className = ExampleConstants.class.getName();
+ requestSourceContents(ShowcaseConstants.DST_SOURCE_RAW + className
+ + ".java.html", javaWidget, null);
} 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.");
+ String className = ExampleConstants.class.getName();
+ requestSourceContents(ShowcaseConstants.DST_SOURCE_RAW + className
+ + ".properties.html", propertiesWidget, null);
}
}
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
index f4c2057..610447d 100644
--- 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
@@ -18,6 +18,10 @@
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.sample.showcase.client.ShowcaseConstants;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseData;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseRaw;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseSource;
import com.google.gwt.user.client.ui.ClickListener;
import com.google.gwt.user.client.ui.FlexTable;
import com.google.gwt.user.client.ui.HTML;
@@ -33,12 +37,12 @@
/**
* Example file.
*/
+@ShowcaseRaw({"ColorConstants.java", "ColorConstants.properties"})
public class CwConstantsWithLookupExample extends ContentWidget {
/**
* The constants used in this Content Widget.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
public static interface CwConstants extends Constants,
ContentWidget.CwConstants {
String cwConstantsWithLookupExampleDescription();
@@ -58,9 +62,8 @@
/**
* A {@link TextBox} where the user can select a color to lookup.
- *
- * @gwt.DATA
*/
+ @ShowcaseData
private TextBox colorBox = null;
/**
@@ -70,16 +73,14 @@
/**
* A {@link TextBox} where the results of the lookup are displayed.
- *
- * @gwt.DATA
*/
+ @ShowcaseData
private TextBox colorResultsBox = null;
/**
* An instance of the constants.
- *
- * @gwt.DATA
*/
+ @ShowcaseData
private CwConstants constants;
/**
@@ -131,9 +132,8 @@
/**
* Initialize this example.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
@Override
public Widget onInitialize() {
// Create the internationalized constants
@@ -197,15 +197,15 @@
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.");
+ String className = ColorConstants.class.getName();
+ requestSourceContents(ShowcaseConstants.DST_SOURCE_RAW + className
+ + ".java.html", javaWidget, null);
} 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.");
+ String className = ColorConstants.class.getName();
+ requestSourceContents(ShowcaseConstants.DST_SOURCE_RAW + className
+ + ".properties.html", propertiesWidget, null);
}
}
@@ -224,9 +224,8 @@
/**
* Lookup the color based on the value the user entered.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
private void updateColor() {
String key = colorBox.getText().trim();
if (key.equals("")) {
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
index 066dcfc..88cc1bd 100644
--- 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
@@ -18,6 +18,9 @@
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.sample.showcase.client.ShowcaseAnnotations.ShowcaseData;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseSource;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseStyle;
import com.google.gwt.user.client.ui.ChangeListener;
import com.google.gwt.user.client.ui.Grid;
import com.google.gwt.user.client.ui.HasVerticalAlignment;
@@ -32,15 +35,13 @@
/**
* Example file.
- *
- * @gwt.CSS .cw-RedText
*/
+@ShowcaseStyle(".cw-RedText")
public class CwDateTimeFormat extends ContentWidget {
/**
* The constants used in this Content Widget.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
public static interface CwConstants extends Constants,
ContentWidget.CwConstants {
String cwDateTimeFormatDescription();
@@ -67,37 +68,32 @@
/**
* An instance of the constants.
- *
- * @gwt.DATA
*/
+ @ShowcaseData
private CwConstants constants;
/**
* The {@link Label} where the formatted value is displayed.
- *
- * @gwt.DATA
*/
+ @ShowcaseData
private Label formattedBox = null;
/**
* The {@link TextBox} that displays the current pattern.
- *
- * @gwt.DATA
*/
+ @ShowcaseData
private TextBox patternBox = null;
/**
* The {@link ListBox} that holds the patterns.
- *
- * @gwt.DATA
*/
+ @ShowcaseData
private ListBox patternList = null;
/**
* The {@link TextBox} where the user enters a value.
- *
- * @gwt.DATA
*/
+ @ShowcaseData
private TextBox valueBox = null;
/**
@@ -122,9 +118,8 @@
/**
* Initialize this example.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
@Override
public Widget onInitialize() {
// Use a Grid to layout the content
@@ -187,8 +182,8 @@
* Show an error message. Pass in null to clear the error message.
*
* @param errorMsg the error message
- * @gwt.SRC
*/
+ @ShowcaseSource
private void showErrorMessage(String errorMsg) {
if (errorMsg == null) {
formattedBox.removeStyleName("cw-RedText");
@@ -200,9 +195,8 @@
/**
* Update the formatted value based on the user entered value and pattern.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
private void updateFormattedValue() {
String sValue = valueBox.getText();
if (!sValue.equals("")) {
@@ -221,9 +215,8 @@
/**
* Update the selected pattern based on the pattern in the list.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
private void updatePattern() {
switch (patternList.getSelectedIndex()) {
// Date + Time
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
index 6cf8f40..68aab16 100644
--- 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
@@ -18,6 +18,9 @@
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.sample.showcase.client.ShowcaseAnnotations.ShowcaseData;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseSource;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseStyle;
import com.google.gwt.user.client.ui.FlexTable;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.VerticalPanel;
@@ -27,15 +30,13 @@
/**
* Example file.
- *
- * @gwt.CSS .cw-DictionaryExample
*/
+@ShowcaseStyle(".cw-DictionaryExample")
public class CwDictionaryExample extends ContentWidget {
/**
* The constants used in this Content Widget.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
public static interface CwConstants extends Constants,
ContentWidget.CwConstants {
String cwDictionaryExampleDescription();
@@ -47,9 +48,8 @@
/**
* An instance of the constants.
- *
- * @gwt.DATA
*/
+ @ShowcaseData
private CwConstants constants;
/**
@@ -74,9 +74,8 @@
/**
* Initialize this example.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
@Override
public Widget onInitialize() {
// Create a vertical panel to layout the contents
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
index 73a6486..d741a55 100644
--- 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
@@ -18,6 +18,10 @@
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.sample.showcase.client.ShowcaseConstants;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseData;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseRaw;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseSource;
import com.google.gwt.user.client.ui.ClickListener;
import com.google.gwt.user.client.ui.FlexTable;
import com.google.gwt.user.client.ui.HTML;
@@ -32,12 +36,12 @@
/**
* Example file.
*/
+@ShowcaseRaw({"ErrorMessages.java", "ErrorMessages.properties"})
public class CwMessagesExample extends ContentWidget {
/**
* The constants used in this Content Widget.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
public static interface CwConstants extends Constants,
ContentWidget.CwConstants {
String cwMessagesExampleArg0Label();
@@ -59,44 +63,38 @@
/**
* The {@link TextBox} where the user enters argument 0.
- *
- * @gwt.DATA
*/
+ @ShowcaseData
private TextBox arg0Box = null;
/**
* The {@link TextBox} where the user enters argument 1.
- *
- * @gwt.DATA
*/
+ @ShowcaseData
private TextBox arg1Box = null;
/**
* The {@link TextBox} where the user enters argument 2.
- *
- * @gwt.DATA
*/
+ @ShowcaseData
private TextBox arg2Box = null;
/**
* An instance of the constants.
- *
- * @gwt.DATA
*/
+ @ShowcaseData
private CwConstants constants;
/**
* The error messages used in this example.
- *
- * @gwt.DATA
*/
+ @ShowcaseData
private ErrorMessages errorMessages = null;
/**
* The {@link HTML} used to display the message.
- *
- * @gwt.DATA
*/
+ @ShowcaseData
private HTML formattedMessage = null;
/**
@@ -148,9 +146,8 @@
/**
* Initialize this example.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
@Override
public Widget onInitialize() {
// Create the internationalized error messages
@@ -232,15 +229,15 @@
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.");
+ String className = ErrorMessages.class.getName();
+ requestSourceContents(ShowcaseConstants.DST_SOURCE_RAW + className
+ + ".java.html", javaWidget, null);
} 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.");
+ String className = ErrorMessages.class.getName();
+ requestSourceContents(ShowcaseConstants.DST_SOURCE_RAW + className
+ + ".properties.html", propertiesWidget, null);
}
}
@@ -259,9 +256,8 @@
/**
* Update the formatted message.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
private void updateMessage() {
String arg0 = arg0Box.getText().trim();
String arg1 = arg1Box.getText().trim();
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
index 91662e6..ad91de0 100644
--- 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
@@ -18,6 +18,9 @@
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.sample.showcase.client.ShowcaseAnnotations.ShowcaseData;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseSource;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseStyle;
import com.google.gwt.user.client.ui.ChangeListener;
import com.google.gwt.user.client.ui.Grid;
import com.google.gwt.user.client.ui.KeyboardListenerAdapter;
@@ -28,15 +31,13 @@
/**
* Example file.
- *
- * @gwt.CSS .cw-RedText
*/
+@ShowcaseStyle(".cw-RedText")
public class CwNumberFormat extends ContentWidget {
/**
* The constants used in this Content Widget.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
public static interface CwConstants extends Constants,
ContentWidget.CwConstants {
String cwNumberFormatDescription();
@@ -63,37 +64,32 @@
/**
* An instance of the constants.
- *
- * @gwt.DATA
*/
+ @ShowcaseData
private CwConstants constants;
/**
* The {@link Label} where the formatted value is displayed.
- *
- * @gwt.DATA
*/
+ @ShowcaseData
private Label formattedBox = null;
/**
* The {@link TextBox} that displays the current pattern.
- *
- * @gwt.DATA
*/
+ @ShowcaseData
private TextBox patternBox = null;
/**
* The {@link ListBox} that holds the patterns.
- *
- * @gwt.DATA
*/
+ @ShowcaseData
private ListBox patternList = null;
/**
* The {@link TextBox} where the user enters a value.
- *
- * @gwt.DATA
*/
+ @ShowcaseData
private TextBox valueBox = null;
/**
@@ -118,9 +114,8 @@
/**
* Initialize this example.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
@Override
public Widget onInitialize() {
// Use a Grid to layout the content
@@ -181,8 +176,8 @@
* Show an error message. Pass in null to clear the error message.
*
* @param errorMsg the error message
- * @gwt.SRC
*/
+ @ShowcaseSource
private void showErrorMessage(String errorMsg) {
if (errorMsg == null) {
formattedBox.removeStyleName("cw-RedText");
@@ -194,9 +189,8 @@
/**
* Update the formatted value based on the user entered value and pattern.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
private void updateFormattedValue() {
String sValue = valueBox.getText();
if (!sValue.equals("")) {
@@ -215,9 +209,8 @@
/**
* Update the selected pattern based on the pattern in the list.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
private void updatePattern() {
switch (patternList.getSelectedIndex()) {
case 0:
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
index f2260e6..3f86f43 100644
--- 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
@@ -19,7 +19,6 @@
/**
* Internationalized messages.
- * @gwt.RAW
*/
public interface ErrorMessages extends Messages {
String permissionDenied(String username, String securityClearance,
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
index ac1b86d..fc9f29b 100644
--- 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
@@ -13,5 +13,5 @@
# 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
index 272ab57..8111226 100644
--- 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
@@ -13,5 +13,5 @@
# 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
index 82fa2f4..015bb1f 100644
--- 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
@@ -13,5 +13,5 @@
# 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
index d0b2a4c..e479b39 100644
--- 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
@@ -13,5 +13,5 @@
# 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
index 0d6040c..f2e8e62 100644
--- 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
@@ -21,7 +21,6 @@
/**
* Internationalized constants used to demonstrate {@link Constants}.
- * @gwt.RAW
*/
public interface ExampleConstants extends Constants {
Map<String, String> colorMap();
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
index ffdafe9..6c9cc01 100644
--- 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
@@ -13,7 +13,6 @@
# License for the specific language governing permissions and limitations under
# the License.
#
-# @gwt.RAW
firstName = <b>First Name:</b>
lastName = <b>Last Name:</b>
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
index cfb33b3..fc705aa 100644
--- 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
@@ -13,7 +13,6 @@
# License for the specific language governing permissions and limitations under
# the License.
#
-# @gwt.RAW
firstName = <b>الاسم الأول:</b>
lastName = <b>الاسم الأخير:</b>
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
index aedc166..9ac2226 100644
--- 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
@@ -13,7 +13,6 @@
# License for the specific language governing permissions and limitations under
# the License.
#
-# @gwt.RAW
firstName = <b>Prénom:</b>
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
index adf4e4e..a8f8010 100644
--- 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
@@ -13,7 +13,6 @@
# License for the specific language governing permissions and limitations under
# the License.
#
-# @gwt.RAW
firstName = <b>名字:</b>
lastName = <b>去年名称:</b>
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
index 38aefb5..6e11a38 100644
--- 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
@@ -17,6 +17,9 @@
import com.google.gwt.i18n.client.Constants;
import com.google.gwt.sample.showcase.client.ContentWidget;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseData;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseSource;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseStyle;
import com.google.gwt.user.client.ui.ChangeListener;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.HorizontalPanel;
@@ -26,15 +29,13 @@
/**
* Example file.
- *
- * @gwt.CSS .gwt-ListBox
*/
+@ShowcaseStyle(".gwt-ListBox")
public class CwListBox extends ContentWidget {
/**
* The constants used in this Content Widget.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
public static interface CwConstants extends Constants,
ContentWidget.CwConstants {
String[] cwListBoxCategories();
@@ -54,9 +55,8 @@
/**
* The data for each type of list.
- *
- * @gwt.DATA
*/
+ @ShowcaseData
private static final String[] carTypes = {
"Acura", "Audi", "BMW", "Buick", "Chevrolet", "Dodge", "Ford", "Honda",
"KIA", "Lexus", "Lincoln", "Mercedes", "Porsche", "Saturn", "Toyota",
@@ -64,9 +64,8 @@
/**
* An instance of the constants.
- *
- * @gwt.DATA
*/
+ @ShowcaseData
private CwConstants constants;
/**
@@ -91,9 +90,8 @@
/**
* Initialize this example.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
@Override
public Widget onInitialize() {
// Create a panel to align the Widgets
@@ -145,8 +143,8 @@
*
* @param listBox the ListBox to add the options to
* @param category the category index
- * @gwt.SRC
*/
+ @ShowcaseSource
private void showCategory(ListBox listBox, int category) {
listBox.clear();
String[] listData = null;
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
index fcc45a7..34c48f8 100644
--- 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
@@ -17,6 +17,9 @@
import com.google.gwt.i18n.client.Constants;
import com.google.gwt.sample.showcase.client.ContentWidget;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseData;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseSource;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseStyle;
import com.google.gwt.user.client.Command;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.MenuBar;
@@ -25,18 +28,14 @@
/**
* Example file.
- *
- * @gwt.CSS .gwt-MenuBar
- * @gwt.CSS .gwt-MenuBarPopup
- * @gwt.CSS html>body .gwt-MenuBarPopup
- * @gwt.CSS * html .gwt-MenuBarPopup
*/
+@ShowcaseStyle({".gwt-MenuBar", ".gwt-MenuBarPopup", "html>body .gwt-MenuBarPopup",
+ "* html .gwt-MenuBarPopup"})
public class CwMenuBar extends ContentWidget {
/**
* The constants used in this Content Widget.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
public static interface CwConstants extends Constants,
ContentWidget.CwConstants {
String cwMenuBarDescription();
@@ -64,9 +63,8 @@
/**
* An instance of the constants.
- *
- * @gwt.DATA
*/
+ @ShowcaseData
private CwConstants constants;
/**
@@ -91,9 +89,8 @@
/**
* Initialize this example.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
@Override
public Widget onInitialize() {
// Create a command that will execute on menu item selection
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
index eb746f2..e0ba7a3 100644
--- 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
@@ -18,6 +18,9 @@
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.sample.showcase.client.ShowcaseAnnotations.ShowcaseData;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseSource;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseStyle;
import com.google.gwt.user.client.ui.AbstractImagePrototype;
import com.google.gwt.user.client.ui.CheckBox;
import com.google.gwt.user.client.ui.DecoratedStackPanel;
@@ -33,18 +36,14 @@
/**
* Example file.
- *
- * @gwt.CSS .gwt-DecoratedStackPanel
- * @gwt.CSS html>body .gwt-DecoratedStackPanel
- * @gwt.CSS * html .gwt-DecoratedStackPanel
- * @gwt.CSS .cw-StackPanelHeader
*/
+@ShowcaseStyle({".gwt-DecoratedStackPanel", "html>body .gwt-DecoratedStackPanel",
+ "* html .gwt-DecoratedStackPanel", ".cw-StackPanelHeader"})
public class CwStackPanel extends ContentWidget {
/**
* The constants used in this Content Widget.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
public static interface CwConstants extends Constants,
ContentWidget.CwConstants {
String[] cwStackPanelContacts();
@@ -70,9 +69,8 @@
* 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
*/
+ @ShowcaseSource
public interface Images extends TreeImages {
AbstractImagePrototype contactsgroup();
@@ -99,9 +97,8 @@
/**
* An instance of the constants.
- *
- * @gwt.DATA
*/
+ @ShowcaseData
private CwConstants constants;
/**
@@ -131,9 +128,8 @@
/**
* Initialize this example.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
@Override
public Widget onInitialize() {
// Get the images
@@ -189,8 +185,8 @@
* @param text the header text
* @param image the {@link AbstractImagePrototype} to add next to the header
* @return the header as a string
- * @gwt.SRC
*/
+ @ShowcaseSource
private String getHeaderString(String text, AbstractImagePrototype image) {
// Add the image and text to a horizontal panel
HorizontalPanel hPanel = new HorizontalPanel();
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
index 841f330..49a850f 100644
--- 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
@@ -17,6 +17,9 @@
import com.google.gwt.i18n.client.Constants;
import com.google.gwt.sample.showcase.client.ContentWidget;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseData;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseSource;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseStyle;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.MultiWordSuggestOracle;
import com.google.gwt.user.client.ui.SuggestBox;
@@ -25,18 +28,14 @@
/**
* Example file.
- *
- * @gwt.CSS .gwt-SuggestBox
- * @gwt.CSS .gwt-SuggestBoxPopup
- * @gwt.CSS html>body .gwt-SuggestBoxPopup
- * @gwt.CSS * html .gwt-SuggestBoxPopup
*/
+@ShowcaseStyle({".gwt-SuggestBox", ".gwt-SuggestBoxPopup",
+ "html>body .gwt-SuggestBoxPopup", "* html .gwt-SuggestBoxPopup"})
public class CwSuggestBox extends ContentWidget {
/**
* The constants used in this Content Widget.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
public static interface CwConstants extends Constants,
ContentWidget.CwConstants {
String cwSuggestBoxDescription();
@@ -50,9 +49,8 @@
/**
* An instance of the constants.
- *
- * @gwt.DATA
*/
+ @ShowcaseData
private CwConstants constants;
/**
@@ -77,9 +75,8 @@
/**
* Initialize this example.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
@Override
public Widget onInitialize() {
// Define the oracle that finds suggestions
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
index b21750e..b185c22 100644
--- 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
@@ -17,6 +17,9 @@
import com.google.gwt.i18n.client.Constants;
import com.google.gwt.sample.showcase.client.ContentWidget;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseData;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseSource;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseStyle;
import com.google.gwt.user.client.Random;
import com.google.gwt.user.client.ui.DecoratorPanel;
import com.google.gwt.user.client.ui.Grid;
@@ -29,15 +32,13 @@
/**
* Example file.
- *
- * @gwt.CSS .gwt-Tree
*/
+@ShowcaseStyle(".gwt-Tree")
public class CwTree extends ContentWidget {
/**
* The constants used in this Content Widget.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
public static interface CwConstants extends Constants,
ContentWidget.CwConstants {
String cwTreeDescription();
@@ -53,9 +54,8 @@
/**
* An instance of the constants.
- *
- * @gwt.DATA
*/
+ @ShowcaseData
private CwConstants constants;
/**
@@ -80,9 +80,8 @@
/**
* Initialize this example.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
@Override
public Widget onInitialize() {
// Create a static tree and a container to hold it
@@ -128,8 +127,8 @@
* node as it is clicked.
*
* @return the new tree
- * @gwt.SRC
*/
+ @ShowcaseSource
private Tree createDynamicTree() {
// Create a new tree
Tree dynamicTree = new Tree();
@@ -177,8 +176,8 @@
* Create a static tree with some data in it.
*
* @return the new tree
- * @gwt.SRC
*/
+ @ShowcaseSource
private Tree createStaticTree() {
// Create the tree
Tree staticTree = new Tree();
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
index 9dbdf25..73d6619 100644
--- 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
@@ -19,6 +19,8 @@
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.sample.showcase.client.ShowcaseAnnotations.ShowcaseData;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseSource;
import com.google.gwt.user.client.ui.AbsolutePanel;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.ClickListener;
@@ -35,9 +37,8 @@
public class CwAnimation extends ContentWidget {
/**
* The constants used in this Content Widget.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
public static interface CwConstants extends Constants,
ContentWidget.CwConstants {
String cwAnimationDescription();
@@ -48,9 +49,8 @@
/**
* A custom animation that moves a small image around a circle in an
* {@link AbsolutePanel}.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
public class CustomAnimation extends Animation {
/**
* The x-coordinate of the center of the circle.
@@ -112,65 +112,56 @@
/**
* The absolute panel used in the example.
- *
- * @gwt.DATA
*/
+ @ShowcaseData
private AbsolutePanel absolutePanel = null;
/**
* The widget that is being animated.
- *
- * @gwt.DATA
*/
+ @ShowcaseData
private Widget animateeBottom = null;
/**
* The widget that is being animated.
- *
- * @gwt.DATA
*/
+ @ShowcaseData
private Widget animateeLeft = null;
/**
* The widget that is being animated.
- *
- * @gwt.DATA
*/
+ @ShowcaseData
private Widget animateeRight = null;
/**
* The widget that is being animated.
- *
- * @gwt.DATA
*/
+ @ShowcaseData
private Widget animateeTop = null;
/**
* The instance of an animation.
- *
- * @gwt.DATA
*/
+ @ShowcaseData
private CustomAnimation animation = null;
/**
* The {@link Button} used to cancel the {@link Animation}.
- *
- * @gwt.DATA
*/
+ @ShowcaseData
private Button cancelButton = null;
/**
* An instance of the constants.
- *
- * @gwt.DATA
*/
+ @ShowcaseData
private CwConstants constants;
/**
* The {@link Button} used to start the {@link Animation}.
- *
- * @gwt.DATA
*/
+ @ShowcaseData
private Button startButton = null;
/**
@@ -200,9 +191,8 @@
/**
* Initialize this example.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
@Override
public Widget onInitialize() {
// Create a new panel
@@ -249,8 +239,8 @@
* it.
*
* @return the new options panel
- * @GWT.SRC
*/
+ @ShowcaseSource
private Widget createOptionsBar() {
// Create a panel to move components around
VerticalPanel optionsBar = new VerticalPanel();
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
index fbd4bdc..6ce4aff 100644
--- 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
@@ -17,6 +17,8 @@
import com.google.gwt.i18n.client.Constants;
import com.google.gwt.sample.showcase.client.ContentWidget;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseData;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseSource;
import com.google.gwt.user.client.Command;
import com.google.gwt.user.client.Cookies;
import com.google.gwt.user.client.DeferredCommand;
@@ -38,9 +40,8 @@
public class CwCookies extends ContentWidget {
/**
* The constants used in this Content Widget.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
public static interface CwConstants extends Constants,
ContentWidget.CwConstants {
String cwCookiesDeleteCookie();
@@ -62,37 +63,32 @@
/**
* The timeout before a cookie expires, in milliseconds. Current one year.
- *
- * @gwt.DATA
*/
+ @ShowcaseData
private static final int COOKIE_TIMOUT = 1000 * 60 * 60 * 24 * 365;
/**
* An instance of the constants.
- *
- * @gwt.DATA
*/
+ @ShowcaseData
private CwConstants constants;
/**
* A {@link TextBox} that holds the name of the cookie.
- *
- * @gwt.DATA
*/
+ @ShowcaseData
private TextBox cookieNameBox = null;
/**
* A {@link TextBox} that holds the value of the cookie.
- *
- * @gwt.DATA
*/
+ @ShowcaseData
private TextBox cookieValueBox = null;
/**
* The {@link ListBox} containing existing cookies.
- *
- * @gwt.DATA
*/
+ @ShowcaseData
private ListBox existingCookiesBox = null;
/**
@@ -122,9 +118,8 @@
/**
* Initialize this example.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
@Override
public Widget onInitialize() {
// Create the panel used to layout the content
@@ -196,8 +191,8 @@
* Refresh the list of existing cookies.
*
* @param selectedCookie the cookie to select by default
- * @gwt.SRC
*/
+ @ShowcaseSource
private void refreshExistingCookies(String selectedCookie) {
// Clear the existing cookies
existingCookiesBox.clear();
@@ -230,9 +225,8 @@
/**
* Retrieve the value of the existing cookie and put it into to value label.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
private void updateExstingCookie() {
// Cannot update if there are no items
if (existingCookiesBox.getItemCount() < 1) {
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
index a6964b4..b46826f 100644
--- 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
@@ -18,6 +18,8 @@
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.sample.showcase.client.ShowcaseAnnotations.ShowcaseData;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseSource;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.ClickListener;
import com.google.gwt.user.client.ui.Frame;
@@ -33,9 +35,8 @@
public class CwFrame extends ContentWidget {
/**
* The constants used in this Content Widget.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
public static interface CwConstants extends Constants,
ContentWidget.CwConstants {
String cwFrameDescription();
@@ -47,9 +48,8 @@
/**
* An instance of the constants.
- *
- * @gwt.DATA
*/
+ @ShowcaseData
private CwConstants constants;
/**
@@ -79,9 +79,8 @@
/**
* Initialize this example.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
@Override
public Widget onInitialize() {
// Create a new frame
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
index 28405f9..0428f7e 100644
--- 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
@@ -18,6 +18,8 @@
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.sample.showcase.client.ShowcaseAnnotations.ShowcaseData;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseSource;
import com.google.gwt.user.client.Command;
import com.google.gwt.user.client.DeferredCommand;
import com.google.gwt.user.client.ui.AbsolutePanel;
@@ -42,9 +44,8 @@
public class CwAbsolutePanel extends ContentWidget {
/**
* The constants used in this Content Widget.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
public static interface CwConstants extends Constants,
ContentWidget.CwConstants {
String cwAbsolutePanelClickMe();
@@ -71,38 +72,33 @@
/**
* An instance of the constants.
- *
- * @gwt.DATA
*/
+ @ShowcaseData
private CwConstants constants;
/**
* The input field used to set the left position of a {@link Widget}.
- *
- * @gwt.DATA
*/
+ @ShowcaseData
private TextBox leftPosBox = null;
/**
* The list box of items that can be repositioned.
- *
- * @gwt.DATA
*/
+ @ShowcaseData
private ListBox listBox = new ListBox();
/**
* The input field used to set the top position of a {@link Widget}.
- *
- * @gwt.DATA
*/
+ @ShowcaseData
private TextBox topPosBox = null;
/**
* A mapping between the name of a {@link Widget} and the widget in the
* {@link AbsolutePanel}.
- *
- * @gwt.DATA
*/
+ @ShowcaseData
private Map<String, Widget> widgetMap = null;
/**
@@ -132,9 +128,8 @@
/**
* Initialize this example.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
@Override
public Widget onInitialize() {
// Create a new panel
@@ -186,8 +181,8 @@
* it.
*
* @return the new options panel
- * @GWT.SRC
*/
+ @ShowcaseSource
private Widget createOptionsBar() {
// Create a panel to move components around
FlexTable optionsBar = new FlexTable();
@@ -234,9 +229,8 @@
/**
* Reposition an item when the user changes the value in the top or left
* position text boxes.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
private void repositionItem() {
// Use a DeferredCommand to allow the key to take effect in the browser
DeferredCommand.addCommand(new Command() {
@@ -261,9 +255,8 @@
/**
* Update the top and left position text fields when the user selects a new
* item to move.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
private void updateSelectedItem() {
String name = listBox.getValue(listBox.getSelectedIndex());
Widget item = widgetMap.get(name);
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
index 59f9f6d..0c29e80 100644
--- 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
@@ -17,6 +17,9 @@
import com.google.gwt.i18n.client.Constants;
import com.google.gwt.sample.showcase.client.ContentWidget;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseData;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseSource;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseStyle;
import com.google.gwt.user.client.ui.DecoratorPanel;
import com.google.gwt.user.client.ui.FlexTable;
import com.google.gwt.user.client.ui.HasHorizontalAlignment;
@@ -26,17 +29,13 @@
/**
* Example file.
- *
- * @gwt.CSS .gwt-DecoratorPanel
- * @gwt.CSS html>body .gwt-DecoratorPanel
- * @gwt.CSS * html .gwt-DecoratorPanel
*/
+@ShowcaseStyle({".gwt-DecoratorPanel", "html>body .gwt-DecoratorPanel", "* html .gwt-DecoratorPanel"})
public class CwDecoratorPanel extends ContentWidget {
/**
* The constants used in this Content Widget.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
public static interface CwConstants extends Constants,
ContentWidget.CwConstants {
String cwDecoratorPanelDescription();
@@ -46,9 +45,8 @@
/**
* An instance of the constants.
- *
- * @gwt.DATA
*/
+ @ShowcaseData
private CwConstants constants;
/**
@@ -73,9 +71,8 @@
/**
* Initialize this example.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
@Override
public Widget onInitialize() {
// Create a table to layout the form options
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
index 39a9880..0f89957 100644
--- 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
@@ -17,6 +17,9 @@
import com.google.gwt.i18n.client.Constants;
import com.google.gwt.sample.showcase.client.ContentWidget;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseData;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseSource;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseStyle;
import com.google.gwt.user.client.ui.DecoratorPanel;
import com.google.gwt.user.client.ui.DisclosurePanel;
import com.google.gwt.user.client.ui.FlexTable;
@@ -31,15 +34,13 @@
/**
* Example file.
- *
- * @gwt.CSS .gwt-DisclosurePanel
*/
+@ShowcaseStyle(".gwt-DisclosurePanel")
public class CwDisclosurePanel extends ContentWidget {
/**
* The constants used in this Content Widget.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
public static interface CwConstants extends Constants,
ContentWidget.CwConstants {
String cwDisclosurePanelDescription();
@@ -63,9 +64,8 @@
/**
* An instance of the constants.
- *
- * @gwt.DATA
*/
+ @ShowcaseData
private CwConstants constants;
/**
@@ -90,9 +90,8 @@
/**
* Initialize this example.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
@Override
public Widget onInitialize() {
// Add the disclosure panels to a panel
@@ -106,9 +105,8 @@
/**
* Create a form that contains undisclosed advanced options.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
private Widget createAdvancedForm() {
// Create a table to layout the form options
FlexTable layout = new FlexTable();
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
index 86b538f..b2f5ba1 100644
--- 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
@@ -17,6 +17,9 @@
import com.google.gwt.i18n.client.Constants;
import com.google.gwt.sample.showcase.client.ContentWidget;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseData;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseSource;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseStyle;
import com.google.gwt.user.client.ui.DockPanel;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.ScrollPanel;
@@ -24,15 +27,13 @@
/**
* Example file.
- *
- * @gwt.CSS .cw-DockPanel
*/
+@ShowcaseStyle(".cw-DockPanel")
public class CwDockPanel extends ContentWidget {
/**
* The constants used in this Content Widget.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
public static interface CwConstants extends Constants,
ContentWidget.CwConstants {
@@ -57,9 +58,8 @@
/**
* An instance of the constants.
- *
- * @gwt.DATA
*/
+ @ShowcaseData
private CwConstants constants;
/**
@@ -84,9 +84,8 @@
/**
* Initialize this example.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
@Override
public Widget onInitialize() {
// Create a Dock Panel
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
index fe0a5ad..84b17fa 100644
--- 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
@@ -17,21 +17,22 @@
import com.google.gwt.i18n.client.Constants;
import com.google.gwt.sample.showcase.client.ContentWidget;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseData;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseSource;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseStyle;
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
*/
+@ShowcaseStyle(".cw-FlowPanel-checkBox")
public class CwFlowPanel extends ContentWidget {
/**
* The constants used in this Content Widget.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
public static interface CwConstants extends Constants,
ContentWidget.CwConstants {
String cwFlowPanelDescription();
@@ -43,9 +44,8 @@
/**
* An instance of the constants.
- *
- * @gwt.DATA
*/
+ @ShowcaseData
private CwConstants constants;
/**
@@ -70,9 +70,8 @@
/**
* Initialize this example.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
@Override
public Widget onInitialize() {
// Create a Flow Panel
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
index c9a27b1..c6abae3 100644
--- 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
@@ -17,6 +17,8 @@
import com.google.gwt.i18n.client.Constants;
import com.google.gwt.sample.showcase.client.ContentWidget;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseData;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseSource;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.Widget;
@@ -27,9 +29,8 @@
public class CwHorizontalPanel extends ContentWidget {
/**
* The constants used in this Content Widget.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
public static interface CwConstants extends Constants,
ContentWidget.CwConstants {
String cwHorizontalPanelButton();
@@ -41,9 +42,8 @@
/**
* An instance of the constants.
- *
- * @gwt.DATA
*/
+ @ShowcaseData
private CwConstants constants;
/**
@@ -73,9 +73,8 @@
/**
* Initialize this example.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
@Override
public Widget onInitialize() {
// Create a Horizontal Panel
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
index abb68e5..1fc379b 100644
--- 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
@@ -17,6 +17,9 @@
import com.google.gwt.i18n.client.Constants;
import com.google.gwt.sample.showcase.client.ContentWidget;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseData;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseSource;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseStyle;
import com.google.gwt.user.client.ui.DecoratorPanel;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.HorizontalSplitPanel;
@@ -24,15 +27,13 @@
/**
* Example file.
- *
- * @gwt.CSS .gwt-HorizontalSplitPanel
*/
+@ShowcaseStyle(".gwt-HorizontalSplitPanel")
public class CwHorizontalSplitPanel extends ContentWidget {
/**
* The constants used in this Content Widget.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
public static interface CwConstants extends Constants,
ContentWidget.CwConstants {
String cwHorizontalSplitPanelDescription();
@@ -44,9 +45,8 @@
/**
* An instance of the constants.
- *
- * @gwt.DATA
*/
+ @ShowcaseData
private CwConstants constants;
/**
@@ -71,9 +71,8 @@
/**
* Initialize this example.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
@Override
public Widget onInitialize() {
// Create a Horizontal Split Panel
@@ -93,7 +92,7 @@
// 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
index 10b4647..be505a5 100644
--- 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
@@ -18,6 +18,9 @@
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.sample.showcase.client.ShowcaseAnnotations.ShowcaseData;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseSource;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseStyle;
import com.google.gwt.user.client.ui.DecoratedTabPanel;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.VerticalPanel;
@@ -25,18 +28,14 @@
/**
* Example file.
- *
- * @gwt.CSS .gwt-DecoratedTabBar
- * @gwt.CSS html>body .gwt-DecoratedTabBar
- * @gwt.CSS * html .gwt-DecoratedTabBar
- * @gwt.CSS .gwt-TabPanel
*/
+@ShowcaseStyle({".gwt-DecoratedTabBar", "html>body .gwt-DecoratedTabBar",
+ "* html .gwt-DecoratedTabBar", ".gwt-TabPanel"})
public class CwTabPanel extends ContentWidget {
/**
* The constants used in this Content Widget.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
public static interface CwConstants extends Constants,
ContentWidget.CwConstants {
String cwTabPanelDescription();
@@ -52,9 +51,8 @@
/**
* An instance of the constants.
- *
- * @gwt.DATA
*/
+ @ShowcaseData
private CwConstants constants;
/**
@@ -79,9 +77,8 @@
/**
* Initialize this example.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
@Override
public Widget onInitialize() {
// Create a tab panel
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
index e956037..dd9ea5f 100644
--- 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
@@ -17,6 +17,8 @@
import com.google.gwt.i18n.client.Constants;
import com.google.gwt.sample.showcase.client.ContentWidget;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseData;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseSource;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.Widget;
@@ -27,9 +29,8 @@
public class CwVerticalPanel extends ContentWidget {
/**
* The constants used in this Content Widget.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
public static interface CwConstants extends Constants,
ContentWidget.CwConstants {
String cwVerticalPanelButton();
@@ -41,9 +42,8 @@
/**
* An instance of the constants.
- *
- * @gwt.DATA
*/
+ @ShowcaseData
private CwConstants constants;
/**
@@ -73,9 +73,8 @@
/**
* Initialize this example.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
@Override
public Widget onInitialize() {
// Create a Vertical Panel
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
index 3646d7d..d7d0198 100644
--- 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
@@ -17,6 +17,9 @@
import com.google.gwt.i18n.client.Constants;
import com.google.gwt.sample.showcase.client.ContentWidget;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseData;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseSource;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseStyle;
import com.google.gwt.user.client.ui.DecoratorPanel;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.VerticalSplitPanel;
@@ -24,15 +27,13 @@
/**
* Example file.
- *
- * @gwt.CSS .gwt-VerticalSplitPanel
*/
+@ShowcaseStyle(".gwt-VerticalSplitPanel")
public class CwVerticalSplitPanel extends ContentWidget {
/**
* The constants used in this Content Widget.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
public static interface CwConstants extends Constants,
ContentWidget.CwConstants {
String cwVerticalSplitPanelDescription();
@@ -44,9 +45,8 @@
/**
* An instance of the constants.
- *
- * @gwt.DATA
*/
+ @ShowcaseData
private CwConstants constants;
/**
@@ -71,9 +71,8 @@
/**
* Initialize this example.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
@Override
public Widget onInitialize() {
// Create a Vertical Split Panel
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
index a2d4d9f..f9d0df9 100644
--- 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
@@ -18,6 +18,9 @@
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.sample.showcase.client.ShowcaseAnnotations.ShowcaseData;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseSource;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseStyle;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.ClickListener;
import com.google.gwt.user.client.ui.DecoratedPopupPanel;
@@ -29,20 +32,16 @@
/**
* Example file.
- *
- * @gwt.CSS .gwt-PopupPanel
- * @gwt.CSS html>body .gwt-PopupPanel
- * @gwt.CSS * html .gwt-PopupPanel
- * @gwt.CSS .gwt-DecoratedPopupPanel
- * @gwt.CSS html>body .gwt-DecoratedPopupPanel
- * @gwt.CSS * html .gwt-DecoratedPopupPanel
*/
+@ShowcaseStyle({
+ ".gwt-PopupPanel", "html>body .gwt-PopupPanel", "* html .gwt-PopupPanel",
+ ".gwt-DecoratedPopupPanel", "html>body .gwt-DecoratedPopupPanel",
+ "* html .gwt-DecoratedPopupPanel"})
public class CwBasicPopup extends ContentWidget {
/**
* The constants used in this Content Widget.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
public static interface CwConstants extends Constants,
ContentWidget.CwConstants {
String cwBasicPopupClickOutsideInstructions();
@@ -58,9 +57,8 @@
/**
* An instance of the constants.
- *
- * @gwt.DATA
*/
+ @ShowcaseData
private CwConstants constants;
/**
@@ -85,9 +83,8 @@
/**
* Initialize this example.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
@Override
public Widget onInitialize() {
// Create a basic popup widget
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
index 1a8d27f..668aade 100644
--- 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
@@ -18,6 +18,9 @@
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.sample.showcase.client.ShowcaseAnnotations.ShowcaseData;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseSource;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseStyle;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.CheckBox;
import com.google.gwt.user.client.ui.ClickListener;
@@ -31,18 +34,14 @@
/**
* Example file.
- *
- * @gwt.CSS .gwt-DialogBox
- * @gwt.CSS html>body .gwt-DialogBox
- * @gwt.CSS * html .gwt-DialogBox
- * @gwt.CSS .cw-DialogBox
*/
+@ShowcaseStyle({".gwt-DialogBox", "html>body .gwt-DialogBox", "* html .gwt-DialogBox",
+ ".cw-DialogBox"})
public class CwDialogBox extends ContentWidget {
/**
* The constants used in this Content Widget.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
public static interface CwConstants extends Constants,
ContentWidget.CwConstants {
String cwDialogBoxCaption();
@@ -66,9 +65,8 @@
/**
* An instance of the constants.
- *
- * @gwt.DATA
*/
+ @ShowcaseData
private CwConstants constants;
/**
@@ -93,9 +91,8 @@
/**
* Initialize this example.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
@Override
public Widget onInitialize() {
// Create the dialog box
@@ -136,8 +133,8 @@
* Create the dialog box for this example.
*
* @return the new dialog box
- * @gwt.SRC
*/
+ @ShowcaseSource
private DialogBox createDialogBox() {
// Create a dialog box and set the caption text
final DialogBox dialogBox = new 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
index 9085184..4cb08d3 100644
--- 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
@@ -18,6 +18,9 @@
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.sample.showcase.client.ShowcaseAnnotations.ShowcaseData;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseSource;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseStyle;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.ClickListener;
import com.google.gwt.user.client.ui.FlexTable;
@@ -29,15 +32,13 @@
/**
* Example file.
- *
- * @gwt.CSS .cw-FlexTable
*/
+@ShowcaseStyle(".cw-FlexTable")
public class CwFlexTable extends ContentWidget {
/**
* The constants used in this Content Widget.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
public static interface CwConstants extends Constants,
ContentWidget.CwConstants {
String cwFlexTableAddRow();
@@ -53,9 +54,8 @@
/**
* An instance of the constants.
- *
- * @gwt.DATA
*/
+ @ShowcaseData
private CwConstants constants;
/**
@@ -80,9 +80,8 @@
/**
* Initialize this example.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
@Override
public Widget onInitialize() {
// Create a Flex Table
@@ -130,9 +129,8 @@
/**
* Add a row to the flex table.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
private void addRow(FlexTable flexTable) {
int numRows = flexTable.getRowCount();
flexTable.setWidget(numRows, 0, Showcase.images.gwtLogo().createImage());
@@ -142,9 +140,8 @@
/**
* Remove a row from the flex table.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
private void removeRow(FlexTable flexTable) {
int numRows = flexTable.getRowCount();
if (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
index 77bfa5a..85df366 100644
--- 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
@@ -18,6 +18,8 @@
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.sample.showcase.client.ShowcaseAnnotations.ShowcaseData;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseSource;
import com.google.gwt.user.client.ui.Grid;
import com.google.gwt.user.client.ui.Widget;
@@ -27,9 +29,8 @@
public class CwGrid extends ContentWidget {
/**
* The constants used in this Content Widget.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
public static interface CwConstants extends Constants,
ContentWidget.CwConstants {
String cwGridDescription();
@@ -39,9 +40,8 @@
/**
* An instance of the constants.
- *
- * @gwt.DATA
*/
+ @ShowcaseData
private CwConstants constants;
/**
@@ -71,9 +71,8 @@
/**
* Initialize this example.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
@Override
public Widget onInitialize() {
// Create a 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
index 0eef7d5..dd58750 100644
--- 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
@@ -17,6 +17,9 @@
import com.google.gwt.i18n.client.Constants;
import com.google.gwt.sample.showcase.client.ContentWidget;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseData;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseSource;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseStyle;
import com.google.gwt.user.client.ui.ClickListener;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.HorizontalPanel;
@@ -31,17 +34,13 @@
/**
* Example file.
- *
- * @gwt.CSS .gwt-TextBox
- * @gwt.CSS .gwt-PasswordTextBox
- * @gwt.CSS .gwt-TextArea
*/
+@ShowcaseStyle({".gwt-TextBox", ".gwt-PasswordTextBox", ".gwt-TextArea"})
public class CwBasicText extends ContentWidget {
/**
* The constants used in this Content Widget.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
public static interface CwConstants extends Constants,
ContentWidget.CwConstants {
String cwBasicTextAreaLabel();
@@ -61,9 +60,8 @@
/**
* An instance of the constants.
- *
- * @gwt.DATA
*/
+ @ShowcaseData
private CwConstants constants;
/**
@@ -88,9 +86,8 @@
/**
* Initialize this example.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
@Override
public Widget onInitialize() {
// Create a panel to layout the widgets
@@ -136,8 +133,8 @@
* @param textBox the text box to listen to
* @param addSelection add listeners to update label
* @return the Label that will be updated
- * @gwt.SRC
*/
+ @ShowcaseSource
private HorizontalPanel createTextExample(final TextBoxBase textBox,
boolean addSelection) {
// Add the text box and label to a panel
@@ -178,8 +175,8 @@
*
* @param textBox the text box
* @param label the label to update
- * @gwt.SRC
*/
+ @ShowcaseSource
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
index 3c7e00d..f582285 100644
--- 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
@@ -17,24 +17,23 @@
import com.google.gwt.i18n.client.Constants;
import com.google.gwt.sample.showcase.client.ContentWidget;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseData;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseSource;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseStyle;
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
*/
+@ShowcaseStyle({".gwt-RichTextArea", ".hasRichTextToolbar", ".gwt-RichTextToolbar",
+ ".cw-RichText"})
public class CwRichText extends ContentWidget {
/**
* The constants used in this Content Widget.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
public static interface CwConstants extends Constants,
ContentWidget.CwConstants {
String cwRichTextDescription();
@@ -44,9 +43,8 @@
/**
* An instance of the constants.
- *
- * @gwt.DATA
*/
+ @ShowcaseData
private CwConstants constants;
/**
@@ -71,9 +69,8 @@
/**
* Initialize this example.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
@Override
public Widget onInitialize() {
// Create the text area and toolbar
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
index 8baf61b..8e38535 100644
--- 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
@@ -17,6 +17,9 @@
import com.google.gwt.i18n.client.Constants;
import com.google.gwt.sample.showcase.client.ContentWidget;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseData;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseSource;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseStyle;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.ClickListener;
@@ -25,15 +28,13 @@
/**
* Example file.
- *
- * @gwt.CSS .gwt-Button
*/
+@ShowcaseStyle(".gwt-Button")
public class CwBasicButton extends ContentWidget {
/**
* The constants used in this Content Widget.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
public static interface CwConstants extends Constants,
ContentWidget.CwConstants {
String cwBasicButtonClickMessage();
@@ -49,9 +50,8 @@
/**
* An instance of the constants.
- *
- * @gwt.DATA
*/
+ @ShowcaseData
private CwConstants constants;
/**
@@ -76,9 +76,8 @@
/**
* Initialize this example.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
@Override
public Widget onInitialize() {
// Create a panel to align the widgets
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
index fb06977..a08369d 100644
--- 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
@@ -17,6 +17,9 @@
import com.google.gwt.i18n.client.Constants;
import com.google.gwt.sample.showcase.client.ContentWidget;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseData;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseSource;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseStyle;
import com.google.gwt.user.client.ui.CheckBox;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.VerticalPanel;
@@ -24,15 +27,13 @@
/**
* Example file.
- *
- * @gwt.CSS .gwt-CheckBox
*/
+@ShowcaseStyle(".gwt-CheckBox")
public class CwCheckBox extends ContentWidget {
/**
* The constants used in this Content Widget.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
public static interface CwConstants extends Constants,
ContentWidget.CwConstants {
String cwCheckBoxCheckAll();
@@ -50,9 +51,8 @@
/**
* An instance of the constants.
- *
- * @gwt.DATA
*/
+ @ShowcaseData
private CwConstants constants;
/**
@@ -77,9 +77,8 @@
/**
* Initialize this example.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
@Override
public Widget onInitialize() {
// Create a vertical panel to align the check boxes
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
index b53219c..a28673a 100644
--- 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
@@ -18,6 +18,9 @@
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.sample.showcase.client.ShowcaseAnnotations.ShowcaseData;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseSource;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseStyle;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.KeyboardListenerAdapter;
@@ -28,16 +31,13 @@
/**
* Example file.
- *
- * @gwt.CSS .gwt-PushButton
- * @gwt.CSS .gwt-ToggleButton
*/
+@ShowcaseStyle({".gwt-PushButton", ".gwt-ToggleButton"})
public class CwCustomButton extends ContentWidget {
/**
* The constants used in this Content Widget.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
public static interface CwConstants extends Constants,
ContentWidget.CwConstants {
String cwCustomButtonDescription();
@@ -51,9 +51,8 @@
/**
* An instance of the constants.
- *
- * @gwt.DATA
*/
+ @ShowcaseData
private CwConstants constants;
/**
@@ -78,9 +77,8 @@
/**
* Initialize this example.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
@Override
public Widget onInitialize() {
// Create a panel to layout the widgets
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
index 7a893e8..cbf855a 100644
--- 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
@@ -17,6 +17,9 @@
import com.google.gwt.i18n.client.Constants;
import com.google.gwt.sample.showcase.client.ContentWidget;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseData;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseSource;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseStyle;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.ClickListener;
@@ -27,15 +30,13 @@
/**
* Example file.
- *
- * @gwt.CSS .gwt-FileUpload
*/
+@ShowcaseStyle(".gwt-FileUpload")
public class CwFileUpload extends ContentWidget {
/**
* The constants used in this Content Widget.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
public static interface CwConstants extends Constants,
ContentWidget.CwConstants {
String cwFileUploadButton();
@@ -53,9 +54,8 @@
/**
* An instance of the constants.
- *
- * @gwt.DATA
*/
+ @ShowcaseData
private CwConstants constants;
/**
@@ -80,9 +80,8 @@
/**
* Initialize this example.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
@Override
public Widget onInitialize() {
// Create a vertical panel to align the content
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
index a94d1d3..5999895 100644
--- 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
@@ -18,6 +18,9 @@
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.sample.showcase.client.ShowcaseAnnotations.ShowcaseData;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseSource;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseStyle;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.Hyperlink;
import com.google.gwt.user.client.ui.VerticalPanel;
@@ -25,15 +28,13 @@
/**
* Example file.
- *
- * @gwt.CSS .gwt-Hyperlink
*/
+@ShowcaseStyle(".gwt-Hyperlink")
public class CwHyperlink extends ContentWidget {
/**
* The constants used in this Content Widget.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
public static interface CwConstants extends Constants,
ContentWidget.CwConstants {
String cwHyperlinkChoose();
@@ -45,9 +46,8 @@
/**
* An instance of the constants.
- *
- * @gwt.DATA
*/
+ @ShowcaseData
private CwConstants constants;
/**
@@ -72,9 +72,8 @@
/**
* Initialize this example.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
@Override
public Widget onInitialize() {
// Add a label
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
index ae91525..a96d33c 100644
--- 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
@@ -17,6 +17,9 @@
import com.google.gwt.i18n.client.Constants;
import com.google.gwt.sample.showcase.client.ContentWidget;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseData;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseSource;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseStyle;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.RadioButton;
import com.google.gwt.user.client.ui.VerticalPanel;
@@ -24,15 +27,13 @@
/**
* Example file.
- *
- * @gwt.CSS .gwt-RadioButton
*/
+@ShowcaseStyle(".gwt-RadioButton")
public class CwRadioButton extends ContentWidget {
/**
* The constants used in this Content Widget.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
public static interface CwConstants extends Constants,
ContentWidget.CwConstants {
String[] cwRadioButtonColors();
@@ -50,9 +51,8 @@
/**
* An instance of the constants.
- *
- * @gwt.DATA
*/
+ @ShowcaseData
private CwConstants constants;
/**
@@ -77,9 +77,8 @@
/**
* Initialize this example.
- *
- * @gwt.SRC
*/
+ @ShowcaseSource
@Override
public Widget onInitialize() {
// Create a vertical panel to align the radio buttons
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
index 960e5b9..0375787 100644
--- a/samples/showcase/src/com/google/gwt/sample/showcase/generator/ShowcaseGenerator.java
+++ b/samples/showcase/src/com/google/gwt/sample/showcase/generator/ShowcaseGenerator.java
@@ -15,243 +15,139 @@
*/
package com.google.gwt.sample.showcase.generator;
+import com.google.gwt.core.ext.Generator;
+import com.google.gwt.core.ext.GeneratorContext;
+import com.google.gwt.core.ext.TreeLogger;
+import com.google.gwt.core.ext.UnableToCompleteException;
+import com.google.gwt.core.ext.typeinfo.JClassType;
+import com.google.gwt.core.ext.typeinfo.NotFoundException;
+import com.google.gwt.sample.showcase.client.ContentWidget;
+import com.google.gwt.sample.showcase.client.ShowcaseConstants;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseData;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseRaw;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseSource;
+import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseStyle;
+
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.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
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.
+ * Generate the source code, css styles, and raw source used in the Showcase
+ * examples.
*/
-public class ShowcaseGenerator {
+public class ShowcaseGenerator extends Generator {
/**
- * The names of the CSS files to parse.
+ * The paths to the CSS style sheets used in Showcase. The paths are relative
+ * to the root path of the {@link ClassLoader}. The variable $THEME will be
+ * replaced by the current theme. An extension of "_rtl.css" will be used for
+ * RTL mode.
*/
- private static final String[] CSS_FILES = {"GWT.css", "Showcase.css"};
+ private static final String[] SRC_CSS = {
+ "com/google/gwt/user/public/$THEME/GWT.css",
+ "com/google/gwt/sample/showcase/public/$THEME/Showcase.css"};
/**
- * The root of all files.
+ * The class loader used to get resources.
*/
- private static final String FILE_ROOT = "../../../samples/showcase/src/";
+ private ClassLoader classLoader = null;
/**
- * The destination folder for raw files.
+ * The generator context.
*/
- private static final String DST_RAW = FILE_ROOT
- + "com/google/gwt/sample/showcase/public/raw/";
+ private GeneratorContext context = null;
/**
- * The destination folder for parsed source code.
+ * The {@link TreeLogger} used to log messages.
*/
- private static final String DST_SOURCE = FILE_ROOT
- + "com/google/gwt/sample/showcase/public/source/";
+ private TreeLogger logger = null;
- /**
- * The destination folder for parse style code.
- */
- private static final String DST_STYLE = FILE_ROOT
- + "com/google/gwt/sample/showcase/public/style/";
+ @Override
+ public String generate(TreeLogger logger, GeneratorContext context,
+ String typeName) throws UnableToCompleteException {
+ this.logger = logger;
+ this.context = context;
+ this.classLoader = getClass().getClassLoader();
- /**
- * The root of content widget files.
- */
- private static final String SRC_CONTENT = FILE_ROOT
- + "com/google/gwt/sample/showcase/client/content/";
+ // Only generate files on the first permutation
+ if (!isFirstPass()) {
+ return null;
+ }
- /**
- * The path to the folder containing all CSS style sheets.
- */
- private static final String SRC_CSS = FILE_ROOT
- + "com/google/gwt/sample/showcase/public/default/";
-
- /**
- * 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";
- BufferedReader br = null;
+ // Get the Showcase ContentWidget subtypes to examine
+ JClassType cwType = 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) {
- }
+ cwType = context.getTypeOracle().getType(ContentWidget.class.getName());
+ } catch (NotFoundException e) {
+ logger.log(TreeLogger.ERROR, "Cannot find ContentWidget class", e);
+ throw new UnableToCompleteException();
+ }
+ JClassType[] types = cwType.getSubtypes();
+
+ // Generate the source and raw source files
+ for (JClassType type : types) {
+ generateRawFiles(type);
+ generateSourceFiles(type);
+ }
+
+ // Generate the CSS source files
+ for (String theme : ShowcaseConstants.STYLE_THEMES) {
+ String styleDefsLTR = getStyleDefinitions(theme, false);
+ String styleDefsRTL = getStyleDefinitions(theme, true);
+ String outDirLTR = ShowcaseConstants.DST_SOURCE_STYLE + theme + "/";
+ String outDirRTL = ShowcaseConstants.DST_SOURCE_STYLE + theme + "_rtl/";
+ for (JClassType type : types) {
+ generateStyleFiles(type, styleDefsLTR, outDirLTR);
+ generateStyleFiles(type, styleDefsRTL, outDirRTL);
}
}
- // 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);
- }
- }
+ return null;
}
/**
- * 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.
+ * Set the full contents of a resource in the public directory.
*
- * @param path the path to the folder
+ * @param partialPath the path to the file relative to the public directory
+ * @param contents the file contents
*/
- 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();
- }
+ private void createPublicResource(String partialPath, String contents) {
+ try {
+ OutputStream outStream = context.tryCreateResource(logger, partialPath);
+ outStream.write(contents.getBytes());
+ context.commitResource(logger, outStream);
+ } catch (UnableToCompleteException e) {
+ logger.log(TreeLogger.ERROR, "Failed while writing", e);
+ } catch (IOException e) {
+ logger.log(TreeLogger.ERROR, "Failed while writing", e);
}
}
/**
- * Recursively iterate the files in a directory and generate the source code
- * for each.
+ * Generate the raw files used by a {@link ContentWidget}.
+ *
+ * @param type the {@link ContentWidget} subclass
*/
- private static void generateRawFiles(File root) {
- if (root.isDirectory()) {
- // Recurse the directory
- File[] subFiles = root.listFiles();
- for (int i = 0; i < subFiles.length; i++) {
- if (!subFiles[i].getName().equals(".svn")) {
- generateRawFiles(subFiles[i]);
- }
- }
- } else if (root.isFile()) {
- String fileContents = getFileContents(root);
- int rawTagIndex = fileContents.indexOf(TAG_RAW);
- if (fileContents == "" || rawTagIndex < 0) {
- return;
- }
+ private void generateRawFiles(JClassType type)
+ throws UnableToCompleteException {
+ // Look for annotation
+ if (!type.isAnnotationPresent(ShowcaseRaw.class)) {
+ 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);
+ // Get the package info
+ String pkgName = type.getPackage().getName();
+ String pkgPath = pkgName.replace('.', '/') + "/";
+
+ // Generate each raw source file
+ String[] filenames = type.getAnnotation(ShowcaseRaw.class).value();
+ for (String filename : filenames) {
+ // Get the file contents
+ String fileContents = getResourceContents(pkgPath + filename);
// Make the source pretty
fileContents = fileContents.replace("<", "<");
@@ -259,185 +155,152 @@
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);
+ // Save the raw source in the public directory
+ String dstPath = ShowcaseConstants.DST_SOURCE_RAW + pkgName + "."
+ + filename + ".html";
+ createPublicResource(dstPath, fileContents);
}
}
/**
- * Recursively iterate the files in a directory and generate the source code
- * for each.
+ * Generate the formatted source code for a {@link ContentWidget}.
+ *
+ * @param type the {@link ContentWidget} subclass
*/
- 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;
- }
+ private void generateSourceFiles(JClassType type)
+ throws UnableToCompleteException {
+ // Get the file contents
+ String filename = type.getQualifiedSourceName().replace('.', '/') + ".java";
+ String fileContents = getResourceContents(filename);
- // 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;
+ // Get each data code block
+ String formattedSource = "";
+ String dataTag = "@" + ShowcaseData.class.getSimpleName();
+ String sourceTag = "@" + ShowcaseSource.class.getSimpleName();
+ int dataTagIndex = fileContents.indexOf(dataTag);
+ int srcTagIndex = fileContents.indexOf(sourceTag);
+ 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);
+ // Add to the formatted source
+ String srcData = fileContents.substring(beginIndex, beginTagIndex)
+ + fileContents.substring(endTagIndex, endIndex);
+ formattedSource += srcData + "\n\n";
// Get next tag
- tagIndex = fileContents.indexOf(TAG_CSS, tagIndex + 1);
+ dataTagIndex = fileContents.indexOf(dataTag, 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(sourceTag, endIndex + 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);
}
+
+ // 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 dstPath = ShowcaseConstants.DST_SOURCE_EXAMPLE
+ + type.getQualifiedSourceName() + ".html";
+ createPublicResource(dstPath, formattedSource);
}
/**
- * Get the full contents of a file.
+ * Generate the styles used by a {@link ContentWidget}.
*
- * @param file the file
- * @return the contents of the file
+ * @param type the {@link ContentWidget} subclass
+ * @param styleDefs the concatenated style definitions
+ * @param outDir the output directory
*/
- private static String getFileContents(File file) {
- String filename = file.getPath();
+ private void generateStyleFiles(JClassType type, String styleDefs,
+ String outDir) {
+ // Look for annotation
+ if (!type.isAnnotationPresent(ShowcaseStyle.class)) {
+ return;
+ }
+
+ // Generate a style file for each theme/RTL mode pair
+ String[] prefixes = type.getAnnotation(ShowcaseStyle.class).value();
+ Map<String, String> matched = new LinkedHashMap<String, String>();
+ for (String prefix : prefixes) {
+ // Get the start location of the style code in the source file
+ boolean foundStyle = false;
+ int start = styleDefs.indexOf("\n" + prefix);
+ while (start >= 0) {
+ // Get the cssContents string name pattern
+ int end = styleDefs.indexOf("{", start);
+ String matchedName = styleDefs.substring(start, end).trim();
+
+ // Get the style code
+ end = styleDefs.indexOf("}", start) + 1;
+ String styleDef = "<pre>" + styleDefs.substring(start, end) + "</pre>";
+ matched.put(matchedName, styleDef);
+
+ // Goto the next match
+ foundStyle = true;
+ start = styleDefs.indexOf("\n" + prefix, end);
+ }
+
+ // No style exists
+ if (!foundStyle) {
+ matched.put(prefix, "<pre>" + prefix + " {\n}</pre>");
+ }
+ }
+
+ // Combine all of the styles into one formatted string
+ String formattedStyle = "";
+ for (String styleDef : matched.values()) {
+ formattedStyle += styleDef;
+ }
+
+ // Save the raw source in the public directory
+ String dstPath = outDir + type.getQualifiedSourceName() + ".html";
+ createPublicResource(dstPath, formattedStyle);
+ }
+
+ /**
+ * Get the full contents of a resource.
+ *
+ * @param path the path to the resource
+ * @return the contents of the resource
+ */
+ private String getResourceContents(String path)
+ throws UnableToCompleteException {
+ InputStream in = classLoader.getResourceAsStream(path);
+ if (in == null) {
+ logger.log(TreeLogger.ERROR, "Resource not found");
+ throw new UnableToCompleteException();
+ }
+
StringBuffer fileContentsBuf = new StringBuffer();
BufferedReader br = null;
try {
- br = new BufferedReader(new FileReader(filename));
+ br = new BufferedReader(new InputStreamReader(in));
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);
+ logger.log(TreeLogger.ERROR, "Cannot read resource", e);
+ throw new UnableToCompleteException();
} finally {
if (br != null) {
try {
@@ -452,49 +315,45 @@
}
/**
- * Verifies that the {@link File} is of the correct type.
+ * Load the contents of all CSS files used in the Showcase for a given
+ * theme/RTL mode, concatenated into one string.
*
- * @param file the {@link File} to check
- * @param filetype the file type, without the .
- * @return true if file type is correct
+ * @param theme the style theme
+ * @param isRTL true if RTL mode
+ * @return the concatenated styles
*/
- 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) {
- }
+ private String getStyleDefinitions(String theme, boolean isRTL)
+ throws UnableToCompleteException {
+ String cssContents = "";
+ for (String path : SRC_CSS) {
+ path = path.replace("$THEME", theme);
+ if (isRTL) {
+ path = path.replace(".css", "_rtl.css");
}
+ cssContents += getResourceContents(path) + "\n\n";
}
+ return cssContents;
+ }
+
+ /**
+ * Ensure that we only generate files once by creating a placeholder file,
+ * then looking for it on subsequent generates.
+ *
+ * @return true if this is the first pass, false if not
+ */
+ private boolean isFirstPass() {
+ String placeholder = ShowcaseConstants.DST_SOURCE + "generated";
+ try {
+ OutputStream outStream = context.tryCreateResource(logger, placeholder);
+ if (outStream == null) {
+ return false;
+ } else {
+ context.commitResource(logger, outStream);
+ }
+ } catch (UnableToCompleteException e) {
+ logger.log(TreeLogger.ERROR, "Unable to generate", e);
+ return false;
+ }
+ return true;
}
}
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
deleted file mode 100644
index 83cf674..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/raw/com.google.gwt.sample.showcase.client.content.i18n.ColorConstants.java.html
+++ /dev/null
@@ -1,41 +0,0 @@
-<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
deleted file mode 100644
index 023a817..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/raw/com.google.gwt.sample.showcase.client.content.i18n.ColorConstants.properties.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<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
deleted file mode 100644
index 8f099b0..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/raw/com.google.gwt.sample.showcase.client.content.i18n.ColorConstants_ar.properties.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<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
deleted file mode 100644
index 6199d86..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/raw/com.google.gwt.sample.showcase.client.content.i18n.ColorConstants_fr.properties.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<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
deleted file mode 100644
index 453d6e1..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/raw/com.google.gwt.sample.showcase.client.content.i18n.ColorConstants_zh.properties.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<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
deleted file mode 100644
index d7cd190..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/raw/com.google.gwt.sample.showcase.client.content.i18n.ErrorMessages.java.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<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
deleted file mode 100644
index 6813893..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/raw/com.google.gwt.sample.showcase.client.content.i18n.ErrorMessages.properties.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<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
deleted file mode 100644
index 3f818c3..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/raw/com.google.gwt.sample.showcase.client.content.i18n.ErrorMessages_ar.properties.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<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
deleted file mode 100644
index c1ad7af..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/raw/com.google.gwt.sample.showcase.client.content.i18n.ErrorMessages_fr.properties.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<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
deleted file mode 100644
index 6cf142e..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/raw/com.google.gwt.sample.showcase.client.content.i18n.ErrorMessages_zh.properties.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<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
deleted file mode 100644
index 976f7f3..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/raw/com.google.gwt.sample.showcase.client.content.i18n.ExampleConstants.java.html
+++ /dev/null
@@ -1,34 +0,0 @@
-<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
deleted file mode 100644
index 1385a2d..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/raw/com.google.gwt.sample.showcase.client.content.i18n.ExampleConstants.properties.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<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
deleted file mode 100644
index 49d44ce..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/raw/com.google.gwt.sample.showcase.client.content.i18n.ExampleConstants_ar.properties.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<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
deleted file mode 100644
index 1137259..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/raw/com.google.gwt.sample.showcase.client.content.i18n.ExampleConstants_fr.properties.html
+++ /dev/null
@@ -1,32 +0,0 @@
-<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
deleted file mode 100644
index 7406f67..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/raw/com.google.gwt.sample.showcase.client.content.i18n.ExampleConstants_zh.properties.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<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
deleted file mode 100644
index ee57626..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.i18n.CwConstantsExample.html
+++ /dev/null
@@ -1,75 +0,0 @@
-<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
deleted file mode 100644
index 06aead5..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.i18n.CwConstantsWithLookupExample.html
+++ /dev/null
@@ -1,107 +0,0 @@
-<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
deleted file mode 100644
index ac59983..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.i18n.CwDateTimeFormat.html
+++ /dev/null
@@ -1,233 +0,0 @@
-<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
deleted file mode 100644
index aaa6cdc..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.i18n.CwDictionaryExample.html
+++ /dev/null
@@ -1,61 +0,0 @@
-<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
deleted file mode 100644
index c63db80..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.i18n.CwMessagesExample.html
+++ /dev/null
@@ -1,135 +0,0 @@
-<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
deleted file mode 100644
index 55efa7e..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.i18n.CwNumberFormat.html
+++ /dev/null
@@ -1,181 +0,0 @@
-<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
deleted file mode 100644
index c69b9c7..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.lists.CwListBox.html
+++ /dev/null
@@ -1,108 +0,0 @@
-<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
deleted file mode 100644
index 1a53608..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.lists.CwMenuBar.html
+++ /dev/null
@@ -1,106 +0,0 @@
-<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
deleted file mode 100644
index 44bf540..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.lists.CwStackPanel.html
+++ /dev/null
@@ -1,132 +0,0 @@
-<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.
- */
- @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 Label(contact));
- }
- 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
deleted file mode 100644
index 1ed030f..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.lists.CwSuggestBox.html
+++ /dev/null
@@ -1,43 +0,0 @@
-<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
deleted file mode 100644
index 14320c1..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.lists.CwTree.html
+++ /dev/null
@@ -1,182 +0,0 @@
-<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
deleted file mode 100644
index 100a5a7..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.other.CwAnimation.html
+++ /dev/null
@@ -1,163 +0,0 @@
-<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
deleted file mode 100644
index 97d7af4..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.other.CwCookies.html
+++ /dev/null
@@ -1,171 +0,0 @@
-<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
deleted file mode 100644
index 5b655d0..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.other.CwFrame.html
+++ /dev/null
@@ -1,62 +0,0 @@
-<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
- String url = GWT.getModuleBaseURL();
- final Frame frame = new Frame(url);
- frame.setSize("700px", "300px");
- frame.ensureDebugId("cwFrame");
-
- // Create a form to set the location of the frame
- final TextBox locationBox = new TextBox();
- locationBox.setText(url);
- 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
deleted file mode 100644
index 2822dc0..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.panels.CwAbsolutePanel.html
+++ /dev/null
@@ -1,134 +0,0 @@
-<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
deleted file mode 100644
index e0ff4d5..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.panels.CwDecoratorPanel.html
+++ /dev/null
@@ -1,44 +0,0 @@
-<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 Search 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
deleted file mode 100644
index 8909284..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.panels.CwDisclosurePanel.html
+++ /dev/null
@@ -1,93 +0,0 @@
-<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
deleted file mode 100644
index 0351054..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.panels.CwDockPanel.html
+++ /dev/null
@@ -1,61 +0,0 @@
-<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
deleted file mode 100644
index 070a76b..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.panels.CwFlowPanel.html
+++ /dev/null
@@ -1,38 +0,0 @@
-<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
deleted file mode 100644
index 24329ee..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.panels.CwHorizontalPanel.html
+++ /dev/null
@@ -1,37 +0,0 @@
-<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
deleted file mode 100644
index ff64d2a..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.panels.CwHorizontalSplitPanel.html
+++ /dev/null
@@ -1,45 +0,0 @@
-<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
deleted file mode 100644
index bb83c29..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.panels.CwTabPanel.html
+++ /dev/null
@@ -1,54 +0,0 @@
-<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
deleted file mode 100644
index c19dd6c..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.panels.CwVerticalPanel.html
+++ /dev/null
@@ -1,37 +0,0 @@
-<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
deleted file mode 100644
index 1f01b8d..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.panels.CwVerticalSplitPanel.html
+++ /dev/null
@@ -1,45 +0,0 @@
-<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
deleted file mode 100644
index 3a831ac..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.popups.CwBasicPopup.html
+++ /dev/null
@@ -1,80 +0,0 @@
-<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
deleted file mode 100644
index 7b29924..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.popups.CwDialogBox.html
+++ /dev/null
@@ -1,128 +0,0 @@
-<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
deleted file mode 100644
index f64654c..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.tables.CwFlexTable.html
+++ /dev/null
@@ -1,91 +0,0 @@
-<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
deleted file mode 100644
index 01d4767..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.tables.CwGrid.html
+++ /dev/null
@@ -1,38 +0,0 @@
-<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
deleted file mode 100644
index 63e9154..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.text.CwBasicText.html
+++ /dev/null
@@ -1,121 +0,0 @@
-<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
deleted file mode 100644
index 86544b8..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.text.CwRichText.html
+++ /dev/null
@@ -1,37 +0,0 @@
-<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
deleted file mode 100644
index a435706..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.text.RichTextToolbar.html
+++ /dev/null
@@ -1 +0,0 @@
-<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
deleted file mode 100644
index 775ac06..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.widgets.CwBasicButton.html
+++ /dev/null
@@ -1,51 +0,0 @@
-<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
deleted file mode 100644
index e1d2fb3..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.widgets.CwCheckBox.html
+++ /dev/null
@@ -1,55 +0,0 @@
-<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
deleted file mode 100644
index 228f85f..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.widgets.CwCustomButton.html
+++ /dev/null
@@ -1,70 +0,0 @@
-<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");
- normalPushButton.addKeyboardListener(new KeyboardListenerAdapter());
- 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");
- normalToggleButton.addKeyboardListener(new KeyboardListenerAdapter());
- 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
deleted file mode 100644
index 9da36e5..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.widgets.CwFileUpload.html
+++ /dev/null
@@ -1,59 +0,0 @@
-<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
deleted file mode 100644
index de4dc03..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.widgets.CwHyperlink.html
+++ /dev/null
@@ -1,43 +0,0 @@
-<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
deleted file mode 100644
index 411526a..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/source/com.google.gwt.sample.showcase.client.content.widgets.CwRadioButton.html
+++ /dev/null
@@ -1,64 +0,0 @@
-<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
deleted file mode 100644
index e69de29..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.i18n.ColorConstants.html
+++ /dev/null
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
deleted file mode 100644
index e69de29..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.i18n.CwConstantsExample.html
+++ /dev/null
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
deleted file mode 100644
index e69de29..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.i18n.CwConstantsWithLookupExample.html
+++ /dev/null
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
deleted file mode 100644
index 4ce825d..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.i18n.CwDateTimeFormat.html
+++ /dev/null
@@ -1,4 +0,0 @@
-<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
deleted file mode 100644
index 2a4237c..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.i18n.CwDictionaryExample.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<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
deleted file mode 100644
index e69de29..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.i18n.CwMessagesExample.html
+++ /dev/null
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
deleted file mode 100644
index 4ce825d..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.i18n.CwNumberFormat.html
+++ /dev/null
@@ -1,4 +0,0 @@
-<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
deleted file mode 100644
index e69de29..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.i18n.ErrorMessages.html
+++ /dev/null
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
deleted file mode 100644
index e69de29..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.i18n.ExampleConstants.html
+++ /dev/null
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
deleted file mode 100644
index 76a6318..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.lists.CwListBox.html
+++ /dev/null
@@ -1,3 +0,0 @@
-<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
deleted file mode 100644
index 4ee6c2a..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.lists.CwMenuBar.html
+++ /dev/null
@@ -1,131 +0,0 @@
-<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/hborder.png) repeat-x 0px -2003px;
- 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 -12px repeat-x;
-}</pre><pre>
-.gwt-MenuBarPopup .middleLeft {
- background: url(images/vborder.png) -12px 0px repeat-y;
-}</pre><pre>
-html>body .gwt-MenuBarPopup .bottomCenter {
- background: url(images/hborder.png) 0px -13px repeat-x;
-}</pre><pre>
-html>body .gwt-MenuBarPopup .middleRight {
- background: url(images/vborder.png) -13px 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='default/images/ie6/hborder_gray_shadow.png',sizingMethod='scale');
-}</pre><pre>
-* html .gwt-MenuBarPopup .middleRight {
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='default/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='default/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='default/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='default/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='default/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
deleted file mode 100644
index 369c77e..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.lists.CwStackPanel.html
+++ /dev/null
@@ -1,99 +0,0 @@
-<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 -21px repeat-x;
-}</pre><pre>
-.gwt-StackPanelItem .middleLeft {
- background: #d3def6 url(images/hborder.png) repeat-x 0px -989px;
- 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/hborder.png) repeat-x 0px -989px;
- border-right: 1px solid #bbbbbb;
-}</pre><pre>
-.gwt-StackPanelItem .middleCenter {
- font-weight: bold;
- font-size: 1.3em;
- background: #d3def6 url(images/hborder.png) repeat-x 0px -989px;
-}</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='default/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='default/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
deleted file mode 100644
index 80435a7..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.lists.CwSuggestBox.html
+++ /dev/null
@@ -1,86 +0,0 @@
-<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 0px -4px;
-}</pre><pre>
-html>body .gwt-SuggestBoxPopup .middleRight {
- background: url(images/vborder.png) repeat-y -4px 0px;
-}</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='default/images/ie6/hborder_blue_shadow.png',sizingMethod='scale');
-}</pre><pre>
-* html .gwt-SuggestBoxPopup .middleRight {
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='default/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='default/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='default/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='default/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='default/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
deleted file mode 100644
index 23659be..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.lists.CwTree.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<pre>
-.gwt-Tree .gwt-TreeItem {
- padding: 1px;
- margin: 0px;
- white-space: nowrap;
- cursor: hand;
- cursor: pointer;
-}</pre><pre>
-.gwt-Tree .gwt-TreeItem-selected {
- background: #93c2f1 url(images/hborder.png) repeat-x 0px -1463px;
-}</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
deleted file mode 100644
index e69de29..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.other.CwAnimation.html
+++ /dev/null
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
deleted file mode 100644
index e69de29..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.other.CwCookies.html
+++ /dev/null
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
deleted file mode 100644
index e69de29..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.other.CwFrame.html
+++ /dev/null
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
deleted file mode 100644
index e69de29..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.panels.CwAbsolutePanel.html
+++ /dev/null
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
deleted file mode 100644
index 4a6cab7..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.panels.CwDecoratorPanel.html
+++ /dev/null
@@ -1,58 +0,0 @@
-<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 .topLeftInner,
-.gwt-DecoratorPanel .topRightInner,
-.gwt-DecoratorPanel .bottomLeftInner,
-.gwt-DecoratorPanel .bottomRightInner {
- 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='default/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='default/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='default/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='default/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
deleted file mode 100644
index 5940a3b..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.panels.CwDisclosurePanel.html
+++ /dev/null
@@ -1,18 +0,0 @@
-<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 {
- color: black;
-}</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
deleted file mode 100644
index 2fca565..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.panels.CwDockPanel.html
+++ /dev/null
@@ -1,5 +0,0 @@
-<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
deleted file mode 100644
index 842e677..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.panels.CwFlowPanel.html
+++ /dev/null
@@ -1,4 +0,0 @@
-<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
deleted file mode 100644
index e69de29..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.panels.CwHorizontalPanel.html
+++ /dev/null
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
deleted file mode 100644
index 7d8c540..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.panels.CwHorizontalSplitPanel.html
+++ /dev/null
@@ -1,8 +0,0 @@
-<pre>
-.gwt-HorizontalSplitPanel {
-}</pre><pre>
-.gwt-HorizontalSplitPanel .hsplitter {
- cursor: move;
- border: 0px;
- background: #91c0ef url(images/vborder.png) 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
deleted file mode 100644
index 2febe7a..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.panels.CwTabPanel.html
+++ /dev/null
@@ -1,103 +0,0 @@
-<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: #d0e4f6;
-}</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: #d0e4f6;
-}</pre><pre>
-.gwt-TabBar .gwt-TabBarItem .middleCenter {
- padding: 0px 4px 2px 4px;
- cursor: pointer;
- cursor: hand;
- color: black;
- font-weight: bold;
- text-align: center;
- background: #d0e4f6;
-}</pre><pre>
-.gwt-TabBar .gwt-TabBarItem-selected .topCenter {
- background: #92c1f0;
-}</pre><pre>
-.gwt-TabBar .gwt-TabBarItem-selected .middleLeft,
-.gwt-TabBar .gwt-TabBarItem-selected .middleRight {
- background: #92c1f0;
-}</pre><pre>
-.gwt-TabBar .gwt-TabBarItem-selected .middleCenter {
- cursor: default;
- background: #92c1f0;
-}</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='default/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='default/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='default/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='default/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
deleted file mode 100644
index e69de29..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.panels.CwVerticalPanel.html
+++ /dev/null
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
deleted file mode 100644
index 087da20..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.panels.CwVerticalSplitPanel.html
+++ /dev/null
@@ -1,8 +0,0 @@
-<pre>
-.gwt-VerticalSplitPanel {
-}</pre><pre>
-.gwt-VerticalSplitPanel .vsplitter {
- cursor: move;
- border: 0px;
- background: #91c0ef url(images/hborder.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.popups.CwBasicPopup.html b/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.popups.CwBasicPopup.html
deleted file mode 100644
index 5fd92f8..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.popups.CwBasicPopup.html
+++ /dev/null
@@ -1,81 +0,0 @@
-<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 0px -4px;
-}</pre><pre>
-html>body .gwt-PopupPanel .middleRight {
- background: url(images/vborder.png) repeat-y -4px 0px;
-}</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='default/images/ie6/hborder_blue_shadow.png',sizingMethod='scale');
-}</pre><pre>
-* html .gwt-PopupPanel .middleRight {
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='default/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='default/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='default/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='default/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='default/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
deleted file mode 100644
index f5aba91..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.popups.CwDialogBox.html
+++ /dev/null
@@ -1,82 +0,0 @@
-<pre>
-.gwt-DialogBox .Caption {
- background: #e3e8f3 url(images/hborder.png) repeat-x 0px -2003px;
- padding: 4px 4px 4px 8px;
- cursor: default;
- border-bottom: 1px solid #bbbbbb;
- border-top: 5px solid #d0e4f6;
-}</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 0px -4px;
-}</pre><pre>
-html>body .gwt-DialogBox .middleRight {
- background: url(images/vborder.png) repeat-y -4px 0px;
-}</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='default/images/ie6/hborder_blue_shadow.png',sizingMethod='scale');
-}</pre><pre>
-* html .gwt-DialogBox .middleRight {
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='default/images/ie6/vborder_blue_shadow.png',sizingMethod='scale');
-}</pre><pre>
-* html .gwt-DialogBox .topLeft {
- width: 5px;
- overflow: hidden;
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='default/images/ie6/corner_dialog_topleft.png',sizingMethod='crop');
-}</pre><pre>
-* html .gwt-DialogBox .topRight {
- width: 8px;
- overflow: hidden;
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='default/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='default/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='default/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
deleted file mode 100644
index ceb5915..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.tables.CwFlexTable.html
+++ /dev/null
@@ -1,8 +0,0 @@
-<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
deleted file mode 100644
index e69de29..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.tables.CwGrid.html
+++ /dev/null
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
deleted file mode 100644
index c22b121..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.text.CwBasicText.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<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
deleted file mode 100644
index 354e90d..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.text.CwRichText.html
+++ /dev/null
@@ -1,64 +0,0 @@
-<pre>
-.gwt-RichTextArea {
-}</pre><pre>
-.hasRichTextToolbar {
- border: 0px;
-}</pre><pre>
-.gwt-RichTextToolbar {
- background: #e3e8f3 url(images/hborder.png) repeat-x 0px -2003px;
- 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
deleted file mode 100644
index e69de29..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.text.RichTextToolbar.html
+++ /dev/null
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
deleted file mode 100644
index 82492b7..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.widgets.CwBasicButton.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<pre>
-.gwt-Button {
- width: 10em;
-}</pre><pre>
-.gwt-Button:active {
- border: 1px inset #ccc;
-}</pre><pre>
-.gwt-Button:hover {
- border-color: #9cf #69e #69e #7af;
-}</pre><pre>
-.gwt-Button[disabled] {
- cursor: default;
- color: #888;
-}</pre><pre>
-.gwt-Button[disabled]:hover {
- border: 1px outset #ccc;
-}</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
deleted file mode 100644
index 45de2bf..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.widgets.CwCheckBox.html
+++ /dev/null
@@ -1,6 +0,0 @@
-<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
deleted file mode 100644
index f770ce8..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.widgets.CwCustomButton.html
+++ /dev/null
@@ -1,100 +0,0 @@
-<pre>
-.gwt-PushButton-up,
-.gwt-PushButton-up-hovering,
-.gwt-PushButton-up-disabled,
-.gwt-PushButton-down,
-.gwt-PushButton-down-hovering,
-.gwt-PushButton-down-disabled {
- margin: 0;
- padding: 3px 5px;
- font-family:Arial, sans-serif;
- text-decoration: none;
- background: url("images/hborder.png") repeat-x 0px -27px;
-}</pre><pre>
-.gwt-PushButton-up {
- border: 1px outset #ccc;
- cursor: pointer;
- cursor: hand;
-}</pre><pre>
-.gwt-PushButton-up-hovering {
- border: 1px outset;
- border-color: #9cf #69e #69e #7af;
- cursor: pointer;
- cursor: hand;
-}</pre><pre>
-.gwt-PushButton-up-disabled {
- border: 1px outset #ccc;
- cursor: default;
- opacity: .5;
- filter: alpha(opacity=40);
- zoom: 1;
-}</pre><pre>
-.gwt-PushButton-down {
- border: 1px inset #666;
- cursor: pointer;
- cursor: hand;
-}</pre><pre>
-.gwt-PushButton-down-hovering {
- border: 1px inset;
- border-color: #9cf #69e #69e #7af;
- cursor: pointer;
- cursor: hand;
-}</pre><pre>
-.gwt-PushButton-down-disabled {
- border: 1px outset #ccc;
- cursor: default;
- opacity: 0.5;
- filter: alpha(opacity=40);
- zoom: 1;
-}</pre><pre>
-.gwt-ToggleButton-up,
-.gwt-ToggleButton-up-hovering,
-.gwt-ToggleButton-up-disabled,
-.gwt-ToggleButton-down,
-.gwt-ToggleButton-down-hovering,
-.gwt-ToggleButton-down-disabled {
- margin: 0;
- padding: 3px 5px;
- font-family:Arial, sans-serif;
- text-decoration: none;
- background: url("images/hborder.png") repeat-x 0px -27px;
-}</pre><pre>
-.gwt-ToggleButton-up {
- border: 1px outset #ccc;
- cursor: pointer;
- cursor: hand;
-}</pre><pre>
-.gwt-ToggleButton-up-hovering {
- border: 1px outset;
- border-color: #9cf #69e #69e #7af;
- cursor: pointer;
- cursor: hand;
-}</pre><pre>
-.gwt-ToggleButton-up-disabled {
- border: 1px outset #ccc;
- cursor: default;
- opacity: .5;
- zoom: 1;
- filter: alpha(opacity=40);
-}</pre><pre>
-.gwt-ToggleButton-down {
- background-position: 0 -513px;
- border: 1px inset #ccc;
- cursor: pointer;
- cursor: hand;
-}</pre><pre>
-.gwt-ToggleButton-down-hovering {
- background-position: 0 -513px;
- border: 1px inset;
- border-color: #9cf #69e #69e #7af;
- cursor: pointer;
- cursor: hand;
-}</pre><pre>
-.gwt-ToggleButton-down-disabled {
- background-position: 0 -513px;
- border: 1px inset #ccc;
- cursor: default;
- opacity: .5;
- zoom: 1;
- filter: alpha(opacity=40);
-}</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
deleted file mode 100644
index e9160d9..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.widgets.CwFileUpload.html
+++ /dev/null
@@ -1,3 +0,0 @@
-<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
deleted file mode 100644
index feda287..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.widgets.CwHyperlink.html
+++ /dev/null
@@ -1,3 +0,0 @@
-<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
deleted file mode 100644
index d3ae7d6..0000000
--- a/samples/showcase/src/com/google/gwt/sample/showcase/public/style/com.google.gwt.sample.showcase.client.content.widgets.CwRadioButton.html
+++ /dev/null
@@ -1,7 +0,0 @@
-<pre>
-.gwt-RadioButton {
- padding: 4px 4px 3px 3px;
-}</pre><pre>
-.gwt-RadioButton-disabled {
- color: #888;
-}</pre>
\ No newline at end of file