Created
July 28, 2011 07:57
-
-
Save gkossakowski/1111177 to your computer and use it in GitHub Desktop.
Showcase diff between scalagwt-sample fork and gwt trunk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/com/google/gwt/sample/showcase/Showcase.gwt.xml b/src/com/google/gwt/sample/showcase/Showcase.gwt.xml | |
index 180e2a8..6dad235 100644 | |
--- a/src/com/google/gwt/sample/showcase/Showcase.gwt.xml | |
+++ b/src/com/google/gwt/sample/showcase/Showcase.gwt.xml | |
@@ -4,9 +4,7 @@ | |
<inherits name='com.google.gwt.user.User'/> | |
<inherits name="com.google.gwt.i18n.I18N"/> | |
<inherits name="com.google.gwt.i18n.CldrLocales"/> | |
- <inherits name="com.google.gwt.user.theme.standard.StandardResources"/> | |
- <inherits name="com.google.gwt.user.theme.chrome.ChromeResources"/> | |
- <inherits name="com.google.gwt.user.theme.dark.DarkResources"/> | |
+ <inherits name="com.google.gwt.user.theme.clean.CleanResources"/> | |
<!-- Enable debug ID. --> | |
<inherits name="com.google.gwt.user.Debug"/> | |
@@ -22,8 +20,12 @@ | |
<!-- Internationalization support. --> | |
<extend-property name="locale" values="en"/> | |
+ <!-- | |
<extend-property name="locale" values="ar"/> | |
<extend-property name="locale" values="fr"/> | |
<extend-property name="locale" values="zh"/> | |
+ --> | |
<set-property-fallback name="locale" value="en"/> | |
+ <set-configuration-property name="locale.cookie" value="SHOWCASE_LOCALE"/> | |
+ <set-configuration-property name="locale.useragent" value="Y"/> | |
</module> | |
diff --git a/src/com/google/gwt/sample/showcase/client/Application.java b/src/com/google/gwt/sample/showcase/client/Application.java | |
deleted file mode 100644 | |
index e0336fa..0000000 | |
--- a/src/com/google/gwt/sample/showcase/client/Application.java | |
+++ /dev/null | |
@@ -1,354 +0,0 @@ | |
-/* | |
- * Copyright 2008 Google Inc. | |
- * | |
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not | |
- * use this file except in compliance with the License. You may obtain a copy of | |
- * the License at | |
- * | |
- * http://www.apache.org/licenses/LICENSE-2.0 | |
- * | |
- * Unless required by applicable law or agreed to in writing, software | |
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | |
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | |
- * License for the specific language governing permissions and limitations under | |
- * the License. | |
- */ | |
-package com.google.gwt.sample.showcase.client; | |
- | |
-import com.google.gwt.core.client.GWT; | |
-import com.google.gwt.event.logical.shared.HasSelectionHandlers; | |
-import com.google.gwt.event.logical.shared.ResizeEvent; | |
-import com.google.gwt.event.logical.shared.ResizeHandler; | |
-import com.google.gwt.event.logical.shared.SelectionHandler; | |
-import com.google.gwt.event.shared.HandlerRegistration; | |
-import com.google.gwt.i18n.client.LocaleInfo; | |
-import com.google.gwt.resources.client.ImageResource; | |
-import com.google.gwt.user.client.Window; | |
-import com.google.gwt.user.client.ui.Composite; | |
-import com.google.gwt.user.client.ui.DecoratorPanel; | |
-import com.google.gwt.user.client.ui.FlexTable; | |
-import com.google.gwt.user.client.ui.FlowPanel; | |
-import com.google.gwt.user.client.ui.Grid; | |
-import com.google.gwt.user.client.ui.HTML; | |
-import com.google.gwt.user.client.ui.HasHorizontalAlignment; | |
-import com.google.gwt.user.client.ui.HasVerticalAlignment; | |
-import com.google.gwt.user.client.ui.HorizontalPanel; | |
-import com.google.gwt.user.client.ui.SimplePanel; | |
-import com.google.gwt.user.client.ui.Tree; | |
-import com.google.gwt.user.client.ui.TreeItem; | |
-import com.google.gwt.user.client.ui.Widget; | |
-import com.google.gwt.user.client.ui.FlexTable.FlexCellFormatter; | |
-import com.google.gwt.user.client.ui.HTMLTable.CellFormatter; | |
- | |
-/** | |
- * <p> | |
- * A generic application that includes a title bar, main menu, content area, and | |
- * some external links at the top. | |
- * </p> | |
- * <h3>CSS Style Rules</h3> | |
- * | |
- * <ul class="css"> | |
- * | |
- * <li>.Application { Applied to the entire Application }</li> | |
- * | |
- * <li>.Application-top { The top portion of the Application }</li> | |
- * | |
- * <li>.Application-title { The title widget }</li> | |
- * | |
- * <li>.Application-links { The main external links }</li> | |
- * | |
- * <li>.Application-options { The options widget }</li> | |
- * | |
- * <li>.Application-menu { The main menu }</li> | |
- * | |
- * <li>.Application-content-wrapper { The scrollable element around the content }</li> | |
- * | |
- * </ul> | |
- */ | |
-public class Application extends Composite implements ResizeHandler, | |
- HasSelectionHandlers<TreeItem> { | |
- /** | |
- * Images used in the {@link Application}. | |
- */ | |
- public interface ApplicationImages extends Tree.Resources { | |
- /** | |
- * An image indicating a leaf. | |
- * | |
- * @return a prototype of this image | |
- */ | |
- @Source("noimage.png") | |
- ImageResource treeLeaf(); | |
- } | |
- | |
- /** | |
- * The base style name. | |
- */ | |
- public static final String DEFAULT_STYLE_NAME = "Application"; | |
- | |
- /** | |
- * The panel that contains the menu and content. | |
- */ | |
- private HorizontalPanel bottomPanel; | |
- | |
- /** | |
- * The decorator around the content. | |
- */ | |
- private DecoratorPanel contentDecorator; | |
- | |
- /** | |
- * The main wrapper around the content and content title. | |
- */ | |
- private Grid contentLayout; | |
- | |
- /** | |
- * The wrapper around the content. | |
- */ | |
- private SimplePanel contentWrapper; | |
- | |
- /** | |
- * The panel that holds the main links. | |
- */ | |
- private HorizontalPanel linksPanel; | |
- | |
- /** | |
- * The main menu. | |
- */ | |
- private Tree mainMenu; | |
- | |
- /** | |
- * The last known width of the window. | |
- */ | |
- private int windowWidth = -1; | |
- | |
- /** | |
- * The panel that contains the title widget and links. | |
- */ | |
- private FlexTable topPanel; | |
- | |
- /** | |
- * Constructor. | |
- */ | |
- public Application() { | |
- // Setup the main layout widget | |
- FlowPanel layout = new FlowPanel(); | |
- initWidget(layout); | |
- | |
- // Setup the top panel with the title and links | |
- createTopPanel(); | |
- layout.add(topPanel); | |
- | |
- // Add the main menu | |
- bottomPanel = new HorizontalPanel(); | |
- bottomPanel.setWidth("100%"); | |
- bottomPanel.setSpacing(0); | |
- bottomPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_TOP); | |
- layout.add(bottomPanel); | |
- createMainMenu(); | |
- bottomPanel.add(mainMenu); | |
- | |
- // Setup the content layout | |
- contentLayout = new Grid(2, 1); | |
- contentLayout.setCellPadding(0); | |
- contentLayout.setCellSpacing(0); | |
- contentDecorator = new DecoratorPanel(); | |
- contentDecorator.setWidget(contentLayout); | |
- contentDecorator.addStyleName(DEFAULT_STYLE_NAME + "-content-decorator"); | |
- bottomPanel.add(contentDecorator); | |
- if (LocaleInfo.getCurrentLocale().isRTL()) { | |
- bottomPanel.setCellHorizontalAlignment(contentDecorator, | |
- HasHorizontalAlignment.ALIGN_LEFT); | |
- contentDecorator.getElement().setAttribute("align", "LEFT"); | |
- } else { | |
- bottomPanel.setCellHorizontalAlignment(contentDecorator, | |
- HasHorizontalAlignment.ALIGN_RIGHT); | |
- contentDecorator.getElement().setAttribute("align", "RIGHT"); | |
- } | |
- CellFormatter formatter = contentLayout.getCellFormatter(); | |
- | |
- // Add the content title | |
- setContentTitle(new HTML("Content")); | |
- formatter.setStyleName(0, 0, DEFAULT_STYLE_NAME + "-content-title"); | |
- | |
- // Add the content wrapper | |
- contentWrapper = new SimplePanel(); | |
- contentLayout.setWidget(1, 0, contentWrapper); | |
- formatter.setStyleName(1, 0, DEFAULT_STYLE_NAME + "-content-wrapper"); | |
- setContent(null); | |
- | |
- // Add a window resize handler | |
- Window.addResizeHandler(this); | |
- } | |
- | |
- /** | |
- * Add a link to the top of the page. | |
- * | |
- * @param link the widget to add to the mainLinks | |
- */ | |
- public void addLink(Widget link) { | |
- if (linksPanel.getWidgetCount() > 0) { | |
- linksPanel.add(new HTML(" | ")); | |
- } | |
- linksPanel.add(link); | |
- } | |
- | |
- public HandlerRegistration addSelectionHandler( | |
- SelectionHandler<TreeItem> handler) { | |
- return mainMenu.addSelectionHandler(handler); | |
- } | |
- | |
- /** | |
- * @return the {@link Widget} in the content area | |
- */ | |
- public Widget getContent() { | |
- return contentWrapper.getWidget(); | |
- } | |
- | |
- /** | |
- * @return the content title widget | |
- */ | |
- public Widget getContentTitle() { | |
- return contentLayout.getWidget(0, 0); | |
- } | |
- | |
- /** | |
- * @return the main menu. | |
- */ | |
- public Tree getMainMenu() { | |
- return mainMenu; | |
- } | |
- | |
- /** | |
- * @return the {@link Widget} used as the title | |
- */ | |
- public Widget getTitleWidget() { | |
- return topPanel.getWidget(0, 0); | |
- } | |
- | |
- public void onResize(ResizeEvent event) { | |
- onWindowResized(event.getWidth(), event.getHeight()); | |
- } | |
- | |
- public void onWindowResized(int width, int height) { | |
- if (width == windowWidth || width < 1) { | |
- return; | |
- } | |
- windowWidth = width; | |
- onWindowResizedImpl(width); | |
- } | |
- | |
- /** | |
- * Set the {@link Widget} to display in the content area. | |
- * | |
- * @param content the content widget | |
- */ | |
- public void setContent(Widget content) { | |
- if (content == null) { | |
- contentWrapper.setWidget(new HTML(" ")); | |
- } else { | |
- contentWrapper.setWidget(content); | |
- } | |
- } | |
- | |
- /** | |
- * Set the title of the content area. | |
- * | |
- * @param title the content area title | |
- */ | |
- public void setContentTitle(Widget title) { | |
- contentLayout.setWidget(0, 0, title); | |
- } | |
- | |
- /** | |
- * Set the {@link Widget} to use as options, which appear to the right of the | |
- * title bar. | |
- * | |
- * @param options the options widget | |
- */ | |
- public void setOptionsWidget(Widget options) { | |
- topPanel.setWidget(1, 1, options); | |
- } | |
- | |
- /** | |
- * Set the {@link Widget} to use as the title bar. | |
- * | |
- * @param title the title widget | |
- */ | |
- public void setTitleWidget(Widget title) { | |
- topPanel.setWidget(1, 0, title); | |
- } | |
- | |
- @Override | |
- protected void onLoad() { | |
- super.onLoad(); | |
- onWindowResized(Window.getClientWidth(), Window.getClientHeight()); | |
- } | |
- | |
- @Override | |
- protected void onUnload() { | |
- super.onUnload(); | |
- windowWidth = -1; | |
- } | |
- | |
- protected void onWindowResizedImpl(int width) { | |
- int menuWidth = mainMenu.getOffsetWidth(); | |
- int contentWidth = Math.max(width - menuWidth - 30, 1); | |
- int contentWidthInner = Math.max(contentWidth - 10, 1); | |
- bottomPanel.setCellWidth(mainMenu, menuWidth + "px"); | |
- bottomPanel.setCellWidth(contentDecorator, contentWidth + "px"); | |
- contentLayout.getCellFormatter().setWidth(0, 0, contentWidthInner + "px"); | |
- contentLayout.getCellFormatter().setWidth(1, 0, contentWidthInner + "px"); | |
- } | |
- | |
- /** | |
- * Create the main menu. | |
- */ | |
- private void createMainMenu() { | |
- // Setup the main menu | |
- ApplicationImages treeImages = GWT.create(ApplicationImages.class); | |
- mainMenu = new Tree(treeImages); | |
- mainMenu.setAnimationEnabled(true); | |
- mainMenu.addStyleName(DEFAULT_STYLE_NAME + "-menu"); | |
- } | |
- | |
- /** | |
- * Create the panel at the top of the page that contains the title and links. | |
- */ | |
- private void createTopPanel() { | |
- boolean isRTL = LocaleInfo.getCurrentLocale().isRTL(); | |
- topPanel = new FlexTable(); | |
- topPanel.setCellPadding(0); | |
- topPanel.setCellSpacing(0); | |
- topPanel.setStyleName(DEFAULT_STYLE_NAME + "-top"); | |
- FlexCellFormatter formatter = topPanel.getFlexCellFormatter(); | |
- | |
- // Setup the links cell | |
- linksPanel = new HorizontalPanel(); | |
- topPanel.setWidget(0, 0, linksPanel); | |
- formatter.setStyleName(0, 0, DEFAULT_STYLE_NAME + "-links"); | |
- if (isRTL) { | |
- formatter.setHorizontalAlignment(0, 0, HasHorizontalAlignment.ALIGN_LEFT); | |
- } else { | |
- formatter.setHorizontalAlignment(0, 0, HasHorizontalAlignment.ALIGN_RIGHT); | |
- } | |
- formatter.setColSpan(0, 0, 2); | |
- | |
- // Setup the title cell | |
- setTitleWidget(null); | |
- formatter.setStyleName(1, 0, DEFAULT_STYLE_NAME + "-title"); | |
- | |
- // Setup the options cell | |
- setOptionsWidget(null); | |
- formatter.setStyleName(1, 1, DEFAULT_STYLE_NAME + "-options"); | |
- if (isRTL) { | |
- formatter.setHorizontalAlignment(1, 1, HasHorizontalAlignment.ALIGN_LEFT); | |
- } else { | |
- formatter.setHorizontalAlignment(1, 1, HasHorizontalAlignment.ALIGN_RIGHT); | |
- } | |
- | |
- // Align the content to the top | |
- topPanel.getRowFormatter().setVerticalAlign(0, | |
- HasVerticalAlignment.ALIGN_TOP); | |
- topPanel.getRowFormatter().setVerticalAlign(1, | |
- HasVerticalAlignment.ALIGN_TOP); | |
- } | |
-} | |
diff --git a/src/com/google/gwt/sample/showcase/client/ContentWidget.java b/src/com/google/gwt/sample/showcase/client/ContentWidget.java | |
index 880affb..d224c0b 100644 | |
--- a/src/com/google/gwt/sample/showcase/client/ContentWidget.java | |
+++ b/src/com/google/gwt/sample/showcase/client/ContentWidget.java | |
@@ -16,108 +16,104 @@ | |
package com.google.gwt.sample.showcase.client; | |
import com.google.gwt.core.client.GWT; | |
-import com.google.gwt.event.logical.shared.SelectionEvent; | |
-import com.google.gwt.event.logical.shared.SelectionHandler; | |
+import com.google.gwt.event.logical.shared.HasValueChangeHandlers; | |
+import com.google.gwt.event.logical.shared.ValueChangeEvent; | |
+import com.google.gwt.event.logical.shared.ValueChangeHandler; | |
+import com.google.gwt.event.shared.HandlerRegistration; | |
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.safehtml.shared.SafeHtml; | |
+import com.google.gwt.safehtml.shared.SafeHtmlUtils; | |
import com.google.gwt.user.client.Window; | |
import com.google.gwt.user.client.rpc.AsyncCallback; | |
-import com.google.gwt.user.client.ui.DeckPanel; | |
-import com.google.gwt.user.client.ui.HTML; | |
-import com.google.gwt.user.client.ui.LazyPanel; | |
-import com.google.gwt.user.client.ui.TabBar; | |
-import com.google.gwt.user.client.ui.VerticalPanel; | |
+import com.google.gwt.user.client.ui.SimpleLayoutPanel; | |
import com.google.gwt.user.client.ui.Widget; | |
+import java.util.ArrayList; | |
+import java.util.Collections; | |
import java.util.HashMap; | |
+import java.util.List; | |
import java.util.Map; | |
/** | |
* <p> | |
- * A widget used to show GWT examples in the ContentPanel. It includes a tab bar | |
- * with options to view the example, view the source, or view the css style | |
- * rules. | |
+ * A widget used to show GWT examples in the ContentPanel. | |
* </p> | |
* <p> | |
* This {@link Widget} uses a lazy initialization mechanism so that the content | |
* is not rendered until the onInitialize method is called, which happens the | |
- * first time the {@link Widget} is added to the page.. The data in the source | |
+ * first time the {@link Widget} is added to the page. The data in the source | |
* and css tabs are loaded using an RPC call to the server. | |
* </p> | |
- * <h3>CSS Style Rules</h3> | |
- * <ul class="css"> | |
- * <li>.sc-ContentWidget { Applied to the entire widget }</li> | |
- * <li>.sc-ContentWidget-tabBar { Applied to the TabBar }</li> | |
- * <li>.sc-ContentWidget-deckPanel { Applied to the DeckPanel }</li> | |
- * <li>.sc-ContentWidget-name { Applied to the name }</li> | |
- * <li>.sc-ContentWidget-description { Applied to the description }</li> | |
- * </ul> | |
*/ | |
-public abstract class ContentWidget extends LazyPanel implements | |
- SelectionHandler<Integer> { | |
+public abstract class ContentWidget extends SimpleLayoutPanel implements | |
+ HasValueChangeHandlers<String> { | |
+ | |
/** | |
- * The constants used in this Content Widget. | |
+ * Generic callback used for asynchronously loaded data. | |
+ * | |
+ * @param <T> the data type | |
*/ | |
- public static interface CwConstants extends Constants { | |
- String contentWidgetExample(); | |
+ public static interface Callback<T> { | |
+ void onError(); | |
- String contentWidgetSource(); | |
- | |
- String contentWidgetStyle(); | |
+ void onSuccess(T value); | |
} | |
/** | |
- * The default style name. | |
+ * Get the simple filename of a class. | |
+ * | |
+ * @param c the class | |
*/ | |
- private static final String DEFAULT_STYLE_NAME = "sc-ContentWidget"; | |
+ protected static String getSimpleName(Class<?> c) { | |
+ String name = c.getName(); | |
+ return name.substring(name.lastIndexOf(".") + 1); | |
+ } | |
/** | |
- * The static loading image displayed when loading CSS or source code. | |
+ * A description of the example. | |
*/ | |
- private static String loadingImage; | |
+ private final SafeHtml description; | |
/** | |
- * The tab bar of options. | |
+ * True if this example has associated styles, false if not. | |
*/ | |
- protected TabBar tabBar = null; | |
+ private final boolean hasStyle; | |
/** | |
- * An instance of the constants. | |
+ * The name of the example. | |
*/ | |
- private final CwConstants constants; | |
+ private final String name; | |
/** | |
- * The deck panel with the contents. | |
+ * A mapping of filenames to their raw source code. The map is populated as | |
+ * source is loaded. | |
*/ | |
- private DeckPanel deckPanel = null; | |
+ private final Map<String, String> rawSource = new HashMap<String, String>(); | |
/** | |
- * A boolean indicating whether or not the RPC request for the source code has | |
- * been sent. | |
+ * A list of filenames of the raw source code included with this example. | |
*/ | |
- private boolean sourceLoaded = false; | |
+ private final List<String> rawSourceFilenames = new ArrayList<String>(); | |
/** | |
- * The widget used to display source code. | |
+ * The source code associated with this widget. | |
*/ | |
- private HTML sourceWidget = null; | |
+ private String sourceCode; | |
/** | |
- * A mapping of themes to style definitions. | |
+ * A style definitions used by this widget. | |
*/ | |
- private Map<String, String> styleDefs = null; | |
+ private String styleDefs; | |
/** | |
- * The widget used to display css style. | |
+ * The view that holds the name, description, and example. | |
*/ | |
- private HTML styleWidget = null; | |
+ private ContentWidgetView view; | |
/** | |
* Whether the demo widget has been initialized. | |
@@ -130,36 +126,39 @@ public abstract class ContentWidget extends LazyPanel implements | |
private boolean widgetInitializing; | |
/** | |
- * A vertical panel that holds the demo widget once it is initialized. | |
- */ | |
- private VerticalPanel widgetVpanel; | |
- | |
- /** | |
- * Constructor. | |
+ * Construct a {@link ContentWidget}. | |
* | |
- * @param constants the constants | |
+ * @param name the text name of the example | |
+ * @param description a text description of the example | |
+ * @param hasStyle true if the example has associated styles | |
+ * @param rawSourceFiles the list of raw source files to include | |
*/ | |
- public ContentWidget(CwConstants constants) { | |
- this.constants = constants; | |
- tabBar = new TabBar(); | |
+ public ContentWidget(String name, String description, boolean hasStyle, String... rawSourceFiles) { | |
+ this(name, SafeHtmlUtils.fromString(description), hasStyle, rawSourceFiles); | |
} | |
/** | |
- * Add an item to this content widget. Should not be called before | |
- * {@link #onInitializeComplete} has been called. | |
+ * Construct a {@link ContentWidget}. | |
* | |
- * @param w the widget to add | |
- * @param tabText the text to display in the tab | |
+ * @param name the text name of the example | |
+ * @param description a safe html description of the example | |
+ * @param hasStyle true if the example has associated styles | |
+ * @param rawSourceFiles the list of raw source files to include | |
*/ | |
- public void add(Widget w, String tabText) { | |
- tabBar.addTab(tabText); | |
- deckPanel.add(w); | |
+ public ContentWidget(String name, SafeHtml description, boolean hasStyle, | |
+ String... rawSourceFiles) { | |
+ this.name = name; | |
+ this.description = description; | |
+ this.hasStyle = hasStyle; | |
+ if (rawSourceFiles != null) { | |
+ for (String rawSourceFile : rawSourceFiles) { | |
+ rawSourceFilenames.add(rawSourceFile); | |
+ } | |
+ } | |
} | |
- @Override | |
- public void ensureWidget() { | |
- super.ensureWidget(); | |
- ensureWidgetInitialized(widgetVpanel); | |
+ public HandlerRegistration addValueChangeHandler(ValueChangeHandler<String> handler) { | |
+ return addHandler(handler, ValueChangeEvent.getType()); | |
} | |
/** | |
@@ -167,217 +166,188 @@ public abstract class ContentWidget extends LazyPanel implements | |
* | |
* @return a description for this example | |
*/ | |
- public abstract String getDescription(); | |
+ public final SafeHtml getDescription() { | |
+ return description; | |
+ } | |
/** | |
* Get the name of this example to use as a title. | |
* | |
* @return a name for this example | |
*/ | |
- public abstract String getName(); | |
- | |
- /** | |
- * @return the tab bar | |
- */ | |
- public TabBar getTabBar() { | |
- return tabBar; | |
+ public final String getName() { | |
+ return name; | |
} | |
/** | |
- * Returns true if this widget has a source section. | |
+ * Get the source code for a raw file. | |
* | |
- * @return true if source tab available | |
+ * @param filename the filename to load | |
+ * @param callback the callback to call when loaded | |
*/ | |
- public boolean hasSource() { | |
- return true; | |
+ public void getRawSource(final String filename, final Callback<String> callback) { | |
+ if (rawSource.containsKey(filename)) { | |
+ callback.onSuccess(rawSource.get(filename)); | |
+ } else { | |
+ RequestCallback rc = new RequestCallback() { | |
+ public void onError(Request request, Throwable exception) { | |
+ callback.onError(); | |
+ } | |
+ | |
+ public void onResponseReceived(Request request, Response response) { | |
+ String text = response.getText(); | |
+ rawSource.put(filename, text); | |
+ callback.onSuccess(text); | |
+ } | |
+ }; | |
+ | |
+ String className = this.getClass().getName(); | |
+ className = className.substring(className.lastIndexOf(".") + 1); | |
+ sendSourceRequest(rc, ShowcaseConstants.DST_SOURCE_RAW + filename + ".html"); | |
+ } | |
} | |
/** | |
- * Returns true if this widget has a style section. | |
+ * Get the filenames of the raw source files. | |
* | |
- * @return true if style tab available | |
+ * @return the raw source files. | |
*/ | |
- public boolean hasStyle() { | |
- return true; | |
+ public List<String> getRawSourceFilenames() { | |
+ return Collections.unmodifiableList(rawSourceFilenames); | |
} | |
/** | |
- * When the widget is first initialized, this method is called. If it returns | |
- * a Widget, the widget will be added as the first tab. Return null to disable | |
- * the first tab. | |
+ * Request the styles associated with the widget. | |
* | |
- * @return the widget to add to the first tab | |
- */ | |
- public abstract Widget onInitialize(); | |
- | |
- /** | |
- * Called when initialization has completed and the widget has been added to | |
- * the page. | |
+ * @param callback the callback used when the styles become available | |
*/ | |
- public void onInitializeComplete() { | |
- } | |
+ public void getStyle(final Callback<String> callback) { | |
+ if (styleDefs != null) { | |
+ callback.onSuccess(styleDefs); | |
+ } else { | |
+ RequestCallback rc = new RequestCallback() { | |
+ public void onError(Request request, Throwable exception) { | |
+ callback.onError(); | |
+ } | |
- public void onSelection(SelectionEvent<Integer> event) { | |
- // Show the associated widget in the deck panel | |
- int tabIndex = event.getSelectedItem().intValue(); | |
- deckPanel.showWidget(tabIndex); | |
+ public void onResponseReceived(Request request, Response response) { | |
+ styleDefs = response.getText(); | |
+ callback.onSuccess(styleDefs); | |
+ } | |
+ }; | |
- // Load the source code | |
- String tabHTML = getTabBar().getTabHTML(tabIndex); | |
- if (!sourceLoaded && tabHTML.equals(constants.contentWidgetSource())) { | |
- sourceLoaded = true; | |
+ String srcPath = ShowcaseConstants.DST_SOURCE_STYLE + Showcase.THEME; | |
+ if (LocaleInfo.getCurrentLocale().isRTL()) { | |
+ srcPath += "_rtl"; | |
+ } | |
String className = this.getClass().getName(); | |
className = className.substring(className.lastIndexOf(".") + 1); | |
- requestSourceContents(ShowcaseConstants.DST_SOURCE_EXAMPLE + className | |
- + ".html", sourceWidget, null); | |
+ sendSourceRequest(rc, srcPath + "/" + className + ".html"); | |
} | |
+ } | |
- // 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"; | |
+ /** | |
+ * Request the source code associated with the widget. | |
+ * | |
+ * @param callback the callback used when the source become available | |
+ */ | |
+ public void getSource(final Callback<String> callback) { | |
+ if (sourceCode != null) { | |
+ callback.onSuccess(sourceCode); | |
+ } else { | |
+ RequestCallback rc = new RequestCallback() { | |
+ public void onError(Request request, Throwable exception) { | |
+ callback.onError(); | |
} | |
- String className = this.getClass().getName(); | |
- className = className.substring(className.lastIndexOf(".") + 1); | |
- requestSourceContents(srcPath + "/" + className + ".html", styleWidget, | |
- callback); | |
- } | |
+ | |
+ public void onResponseReceived(Request request, Response response) { | |
+ sourceCode = response.getText(); | |
+ callback.onSuccess(sourceCode); | |
+ } | |
+ }; | |
+ | |
+ String className = this.getClass().getName(); | |
+ className = className.substring(className.lastIndexOf(".") + 1); | |
+ sendSourceRequest(rc, ShowcaseConstants.DST_SOURCE_EXAMPLE + className + ".html"); | |
} | |
} | |
/** | |
- * Select a tab. | |
+ * Check if the widget should have margins. | |
* | |
- * @param index the tab index | |
+ * @return true to use margins, false to flush against edges | |
*/ | |
- public void selectTab(int index) { | |
- tabBar.selectTab(index); | |
+ public boolean hasMargins() { | |
+ return true; | |
} | |
- protected abstract void asyncOnInitialize(final AsyncCallback<Widget> callback); | |
- | |
/** | |
- * Initialize this widget by creating the elements that should be added to the | |
- * page. | |
+ * Check if the widget should be wrapped in a scrollable div. | |
+ * | |
+ * @return true to use add scrollbars, false not to | |
*/ | |
- @Override | |
- protected final Widget createWidget() { | |
- deckPanel = new DeckPanel(); | |
- | |
- setStyleName(DEFAULT_STYLE_NAME); | |
- | |
- // Add a tab handler | |
- tabBar.addSelectionHandler(this); | |
- | |
- // Create a container for the main example | |
- widgetVpanel = new VerticalPanel(); | |
- add(widgetVpanel, constants.contentWidgetExample()); | |
- | |
- // Add the name | |
- HTML nameWidget = new HTML(getName()); | |
- nameWidget.setStyleName(DEFAULT_STYLE_NAME + "-name"); | |
- widgetVpanel.add(nameWidget); | |
- | |
- // Add the description | |
- HTML descWidget = new HTML(getDescription()); | |
- descWidget.setStyleName(DEFAULT_STYLE_NAME + "-description"); | |
- widgetVpanel.add(descWidget); | |
- | |
- // Add source code tab | |
- if (hasSource()) { | |
- sourceWidget = new HTML(); | |
- add(sourceWidget, constants.contentWidgetSource()); | |
- } else { | |
- sourceLoaded = true; | |
- } | |
- | |
- // Add style tab | |
- if (hasStyle()) { | |
- styleDefs = new HashMap<String, String>(); | |
- styleWidget = new HTML(); | |
- add(styleWidget, constants.contentWidgetStyle()); | |
- } | |
+ public boolean hasScrollableContent() { | |
+ return true; | |
+ } | |
- return deckPanel; | |
+ /** | |
+ * Returns true if this widget has a style section. | |
+ * | |
+ * @return true if style tab available | |
+ */ | |
+ public final boolean hasStyle() { | |
+ return hasStyle; | |
} | |
- @Override | |
- protected void onLoad() { | |
- ensureWidget(); | |
+ /** | |
+ * When the widget is first initialized, this method is called. If it returns | |
+ * a Widget, the widget will be added as the first tab. Return null to disable | |
+ * the first tab. | |
+ * | |
+ * @return the widget to add to the first tab | |
+ */ | |
+ public abstract Widget onInitialize(); | |
- // Select the first tab | |
- if (getTabBar().getTabCount() > 0) { | |
- tabBar.selectTab(0); | |
- } | |
+ /** | |
+ * Called when initialization has completed and the widget has been added to | |
+ * the page. | |
+ */ | |
+ public void onInitializeComplete() { | |
} | |
+ protected abstract void asyncOnInitialize(final AsyncCallback<Widget> callback); | |
+ | |
/** | |
- * Load the contents of a remote file into the specified widget. | |
+ * Fire a {@link ValueChangeEvent} indicating that the user wishes to see the | |
+ * specified source file. | |
* | |
- * @param url a partial path relative to the module base URL | |
- * @param target the target Widget to place the contents | |
- * @param callback the callback when the call completes | |
+ * @param filename the filename that the user wishes to see | |
*/ | |
- protected void requestSourceContents(String url, final HTML target, | |
- final RequestCallback callback) { | |
- // Show the loading image | |
- if (loadingImage == null) { | |
- loadingImage = "<img src=\"" + GWT.getModuleBaseURL() | |
- + "images/loading.gif\">"; | |
+ protected void fireRawSourceRequest(String filename) { | |
+ if (!rawSourceFilenames.contains(filename)) { | |
+ throw new IllegalArgumentException("Filename is not registered with this example: " | |
+ + filename); | |
} | |
- target.setDirection(HasDirection.Direction.LTR); | |
- DOM.setStyleAttribute(target.getElement(), "textAlign", "left"); | |
- target.setHTML(" " + loadingImage); | |
- | |
- // Request the contents of the file | |
- RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, | |
- GWT.getModuleBaseURL() + 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); | |
+ ValueChangeEvent.fire(this, filename); | |
+ } | |
- // Send the request | |
- try { | |
- builder.send(); | |
- } catch (RequestException e) { | |
- realCallback.onError(null, e); | |
+ @Override | |
+ protected void onLoad() { | |
+ if (view == null) { | |
+ view = new ContentWidgetView(hasMargins(), hasScrollableContent()); | |
+ view.setName(getName()); | |
+ view.setDescription(getDescription()); | |
+ setWidget(view); | |
} | |
+ ensureWidgetInitialized(); | |
+ super.onLoad(); | |
} | |
/** | |
* Ensure that the demo widget has been initialized. Note that initialization | |
* can fail if there is a network failure. | |
*/ | |
- private void ensureWidgetInitialized(final VerticalPanel vPanel) { | |
+ private void ensureWidgetInitialized() { | |
if (widgetInitializing || widgetInitialized) { | |
return; | |
} | |
@@ -396,10 +366,26 @@ public abstract class ContentWidget extends LazyPanel implements | |
Widget widget = result; | |
if (widget != null) { | |
- vPanel.add(widget); | |
+ view.setExample(widget); | |
} | |
onInitializeComplete(); | |
} | |
}); | |
} | |
+ | |
+ /** | |
+ * Send a request for source code. | |
+ * | |
+ * @param callback the {@link RequestCallback} to send | |
+ * @param url the URL to target | |
+ */ | |
+ private void sendSourceRequest(RequestCallback callback, String url) { | |
+ RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, GWT.getModuleBaseURL() + url); | |
+ builder.setCallback(callback); | |
+ try { | |
+ builder.send(); | |
+ } catch (RequestException e) { | |
+ callback.onError(null, e); | |
+ } | |
+ } | |
} | |
diff --git a/src/com/google/gwt/sample/showcase/client/Showcase.java b/src/com/google/gwt/sample/showcase/client/Showcase.java | |
index 190821b..cb2efb3 100644 | |
--- a/src/com/google/gwt/sample/showcase/client/Showcase.java | |
+++ b/src/com/google/gwt/sample/showcase/client/Showcase.java | |
@@ -1,12 +1,12 @@ | |
/* | |
* 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 | |
@@ -17,80 +17,31 @@ package com.google.gwt.sample.showcase.client; | |
import com.google.gwt.core.client.EntryPoint; | |
import com.google.gwt.core.client.GWT; | |
-import com.google.gwt.dom.client.Element; | |
+import com.google.gwt.core.client.prefetch.Prefetcher; | |
+import com.google.gwt.dom.client.Document; | |
import com.google.gwt.dom.client.HeadElement; | |
-import com.google.gwt.dom.client.Node; | |
-import com.google.gwt.dom.client.NodeList; | |
-import com.google.gwt.event.dom.client.ChangeEvent; | |
-import com.google.gwt.event.dom.client.ChangeHandler; | |
-import com.google.gwt.event.dom.client.ClickEvent; | |
-import com.google.gwt.event.dom.client.ClickHandler; | |
-import com.google.gwt.event.logical.shared.SelectionEvent; | |
-import com.google.gwt.event.logical.shared.SelectionHandler; | |
+import com.google.gwt.dom.client.LinkElement; | |
+import com.google.gwt.event.logical.shared.OpenEvent; | |
+import com.google.gwt.event.logical.shared.OpenHandler; | |
import com.google.gwt.event.logical.shared.ValueChangeEvent; | |
import com.google.gwt.event.logical.shared.ValueChangeHandler; | |
-import com.google.gwt.http.client.UrlBuilder; | |
import com.google.gwt.i18n.client.LocaleInfo; | |
-import com.google.gwt.resources.client.ImageResource; | |
-import com.google.gwt.sample.showcase.client.content.i18n.CwConstantsExample; | |
-import com.google.gwt.sample.showcase.client.content.i18n.CwConstantsWithLookupExample; | |
-import com.google.gwt.sample.showcase.client.content.i18n.CwDateTimeFormat; | |
-import com.google.gwt.sample.showcase.client.content.i18n.CwDictionaryExample; | |
-import com.google.gwt.sample.showcase.client.content.i18n.CwMessagesExample; | |
-import com.google.gwt.sample.showcase.client.content.i18n.CwNumberFormat; | |
-import com.google.gwt.sample.showcase.client.content.i18n.CwPluralFormsExample; | |
-import com.google.gwt.sample.showcase.client.content.lists.CwListBox; | |
-import com.google.gwt.sample.showcase.client.content.lists.CwMenuBar; | |
-import com.google.gwt.sample.showcase.client.content.lists.CwStackPanel; | |
-import com.google.gwt.sample.showcase.client.content.lists.CwSuggestBox; | |
-import com.google.gwt.sample.showcase.client.content.lists.CwTree; | |
-import com.google.gwt.sample.showcase.client.content.other.CwAnimation; | |
-import com.google.gwt.sample.showcase.client.content.other.CwCookies; | |
-import com.google.gwt.sample.showcase.client.content.panels.CwAbsolutePanel; | |
-import com.google.gwt.sample.showcase.client.content.panels.CwDecoratorPanel; | |
-import com.google.gwt.sample.showcase.client.content.panels.CwDisclosurePanel; | |
-import com.google.gwt.sample.showcase.client.content.panels.CwDockPanel; | |
-import com.google.gwt.sample.showcase.client.content.panels.CwFlowPanel; | |
-import com.google.gwt.sample.showcase.client.content.panels.CwHorizontalPanel; | |
-import com.google.gwt.sample.showcase.client.content.panels.CwHorizontalSplitPanel; | |
-import com.google.gwt.sample.showcase.client.content.panels.CwTabPanel; | |
-import com.google.gwt.sample.showcase.client.content.panels.CwVerticalPanel; | |
-import com.google.gwt.sample.showcase.client.content.panels.CwVerticalSplitPanel; | |
-import com.google.gwt.sample.showcase.client.content.popups.CwBasicPopup; | |
-import com.google.gwt.sample.showcase.client.content.popups.CwDialogBox; | |
-import com.google.gwt.sample.showcase.client.content.tables.CwFlexTable; | |
-import com.google.gwt.sample.showcase.client.content.tables.CwGrid; | |
-import com.google.gwt.sample.showcase.client.content.text.CwBasicText; | |
-import com.google.gwt.sample.showcase.client.content.text.CwRichText; | |
-import com.google.gwt.sample.showcase.client.content.widgets.CwBasicButton; | |
-import com.google.gwt.sample.showcase.client.content.widgets.CwCheckBox; | |
-import com.google.gwt.sample.showcase.client.content.widgets.CwCustomButton; | |
-import com.google.gwt.sample.showcase.client.content.widgets.CwDatePicker; | |
-import com.google.gwt.sample.showcase.client.content.widgets.CwFileUpload; | |
-import com.google.gwt.sample.showcase.client.content.widgets.CwHyperlink; | |
-import com.google.gwt.sample.showcase.client.content.widgets.CwRadioButton; | |
-import com.google.gwt.user.client.Command; | |
+import com.google.gwt.safehtml.shared.SafeHtmlBuilder; | |
+import com.google.gwt.safehtml.shared.SafeHtmlUtils; | |
+import com.google.gwt.sample.showcase.client.MainMenuTreeViewModel.Category; | |
+import com.google.gwt.user.cellview.client.CellTree; | |
+import com.google.gwt.user.cellview.client.TreeNode; | |
import com.google.gwt.user.client.History; | |
import com.google.gwt.user.client.Window; | |
-import com.google.gwt.user.client.Window.Location; | |
-import com.google.gwt.user.client.ui.AbstractImagePrototype; | |
import com.google.gwt.user.client.ui.HTML; | |
-import com.google.gwt.user.client.ui.HasHorizontalAlignment; | |
-import com.google.gwt.user.client.ui.HasVerticalAlignment; | |
-import com.google.gwt.user.client.ui.HorizontalPanel; | |
-import com.google.gwt.user.client.ui.Image; | |
-import com.google.gwt.user.client.ui.ListBox; | |
+import com.google.gwt.user.client.ui.RootLayoutPanel; | |
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; | |
-import com.google.gwt.user.client.ui.VerticalPanel; | |
+import com.google.gwt.view.client.SelectionChangeEvent; | |
+import com.google.gwt.view.client.SingleSelectionModel; | |
import java.util.ArrayList; | |
-import java.util.HashMap; | |
import java.util.List; | |
-import java.util.Map; | |
+import java.util.Set; | |
/** | |
* Entry point classes define <code>onModuleLoad()</code>. | |
@@ -104,71 +55,41 @@ public class Showcase implements EntryPoint { | |
} | |
/** | |
- * A special version of the ToggleButton that cannot be clicked if down. If | |
- * one theme button is pressed, all of the others are depressed. | |
- */ | |
- private static class ThemeButton extends ToggleButton { | |
- private static List<ThemeButton> allButtons = null; | |
- | |
- private String theme; | |
- | |
- public ThemeButton(String theme) { | |
- super(); | |
- this.theme = theme; | |
- addStyleName("sc-ThemeButton-" + theme); | |
- | |
- // Add this button to the static list | |
- if (allButtons == null) { | |
- allButtons = new ArrayList<ThemeButton>(); | |
- setDown(true); | |
- } | |
- allButtons.add(this); | |
- } | |
- | |
- public String getTheme() { | |
- return theme; | |
- } | |
- | |
- @Override | |
- protected void onClick() { | |
- if (!isDown()) { | |
- // Raise all of the other buttons | |
- for (ThemeButton button : allButtons) { | |
- if (button != this) { | |
- button.setDown(false); | |
- } | |
- } | |
- | |
- // Fire the click handlers | |
- super.onClick(); | |
- } | |
- } | |
- } | |
- | |
- /** | |
* The static images used throughout the Showcase. | |
*/ | |
- public static final ShowcaseImages images = (ShowcaseImages) GWT.create(ShowcaseImages.class); | |
+ public static final ShowcaseResources images = GWT.create( | |
+ ShowcaseResources.class); | |
/** | |
- * The current style theme. | |
+ * The name of the style theme used in showcase. | |
*/ | |
- static String CUR_THEME = ShowcaseConstants.STYLE_THEMES[0]; | |
+ public static final String THEME = "clean"; | |
/** | |
- * The {@link Application}. | |
+ * Get the token for a given content widget. | |
+ * | |
+ * @return the content widget token. | |
*/ | |
- private Application app = new Application(); | |
+ public static String getContentWidgetToken(ContentWidget content) { | |
+ return getContentWidgetToken(content.getClass()); | |
+ } | |
/** | |
- * A mapping of history tokens to their associated menu items. | |
+ * Get the token for a given content widget. | |
+ * | |
+ * @return the content widget token. | |
*/ | |
- private Map<String, TreeItem> itemTokens = new HashMap<String, TreeItem>(); | |
+ public static <C extends ContentWidget> String getContentWidgetToken( | |
+ Class<C> cwClass) { | |
+ String className = cwClass.getName(); | |
+ className = className.substring(className.lastIndexOf('.') + 1); | |
+ return "!" + className; | |
+ } | |
/** | |
- * A mapping of menu items to the widget display when the item is selected. | |
+ * The main application shell. | |
*/ | |
- private Map<TreeItem, ContentWidget> itemWidgets = new HashMap<TreeItem, ContentWidget>(); | |
+ private ShowcaseShell shell; | |
/** | |
* This is the entry point method. | |
@@ -177,394 +98,157 @@ public class Showcase implements EntryPoint { | |
// Generate the source code and css for the examples | |
GWT.create(GeneratorInfo.class); | |
- // Create the constants | |
- ShowcaseConstants constants = (ShowcaseConstants) GWT.create(ShowcaseConstants.class); | |
+ // Inject global styles. | |
+ injectThemeStyleSheet(); | |
+ images.css().ensureInjected(); | |
+ | |
+ // Initialize the constants. | |
+ ShowcaseConstants constants = GWT.create(ShowcaseConstants.class); | |
+ | |
+ // Create the application shell. | |
+ final SingleSelectionModel<ContentWidget> selectionModel = new SingleSelectionModel<ContentWidget>(); | |
+ final MainMenuTreeViewModel treeModel = new MainMenuTreeViewModel( | |
+ constants, selectionModel); | |
+ Set<ContentWidget> contentWidgets = treeModel.getAllContentWidgets(); | |
+ shell = new ShowcaseShell(treeModel); | |
+ RootLayoutPanel.get().add(shell); | |
+ | |
+ // Prefetch examples when opening the Category tree nodes. | |
+ final List<Category> prefetched = new ArrayList<Category>(); | |
+ final CellTree mainMenu = shell.getMainMenu(); | |
+ mainMenu.addOpenHandler(new OpenHandler<TreeNode>() { | |
+ public void onOpen(OpenEvent<TreeNode> event) { | |
+ Object value = event.getTarget().getValue(); | |
+ if (!(value instanceof Category)) { | |
+ return; | |
+ } | |
- // Swap out the style sheets for the RTL versions if needed. | |
- updateStyleSheets(); | |
+ Category category = (Category) value; | |
+ if (!prefetched.contains(category)) { | |
+ prefetched.add(category); | |
+ Prefetcher.prefetch(category.getSplitPoints()); | |
+ } | |
+ } | |
+ }); | |
- // Create the application | |
- setupTitlePanel(constants); | |
- setupMainLinks(constants); | |
- setupOptionsPanel(); | |
- setupMainMenu(constants); | |
+ // Always prefetch. | |
+ Prefetcher.start(); | |
+ | |
+ // Change the history token when a main menu item is selected. | |
+ selectionModel.addSelectionChangeHandler( | |
+ new SelectionChangeEvent.Handler() { | |
+ public void onSelectionChange(SelectionChangeEvent event) { | |
+ ContentWidget selected = selectionModel.getSelectedObject(); | |
+ if (selected != null) { | |
+ History.newItem(getContentWidgetToken(selected), true); | |
+ } | |
+ } | |
+ }); | |
- // Setup a history handler to reselect the associate menu item | |
- final ValueChangeHandler<String> historyHandler = new ValueChangeHandler<String>() { | |
+ // Setup a history handler to reselect the associate menu item. | |
+ final ValueChangeHandler<String> historyHandler = new ValueChangeHandler< | |
+ String>() { | |
public void onValueChange(ValueChangeEvent<String> event) { | |
- TreeItem item = itemTokens.get(event.getValue()); | |
- if (item == null) { | |
- item = app.getMainMenu().getItem(0).getChild(0); | |
+ // Get the content widget associated with the history token. | |
+ ContentWidget contentWidget = treeModel.getContentWidgetForToken( | |
+ event.getValue()); | |
+ if (contentWidget == null) { | |
+ return; | |
+ } | |
+ | |
+ // Expand the tree node associated with the content. | |
+ Category category = treeModel.getCategoryForContentWidget( | |
+ contentWidget); | |
+ TreeNode node = mainMenu.getRootTreeNode(); | |
+ int childCount = node.getChildCount(); | |
+ for (int i = 0; i < childCount; i++) { | |
+ if (node.getChildValue(i) == category) { | |
+ node.setChildOpen(i, true, true); | |
+ break; | |
+ } | |
} | |
- // Select the associated TreeItem | |
- app.getMainMenu().setSelectedItem(item, false); | |
- app.getMainMenu().ensureSelectedItemVisible(); | |
+ // Select the node in the tree. | |
+ selectionModel.setSelected(contentWidget, true); | |
- // Show the associated ContentWidget | |
- displayContentWidget(itemWidgets.get(item)); | |
+ // Display the content widget. | |
+ displayContentWidget(contentWidget); | |
} | |
}; | |
History.addValueChangeHandler(historyHandler); | |
- // Add a handler that sets the content widget when a menu item is selected | |
- app.addSelectionHandler(new SelectionHandler<TreeItem>() { | |
- public void onSelection(SelectionEvent<TreeItem> event) { | |
- TreeItem item = event.getSelectedItem(); | |
- ContentWidget content = itemWidgets.get(item); | |
- if (content != null && !content.equals(app.getContent())) { | |
- History.newItem(getContentWidgetToken(content)); | |
- } | |
- } | |
- }); | |
- | |
- // Show the initial example | |
+ // Show the initial example. | |
if (History.getToken().length() > 0) { | |
History.fireCurrentHistoryState(); | |
} else { | |
- // Use the first token available | |
- TreeItem firstItem = app.getMainMenu().getItem(0).getChild(0); | |
- app.getMainMenu().setSelectedItem(firstItem, false); | |
- app.getMainMenu().ensureSelectedItemVisible(); | |
- displayContentWidget(itemWidgets.get(firstItem)); | |
+ // Use the first token available. | |
+ TreeNode root = mainMenu.getRootTreeNode(); | |
+ TreeNode category = root.setChildOpen(0, true); | |
+ ContentWidget content = (ContentWidget) category.getChildValue(0); | |
+ selectionModel.setSelected(content, true); | |
} | |
- } | |
- /** | |
- * Set the content to the {@link ContentWidget}. | |
- * | |
- * @param content the {@link ContentWidget} to display | |
- */ | |
- private void displayContentWidget(ContentWidget content) { | |
- if (content != null) { | |
- app.setContent(content); | |
- app.setContentTitle(content.getTabBar()); | |
- } | |
- } | |
- | |
- /** | |
- * Get the token for a given content widget. | |
- * | |
- * @return the content widget token. | |
- */ | |
- private String getContentWidgetToken(ContentWidget content) { | |
- String className = content.getClass().getName(); | |
- className = className.substring(className.lastIndexOf('.') + 1); | |
- return className; | |
+ // Generate a site map. | |
+ createSiteMap(contentWidgets); | |
} | |
/** | |
- * Get the style name of the reference element defined in the current GWT | |
- * theme style sheet. | |
+ * Create a hidden site map for crawlability. | |
* | |
- * @param prefix the prefix of the reference style name | |
- * @return the style name | |
- */ | |
- private String getCurrentReferenceStyleName(String prefix) { | |
- String gwtRef = prefix + "-Reference-" + CUR_THEME; | |
- if (LocaleInfo.getCurrentLocale().isRTL()) { | |
- gwtRef += "-rtl"; | |
+ * @param contentWidgets the {@link ContentWidget}s used in Showcase | |
+ */ | |
+ private void createSiteMap(Set<ContentWidget> contentWidgets) { | |
+ SafeHtmlBuilder sb = new SafeHtmlBuilder(); | |
+ for (ContentWidget cw : contentWidgets) { | |
+ String token = getContentWidgetToken(cw); | |
+ sb.append(SafeHtmlUtils.fromTrustedString("<a href=\"#" + token + "\">" | |
+ + token + "</a>")); | |
} | |
- return gwtRef; | |
- } | |
- | |
- /** | |
- * Create the main links at the top of the application. | |
- * | |
- * @param constants the constants with text | |
- */ | |
- private void setupMainLinks(ShowcaseConstants constants) { | |
- // Link to GWT Homepage | |
- app.addLink(new HTML("<a href=\"" + ShowcaseConstants.GWT_HOMEPAGE + "\">" | |
- + constants.mainLinkHomepage() + "</a>")); | |
- | |
- // Link to More Examples | |
- app.addLink(new HTML("<a href=\"" + ShowcaseConstants.GWT_EXAMPLES + "\">" | |
- + constants.mainLinkExamples() + "</a>")); | |
- } | |
- | |
- /** | |
- * Setup all of the options in the main menu. | |
- * | |
- * @param constants the constant values to use | |
- */ | |
- private void setupMainMenu(ShowcaseConstants constants) { | |
- Tree mainMenu = app.getMainMenu(); | |
- | |
- // Widgets | |
- TreeItem catWidgets = mainMenu.addItem(constants.categoryWidgets()); | |
- setupMainMenuOption(catWidgets, new CwCheckBox(constants), | |
- images.catWidgets()); | |
- setupMainMenuOption(catWidgets, new CwRadioButton(constants), | |
- images.catWidgets()); | |
- setupMainMenuOption(catWidgets, new CwBasicButton(constants), | |
- images.catWidgets()); | |
- setupMainMenuOption(catWidgets, new CwCustomButton(constants), | |
- images.catWidgets()); | |
- setupMainMenuOption(catWidgets, new CwFileUpload(constants), | |
- images.catWidgets()); | |
- setupMainMenuOption(catWidgets, new CwDatePicker(constants), | |
- images.catWidgets()); | |
- setupMainMenuOption(catWidgets, new CwHyperlink(constants), | |
- images.catWidgets()); | |
- | |
- // Lists | |
- TreeItem catLists = mainMenu.addItem(constants.categoryLists()); | |
- setupMainMenuOption(catLists, new CwListBox(constants), images.catLists()); | |
- setupMainMenuOption(catLists, new CwSuggestBox(constants), | |
- images.catLists()); | |
- setupMainMenuOption(catLists, new CwTree(constants), images.catLists()); | |
- setupMainMenuOption(catLists, new CwMenuBar(constants), images.catLists()); | |
- setupMainMenuOption(catLists, new CwStackPanel(constants), | |
- images.catLists()); | |
- | |
- // Text | |
- TreeItem catText = mainMenu.addItem(constants.categoryTextInput()); | |
- setupMainMenuOption(catText, new CwBasicText(constants), | |
- images.catTextInput()); | |
- setupMainMenuOption(catText, new CwRichText(constants), | |
- images.catTextInput()); | |
- | |
- // Popups | |
- TreeItem catPopup = mainMenu.addItem(constants.categoryPopups()); | |
- setupMainMenuOption(catPopup, new CwBasicPopup(constants), | |
- images.catPopups()); | |
- setupMainMenuOption(catPopup, new CwDialogBox(constants), | |
- images.catPopups()); | |
- | |
- // Panels | |
- TreeItem catPanels = mainMenu.addItem(constants.categoryPanels()); | |
- setupMainMenuOption(catPanels, new CwDecoratorPanel(constants), | |
- images.catPanels()); | |
- setupMainMenuOption(catPanels, new CwFlowPanel(constants), | |
- images.catPanels()); | |
- setupMainMenuOption(catPanels, new CwHorizontalPanel(constants), | |
- images.catPanels()); | |
- setupMainMenuOption(catPanels, new CwVerticalPanel(constants), | |
- images.catPanels()); | |
- setupMainMenuOption(catPanels, new CwAbsolutePanel(constants), | |
- images.catPanels()); | |
- setupMainMenuOption(catPanels, new CwDockPanel(constants), | |
- images.catPanels()); | |
- setupMainMenuOption(catPanels, new CwDisclosurePanel(constants), | |
- images.catPanels()); | |
- setupMainMenuOption(catPanels, new CwTabPanel(constants), | |
- images.catPanels()); | |
- setupMainMenuOption(catPanels, new CwHorizontalSplitPanel(constants), | |
- images.catPanels()); | |
- setupMainMenuOption(catPanels, new CwVerticalSplitPanel(constants), | |
- images.catPanels()); | |
- | |
- // Tables | |
- TreeItem catTables = mainMenu.addItem(constants.categoryTables()); | |
- setupMainMenuOption(catTables, new CwGrid(constants), images.catTables()); | |
- setupMainMenuOption(catTables, new CwFlexTable(constants), | |
- images.catTables()); | |
- | |
- // Internationalization | |
- TreeItem catI18N = mainMenu.addItem(constants.categoryI18N()); | |
- setupMainMenuOption(catI18N, new CwNumberFormat(constants), | |
- images.catI18N()); | |
- setupMainMenuOption(catI18N, new CwDateTimeFormat(constants), | |
- images.catI18N()); | |
- setupMainMenuOption(catI18N, new CwMessagesExample(constants), | |
- images.catI18N()); | |
- setupMainMenuOption(catI18N, new CwPluralFormsExample(constants), | |
- images.catI18N()); | |
- setupMainMenuOption(catI18N, new CwConstantsExample(constants), | |
- images.catI18N()); | |
- setupMainMenuOption(catI18N, new CwConstantsWithLookupExample(constants), | |
- images.catI18N()); | |
- setupMainMenuOption(catI18N, new CwDictionaryExample(constants), | |
- images.catI18N()); | |
- | |
- // Other | |
- TreeItem catOther = mainMenu.addItem(constants.categoryOther()); | |
- setupMainMenuOption(catOther, new CwAnimation(constants), images.catOther()); | |
- setupMainMenuOption(catOther, new CwCookies(constants), images.catOther()); | |
- } | |
- | |
- /** | |
- * Add an option to the main menu. | |
- * | |
- * @param parent the {@link TreeItem} that is the option | |
- * @param content the {@link ContentWidget} to display when selected | |
- * @param image the icon to display next to the {@link TreeItem} | |
- */ | |
- private void setupMainMenuOption(TreeItem parent, ContentWidget content, | |
- ImageResource image) { | |
- // Create the TreeItem | |
- TreeItem option = parent.addItem(AbstractImagePrototype.create(image).getHTML() | |
- + " " + content.getName()); | |
- // Map the item to its history token and content widget | |
- itemWidgets.put(option, content); | |
- itemTokens.put(getContentWidgetToken(content), option); | |
+ // Add the site map to the page. | |
+ HTML siteMap = new HTML(sb.toSafeHtml()); | |
+ siteMap.setVisible(false); | |
+ RootPanel.get().add(siteMap, 0, 0); | |
} | |
- | |
+ | |
/** | |
- * Create the options that appear next to the title. | |
+ * Set the content to the {@link ContentWidget}. | |
+ * | |
+ * @param content the {@link ContentWidget} to display | |
*/ | |
- private void setupOptionsPanel() { | |
- VerticalPanel vPanel = new VerticalPanel(); | |
- vPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_RIGHT); | |
- if (LocaleInfo.getCurrentLocale().isRTL()) { | |
- vPanel.getElement().setAttribute("align", "left"); | |
- } else { | |
- vPanel.getElement().setAttribute("align", "right"); | |
- } | |
- app.setOptionsWidget(vPanel); | |
- | |
- // Add the option to change the locale | |
- final ListBox localeBox = new ListBox(); | |
- String currentLocale = LocaleInfo.getCurrentLocale().getLocaleName(); | |
- if (currentLocale.equals("default")) { | |
- currentLocale = "en"; | |
- } | |
- String[] localeNames = LocaleInfo.getAvailableLocaleNames(); | |
- for (String localeName : localeNames) { | |
- if (!localeName.equals("default")) { | |
- String nativeName = LocaleInfo.getLocaleNativeDisplayName(localeName); | |
- localeBox.addItem(nativeName, localeName); | |
- if (localeName.equals(currentLocale)) { | |
- localeBox.setSelectedIndex(localeBox.getItemCount() - 1); | |
- } | |
- } | |
+ private void displayContentWidget(ContentWidget content) { | |
+ if (content == null) { | |
+ return; | |
} | |
- localeBox.addChangeHandler(new ChangeHandler() { | |
- public void onChange(ChangeEvent event) { | |
- String localeName = localeBox.getValue(localeBox.getSelectedIndex()); | |
- UrlBuilder builder = Location.createUrlBuilder().setParameter("locale", | |
- localeName); | |
- Window.Location.replace(builder.buildString()); | |
- } | |
- }); | |
- HorizontalPanel localeWrapper = new HorizontalPanel(); | |
- localeWrapper.add(new Image(images.locale())); | |
- localeWrapper.add(localeBox); | |
- vPanel.add(localeWrapper); | |
- | |
- // Add the option to change the style | |
- final HorizontalPanel styleWrapper = new HorizontalPanel(); | |
- vPanel.add(styleWrapper); | |
- for (int i = 0; i < ShowcaseConstants.STYLE_THEMES.length; i++) { | |
- final ThemeButton button = new ThemeButton( | |
- ShowcaseConstants.STYLE_THEMES[i]); | |
- styleWrapper.add(button); | |
- button.addClickHandler(new ClickHandler() { | |
- public void onClick(ClickEvent event) { | |
- // 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(); | |
- } | |
- }); | |
- } | |
+ shell.setContent(content); | |
+ Window.setTitle("Showcase of Features: " + content.getName()); | |
} | |
/** | |
- * Create the title bar at the top of the application. | |
- * | |
- * @param constants the constant values to use | |
+ * Convenience method for getting the document's head element. | |
+ * | |
+ * @return the document's head element | |
*/ | |
- private void setupTitlePanel(ShowcaseConstants constants) { | |
- // Get the title from the internationalized constants | |
- String pageTitle = "<h1>" + constants.mainTitle() + "</h1><h2>" | |
- + constants.mainSubTitle() + "</h2>"; | |
- | |
- // Add the title and some images to the title bar | |
- HorizontalPanel titlePanel = new HorizontalPanel(); | |
- titlePanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE); | |
- titlePanel.add(new Image(images.gwtLogo())); | |
- titlePanel.add(new HTML(pageTitle)); | |
- app.setTitleWidget(titlePanel); | |
- } | |
+ private native HeadElement getHeadElement() /*-{ | |
+ return $doc.getElementsByTagName("head")[0]; | |
+ }-*/; | |
/** | |
- * Update the style sheets to reflect the current theme and direction. | |
+ * Inject the GWT theme style sheet based on the RTL direction of the current | |
+ * locale. | |
*/ | |
- private void updateStyleSheets() { | |
- // Generate the names of the style sheets to include | |
- String gwtStyleSheet = "gwt/" + CUR_THEME + "/" + CUR_THEME + ".css"; | |
- String showcaseStyleSheet = CUR_THEME + "/Showcase.css"; | |
- if (LocaleInfo.getCurrentLocale().isRTL()) { | |
- gwtStyleSheet = gwtStyleSheet.replace(".css", "_rtl.css"); | |
- showcaseStyleSheet = showcaseStyleSheet.replace(".css", "_rtl.css"); | |
- } | |
- | |
- // Find existing style sheets that need to be removed | |
- boolean styleSheetsFound = false; | |
- final HeadElement headElem = StyleSheetLoader.getHeadElement(); | |
- final List<Element> toRemove = new ArrayList<Element>(); | |
- NodeList<Node> children = headElem.getChildNodes(); | |
- for (int i = 0; i < children.getLength(); i++) { | |
- Node node = children.getItem(i); | |
- if (node.getNodeType() == Node.ELEMENT_NODE) { | |
- Element elem = Element.as(node); | |
- if (elem.getTagName().equalsIgnoreCase("link") | |
- && elem.getPropertyString("rel").equalsIgnoreCase("stylesheet")) { | |
- styleSheetsFound = true; | |
- String href = elem.getPropertyString("href"); | |
- // If the correct style sheets are already loaded, then we should have | |
- // nothing to remove. | |
- if (!href.contains(gwtStyleSheet) | |
- && !href.contains(showcaseStyleSheet)) { | |
- toRemove.add(elem); | |
- } | |
- } | |
- } | |
- } | |
- | |
- // Return if we already have the correct style sheets | |
- if (styleSheetsFound && toRemove.size() == 0) { | |
- return; | |
- } | |
- | |
- // Detach the app while we manipulate the styles to avoid rendering issues | |
- RootPanel.get().remove(app); | |
- | |
- // Remove the old style sheets | |
- for (Element elem : toRemove) { | |
- headElem.removeChild(elem); | |
- } | |
+ private void injectThemeStyleSheet() { | |
+ // Choose the name style sheet based on the locale. | |
+ String styleSheet = "gwt/" + THEME + "/" + THEME; | |
+ styleSheet += LocaleInfo.getCurrentLocale().isRTL() ? "_rtl.css" : ".css"; | |
// Load the GWT theme style sheet | |
String modulePath = GWT.getModuleBaseURL(); | |
- Command callback = new Command() { | |
- /** | |
- * The number of style sheets that have been loaded and executed this | |
- * command. | |
- */ | |
- private int numStyleSheetsLoaded = 0; | |
- | |
- public void execute() { | |
- // Wait until all style sheets have loaded before re-attaching the app | |
- numStyleSheetsLoaded++; | |
- if (numStyleSheetsLoaded < 2) { | |
- return; | |
- } | |
- | |
- // Different themes use different background colors for the body | |
- // element, but IE only changes the background of the visible content | |
- // on the page instead of changing the background color of the entire | |
- // page. By changing the display style on the body element, we force | |
- // IE to redraw the background correctly. | |
- RootPanel.getBodyElement().getStyle().setProperty("display", "none"); | |
- RootPanel.getBodyElement().getStyle().setProperty("display", ""); | |
- RootPanel.get().add(app); | |
- } | |
- }; | |
- StyleSheetLoader.loadStyleSheet(modulePath + gwtStyleSheet, | |
- getCurrentReferenceStyleName("gwt"), callback); | |
- | |
- // Load the showcase specific style sheet after the GWT theme style sheet so | |
- // that custom styles supercede the theme styles. | |
- StyleSheetLoader.loadStyleSheet(modulePath + showcaseStyleSheet, | |
- getCurrentReferenceStyleName("Application"), callback); | |
+ LinkElement linkElem = Document.get().createLinkElement(); | |
+ linkElem.setRel("stylesheet"); | |
+ linkElem.setType("text/css"); | |
+ linkElem.setHref(modulePath + styleSheet); | |
+ getHeadElement().appendChild(linkElem); | |
} | |
} | |
diff --git a/src/com/google/gwt/sample/showcase/client/ShowcaseConstants.java b/src/com/google/gwt/sample/showcase/client/ShowcaseConstants.java | |
index e30e5fe..f676456 100644 | |
--- a/src/com/google/gwt/sample/showcase/client/ShowcaseConstants.java | |
+++ b/src/com/google/gwt/sample/showcase/client/ShowcaseConstants.java | |
@@ -15,7 +15,17 @@ | |
*/ | |
package com.google.gwt.sample.showcase.client; | |
-import com.google.gwt.i18n.client.Constants; | |
+import com.google.gwt.sample.showcase.client.MainMenuTreeViewModel.MenuConstants; | |
+import com.google.gwt.sample.showcase.client.content.cell.CwCellBrowser; | |
+import com.google.gwt.sample.showcase.client.content.cell.CwCellList; | |
+import com.google.gwt.sample.showcase.client.content.cell.CwCellSampler; | |
+import com.google.gwt.sample.showcase.client.content.cell.CwCellTable; | |
+import com.google.gwt.sample.showcase.client.content.cell.CwCellTree; | |
+import com.google.gwt.sample.showcase.client.content.cell.CwCellValidation; | |
+import com.google.gwt.sample.showcase.client.content.cell.CwCustomDataGrid; | |
+import com.google.gwt.sample.showcase.client.content.cell.CwDataGrid; | |
+import com.google.gwt.sample.showcase.client.content.i18n.CwBidiFormatting; | |
+import com.google.gwt.sample.showcase.client.content.i18n.CwBidiInput; | |
import com.google.gwt.sample.showcase.client.content.i18n.CwConstantsExample; | |
import com.google.gwt.sample.showcase.client.content.i18n.CwConstantsWithLookupExample; | |
import com.google.gwt.sample.showcase.client.content.i18n.CwDateTimeFormat; | |
@@ -25,6 +35,7 @@ import com.google.gwt.sample.showcase.client.content.i18n.CwNumberFormat; | |
import com.google.gwt.sample.showcase.client.content.i18n.CwPluralFormsExample; | |
import com.google.gwt.sample.showcase.client.content.lists.CwListBox; | |
import com.google.gwt.sample.showcase.client.content.lists.CwMenuBar; | |
+import com.google.gwt.sample.showcase.client.content.lists.CwStackLayoutPanel; | |
import com.google.gwt.sample.showcase.client.content.lists.CwStackPanel; | |
import com.google.gwt.sample.showcase.client.content.lists.CwSuggestBox; | |
import com.google.gwt.sample.showcase.client.content.lists.CwTree; | |
@@ -37,10 +48,9 @@ import com.google.gwt.sample.showcase.client.content.panels.CwDisclosurePanel; | |
import com.google.gwt.sample.showcase.client.content.panels.CwDockPanel; | |
import com.google.gwt.sample.showcase.client.content.panels.CwFlowPanel; | |
import com.google.gwt.sample.showcase.client.content.panels.CwHorizontalPanel; | |
-import com.google.gwt.sample.showcase.client.content.panels.CwHorizontalSplitPanel; | |
-import com.google.gwt.sample.showcase.client.content.panels.CwTabPanel; | |
+import com.google.gwt.sample.showcase.client.content.panels.CwSplitLayoutPanel; | |
+import com.google.gwt.sample.showcase.client.content.panels.CwTabLayoutPanel; | |
import com.google.gwt.sample.showcase.client.content.panels.CwVerticalPanel; | |
-import com.google.gwt.sample.showcase.client.content.panels.CwVerticalSplitPanel; | |
import com.google.gwt.sample.showcase.client.content.popups.CwBasicPopup; | |
import com.google.gwt.sample.showcase.client.content.popups.CwDialogBox; | |
import com.google.gwt.sample.showcase.client.content.tables.CwFlexTable; | |
@@ -58,25 +68,23 @@ import com.google.gwt.sample.showcase.client.content.widgets.CwRadioButton; | |
/** | |
* Constants used throughout the showcase. | |
*/ | |
-public interface ShowcaseConstants extends Constants, | |
- ContentWidget.CwConstants, CwCheckBox.CwConstants, | |
- CwRadioButton.CwConstants, CwBasicButton.CwConstants, | |
- CwCustomButton.CwConstants, CwListBox.CwConstants, | |
- CwSuggestBox.CwConstants, CwTree.CwConstants, CwMenuBar.CwConstants, | |
- CwFlowPanel.CwConstants, CwDisclosurePanel.CwConstants, | |
- CwTabPanel.CwConstants, CwDockPanel.CwConstants, | |
- CwHorizontalPanel.CwConstants, CwHorizontalSplitPanel.CwConstants, | |
- CwVerticalPanel.CwConstants, CwVerticalSplitPanel.CwConstants, | |
- CwBasicPopup.CwConstants, CwDialogBox.CwConstants, CwGrid.CwConstants, | |
- CwFlexTable.CwConstants, CwBasicText.CwConstants, CwRichText.CwConstants, | |
- CwFileUpload.CwConstants, CwAbsolutePanel.CwConstants, | |
- CwHyperlink.CwConstants, CwFrame.CwConstants, CwStackPanel.CwConstants, | |
- CwCookies.CwConstants, CwNumberFormat.CwConstants, | |
- CwDateTimeFormat.CwConstants, CwMessagesExample.CwConstants, | |
- CwConstantsExample.CwConstants, CwConstantsWithLookupExample.CwConstants, | |
- CwDictionaryExample.CwConstants, CwDecoratorPanel.CwConstants, | |
- CwAnimation.CwConstants, CwDatePicker.CwConstants, | |
- CwPluralFormsExample.CwConstants { | |
+public interface ShowcaseConstants extends MenuConstants, CwCheckBox.CwConstants, | |
+ CwRadioButton.CwConstants, CwBasicButton.CwConstants, CwCustomButton.CwConstants, | |
+ CwListBox.CwConstants, CwSuggestBox.CwConstants, CwTree.CwConstants, CwMenuBar.CwConstants, | |
+ CwFlowPanel.CwConstants, CwDisclosurePanel.CwConstants, CwTabLayoutPanel.CwConstants, | |
+ CwDockPanel.CwConstants, CwHorizontalPanel.CwConstants, CwVerticalPanel.CwConstants, | |
+ CwBasicPopup.CwConstants, CwDialogBox.CwConstants, CwGrid.CwConstants, CwFlexTable.CwConstants, | |
+ CwBasicText.CwConstants, CwRichText.CwConstants, CwFileUpload.CwConstants, | |
+ CwAbsolutePanel.CwConstants, CwHyperlink.CwConstants, CwFrame.CwConstants, | |
+ CwStackPanel.CwConstants, CwCookies.CwConstants, CwNumberFormat.CwConstants, | |
+ CwBidiInput.CwConstants, CwBidiFormatting.CwConstants, CwDateTimeFormat.CwConstants, | |
+ CwMessagesExample.CwConstants, CwConstantsExample.CwConstants, | |
+ CwConstantsWithLookupExample.CwConstants, CwDictionaryExample.CwConstants, | |
+ CwDecoratorPanel.CwConstants, CwAnimation.CwConstants, CwDatePicker.CwConstants, | |
+ CwPluralFormsExample.CwConstants, CwCellList.CwConstants, CwCellTable.CwConstants, | |
+ CwDataGrid.CwConstants, CwCellTree.CwConstants, CwCellBrowser.CwConstants, | |
+ CwCellValidation.CwConstants, CwCellSampler.CwConstants, CwSplitLayoutPanel.CwConstants, | |
+ CwStackLayoutPanel.CwConstants, CwCustomDataGrid.CwConstants { | |
/** | |
* The path to source code for examples, raw files, and style definitions. | |
@@ -97,60 +105,4 @@ public interface ShowcaseConstants extends Constants, | |
* 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 = {"standard", "chrome", "dark"}; | |
- | |
- String categoryI18N(); | |
- | |
- String categoryLists(); | |
- | |
- String categoryOther(); | |
- | |
- String categoryPanels(); | |
- | |
- String categoryPopups(); | |
- | |
- String categoryTables(); | |
- | |
- String categoryTextInput(); | |
- | |
- String categoryWidgets(); | |
- | |
- /** | |
- * @return text for the link to more examples | |
- */ | |
- String mainLinkExamples(); | |
- | |
- /** | |
- * @return text for the link to the GWT homepage | |
- */ | |
- String mainLinkHomepage(); | |
- | |
- /** | |
- * @return the title of the main menu | |
- */ | |
- String mainMenuTitle(); | |
- | |
- /** | |
- * @return the sub title of the application | |
- */ | |
- String mainSubTitle(); | |
- | |
- /** | |
- * @return the title of the application | |
- */ | |
- String mainTitle(); | |
} | |
diff --git a/src/com/google/gwt/sample/showcase/client/ShowcaseConstants.properties b/src/com/google/gwt/sample/showcase/client/ShowcaseConstants.properties | |
deleted file mode 100644 | |
index 8428646..0000000 | |
--- a/src/com/google/gwt/sample/showcase/client/ShowcaseConstants.properties | |
+++ /dev/null | |
@@ -1,241 +0,0 @@ | |
-mainMenuTitle = GWT Examples | |
-mainSubTitle = Showcase of Features | |
-mainTitle = Google Web Toolkit | |
-mainLinkHomepage = GWT Homepage | |
-mainLinkExamples = More Examples | |
- | |
-categoryI18N = Internationalization | |
-categoryLists = Lists and Menus | |
-categoryOther = Other Features | |
-categoryPanels = Panels | |
-categoryPopups = Popups | |
-categoryTables = Tables | |
-categoryTextInput = Text Input | |
-categoryWidgets = Widgets | |
- | |
-contentWidgetExample = Example | |
-contentWidgetSource = Source Code | |
-contentWidgetStyle = CSS Style | |
- | |
-cwAbsolutePanelName = Absolute Panel | |
-cwAbsolutePanelDescription = An absolute panel positions all of its children absolutely, allowing them to overlap. | |
-cwAbsolutePanelClickMe = Click Me! | |
-cwAbsolutePanelHelloWorld = Hello World | |
-cwAbsolutePanelLeft = <b>Left:</b> | |
-cwAbsolutePanelItemsToMove = <b>Items to move:</b> | |
-cwAbsolutePanelTop = <b>Top:</b> | |
-cwAbsolutePanelWidgetNames = Hello World, Button, Grid | |
-cwAnimationName = Animations | |
-cwAnimationDescription = Animate your application with timed effects. | |
-cwAnimationStart = Start | |
-cwAnimationCancel = Cancel | |
-cwAnimationOptions = Animation Options | |
-cwBasicButtonName = Basic Button | |
-cwBasicButtonDescription = Basic button widgets | |
-cwBasicButtonClickMessage = Stop poking me! | |
-cwBasicButtonDisabled = Disabled Button | |
-cwBasicButtonNormal = Normal Button | |
-cwBasicPopupName = Basic Popup | |
-cwBasicPopupDescription = GWT provides the framework to create a custom popup. | |
-cwBasicPopupClickOutsideInstructions = Click anywhere outside this popup to make it disappear. | |
-cwBasicPopupInstructions = <b>Click an image to see full size:</b> | |
-cwBasicPopupShowButton = Show Basic Popup | |
-cwBasicTextName = Basic Text | |
-cwBasicTextDescription = GWT includes the standard complement of text-entry widgets, each of which supports keyboard and selection events you can use to control text entry. In particular, notice that the selection range for each widget is updated whenever you press a key. | |
-cwBasicTextAreaLabel = <b>Text area:</b> | |
-cwBasicTextNormalLabel = <b>Normal text box:</b> | |
-cwBasicTextPasswordLabel = <b>Password text box:</b> | |
-cwBasicTextReadOnly = read only | |
-cwBasicTextSelected = Selected | |
-cwCheckBoxName = Checkbox | |
-cwCheckBoxDescription = Basic Checkbox Widgets | |
-cwCheckBoxCheckAll = <b>Check all days that you are available:</b> | |
-cwCheckBoxDays = Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday | |
-cwConstantsExampleDescription = Interface Constants makes it possible to localize strings, numbers, and maps of strings onto strings. This example isn't terribly exciting, but it does demonstrate how to localize constants. The labels and color choices below are provided by the localized implementation of the sample interface ExampleConstants. | |
-cwConstantsExampleName = Constants | |
-cwConstantsExampleLinkText = This example interacts with the sample interface: | |
-cwConstantsWithLookupExampleDescription = Interface ConstantsWithLookup makes it possible to dynamically look up localized values using method names as string keys. | |
-cwConstantsWithLookupExampleLinkText = This example interacts with the sample interface: | |
-cwConstantsWithLookupExampleMethodName = <b>Name of method:</b> | |
-cwConstantsWithLookupExampleName = Constants With Lookup | |
-cwConstantsWithLookupExampleResults = <b>Lookup results:</b> | |
-cwConstantsWithLookupExampleNoInput = <Please enter a method name above> | |
-cwConstantsWithLookupExampleNoMatches = <Not found> | |
-cwCookiesName = Cookies | |
-cwCookiesDescription = Track users with ease and save data on the client side using cookies. | |
-cwCookiesDeleteCookie = Delete | |
-cwCookiesExistingLabel = <b>Existing Cookies:</b> | |
-cwCookiesInvalidCookie = You must specify a cookie name | |
-cwCookiesNameLabel = <b>Name:</b> | |
-cwCookiesSetCookie = Set Cookie | |
-cwCookiesValueLabel = <b>Value:</b> | |
-cwCustomButtonName = Custom Button | |
-cwCustomButtonDescription = PushButtons and ToggleButtons allow you to customize the look of your buttons | |
-cwCustomButtonPush = <b>Push Buttons:</b> | |
-cwCustomButtonToggle = <b>Toggle Buttons:</b> | |
-cwDatePickerName = Date Picker | |
-cwDatePickerDescription = Let users select a date using the DatePicker. | |
-cwDatePickerBoxLabel = <br><br><br><b>DateBox with popup DatePicker:</b> | |
-cwDatePickerLabel = <b>Permanent DatePicker:</b> | |
-cwDateTimeFormatName = Date Time Format | |
-cwDateTimeFormatDescription = Class DateTimeFormat supports locale-sensitive formatting and parsing of date and time values, like NumberFormat, using a flexible pattern-based syntax. Both custom patterns and standard patterns are supported. | |
-cwDateTimeFormatFailedToParseInput = Unable to parse input | |
-cwDateTimeFormatFormattedLabel = <b>Formatted value:</b> | |
-cwDateTimeFormatInvalidPattern = Invalid pattern | |
-cwDateTimeFormatPatternLabel = <b>Pattern:</b> | |
-cwDateTimeFormatPatterns = Full Date/Time, Long Date/Time, Medium Date/Time, Short Date/Time, Full Date, Long Date, Medium Date, Short Date, Full Time, Long Time, Medium Time, Short Time, Custom | |
-cwDateTimeFormatValueLabel = <b>Value to format:</b> | |
-cwDecoratorPanelFormDescription = Description: | |
-cwDecoratorPanelFormName = Name: | |
-cwDecoratorPanelFormTitle = Enter Search Criteria | |
-cwDecoratorPanelName = Decorator Panel | |
-cwDecoratorPanelDescription = Add rounded corners to any Widget using the Decorator Panel. | |
-cwDialogBoxName = Dialog Box | |
-cwDialogBoxDescription = The draggable DialogBox resembles a window and includes a title bar. You can adjust to opacity to allow some of the background to show through the popup. | |
-cwDialogBoxMakeTransparent = Make Translucent | |
-cwDialogBoxCaption = Sample DialogBox | |
-cwDialogBoxClose = Close | |
-cwDialogBoxDetails = This is an example of a standard dialog box component. | |
-cwDialogBoxItem = item | |
-cwDialogBoxListBoxInfo = This list box demonstrates that you can drag the popup over it. This obscure corner case renders incorrectly for many other libraries. | |
-cwDialogBoxShowButton = Show Dialog Box | |
-cwDictionaryExampleName = Dictionary | |
-cwDictionaryExampleDescription = Using the Dictionary class, you can lookup localized values within JavaScript objects defined in the host HTML page rather than compiling them into your GWT code. This is useful if your translations change frequently, because your HTML server can emit updated translations into the host page HTML as often as needed. It can also a useful way to integrate a GWT module with existing localized web applications. Note that a dictionary's values depend only on the host page HTML and are not influenced by the GWT locale client property. For this example, the JavaScript variable declaration appears in the source for this HTML page. | |
-cwDictionaryExampleLinkText = <b>This example interacts with the following JavaScript variable:</b> | |
-cwDisclosurePanelName = Disclosure Panel | |
-cwDisclosurePanelDescription = A Disclosure Panel will show or hide its contents when the user clicks on the header text. The contents can be simple text, or any Widget, such as an image or advanced options in a form. | |
-cwDisclosurePanelFormAdvancedCriteria = Advanced Criteria | |
-cwDisclosurePanelFormDescription = Description: | |
-cwDisclosurePanelFormGender = Gender: | |
-cwDisclosurePanelFormGenderOptions = male, female | |
-cwDisclosurePanelFormLocation = Location: | |
-cwDisclosurePanelFormName = Name: | |
-cwDisclosurePanelFormTitle = <b>Enter Search Criteria</b> | |
-cwDockPanelName = Dock Panel | |
-cwDockPanelDescription = A Dock Panel aligns its content using compass directions. | |
-cwDockPanelCenter = This is a <code>ScrollPanel</code> contained at the center of a <code>DockPanel</code>. By putting some fairly large contents in the middle and setting its size explicitly, it becomes a scrollable area within the page, but without requiring the use of an IFRAME.<br><br>Here's quite a bit more meaningless text that will serve primarily to make this thing scroll off the bottom of its visible area. Otherwise, you might have to make it really, really small in order to see the nifty scroll bars! | |
-cwDockPanelEast = This is the east component | |
-cwDockPanelNorth1 = This is the first north component | |
-cwDockPanelNorth2 = This is the second north component | |
-cwDockPanelSouth1 = This is the first south component | |
-cwDockPanelSouth2 = This is the second south component | |
-cwDockPanelWest = This is the west component | |
-cwFileUploadName = File Upload | |
-cwFileUploadDescription = Upload files asynchronously using AJAX file uploads. | |
-cwFileUploadNoFileError = You must select a file to upload | |
-cwFileUploadSelectFile = <b>Select a file:</b> | |
-cwFileUploadSuccessful = File uploaded! | |
-cwFileUploadButton = Upload File | |
-cwFlexTableName = Flex Table | |
-cwFlexTableDescription = The Flex Table supports row spans and column spans, allowing you to layout data in a variety of ways. | |
-cwFlexTableAddRow = Add a row | |
-cwFlexTableDetails = This is a FlexTable that supports <B>colspans</B> and <B>rowspans</B>. You can use it to format your page or as a special purpose table. | |
-cwFlexTableRemoveRow = Remove a row | |
-cwFlowPanelName = Flow Panel | |
-cwFlowPanelDescription = A Flow Panel lets its content flow naturally. | |
-cwFlowPanelItem = Item | |
-cwFrameName = Frames | |
-cwFrameDescription = Embed content from other sites into your page using the Frame, a wrapper around an IFRAME element. | |
-cwFrameSetLocation = Set Location | |
-cwGridName = Grid | |
-cwGridDescription = A simple grid | |
-cwHorizontalPanelName = Horizontal Panel | |
-cwHorizontalPanelDescription = A Horizontal Panel aligns its content horizontally without allowing it to wrap. Resize the page to see how the content maintains its horizontal alignment. | |
-cwHorizontalPanelButton = Button | |
-cwHorizontalSplitPanelName = Horizontal Split Panel | |
-cwHorizontalSplitPanelDescription = Give users the freedom to decide how to allocate space using this split panel. | |
-cwHorizontalSplitPanelText = This is some text to show how the contents on either side of the splitter flow. | |
-cwHyperlinkName = Hyperlink | |
-cwHyperlinkDescription = Embed your page with Hyperlinks to navigate to different sections. Hyperlinks create history tokens, allowing users to return to a previous state using the browser back button. | |
-cwHyperlinkChoose = <b>Choose a section:</b> | |
-cwListBoxName = List Box | |
-cwListBoxDescription = Built-in selection box and drop down lists | |
-cwListBoxCars = compact, sedan, coupe, convertible, SUV, truck | |
-cwListBoxCategories = Cars, Sports, Vacation Spots | |
-cwListBoxSelectAll = <b>Select all that apply:</b> | |
-cwListBoxSelectCategory = <b>Select a category:</b> | |
-cwListBoxSports = Baseball, Basketball, Football, Hockey, Lacrosse, Polo, Soccer, Softball, Water Polo | |
-cwListBoxVacations = Carribean, Grand Canyon, Paris, Italy, New York, Las Vegas | |
-cwMenuBarName = Menu Bar | |
-cwMenuBarDescription = The Menu Bar can be used to navigate through many options. It also supports nested sub menus. | |
-cwMenuBarEditCategory = Edit | |
-cwMenuBarEditOptions = Undo, Redo, Cut, Copy, Paste | |
-cwMenuBarFileCategory = File | |
-cwMenuBarFileOptions = New, Open, Close, Recent, Exit | |
-cwMenuBarFileRecents = Fishing in the desert.txt, How to tame a wild parrot, Idiots Guide to Emu Farms | |
-cwMenuBarGWTOptions = Download, Examples, Source Code, GWT wit' the program | |
-cwMenuBarHelpCategory = Help | |
-cwMenuBarHelpOptions = Contents, Fortune Cookie, About GWT | |
-cwMenuBarPrompts = Thank you for selecting a menu item, A fine selection indeed, Don't you have anything better to do than select menu items?, Try something else, this is just a menu!, Another wasted click | |
-cwMessagesExampleName = Messages | |
-cwMessagesExampleDescription = Interface Messages provides a way to create strongly-typed parameterized messages that are checked for correctness during compilation. | |
-cwMessagesExampleArg0Label = <b>Argument {0}:</b> | |
-cwMessagesExampleArg1Label = <b>Argument {1}:</b> | |
-cwMessagesExampleArg2Label = <b>Argument {2}:</b> | |
-cwMessagesExampleFormattedLabel = <b>Formatted message:</b> | |
-cwMessagesExampleLinkText = This example interacts with the sample interface: | |
-cwMessagesExampleTemplateLabel = <b>Message template:</b> | |
-cwNumberFormatName = Number Format | |
-cwNumberFormatDescription = Class NumberFormat supports locale-sensitive formatting and parsing of numbers using a flexible pattern-based syntax. In addition to custom patterns, several standard patterns are also available for convenience. | |
-cwNumberFormatFailedToParseInput = Unable to parse input | |
-cwNumberFormatFormattedLabel = <b>Formatted value:</b> | |
-cwNumberFormatInvalidPattern = Invalid pattern | |
-cwNumberFormatPatternLabel = <b>Pattern:</b> | |
-cwNumberFormatPatterns = Decimal, Currency, Scientific, Percent, Custom | |
-cwNumberFormatValueLabel = <b>Value to format:</b> | |
-cwPluralFormsExampleName = Plural Forms | |
-cwPluralFormsExampleDescription = Plural Forms provide a way to create message translations that depend on the count of something. | |
-cwPluralFormsExampleArg0Label = <b>Argument {0}:</b> | |
-cwPluralFormsExampleFormattedLabel = <b>Formatted message:</b> | |
-cwPluralFormsExampleLinkText = This example interacts with the sample interface: | |
-cwRadioButtonName = Radio Button | |
-cwRadioButtonDescription = Basic RadioButton Widget | |
-cwRadioButtonColors = blue, red, yellow, green | |
-cwRadioButtonSelectColor = <b>Select your favorite color:</b> | |
-cwRadioButtonSelectSport = <b>Select your favorite sport:</b> | |
-cwRadioButtonSports = Baseball, Basketball, Football, Hockey, Soccer, Water Polo | |
-cwRichTextName = Rich Text | |
-cwRichTextDescription = The Rich Text Area is supported on all major browsers, and will fall back gracefully to the level of functionality supported on each. | |
-cwStackPanelName = Stack Panel | |
-cwStackPanelDescription = The StackPanel stacks its children vertically, displaying only one at a time, with a header for each child which the user can click to display. This is useful for vertical menu systems. | |
-cwStackPanelContactsHeader = Contacts | |
-cwStackPanelContacts = Benoit Mandelbrot, Albert Einstein, Rene Descartes, Bob Saget, Ludwig von Beethoven, Richard Feynman, Alan Turing, John von Neumann | |
-cwStackPanelContactsEmails = [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected] | |
-cwStackPanelMailHeader = Mail | |
-cwStackPanelMailFolders = Inbox, Drafts, Templates, Sent, Trash | |
-cwStackPanelFiltersHeader = Filters | |
-cwStackPanelFilters = All, Starred, Read, Unread, Recent, Sent by me | |
-cwSuggestBoxName = Suggest Box | |
-cwSuggestBoxDescription = Generate suggestions via RPC calls to the server or static data on the page | |
-cwSuggestBoxLabel = <b>Choose a word:</b> | |
-cwSuggestBoxWords = 1337, apple, about, ant, bruce, banana, bobv, canada, coconut, compiler, donut, deferred binding, dessert topping, eclair, ecc, frog attack, floor wax, fitz, google, gosh, gwt, hollis, haskell, hammer, in the flinks, internets, ipso facto, jat, jgw, java, jens, knorton, kaitlyn, kangaroo, la grange, lars, love, morrildl, max, maddie, mloofle, mmendez, nail, narnia, null, optimizations, obfuscation, original, ping pong, polymorphic, pleather, quotidian, quality, qu'est-ce que c'est, ready state, ruby, rdayal, subversion, superclass, scottb, tobyr, the dans, ~ tilde, undefined, unit tests, under 100ms, vtbl, vidalia, vector graphics, w3c, web experience, work around, w00t!, xml, xargs, xeno, yacc, yank (the vi command), zealot, zoe, zebra | |
-cwTabPanelName = Tab Panel | |
-cwTabPanelDescription = Divide content over multiple tabs. | |
-cwTabPanelTab0 = Click one of the tabs to see more content. | |
-cwTabPanelTab2 = Tabs are highly customizable using CSS. | |
-cwTabPanelTabs = Home, GWT Logo, More Info | |
-cwTreeName = Tree | |
-cwTreeDescription = Dynamic Tree Widget supports lazy loading of data via RPC calls to the server | |
-cwTreeDynamicLabel = <b>Dynamic Tree:</b> | |
-cwTreeItem = Item | |
-cwTreeStaticLabel = <b>Static Tree:</b> | |
-cwTreeComposers = Beethoven, Brahms, Mozart | |
-cwTreeConcertos = Concertos | |
-cwTreeQuartets = Quartets | |
-cwTreeSonatas = Sonatas | |
-cwTreeSymphonies = Symphonies | |
-cwTreeBeethovenWorkConcertos = No. 1 - C, No. 2 - B-Flat Major, No. 3 - C Minor, No. 4 - G Major, No. 5 - E-Flat Major | |
-cwTreeBeethovenWorkQuartets = Six String Quartets, Three String Quartets, Grosse Fugue for String Quartets | |
-cwTreeBeethovenWorkSonatas = Sonata in A Minor, Sonata in F Major | |
-cwTreeBeethovenWorkSymphonies = No. 2 - D Major, No. 2 - D Major, No. 3 - E-Flat Major, No. 4 - B-Flat Major, No. 5 - C Minor, No. 6 - F Major, No. 7 - A Major, No. 8 - F Major, No. 9 - D Minor | |
-cwTreeBrahmsWorkConcertos = Violin Concerto, Double Concerto - A Minor, Piano Concerto No. 1 - D Minor, Piano Concerto No. 2 - B-Flat Major | |
-cwTreeBrahmsWorkQuartets = Piano Quartet No. 1 - G Minor, Piano Quartet No. 2 - A Major, Piano Quartet No. 3 - C Minor, String Quartet No. 3 - B-Flat Minor | |
-cwTreeBrahmsWorkSonatas = Two Sonatas for Clarinet - F Minor, Two Sonatas for Clarinet - E-Flat Major | |
-cwTreeBrahmsWorkSymphonies = No. 1 - C Minor, No. 2 - D Minor, No. 3 - F Major, No. 4 - E Minor | |
-cwTreeMozartWorkConcertos = Piano Concerto No. 12, Piano Concerto No. 17, Clarinet Concerto, Violin Concerto No. 5, Violin Concerto No. 4 | |
-cwVerticalPanelName = Vertical Panel | |
-cwVerticalPanelDescription = A Vertical Panel aligns its content vertically without allowing it to wrap. Resize the page to see how the content maintains its vertical alignment. | |
-cwVerticalPanelButton = Button | |
-cwVerticalSplitPanelName = Vertical Split Panel | |
-cwVerticalSplitPanelDescription = Give users the freedom to decide how to allocate space using this split panel. | |
-cwVerticalSplitPanelText = This is some text to show how the contents on either side of the splitter flow. | |
diff --git a/src/com/google/gwt/sample/showcase/client/ShowcaseConstants_ar.properties b/src/com/google/gwt/sample/showcase/client/ShowcaseConstants_ar.properties | |
deleted file mode 100644 | |
index 94b42c0..0000000 | |
--- a/src/com/google/gwt/sample/showcase/client/ShowcaseConstants_ar.properties | |
+++ /dev/null | |
@@ -1,245 +0,0 @@ | |
-mainMenuTitle = امثلة GWT | |
-mainSubTitle = عرض المزايا | |
-mainTitle = ادوات غوغل للويب | |
-mainLinkHomepage = صفحة GWT الرئيسية | |
-mainLinkExamples = المزيد من الامثله | |
- | |
-categoryI18N = التدويل | |
-categoryLists = القوائم واللوائح | |
-categoryOther = مزايا اخرى | |
-categoryPanels = الواح | |
-categoryPopups = النوافذ المنبثقة | |
-categoryTables = الجداول | |
-categoryTextInput = ادخال النص | |
-categoryWidgets = ŸàÿØÿ¨ÿßÿ™ | |
- | |
-contentWidgetExample = مثال | |
-contentWidgetSource = شفره المصدر | |
-contentWidgetStyle = اسلوب CSS | |
- | |
-cwAbsolutePanelName = اللوح المطلق | |
-cwAbsolutePanelDescription = اللوح المطلق يوزع محتوياته بشكل مطلق مما يتيح لهم التداخل | |
-cwAbsolutePanelClickMe = انقر هنا! | |
-cwAbsolutePanelHelloWorld = اهلا بالعالم | |
-cwAbsolutePanelLeft = <b>اليسار:</b> | |
-cwAbsolutePanelItemsToMove = <b>العناصر التي ستنقل:</b> | |
-cwAbsolutePanelTop = <b>عليا:</b> | |
-cwAbsolutePanelWidgetNames = اهلا بالعالم, زر, شبكة | |
-cwBasicButtonName = زر اساسي | |
-cwBasicButtonDescription = ودجات الزر الاساسي | |
-cwBasicButtonClickMessage = توقف عن وكزي! | |
-cwBasicButtonDisabled = زر المعوقين | |
-cwBasicButtonNormal = ÿ≤ÿ± ÿπÿßÿØŸä | |
-cwBasicPopupName = نافذة منبثقة اساسية | |
-cwBasicPopupDescription = GWT يوفر الاطار لخلق نوافذ منبثقة مخصصة | |
-cwBasicPopupClickOutsideInstructions = انقر في اي مكان خارج هذه النافذة المنبثقة لاخفائها | |
-cwBasicPopupInstructions = <b>انقر على الصورة لترى الحجم الكامل:</b> | |
-cwBasicPopupShowButton = اظهار النافذة المنبثقة الاساسية | |
-cwBasicTextName = النص الاساسي | |
-cwBasicTextDescription = GWT يتضمن المتمم القياسي لودجات ادخال النص. كل من هذه الودجات يدعم الاحداث الناتجة من لوحة المفاتيح ومن الاختيار والتي يمكن استخدامها للتحكم بادخال النص. بالتحديد لاحظ ان نطاق الاختيار لكل ودجة يتم تحديثه مع كل كبسة مفتاح. | |
-cwBasicTextAreaLabel = <b>منطقة النص:</b> | |
-cwBasicTextNormalLabel = <b>ŸÖÿ±ÿ®ÿπ ŸÜÿµ ÿπÿßÿØŸä:</b> | |
-cwBasicTextPasswordLabel = <b>مربع نص كلمة السر:</b> | |
-cwBasicTextReadOnly = ŸÇÿ±ÿßÿ°ÿ© ŸÅŸÇÿ∑ | |
-cwBasicTextSelected = ŸÖÿÆÿ™ÿßÿ±ÿ© | |
-cwCheckBoxName = خانة تأشير | |
-cwCheckBoxDescription = ودجات خانة تاشير اساسية | |
-cwCheckBoxCheckAll = <b>تأكد من ان كل الأيام أنت المتاحة:</b> | |
-cwCheckBoxDays = الاثنين , الثلاثاء , الاربعاء , الخميس , الجمعة , السبت , الأحد | |
-cwConstantsExampleDescription = ان ثوابت الواجهة تمكن من التخصيص المحلي للمنصوصات او الارقام وجداول تعيين المنصوصات على منصوصات. مع ان هذا ليس مثالا ممتازا الا انه يوضح كيف يمكن تخصيص الثوابت محليا. ان اللواصق وخيارات الالوان ادناه مزودة من التطبيق الذي تم تخصيصه محليا لعينة الواجهة ExampleConstants | |
-cwConstantsExampleName = الثوابت | |
-cwConstantsExampleLinkText = هذا المثال يتفاعل مع عينة الواجهة: | |
-cwConstantsWithLookupExampleDescription = ان واجهة ConstantsWithLookup تجعل من الممكن البحث عن قيم تم تخصيصها محليا باستخدام اسم الدالة كمفتاح للبحث | |
-cwConstantsWithLookupExampleLinkText = هذا المثال يتفاعل مع عينة الواجهة: | |
-cwConstantsWithLookupExampleMethodName = <b>اسم الطريقة:</b> | |
-cwConstantsWithLookupExampleName = ÿ´Ÿàÿßÿ®ÿ™ ŸÖÿπ ÿ®ÿ≠ÿ´ | |
-cwConstantsWithLookupExampleResults = <b>نتائج البحث:</b> | |
-cwConstantsWithLookupExampleNoInput =< الرجاء ادخال اسم الطريقة اعلاه > | |
-cwConstantsWithLookupExampleNoMatches = <غير موجود> | |
-cwCookiesName = الكعكات | |
-cwCookiesDescription = تتبع المستخدم بسهولة وحفظ البيانات عند المستخدم باستخدام الكعكات. | |
-cwCookiesDeleteCookie = حذف | |
-cwCookiesExistingLabel = <b>الكعكات الموجودة:</b> | |
-cwCookiesInvalidCookie = عليك ان تحدد اسم كعكه | |
-cwCookiesNameLabel = <b>الاسم:</b> | |
-cwCookiesSetCookie = تحديد كعكه | |
-cwCookiesValueLabel = <b>القيمه:</b> | |
-cwCustomButtonName = ÿ≤ÿ± ŸÖÿÆÿµÿµ | |
-cwCustomButtonDescription = ازرار الدفع وازرار التبديل تمكنك من تخصيص مظهر الازرار | |
-cwCustomButtonPush = <b>ÿßÿ≤ÿ±ÿßÿ± ÿØŸÅÿπ:</b> | |
-cwCustomButtonToggle = <b>ازرار تبديل:</b> | |
-cwDateTimeFormatName = نسق التاريخ والوقت | |
-cwDateTimeFormatDescription = ان صنف نسق التاريخ والوقت يدعم التنسيق تبعا للخصائص المحلية وتحليل قيم التاريخ والوقت مثل NumberFormat, باستخدام صيغة مرنة معتمدة على النمط. ان كل من الانماط القياسية والانماط المخصصة مدعومة. | |
-cwDateTimeFormatFailedToParseInput = غير قادر على تحليل المدخلات | |
-cwDateTimeFormatFormattedLabel = <b>قيمة منسقة:</b> | |
-cwDateTimeFormatInvalidPattern = نمط غير سليم | |
-cwDateTimeFormatPatternLabel = <b>ŸÜŸÖÿ∑:</b> | |
-cwDateTimeFormatPatterns = التاريخ/الوقت كامل, التاريخ/الوقت طويل, التاريخ/الوقت متوسط, التاريخ/الوقت قصير, التاريخ كامل, التاريخ طويل, التاريخ متوسط, التاريخ قصير, الوقت كامل, الوقت طويل, الوقت متوسط, الوقت قصير, مخصص | |
-cwDateTimeFormatValueLabel = <b>قيمة للتنسيق:</b> | |
-cwDecoratorPanelFormDescription = الوصف: | |
-cwDecoratorPanelFormName = اسم: | |
-cwDecoratorPanelFormTitle = <b>ادخال معايير البحث</b> | |
-cwDialogBoxName = مربع الحوار | |
-cwDialogBoxDescription = ان مربع الوار القابل للسحب يشبه النافذة ويحتوي على شريط عنوان. بالامكان تعديل العتمة لاظهار جزء من الخلفية من خلال النافذة المنبثقة. | |
-cwDialogBoxMakeTransparent = تحديد شفافية | |
-cwDialogBoxCaption = عينة لمربع حوال | |
-cwDialogBoxClose = اغلاق | |
-cwDialogBoxDetails = هذا مثال لمكون مربع حوار قياسي. | |
-cwDialogBoxItem = عنصر | |
-cwDialogBoxListBoxInfo = ان مربع قائمة الخيارات هذا يوضح امكانية سحب النافذة المنبثقة فوقه. ان حالة الزاوية الغامضة هذه تظهر بشكل غير صحيح في معظم المكتبات الاخرى. | |
-cwDialogBoxShowButton = اظهار مربع حوار | |
-cwDictionaryExampleName = قاموس | |
-cwDictionaryExampleDescription = باستخدام صنف القاموس, يمكنك البحث عن قيم تم تخصيصها محليا ضمن كائنات جافاسكريبت والمعرفة ضمن مضيف صفحة HTML بدلا من تجميعهم داخل شفرة GWT الخاصة بك. هذه الامكانية مفيدة في حالة تغير الترجمة كثيرا لكون خادم HTML يمكن ان يبث الترجمة المحدثة داخل صفحة HTML المضيفة كلما دعت الحاجة. كما ويمكن ان يكون هذا مفيدا لدمج وحدة GWT مع تطبيق ويب تم تخصيصه محليا. لاحظ ان قيم القاموس تعتمد فقط على صفحة مضيف HTML ولا تتأثر بصفات عميلGWT المحلي. في هذا المثال, يظهر اعلان متغير جافاسكريبت في المصدر لصفحة HTML المعنية. | |
-cwDictionaryExampleLinkText = <b>هذا المثال يتفاعل مع متغيرات جافاسكريبت التالية :</b> | |
-cwDisclosurePanelName = لوحة الكشف | |
-cwDisclosurePanelDescription = لوحة الكشف تظهر او تخفي محتوياتها عندما ينقر المستخدم على نص الترويسة. ممكن ان تكون المحتويات نص بسيط, او اي ودجة, مثلا صورة او خيارات متقدمة في استمارة. | |
-cwDisclosurePanelFormAdvancedCriteria = معايير متقدمة | |
-cwDisclosurePanelFormDescription = الوصف: | |
-cwDisclosurePanelFormGender = الجنس: | |
-cwDisclosurePanelFormGenderOptions = ذكر, انثى | |
-cwDisclosurePanelFormLocation = موقع: | |
-cwDisclosurePanelFormName = اسم: | |
-cwDisclosurePanelFormTitle = <b>ادخال معايير البحث</b> | |
-cwDockPanelName = ŸÑŸàÿ≠ ÿßÿ±ÿ≥ÿßÿ° | |
-cwDockPanelDescription = لوح الارساء يحاذي محتوياته باستخدام اتجاهات البوصلة. | |
-cwDockPanelCenter = هذا هو <code>scrollpanel</code> المدونه الواردة في هذا المركز من <code>dockpanel</code> المدونه>. من خلال وضع بعض المحتويات الى حد كبير في خط الوسط وتحديد حجمه صراحة , فانه يصبح المجال قابل للتدرج ضمن صفحة , ولكن دون ان يتطلب ذلك استخدام وسيلة iframe. <br><br>اليك لا بأس به اكثر معنى النص من شأنه ان يخدم في المقام الاول لجعل هذا الشيء لفيفه من اسفل منطقة اعمالها للعيان. خلاف ذلك , انك قد تضطر الى جعلها حقا , حقا الصغيرة كي نرى nifty فيفه القضبان! | |
-cwDockPanelEast = هذا هو العنصر الشرق | |
-cwDockPanelNorth1 = هذا هو العنصر الشمالي الاول | |
-cwDockPanelNorth2 = هذا هو العنصر الشمالي الثاني | |
-cwDockPanelSouth1 = هذا هو العنصر الجنوبي الاول | |
-cwDockPanelSouth2 = هذا هو العنصر الجنوبي الثاني | |
-cwDockPanelWest = هذا هو العنصر الغربي | |
-cwFileUploadName = تصعيد ملف | |
-cwFileUploadDescription = تصعيد الملف بشكل غير متزامن باستخدام امكانية اجاكس لتصعيد الملفات | |
-cwFileUploadNoFileError = يجب عليك اختيار ملف للتصعيد | |
-cwFileUploadSelectFile = <b>قم باختيار ملف:</b> | |
-cwFileUploadSuccessful = تم تصعيد الملف! | |
-cwFileUploadButton = تصعيد الملف | |
-cwFlexTableName = جدول فلكس | |
-cwFlexTableDescription = ان جدول فلكس يدعم اتساع الصفوف والاعمدة مما يتيح لك ترتيب المعلومات بطرق مختلفة | |
-cwFlexTableAddRow = اضافة صف | |
-cwFlexTableDetails = هذا هو جدول فلكس والذي يدعم <b>colspan</b> و <b>rowspans</b>. يمكنك تنسيق الصفحة الخاصة بك كجدول من نوع خاص | |
-cwFlexTableRemoveRow = احذف صف | |
-cwFlowPanelName = لوحة الانسياب | |
-cwFlowPanelDescription = لوحة الانسياب تتيح لمحتوياتها الانسياب بشكل طبيعي. | |
-cwFlowPanelItem = عنصر | |
-cwFrameName = ÿßÿ∑ÿßÿ±ÿßÿ™ | |
-cwFrameDescription = قم بتضمين محتويات من موقع اخر داخل الصفحة الخاصة بك باستخدام الاطار الذي يمثل غلاف حول عنصر IFRAME | |
-cwFrameSetLocation = حدد مكان | |
-cwGridName = شبكة | |
-cwGridDescription = شبكة بسيطة | |
-cwHorizontalPanelName = لوح افقي | |
-cwHorizontalPanelDescription = اللوح الافقي يحاذي محتوياته افقيا ولا يسمح لها بالالتفاف. قم بتغير حجم الصفحة لتلاحظ يف ان المحتويات تحافظ على محاذاتها الافقية. | |
-cwHorizontalPanelButton = ÿ≤ÿ± | |
-cwHorizontalSplitPanelName = لوح الانقسام الافقي | |
-cwHorizontalSplitPanelDescription = اعطاء المستخدمين حرية تحديد توزيع الفضاء باستخدام لوح الانقسام. | |
-cwHorizontalSplitPanelText = هذا النص عبارة عن مثال لتوضيح انسياب النص على كل جانب من الفاصل | |
-cwHyperlinkName = وصلة | |
-cwHyperlinkDescription = قم بتضمين الوصلات داخل الصفحة للملاحة بين الاقسام المختلفة. ان الوصلات تولد علامات توثق تسلسل (تأريخ) الملاحة بحيث يمكن العودة الى الحالة السابقة باستخدام زر "السابق" في المتصفح | |
-cwHyperlinkChoose = <b>اختيار احد الاقسام:</b> | |
-cwListBoxName = مربع اللائحة | |
-cwListBoxDescription = مربع اختيار ولوائح منسدلة مضمنين | |
-cwListBoxCars = الميثاق , سيدان , العربة , للتحويل , جيب , وشاحنة | |
-cwListBoxCategories = سيارات, رياضة, مواقع للعطلة | |
-cwListBoxSelectAll = <b>اختر كل ما ينطبق:</b> | |
-cwListBoxSelectCategory = <b>اختر الفئة:</b> | |
-cwListBoxSports = البيسبول , كرة السلة , كرة القدم الامريكية , الهوكي , لاكروس , بولو , كرة القدم , الكرة الناعمة , وكرة الماء | |
-cwListBoxVacations = منطقة البحر الكاريبي , جراند كانيون , باريس , ايطاليا , نيويورك , لاس فيجا | |
-cwMenuBarName = شريط القوائم | |
-cwMenuBarDescription = شريط القوائم يمكنك من التنقل بين العديد من الخيارات, وكذلك يعدم القوائم المتفرعة | |
-cwMenuBarEditCategory = تحرير | |
-cwMenuBarEditOptions = تراجع , اعادة , قطع , نسخة , وألصق | |
-cwMenuBarFileCategory = الملف | |
-cwMenuBarFileOptions = جديد, فتح, اغلاق, مؤخرا, خروج | |
-cwMenuBarFileRecents = صيد السمك في الصحراء.txt , كيفية تدريب الببغاوات البرية, دليل البلهاء للمزارع | |
-cwMenuBarGWTOptions = تنزيل, امثلة, شفرة المصدرة, وت gwt, البرنامج | |
-cwMenuBarHelpCategory = ŸÖÿ≥ÿßÿπÿØÿ© | |
-cwMenuBarHelpOptions = المحتويات , كعكه الحظ , عن gwt | |
-cwMenuBarPrompts = شكرا لاختيارك عنصر من القائمة. اختيار جيد فعلا. الا يوجد شيء افضل تقوم به بدلا من اختيارك عنصرا من القائمة؟ | |
-cwMessagesExampleName = رسائل | |
-cwMessagesExampleDescription = ان واجهة الرسائل تمكن من توليد رسائل بمتغيرات محددة الانواع والتي يمكن التحقق من صحتها خلال التجميع | |
-cwMessagesExampleArg0Label = <b>متغير {0}:</b> | |
-cwMessagesExampleArg1Label = <b>متغير {1}:</b> | |
-cwMessagesExampleArg2Label = <b>متغير {2}:</b> | |
-cwMessagesExampleFormattedLabel = <b>رسالة منسقة:</b> | |
-cwMessagesExampleLinkText = هذا المثال يتفاعل مع عينة الواجهة: | |
-cwMessagesExampleTemplateLabel = <b>قالب رسالة:</b> | |
-cwNumberFormatName = نسق الاعداد | |
-cwNumberFormatDescription = الصنف NumberFormat يدعم تنسيق حسب الاعدادات المحلية وتحليل الارقام باستخدام صيغة مرنة تعتمد على نمط الرقم. بالاضافة الى الانماط المخصصة, هنالك مجموعة من الانماط القياسية. | |
-cwNumberFormatFailedToParseInput = غير قادر على تحليل المدخلات | |
-cwNumberFormatFormattedLabel = <b>قيمة منسقة:</b> | |
-cwNumberFormatInvalidPattern = نمط غير صالح | |
-cwNumberFormatPatternLabel = <b>ŸÜŸÖÿ∑:</b> | |
-cwNumberFormatPatterns = عشري, عملة, علمي, نسبة مؤوية, تخصيص | |
-cwNumberFormatValueLabel = <b>قيمة للتنسيق:</b> | |
-cwPluralFormsExampleArg0Label = <b>متغير {0}:</b> | |
-cwPluralFormsExampleFormattedLabel = <b>رسالة منسقة:</b> | |
-cwPluralFormsExampleLinkText = هذا المثال يتفاعل مع عينة الواجهة: | |
-cwRadioButtonName = زر انتقاء | |
-cwRadioButtonDescription = ودجة زر انتقاء اساسي | |
-cwRadioButtonColors = ازرق ,احمر ,اصفر ,اخضر | |
-cwRadioButtonSelectColor = <b>اختر اللون المفضل لديك:</b> | |
-cwRadioButtonSelectSport = <b>اختر الرياضة المفضلة لديك:</b> | |
-cwRadioButtonSports = البيسبول , كرة السلة , كرة القدم الامريكية , الهوكي , كرة القدم , كرة الماء | |
-cwRichTextName = النص الغني | |
-cwRichTextDescription = ان مكون حيز النص الغني مدعوم من قبل جميع المتصفحات الشائعة, ويتم التقليل من الامكانات المعروضة بشكل مناسب حسب امكانيات المتصفح. | |
-cwStackPanelName = لوح التكديس | |
-cwStackPanelDescription =ان لوح التكديس يكدس محتوياته عموديا ويعرض واحدة منها فقط في الوقت الواحد مع ترويسة لكل من المحتويات والتي ممكن النقر عليها لعرضها كاملة. ان هذا مفيد للقوائم العمودية. | |
-cwStackPanelContactsHeader = جهات الاتصال | |
-cwStackPanelContacts = بينويت ماندلبروت , البرت اينشتاين , رينيه ديكارت , بوب ساجيت, لودفيغ فون بيتهوفن , ريتشارد فاينمان , الآن تورنج , جون فون نيومان | |
-cwStackPanelContactsEmails = [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected] | |
-cwStackPanelMailHeader = البريد | |
-cwStackPanelMailFolders = البريد الوارد , مسودات , قوالب , أرسلت , المهملات | |
-cwStackPanelFiltersHeader = ŸÖÿ±ÿ¥ÿ≠ÿßÿ™ | |
-cwStackPanelFilters = الجميع, مؤشرة بالنجوم, مقروء , غير مقروء, حديث, مرسلة من قبلي | |
-cwSuggestBoxName = صندوق الاقتراحات | |
-cwSuggestBoxDescription = توليد اقتراحات خلال استدعاء اجراءات عن بعد (RPC) للخاد او بيانات ساكنة على الصفحة | |
-cwSuggestBoxLabel = <b>اختيار كلمة:</b> | |
-cwSuggestBoxWords = 1337 , تفاح , نحو , نمله , بروس , الموز , bobv , كندا , وجوز الهند , والمطيع , donut , ارجأت ملزمة , بينما تتصدر حلوى , eclair , رعايه الطفولة المبكره , ضفدع الهجوم , الكلمه الشمع , وفيتز , google , غوش , gwt , هوليس , حزقيل , المطرقه , في flinks , internets , بحكم الواقع , jat , jgw , جاوه , جينز , knorton , kaitlyn , الكنغر , مدينة لوس انجلوس المزرعه , لارس , الحب , morrildl , ماكس , maddie , mloofle , mmendez , مسمار , narnia , لاغيه , تحسينات , والتشويش , والأصل , بينغ بونغ , متعلق ب تعدد الأشكال , pleather , يومي , والجوده , qu'est - جيم - هاء c'est اختصار اسم مدينة كوبيك الكنديه , واستعداد الدولة , روبي , rdayal , التخريب , ما دون الشعبه وفوق الطبقة , scottb , tobyr , dans , ~ التلده , دون تعريف , وحده الاختبارات , في اطار 100ms , vtbl , مدينة فيداليا , مكافحة ناقلات الرسومات , ومجموعة الشبكه العالمية لمتصفحات الويب , ويب التجربه , وعمل حولها , w00t! , أكس أم أل , xargs , xeno , وياك , yank (سادسا القيادة) , المتعصب , زوي , العتابي | |
-cwTabPanelName = لوحة الجدولة | |
-cwTabPanelDescription = تقسم المحتويات على حقول متعددة | |
-cwTabPanelTab0 = انقر على أحد علامات الجدولة للاطلاع على المزيد من المحتوى. | |
-cwTabPanelTab2 = ممكن تخصيص حقول الجدولة بمرونة باستخدام CSS | |
-cwTabPanelTabs = الموطن , شعار gwt , والمزيد من المعلومات | |
-cwTreeName = ÿ¥ÿ¨ÿ±ÿ© | |
-cwTreeDescription = ودجة الشجرة الديناميكية تدعم التحميل الكسول للبيانات من خلال استدعاءات RPC للخادم | |
-cwTreeDynamicLabel = <b>شجرة ديناميكية</b> | |
-cwTreeItem = العنصر | |
-cwTreeStaticLabel = <b>شجرة ساكنة</b> | |
-cwVerticalPanelName = اللوح العمودي | |
-cwVerticalPanelDescription = ان اللوح العمودي يحاذي محتوياته عموديا بدون السماح لهم بالالتفاف. قم بتغيير حجم الصفحة لملاحظة كيفية حفاظ المحتويات على محاذاتها العمودية. | |
-cwVerticalPanelButton = ÿ≤ÿ± | |
-cwVerticalSplitPanelName = لوح الانقسام العمودي | |
-cwVerticalSplitPanelDescription = اعطاء المستخدم حرية توزيع الفضاء باستخدام لوحة الانقسام | |
-cwVerticalSplitPanelText = هذا النص عبارة عن مثال لتوضيح انسياب النص على كل جانب من الفاصل. | |
- | |
-# TODO: sort new translation below into the file | |
-cwAnimationName = الرسوم المتحركه | |
-cwAnimationDescription = تحريك التطبيق بمؤثرات موقوتة. | |
-cwAnimationStart = البدء | |
-cwAnimationCancel = الغاء | |
-cwAnimationOptions = خيارات الرسوم المتحركه | |
-cwDecoratorPanelName = لوح الزخرفة | |
-cwDecoratorPanelDescription = اضافة زوايا مدورة لأي ودجة باستخدام لوح الزخرفة. | |
- | |
-# TODO: get official translations | |
-cwTreeComposers = بيتهوفن ,برامز ,موزارت | |
-cwTreeConcertos = القطع الموسيقيه | |
-cwTreeQuartets = الرباعيات | |
-cwTreeSonatas = السوناتات | |
-cwTreeSymphonies = السمفونيات | |
-cwTreeBeethovenWorkConcertos = رقم 1 -- ج ,رقم 2 -- ب - شقة كبيرة ,رقم 3 -- ج طفيفة ,رقم 4 -- ز الرئيسية ,رقم 5 -- ة - شقة الرئيسية | |
-cwTreeBeethovenWorkQuartets = الرباعيات ستة الخيط ,الخيط الرباعيات الثلاث, Grosse فقدان الذاكرة لسلسلة الرباعيات | |
-cwTreeBeethovenWorkSonatas = سوناتا فى قاصر ,و في سوناتا الرئيسية | |
-cwTreeBeethovenWorkSymphonies = رقم 2 -- د الرئيسية ,رقم 2 -- د الرئيسية ,رقم 3 -- ة - شقة كبيرة ,رقم 4 -- ب - شقة كبيرة ,رقم 5 -- ج طفيفة ,رقم 6 -- و الرئيسية ,رقم 7 -- رئيسي ,رقم 8 -- و الرئيسية ,العدد 9 -- د طفيفة | |
-cwTreeBrahmsWorkConcertos = كونشرتو الكمان ,اي ضعف كونشرتو -- قاصر ,كونشرتو البيانو رقم 1 -- مد طفيفة ,كونشرتو البيانو رقم 2 -- ب - شقة الرئيسية | |
-cwTreeBrahmsWorkQuartets = الرباعيه البيانو رقم 1 -- ز طفيفة ,المجموعة الرباعيه بيانو رقم 2 -- رئيسي ,المجموعة الرباعيه البيانو رقم 3 -- ج طفيفة ,رباعي رقم 3 -- ب - شقة بسيطة | |
-cwTreeBrahmsWorkSonatas = اثنين السوناتات لكلارينيت -- و قاصر ,لاثنين من السوناتات كلارينيت -- ة - شقة الرئيسية | |
-cwTreeBrahmsWorkSymphonies = رقم 1 -- ج طفيفة ,رقم 2 -- د طفيفة ,رقم 3 -- و الرئيسية ,رقم 4 -- ة طفيفة | |
-cwTreeMozartWorkConcertos = كونشرتو البيانو رقم 12 , كونشرتو البيانو رقم 17 , كونشرتو الكلارينت , كونشرتو الكمان رقم 5 , رقم 4 كونشرتو الكمان | |
-cwDatePickerName = تاريخ القاطف | |
-cwDatePickerDescription = اسمحوا المستخدمين اختيار تاريخ باستخدام DatePicker. | |
-cwDatePickerBoxLabel = <br><br><br><b>DateBox مع قافزة DatePicker : </b> | |
-cwDatePickerLabel = <b>الدائم DatePicker : </b> | |
-cwPluralFormsExampleName = تعدد أشكال | |
-cwPluralFormsExampleDescription = تعدد أشكال توفير وسيلة لخلق ترجمة الرسالة التي تعتمد على عدد من شيء. | |
diff --git a/src/com/google/gwt/sample/showcase/client/ShowcaseConstants_fr.properties b/src/com/google/gwt/sample/showcase/client/ShowcaseConstants_fr.properties | |
deleted file mode 100644 | |
index c177997..0000000 | |
--- a/src/com/google/gwt/sample/showcase/client/ShowcaseConstants_fr.properties | |
+++ /dev/null | |
@@ -1,243 +0,0 @@ | |
-mainMenuTitle = Exemples GWT | |
-mainSubTitle = Présentation des fonctionnalités | |
-mainTitle = Google Web Toolkit | |
-mainLinkHomepage = Page d'accueil de GWT | |
-mainLinkExamples = Autres exemples | |
- | |
-categoryI18N = Internationalisation | |
-categoryLists = Listes et menus | |
-categoryOther = Autres fonctions | |
-categoryPanels = Panneaux | |
-categoryPopups = Fenêtres pop-up | |
-categoryTables = Tables | |
-categoryTextInput = Saisie de texte | |
-categoryWidgets = Widgets | |
- | |
-contentWidgetExample = Exemple | |
-contentWidgetSource = Code source | |
-contentWidgetStyle = Style CSS | |
- | |
-cwAbsolutePanelName = Panneau Absolu | |
-cwAbsolutePanelDescription = Un panneau absolu positionne chacun de ces enfants en utilisant des coordonnées absolues, ce qui leurs permet de s'imbriquer. | |
-cwAbsolutePanelClickMe = Cliquez-moi! | |
-cwAbsolutePanelHelloWorld = Hello World | |
-cwAbsolutePanelLeft = <b>Bord gauche:</b> | |
-cwAbsolutePanelItemsToMove = <b>Points à circuler:</b> | |
-cwAbsolutePanelTop = <b>Bord du dessus:</b> | |
-cwAbsolutePanelWidgetNames = Bonjour le monde, Button, Grid | |
-cwAnimationName = Animations | |
-cwAnimationDescription = Animez vos applications à l'aide d'effets règlés à interval de temps fixe. | |
-cwAnimationStart = Commencer | |
-cwAnimationCancel = Annuler | |
-cwAnimationOptions = Options d'animation | |
-cwBasicButtonName = Bouton basique | |
-cwBasicButtonDescription = Widgets de bouton basique | |
-cwBasicButtonClickMessage = Arrêtez de me tapoter! | |
-cwBasicButtonDisabled = Bouton désactivé | |
-cwBasicButtonNormal = Bouton normal | |
-cwBasicPopupName = Fenêtre pop-up basique | |
-cwBasicPopupDescription = GWT fournit le cadre pour créer une fenêtre pop-up personnalisée. | |
-cwBasicPopupClickOutsideInstructions = Cliquez en dehors de cette fenêtre pop-up pour la faire disparaître. | |
-cwBasicPopupInstructions = <b>Cliquez sur une image pour l'afficher à sa taille maximale:</b> | |
-cwBasicPopupShowButton = Afficher la fenêtre pop-up basique | |
-cwBasicTextName = Texte basique | |
-cwBasicTextDescription = GWT inclut le complément standard des widgets de saisie de texte, ou chacun de ceux-ci supportent les evenements du clavier et de selectionnement que vous pouvez utliliser pour contrôler la saisie de texte. En particulier, notez que la plage de sélection pour chaque widget est mise à jour chaque fois que vous appuyez sur une touche. | |
-cwBasicTextAreaLabel = <b>Zone de texte:</b> | |
-cwBasicTextNormalLabel = <b>Zone de texte normale:</b> | |
-cwBasicTextPasswordLabel = <b>Zone de texte «mot de passe»:</b> | |
-cwBasicTextReadOnly = lecture seulement | |
-cwBasicTextSelected = Sélectionné | |
-cwCheckBoxName = Case à cocher | |
-cwCheckBoxDescription = Widgets de case à cocher basique | |
-cwCheckBoxCheckAll = <b>Arrivée tous les jours que vous êtes disponible:</b> | |
-cwCheckBoxDays = lundi, mardi, mercredi, jeudi, vendredi, samedi, dimanche | |
-cwConstantsExampleDescription = Les Constantes d'Interfaces permet de localiser des chaînes de caractères, des numéros et des mappes qui mappent une chaine de caractères à une autre. Cet exemple n'est pas très passionnant, mais il nous montre comment localiser des constantes. Les étiquettes et le choix des couleurs ci-dessous sont fournies par l'application localisée de l'échantillon d'interface ExampleConstants. | |
-cwConstantsExampleName = Constantes | |
-cwConstantsExampleLinkText = Cet exemple interagit avec l'échatillon de l'interface: | |
-cwConstantsWithLookupExampleDescription = L'Interface ConstantsWithLookup permet de rechercher dynamiquement des valeurs localisées en utilisant des méthodes des noms comme chaîne clés. | |
-cwConstantsWithLookupExampleLinkText = Cet exemple interagit avec l'échantillon de l'interface: | |
-cwConstantsWithLookupExampleMethodName = <b>Nom de la méthode:</b> | |
-cwConstantsWithLookupExampleName = Constantes Avec Lookup | |
-cwConstantsWithLookupExampleResults = <b>Résultats du Lookup:</b> | |
-cwConstantsWithLookupExampleNoInput = <entrer un nom de méthode, s’il vous plaît> | |
-cwConstantsWithLookupExampleNoMatches = <Pas de résultats trouvés> | |
-cwCookiesName = Cookies | |
-cwCookiesDescription = Traquez vos utilisateurs facilement et sauvegardez des données sur le client en utilisant des cookies. | |
-cwCookiesDeleteCookie = Supprimer | |
-cwCookiesExistingLabel = <b>Cookies existants:</b> | |
-cwCookiesInvalidCookie = Vous devez indiquer un nom de cookie | |
-cwCookiesNameLabel = <b>Nom:</b> | |
-cwCookiesSetCookie = Sauvegarder Cookie | |
-cwCookiesValueLabel = <b>Valeur:</b> | |
-cwCustomButtonName = Bouton personnalisé | |
-cwCustomButtonDescription = Les boutons de commande et les boutons à bascule vous permettent de personnaliser l'apparence de vos boutons | |
-cwCustomButtonPush = <b>Boutons de commande:</b> | |
-cwCustomButtonToggle = <b>Boutons à bascule:</b> | |
-cwDateTimeFormatName = Format Date Heure | |
-cwDateTimeFormatDescription = La classe DateTimeFormat supporte un formatage et analyse des valeurs date et heure qui est sensible au locale de l'usager, par exemple la classe NumberFormat, au moyen d'un modèle souple fondée sur le patron de la syntaxe. Les deux modèles standard et personnalisés schéma sont supportés. | |
-cwDateTimeFormatFailedToParseInput = Impossible d'analyser les données saisies. | |
-cwDateTimeFormatFormattedLabel = <b>Valeur formattée:</b> | |
-cwDateTimeFormatInvalidPattern = Patron incorrect | |
-cwDateTimeFormatPatternLabel = <b>Patron:</b> | |
-cwDateTimeFormatPatterns = Date Complète / Heure, Date Longue / Heure, Date Moyenne / Heure, Date Courte / Heure, Date Complète, Date Longue, Date Moyenne, Date Courte, Temps Complet, Temps Long, Temps Moyen, Temps Court, Personnalisé | |
-cwDateTimeFormatValueLabel = <b>Valeur au format:</b> | |
-cwDecoratorPanelFormDescription = Description: | |
-cwDecoratorPanelFormName = Nom: | |
-cwDecoratorPanelFormTitle = Saisissez des critères de recherche | |
-cwDecoratorPanelName = Panneau décorateur | |
-cwDecoratorPanelDescription = Ajouter des coins arrondis à un Widget en utilisant le panneau décorateur. | |
-cwDialogBoxName = Boîte de dialogue | |
-cwDialogBoxDescription = La boîte de dialogue que vous pouvez faire glisser et déposer, est similaire à une fenêtre et inclut une barre de titre. Vous pouvez régler l'opacité pour rendre visible une partie de l'arrière-plan à travers la fenêtre pop-up. | |
-cwDialogBoxMakeTransparent = Ajouter de la transparence | |
-cwDialogBoxCaption = Exemple de boîte de dialogue | |
-cwDialogBoxClose = Fermer | |
-cwDialogBoxDetails = Ceci est un exemple de composant de boîte de dialogue standard. | |
-cwDialogBoxItem = élément | |
-cwDialogBoxListBoxInfo = Cette zone de liste montre que vous pouvez faire glisser une fenêtre pop-up devant-elle. Ce problème complexe se répète pour de nombreuses autres bibliothèques. | |
-cwDialogBoxShowButton = Afficher la boîte de dialogue | |
-cwDictionaryExampleName = Dictionnaire | |
-cwDictionaryExampleDescription = En utilisant la classe Dictionary, vous pouvez recherchez les valeurs localisées qui sont définis dans des objets JavaScript dans la page HTML hôte plutôt que de les compilés dans votre code GWT. Cette option est utile si vos traductions changent fréquemment, car votre serveur HTML peut mettre à jour les traductions dans le HTML de la page d'accueil aussi souvent que nécessaire. Cette class présente également un moyen d'intégrer un module GWT avec des applications existantes qui sont localisés. Notez que les valeurs d'un dictionnaire dépendent sur le HTML de la page d'accueil et ne sont pas influencées par la propriete de locale de GWT. Pour cet exemple, la déclaration des objets JavaScript apparait dans le code source de cette page HTML. | |
-cwDictionaryExampleLinkText = <b>Cet exemple interagit avec le JavaScript variable suivant:</b> | |
-cwDisclosurePanelName = Panneau de présentation | |
-cwDisclosurePanelDescription = Un panneau de présentation affiche ou masque son contenu lorsque l'utilisateur clique sur le texte de son en-tête. Son contenu peut être un simple texte ou un widget, tel qu'une image ou des options avancées dans un formulaire. | |
-cwDisclosurePanelFormAdvancedCriteria = Critères avancés | |
-cwDisclosurePanelFormDescription = Description: | |
-cwDisclosurePanelFormGender = Sexe: | |
-cwDisclosurePanelFormGenderOptions = masculin, féminin | |
-cwDisclosurePanelFormLocation = Lieu: | |
-cwDisclosurePanelFormName = Nom: | |
-cwDisclosurePanelFormTitle = <b>Saisissez des critères de recherche</b> | |
-cwDockPanelName = Panneau d'ancrage | |
-cwDockPanelDescription = Dans un panneau d'ancrage, le contenu est placé en fonction des points cardinaux. | |
-cwDockPanelCenter = Voici un <code>panneau de défilement</code> situé au centre d'un <code>panneau d'ancrage</code>. Si des contenus relativement volumineux sont insérés au milieu de ce panneau à défilement et si sa taille est définie, il prend la forme d'une zone dotée d'une fonction de défilement à l'intérieur de la page, sans l'utilisation d'un IFRAME.<br><br>Voici un texte encore plus obscur qui va surtout servir à faire défiler cet élément jusqu'en bas de sa zone visible. Sinon, il vous faudra réduire ce panneau à une taille minuscule pour pouvoir afficher ces formidables barres de défilement! | |
-cwDockPanelEast = Ceci est le composant est | |
-cwDockPanelNorth1 = Ceci est le premier composant nord | |
-cwDockPanelNorth2 = Ceci est le second composant nord | |
-cwDockPanelSouth1 = Ceci est le premier composant sud | |
-cwDockPanelSouth2 = Ceci est le second composant sud | |
-cwDockPanelWest = Ceci est le composant ouest | |
-cwFileUploadName = Transfert de fichier | |
-cwFileUploadDescription = Transférez des fichiers de manière asynchrone à l'aide de transferts de fichiers AJAX | |
-cwFileUploadNoFileError = Vous devez sélectionner un fichier à envoyer | |
-cwFileUploadSelectFile = <b>Choisissez un fichier:</b> | |
-cwFileUploadSuccessful = Fichier téléchargé! | |
-cwFileUploadButton = Envoyer un fichier | |
-cwFlexTableName = Tableau flexible | |
-cwFlexTableDescription = Le tableau flexible prend en charge des plages de lignes et des plages de colonnes, pour vous permettre d'y disposer les données de plusieurs façons. | |
-cwFlexTableAddRow = Ajouter une ligne | |
-cwFlexTableDetails = Ceci est un tableau flexible qui prend en charge les <B>plages de colonne</B> et les <B>plages de ligne</B>. Vous pouvez l'utiliser pour mettre en forme votre page ou en tant que tableau réservé à un but précis. | |
-cwFlexTableRemoveRow = Supprimer une ligne | |
-cwFlowPanelName = Panneau déroulant | |
-cwFlowPanelDescription = Dans un panneau déroulant, le contenu défile de manière continue. | |
-cwFlowPanelItem = Élément | |
-cwFrameName = Cadres | |
-cwFrameDescription = Intégrez le contenu d'autres sites dans votre page à l'aide de l'encadrement, une enveloppe autour d'un élément IFRAME. | |
-cwFrameSetLocation = Fixez l'emplacement | |
-cwGridName = Grille | |
-cwGridDescription = Grille simple | |
-cwHorizontalPanelName = Panneau horizontal | |
-cwHorizontalPanelDescription = Dans un panneau horizontal, le contenu est aligné horizontalement sans être renvoyé à la ligne. Redimensionnez la page pour voir comment le contenu conserve son alignement horizontal. | |
-cwHorizontalPanelButton = Bouton | |
-cwHorizontalSplitPanelName = Panneau à fractionnement horizontal | |
-cwHorizontalSplitPanelDescription = Donne aux utilisateurs la possibilité de décider de la manière dont l'espace doit être alloué. | |
-cwHorizontalSplitPanelText = Voici un texte permettant de voir comment le contenu situé de chaque côté de la barre de fractionnement se défile. | |
-cwHyperlinkName = Hyperlien | |
-cwHyperlinkDescription = Intégrer votre page avec les hyperliens pour naviguer à différentes sections. Les hyperliens créent des jetons d'histoire, permettant aux usagers de retourner à un état précédent en utilisant le bouton de retour du navigateur. | |
-cwHyperlinkChoose = <b>Choisir une section:</b> | |
-cwListBoxName = Zone de liste | |
-cwListBoxDescription = Zone de sélection et listes déroulantes intégrées | |
-cwListBoxCars = compact, berline, coupé, cabriolet, VUS, camions | |
-cwListBoxCategories = Voitures, Sports, Lieux de vacances | |
-cwListBoxSelectAll = <b>Sélectionnez toutes les options appropriées:</b> | |
-cwListBoxSelectCategory = <b>Sélectionnez une catégorie:</b> | |
-cwListBoxSports = Base-ball, Basket-ball, Football, Hockey, Crosse, Polo, Soccer, Softball, Water-polo | |
-cwListBoxVacations = Caraïbes, Grand Canyon, Paris, Italie, New York, Las Vegas | |
-cwMenuBarName = Barre de menus | |
-cwMenuBarDescription = La barre de menus permet de naviguer parmi de nombreuses options. Elle prend également en charge des sous-menus. | |
-cwMenuBarEditCategory = Édition | |
-cwMenuBarEditOptions = Annuler, Rétablir, Couper, Copier, Coller | |
-cwMenuBarFileCategory = Fichier | |
-cwMenuBarFileOptions = Nouveau, Ouvrir, Fermer, Récent, Quitter | |
-cwMenuBarFileRecents = Pêcher dans le désert.txt, Comment apprivoiser un perroquet sauvage, L'élevage des émeus pour les nuls | |
-cwMenuBarGWTOptions = Télécharger, Exemples, Code source, GWiTtez avec le programme | |
-cwMenuBarHelpCategory = Aide | |
-cwMenuBarHelpOptions = Contenu, Biscuit de fortune, À propos de GWT | |
-cwMenuBarPrompts = Merci d'avoir sélectionné une option de menu, Une sélection vraiment pertinente, N'avez-vous rien de mieux à faire que de sélectionner des options de menu?, Essayez quelque chose d'autre, ceci n'est qu'un menu!, Un autre clic gaspillé | |
-cwMessagesExampleName = Messages | |
-cwMessagesExampleDescription = Les Message d'Interfaces fournissent un moyen de créer des messages fortement-typés et paramétrés qui sont verifiés lors de la compilation pour assurés qu'ils sont corrects. | |
-cwMessagesExampleArg0Label = <b>Paramètre {0}:</b> | |
-cwMessagesExampleArg1Label = <b>Paramètre {1}:</b> | |
-cwMessagesExampleArg2Label = <b>Paramètre {2}:</b> | |
-cwMessagesExampleFormattedLabel = <b>Valeur formattée:</b> | |
-cwMessagesExampleLinkText = Cet exemple interagit avec l'échantillon de l'interface: | |
-cwMessagesExampleTemplateLabel = <b>Message modèle:</b> | |
-cwNumberFormatName = Format du Nombre | |
-cwNumberFormatDescription = La classe NumberFormat supporte un formatage et une analyse de chiffres qui sont sensibles au locale de l'usager au moyen d'un modèle souple fondée sur le patron de la syntaxe. En plus de models personalisés, plusieurs modèles standards sont également disponibles pour votre convenance. | |
-cwNumberFormatFailedToParseInput = Impossible d'analyser les données saisies. | |
-cwNumberFormatFormattedLabel = <b>Valeur formattée:</b> | |
-cwNumberFormatInvalidPattern = Patron incorrect | |
-cwNumberFormatPatternLabel = <b>Patron:</b> | |
-cwNumberFormatPatterns = Décimales, devise, scientifique, pourcentage, personnalisé | |
-cwNumberFormatValueLabel = <b>Valeur au format:</b> | |
-cwPluralFormsExampleArg0Label = <b>Paramètre {0}:</b> | |
-cwPluralFormsExampleFormattedLabel = <b>Valeur formattée:</b> | |
-cwPluralFormsExampleLinkText = Cet exemple interagit avec l'échantillon de l'interface: | |
-cwRadioButtonName = Bouton radio | |
-cwRadioButtonDescription = Widget de bouton radio basique | |
-cwRadioButtonColors = bleu, rouge, jaune, vert | |
-cwRadioButtonSelectColor = <b>Sélectionnez votre couleur préférée:</b> | |
-cwRadioButtonSelectSport = <b>Sélectionnez votre sport préféré:</b> | |
-cwRadioButtonSports = Base-ball, Basket-ball, Football, Hockey, Soccer, Water-polo | |
-cwRichTextName = Texte enrichi | |
-cwRichTextDescription = La zone de texte enrichie est supportée sur tous les navigateurs les plus courants. Normalement, cette zone adopte harmonieusement le niveau de fonctionnalité offert par les navigateurs qui supportent cette zone. | |
-cwStackPanelName = Stack Panel | |
-cwStackPanelDescription = Le StackPanel piles verticalement ses enfants, affichant seulement un à la fois, avec une tête pour chaque enfant dont l'utilisateur peut cliquer pour défiler le panneau correspondant à l'en-tête. Cette option est utile pour les systèmes de menu verticale. | |
-cwStackPanelContactsHeader = Contacts | |
-cwStackPanelContacts = Benoit Mandelbrot, Albert Einstein, René Descartes, Bob Saget, Ludwig von Beethoven, Richard Feynman, Alan Turing, John de von Neumann | |
-cwStackPanelContactsEmails = [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected] | |
-cwStackPanelMailHeader = Mail | |
-cwStackPanelMailFolders = Boîte de réception, Brouillons, Formulaires, Messages envoyés, Corbeille | |
-cwStackPanelFiltersHeader = Filtres | |
-cwStackPanelFilters = Tous, Suivi, Lus, Non lus, Récemment accédés, Postés par moi | |
-cwSuggestBoxName = Zone de suggestion | |
-cwSuggestBoxDescription = Permet de générer des suggestions par l'intermédiaire d'appels de procédure distante (RPC) au serveur ou de données statiques sur la page. | |
-cwSuggestBoxLabel = <b>Choisir un mot:</b> | |
-cwSuggestBoxWords = 1337, apple, about, ant, bruce, banana, bobv, canada, coconut, compiler, donut, deferred binding, dessert topping, eclair, ecc, frog attack, floor wax, fitz, google, gosh, gwt, hollis, haskell, hammer, in the flinks, internets, ipso facto, jat, jgw, java, jens, knorton, kaitlyn, kangaroo, la grange, lars, love, morrildl, max, maddie, mloofle, mmendez, nail, narnia, null, optimizations, obfuscation, original, ping pong, polymorphic, pleather, quotidian, quality, qu'est-ce que c'est, ready state, ruby, rdayal, subversion, superclass, scottb, tobyr, the dans, ~ tilde, undefined, unit tests, under 100ms, vtbl, vidalia, vector graphics, w3c, web experience, work around, w00t!, xml, xargs, xeno, yacc, yank (the vi command), zealot, zoe, zebra | |
-cwTabPanelName = Panneau d'onglets | |
-cwTabPanelDescription = Permet de répartir le contenu en plusieurs onglets. | |
-cwTabPanelTab0 = Cliquez sur l'un des onglets pour afficher du contenu supplémentaire. | |
-cwTabPanelTab2 = Grâce au langage CSS, les onglets sont presque entièrement personnalisables. | |
-cwTabPanelTabs = Accueil, Logo GWT, Plus d'info | |
-cwTreeName = Arborescence | |
-cwTreeDescription = Le widget d'arborescence dynamique prend en charge le téléchargement allégé ("lazy loading") des données par le biais des appels de procédure distants (RPC) au serveur. | |
-cwTreeDynamicLabel = <b>Arborescence dynamique:</b> | |
-cwTreeItem = Élément | |
-cwTreeStaticLabel = <b>Arborescence statique:</b> | |
-cwVerticalPanelName = Panneau vertical | |
-cwVerticalPanelDescription = Dans un panneau vertical, le contenu est aligné verticalement sans être renvoyé à la ligne. Redimensionnez la page pour voir comment le contenu conserve son alignement vertical. | |
-cwVerticalPanelButton = Bouton | |
-cwVerticalSplitPanelName = Panneau à fractionnement vertical | |
-cwVerticalSplitPanelDescription = Donne aux utilisateurs la possibilité de décider de la manière dont l'espace doit être alloué. | |
-cwVerticalSplitPanelText = Voici un texte permettant de voir comment le contenu situé de chaque côté de la barre de fractionnement se défile. | |
- | |
-# TODO: get official translations | |
-cwTreeComposers = Beethoven, Brahms, Mozart | |
-cwTreeConcertos = Concertos | |
-cwTreeQuartets = Quatuors | |
-cwTreeSonatas = Sonates | |
-cwTreeSymphonies = Symphonies | |
-cwTreeBeethovenWorkConcertos = n ° 1 - C, n ° 2 - B-Flat Major, n ° 3 - C Minor, n ° 4 - G Major, n ° 5 - mi bémol majeur | |
-cwTreeBeethovenWorkQuartets = Six Quatuors à cordes, Trois Quatuors à cordes, Grosse Fugue pour Quatuors à cordes | |
-cwTreeBeethovenWorkSonatas = Sonate en la mineur, Sonate en fa majeur | |
-cwTreeBeethovenWorkSymphonies = n ° 2 - D Major, n ° 2 - D Major, n ° 3 - E-Flat Major, n ° 4 - B-Flat Major, n ° 5 - C Minor, n ° 6 - F Major, n ° 7 - Un grand, n ° 8 - F Major, n ° 9 - ré mineur | |
-cwTreeBrahmsWorkConcertos = Concerto pour violon, Double Concerto - A minor, Concerto pour piano n ° 1 - D minor, Concerto pour piano n ° 2 - si bémol majeur | |
-cwTreeBrahmsWorkQuartets = Quatuor pour piano n ° 1 - G Minor, Quatuor pour piano n ° 2 - Un grand, Quatuor pour piano n ° 3 - C Minor, Quatuor à cordes n ° 3 - B-flat minor | |
-cwTreeBrahmsWorkSonatas = Deux Sonates pour clarinette - F Minor, deux sonates pour clarinette - mi bémol majeur | |
-cwTreeBrahmsWorkSymphonies = n ° 1 - C Minor, n ° 2 - ré mineur, n ° 3 - F Major, n ° 4 - E Minor | |
-cwTreeMozartWorkConcertos = Concerto pour piano n ° 12, Concerto pour piano n ° 17, Concerto pour clarinette, Concerto pour violon n ° 5, Concerto pour violon n ° 4 | |
-cwDatePickerName = Date Picker | |
-cwDatePickerDescription = Permettre aux utilisateurs de sÈlectionner une date ‡ l'aide de la DatePicker. | |
-cwDatePickerBoxLabel = <br><br><b>DateBox avec popup DatePicker:</b> | |
-cwDatePickerLabel = <b>DatePicker permanent:</b> | |
-cwPluralFormsExampleName = Formes plurielles | |
-cwPluralFormsExampleDescription = Les formes plurielles de fournir un moyen de créer les traductions des messages qui dépendent du chef d'accusation de quelque chose. | |
diff --git a/src/com/google/gwt/sample/showcase/client/ShowcaseConstants_zh.properties b/src/com/google/gwt/sample/showcase/client/ShowcaseConstants_zh.properties | |
deleted file mode 100644 | |
index d917c3c..0000000 | |
--- a/src/com/google/gwt/sample/showcase/client/ShowcaseConstants_zh.properties | |
+++ /dev/null | |
@@ -1,244 +0,0 @@ | |
-mainMenuTitle = GWT 示例 | |
-mainSubTitle = 功能展示 | |
-mainTitle = Google Web Toolkit | |
-mainLinkHomepage = GWT 主页 | |
-mainLinkExamples = 更多示例 | |
- | |
-categoryI18N =ÂõΩÈôÖÂåñ | |
-categoryLists = 列表和菜单 | |
-categoryOther =其它功能 | |
-categoryPanels = 面板 | |
-categoryPopups = 弹出式窗口 | |
-categoryTables = Ë°® | |
-categoryTextInput = 文本输入 | |
-categoryWidgets = 部件 | |
- | |
-contentWidgetExample = 示例 | |
-contentWidgetSource = 源代码 | |
-contentWidgetStyle = CSS 样式 | |
- | |
-cwAbsolutePanelName = 绝对定位面板 | |
-cwAbsolutePanelDescription = 绝对定位面板(AbsolutePanel)使用绝对坐标定位子部件,并允许他们重叠。 | |
-cwAbsolutePanelClickMe =点击我! | |
-cwAbsolutePanelHelloWorld =你好世界 | |
-cwAbsolutePanelLeft = <b>左:</b> | |
-cwAbsolutePanelItemsToMove = <b>移动项目:</b> | |
-cwAbsolutePanelTop = <b>顶部:</b> | |
-cwAbsolutePanelWidgetNames =你好世界, 按钮, 网格 | |
-cwBasicButtonName = 简单按钮 | |
-cwBasicButtonDescription = 简单按钮部件 | |
-cwBasicButtonClickMessage = 不要再点了! | |
-cwBasicButtonDisabled = 禁用按钮 | |
-cwBasicButtonNormal = 常规按钮 | |
-cwBasicPopupName = 简单弹出式窗口 | |
-cwBasicPopupDescription = GWT 提供了创建自定义弹出式窗口的架构。 | |
-cwBasicPopupClickOutsideInstructions = 点击此弹出式窗口外的任意位置可将其隐藏。 | |
-cwBasicPopupInstructions = <b>点击查看原尺寸图片:</b> | |
-cwBasicPopupShowButton = 显示简单弹出式窗口 | |
-cwBasicTextName = 简单文本 | |
-cwBasicTextDescription = GWT 包含整套标准文本输入部件,每个部件均支持文本输入所需的键盘和选择事件。 特别是每个部件的选择范围都会在每次按键后更新。 | |
-cwBasicTextAreaLabel = <b>文本区域:</b> | |
-cwBasicTextNormalLabel = <b>常规文本框:</b> | |
-cwBasicTextPasswordLabel = <b>密码文本框:</b> | |
-cwBasicTextReadOnly = 只读 | |
-cwBasicTextSelected = 已选择 | |
-cwCheckBoxName = 复选框 | |
-cwCheckBoxDescription = 简单复选框部件 | |
-cwCheckBoxCheckAll = <b>检查所有天知道您有空:</b> | |
-cwCheckBoxDays =周一,周二,周三,周四,周五,周六,周日 | |
-cwConstantsExampleDescription =常量接口(Constants)可以用来本地化字串,数字,字串到字串的映射表。这个例子也许并不特别有趣,但它演示了如何本地化常量。抽象界面ExampleConstants的本地化实现提供了标签文本和颜色选择 。 | |
-cwConstantsExampleName =常量 | |
-cwConstantsExampleLinkText = 这个例子使用了示例接口: | |
-cwConstantsWithLookupExampleDescription =接口ConstantsWithLookup提供了使用字串键作为方法名动态查找本地化变量。 | |
-cwConstantsWithLookupExampleLinkText = 这个例子使用了示例接口: | |
-cwConstantsWithLookupExampleMethodName = <b>方法名: </b> | |
-cwConstantsWithLookupExampleName = 常量查找 | |
-cwConstantsWithLookupExampleResults = <b>查找结果: </b> | |
-cwConstantsWithLookupExampleNoInput = <请在上面输入方法名> | |
-cwConstantsWithLookupExampleNoMatches = <未找到> | |
-cwCookiesName = Cookie | |
-cwCookiesDescription =跟踪用户,使用的Cookie在客户端轻松保存数据 。 | |
-cwCookiesDeleteCookie =删除 | |
-cwCookiesExistingLabel = <b>现有Cookie:</b> | |
-cwCookiesInvalidCookie = 您必须指定Cookie的名称 | |
-cwCookiesNameLabel = <b>名称:</b> | |
-cwCookiesSetCookie = 设置Cookie | |
-cwCookiesValueLabel = <b>值:</b> | |
-cwCustomButtonName = 自定义按钮 | |
-cwCustomButtonDescription = PushButton 和 ToggleButton 可以用来自定义按钮的外观 | |
-cwCustomButtonPush = <b>PushButton:</b> | |
-cwCustomButtonToggle = <b>ToggleButton:</b> | |
-cwDateTimeFormatName = 日期时间格式 | |
-cwDateTimeFormatDescription = DateTimeFormat类会根据区域的不同来格式化或解析日期和时间,如同NumberFormat类一样,使用一种灵活模式语法,支持定制模式和标准模式。 | |
-cwDateTimeFormatFailedToParseInput =无法解析输入 | |
-cwDateTimeFormatFormattedLabel = <b>格式化的值: </b> | |
-cwDateTimeFormatInvalidPattern =无效模板 | |
-cwDateTimeFormatPatternLabel = <b>Ê®°ÊùøÔºö </b> | |
-cwDateTimeFormatPatterns = 完全日期时间, 长日期时间, 中日期时间, 短日期时间, 完全日期, 长日期, 中日期, 短日期, 完全时间, 长时间, 中时间, 短时间, 自定义风俗 | |
-cwDateTimeFormatValueLabel = <b>需要格式的值: </b> | |
-cwDecoratorPanelFormDescription = 说明: | |
-cwDecoratorPanelFormName = Âêç: | |
-cwDecoratorPanelFormTitle = 输入搜索条件 | |
-cwDialogBoxName = 对话框 | |
-cwDialogBoxDescription = 可拖动的对话框(DialogBox)类似于一个有标题栏的窗口。 这种窗口还支持一种半透明模式,让部分背景透过弹出式窗口。 | |
-cwDialogBoxMakeTransparent = 使其半透明 | |
-cwDialogBoxCaption = 对话框示例 | |
-cwDialogBoxClose = 关闭 | |
-cwDialogBoxDetails = 以下是一个标准对话框组件的示例。 | |
-cwDialogBoxItem = 项目 | |
-cwDialogBoxListBoxInfo = 此列表框演示了将弹出式窗口拖放到上面的情况。 对于其他许多库,这一模糊的边际情形都无法正确显示。 | |
-cwDialogBoxShowButton = 显示对话框 | |
-cwDictionaryExampleName =字典 | |
-cwDictionaryExampleDescription = 使用字典类,你可以查找在HTML网页定义的Javascript变量值。您不需要把这些变量放入GWT代码。有不少时候这样做有好处,比如你的翻译经常变更的,而你的html服务器不时更新翻译过的HTML网页。还比如可以用它来整合GWT模块与现有的网络应用程序。值得注意的是,字典的值是完全来自于作为宿主的HTML页面,而GWT的区域设置无法对其有任何影响。在这个例子中, Javascript的变量的声明是在HTML网页。 | |
-cwDictionaryExampleLinkText = <b>这个例子使用下列Javascript的变量: </b> | |
-cwDisclosurePanelName = 公布面板 | |
-cwDisclosurePanelDescription = 公布面板(DisclosurePanel)会在用户点击标题文字时显示或隐藏其内容。 该内容可以是简单的文本或任意部件,如图片或表单的高级选项。 | |
-cwDisclosurePanelFormAdvancedCriteria = 高级条件 | |
-cwDisclosurePanelFormDescription = 说明: | |
-cwDisclosurePanelFormGender = 性别: | |
-cwDisclosurePanelFormGenderOptions = 男, 女 | |
-cwDisclosurePanelFormLocation = 位置: | |
-cwDisclosurePanelFormName = 姓名: | |
-cwDisclosurePanelFormTitle = <b>输入搜索条件</b> | |
-cwDockPanelName = 停靠面板 | |
-cwDockPanelDescription = 停靠面板会使用罗盘方向来对齐内容。 | |
-cwDockPanelCenter = 这个示例中在<code>DockPanel</code> 的中间位置有一个<code>ScrollPanel</code>。如果在中间放入很多内容,它就会变成页面内的可滚动区域,无需使用IFRAME。<br><br>此处使用了相当多无意义的文字,主要是为了可以滚动至可视区域的底部。否则,您恐怕不得不把它缩到很小才能看到那小巧的滚动条。 | |
-cwDockPanelEast = 此为东侧组件 | |
-cwDockPanelNorth1 = 此为北侧第一个组件 | |
-cwDockPanelNorth2 = 此为北侧第二个组件 | |
-cwDockPanelSouth1 = 此为南侧第一个组件 | |
-cwDockPanelSouth2 = 此为南侧第二个组件 | |
-cwDockPanelWest = 此为西侧组件 | |
-cwFileUploadName = 文件上传 | |
-cwFileUploadDescription = 使用AJAX异步上传文件。 | |
-cwFileUploadNoFileError = 你必须选择要上传的文件 | |
-cwFileUploadSelectFile = <b>选择一个文件:</b> | |
-cwFileUploadSuccessful = 文件上传完毕! | |
-cwFileUploadButton = 上传文件 | |
-cwFlexTableName = 灵活表 | |
-cwFlexTableDescription = 灵活表(FlexTable)支持跨行和跨列,这就让您可以用多种方式来布局。 | |
-cwFlexTableAddRow = 添加行 | |
-cwFlexTableDetails = 这是一个可支持 <B>colspans</B> 和 <B>rowspans</B> 的 FlexTable。 您可以用它来布局页面或作为其它特殊用途的表。 | |
-cwFlexTableRemoveRow = 删除行 | |
-cwFlowPanelName = 自然布局面板 | |
-cwFlowPanelDescription = 自然布局面板(FlowPanel)可让其中的内容自然布局。 | |
-cwFlowPanelItem = 项目 | |
-cwFrameName = Ê°Ü | |
-cwFrameDescription = 框(Frame)是对IFRAME的封装,可以用来在您的网页嵌入其他网站的内容。 | |
-cwFrameSetLocation =设定位置 | |
-cwGridName = 网格 | |
-cwGridDescription = 网格(Grid) | |
-cwHorizontalPanelName = 水平面板 | |
-cwHorizontalPanelDescription = 水平面板(HorizontalPanel)不用换行而横向对齐内容。改变页面大小,看看内容如何保持水平对齐。 | |
-cwHorizontalPanelButton = 按钮 | |
-cwHorizontalSplitPanelName = 水平拆分面板 | |
-cwHorizontalSplitPanelDescription = 水平拆分面板(HorizontalSplitPanel)允许用户可自由决定如何分配空间。 | |
-cwHorizontalSplitPanelText = 以下文字显示了分隔条两侧的内容是如何布局的。 | |
-cwHyperlinkName =超链 | |
-cwHyperlinkDescription =在网页中嵌入超连结(Hyperlink),就可以链接到到网页的不同栏目。超连结会同时会自动生成历史令牌,这样用户就可以用浏览器后退按钮恢复到过去的相应状态。 | |
-cwHyperlinkChoose = <b>选择一个栏目:</b> | |
-cwListBoxName = 列表框 | |
-cwListBoxDescription = 预制的选择框和下拉列表 | |
-cwListBoxCars = 紧凑,轿车,跑车,兑换,越野车,卡车 | |
-cwListBoxCategories = 汽车, 体育, 度假景点 | |
-cwListBoxSelectAll = <b>选择所有适用内容:</b> | |
-cwListBoxSelectCategory = <b>选择类别:</b> | |
-cwListBoxSports = 棒球, 篮球, 足球, 冰球, 曲棍球, 马球, 足球, 垒球, 水球 | |
-cwListBoxVacations = 加勒比地区,大峡谷,巴黎,意大利,纽约,拉斯维加斯 | |
-cwMenuBarName = 菜单栏 | |
-cwMenuBarDescription = 菜单栏可用于遍历众多选项,还可支持嵌套子菜单。 | |
-cwMenuBarEditCategory = 编辑 | |
-cwMenuBarEditOptions = 撤消, 重复, 剪切, 复制, 粘贴 | |
-cwMenuBarFileCategory = 文件 | |
-cwMenuBarFileOptions = 新建, 打开, 关闭, 近期文件, 退出 | |
-cwMenuBarFileRecents = Fishing in the desert.txt, How to tame a wild parrot, Idiots Guide to Emu Farms | |
-cwMenuBarGWTOptions = 下载, 示例, 源代码, GWT 高手程序 | |
-cwMenuBarHelpCategory = 帮助 | |
-cwMenuBarHelpOptions = 内容, 幸运饼, 关于GWT | |
-cwMenuBarPrompts = 感谢您选择菜单项, 选得很不错, 除了选择菜单项之外难道没有更好的选择?, 试试别的吧, 这不过是个菜单而已!, 又浪费了一次点击 | |
-cwMessagesExampleName = 消息 | |
-cwMessagesExampleDescription = 消息(Messages)界面提供了一种具有严格参数类型的信息生成方式,在编译阶段可以检查的参数的正确性。 | |
-cwMessagesExampleArg0Label = <b>论点(0): </b> | |
-cwMessagesExampleArg1Label = <b>论点(1): </b> | |
-cwMessagesExampleArg2Label = <b>论点(2): </b> | |
-cwMessagesExampleFormattedLabel = <b>格式化信息: </b> | |
-cwMessagesExampleLinkText =这个例子使用了示例接口: | |
-cwMessagesExampleTemplateLabel = <b>‰ø°ÊÅØÊ®°ÊùøÔºö</b> | |
-cwNumberFormatName =数字格式 | |
-cwNumberFormatDescription = NumberFormat类使用一种模式语法可以根据区域的不同来格式化或解析数字串。除了自定义模式外,还有一些方便的标准预制模式。 | |
-cwNumberFormatFailedToParseInput =无法解析输入 | |
-cwNumberFormatFormattedLabel = <b>格式化值:</b> | |
-cwNumberFormatInvalidPattern =无效模板 | |
-cwNumberFormatPatternLabel = <b>Ê®°ÊùøÔºö</b> | |
-cwNumberFormatPatterns = 小数, 货币, 科学, 百分数, 自定义 | |
-cwNumberFormatValueLabel = <b>需要格式的值:</b> | |
-cwPluralFormsExampleArg0Label = <b>论点(0): </b> | |
-cwPluralFormsExampleFormattedLabel = <b>格式化信息: </b> | |
-cwPluralFormsExampleLinkText = 这个例子使用了示例接口: | |
-cwRadioButtonName = 单选按钮 | |
-cwRadioButtonDescription = 单选按钮部件 | |
-cwRadioButtonColors = 蓝, 红, 黄, 绿 | |
-cwRadioButtonSelectColor = <b>选择您喜欢的颜色:</b> | |
-cwRadioButtonSelectSport = <b>选择您喜欢的运动:</b> | |
-cwRadioButtonSports = 棒球, 篮球, 足球, 冰球, 足球, 水球 | |
-cwRichTextName = 格式文本 | |
-cwRichTextDescription = 主流浏览器基本都支持格式文本区域,但支持的程度并不同。GWT的格式文本部件可以自动调节到浏览器所能支持的程度。 | |
-cwStackPanelName =栈面板 | |
-cwStackPanelDescription = 栈面板(StackPanel)会纵向排列子部件,任意时刻只显示某一部件的内容,其他子部件则只显示其标题,用户可以通过点击标题切换。这是一种十分有用的垂直菜单系统。 | |
-cwStackPanelContactsHeader = ÈÄöËÆØÂΩï | |
-cwStackPanelContacts = 曼德尔布洛特, 爱因斯坦, 笛卡尔, 萨吉特, 贝多芬, 费曼, 阿兰图灵, 冯诺依曼 | |
-cwStackPanelContactsEmails = [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected] | |
-cwStackPanelMailHeader =邮件 | |
-cwStackPanelMailFolders = 收件箱, 草稿箱, 范本, 发送, 垃圾箱 | |
-cwStackPanelFiltersHeader =过滤器 | |
-cwStackPanelFilters = 所有, 重要, 读过, 未读过, 最近, 我发出的 | |
-cwSuggestBoxName = 建议框 | |
-cwSuggestBoxDescription = 通过服务器RPC调用或页面的静态数据来生成建议 | |
-cwSuggestBoxLabel = <b>选择字词:</b> | |
-cwSuggestBoxWords = 1337, apple, about, ant, bruce, banana, bobv, canada, coconut, compiler, donut, deferred binding, dessert topping, eclair, ecc, frog attack, floor wax, fitz, google, gosh, gwt, hollis, haskell, hammer, in the flinks, internets, ipso facto, jat, jgw, java, jens, knorton, kaitlyn, kangaroo, la grange, lars, love, morrildl, max, maddie, mloofle, mmendez, nail, narnia, null, optimizations, obfuscation, original, ping pong, polymorphic, pleather, quotidian, quality, qu'est-ce que c'est, ready state, ruby, rdayal, subversion, superclass, scottb, tobyr, the dans, ~ tilde, undefined, unit tests, under 100ms, vtbl, vidalia, vector graphics, w3c, web experience, work around, w00t!, xml, xargs, xeno, yacc, yank (the vi command), zealot, zoe, zebra | |
-cwTabPanelName = 标签面板 | |
-cwTabPanelDescription = 通过多个标签划分内容。 | |
-cwTabPanelTab0 = 点击标签可查看更多内容。 | |
-cwTabPanelTab2 = 标签可通过 CSS 实现高度自定义化。 | |
-cwTabPanelTabs = 主页, GWT 徽标, 更多信息 | |
-cwTreeName = 树 | |
-cwTreeDescription = 动态树部件可通过对服务器进行RPC调用来实现数据的延迟加载 | |
-cwTreeDynamicLabel = <b>动态树:</b> | |
-cwTreeItem = 项目 | |
-cwTreeStaticLabel = <b>静态树:</b> | |
-cwVerticalPanelName = 垂直面板 | |
-cwVerticalPanelDescription = 垂直面板(VerticalPanel)可以纵向对齐相关内容。改变页面大小,看看内容如何保持垂直对齐的。 | |
-cwVerticalPanelButton = 按钮 | |
-cwVerticalSplitPanelName = 垂直拆分面板 | |
-cwVerticalSplitPanelDescription = 垂直拆分面板(VerticalSplitPanel)允许用户自由决定如何分配空间。 | |
-cwVerticalSplitPanelText = 以下文字显示了分隔条两侧的内容是如何流动的。 | |
- | |
-# TODO: get official translations | |
-cwAnimationName = 动画 | |
-cwAnimationDescription = 动画使你的程序具备时间效果。 | |
-cwAnimationStart = 开始 | |
-cwAnimationCancel = 取消 | |
-cwAnimationOptions = 动画选项 | |
-cwDecoratorPanelName = 装饰面板 | |
-cwDecoratorPanelDescription = 装饰面板(DecoratorPanel)可以给任何部件添加圆角。 | |
-cwTreeComposers =贝多芬, 布拉姆斯, 莫札特 | |
-cwTreeConcertos =协奏曲 | |
-cwTreeQuartets =四重奏 | |
-cwTreeSonatas =奏鸣曲 | |
-cwTreeSymphonies =交响乐 | |
-cwTreeBeethovenWorkConcertos =第1号-○, 第2号- B大调大, 第3号- C小调, 第4号- G大, 第5号-电子商务大调 | |
-cwTreeBeethovenWorkQuartets =六弦四重奏, 弦乐四重奏三, grosse赋格曲为弦乐四重奏 | |
-cwTreeBeethovenWorkSonatas =奏鸣曲在未成年人, 调奏鸣曲F大 | |
-cwTreeBeethovenWorkSymphonies =第2号-D大, 第2号- D大, 第3号- E大调大, 第4号- B大调大, 第5号- C小调, 第6号- F大, 号7 -一大, 第8号- F大, 第9号- D小调 | |
-cwTreeBrahmsWorkConcertos =小提琴协奏曲, -未成年人, 钢琴协奏曲第1号- D小调, 钢琴协奏曲第2号-的B大调 | |
-cwTreeBrahmsWorkQuartets =钢琴四重奏第1号-G小调钢琴四重奏第2号-的一个主要, 钢琴四重奏第3号- C小调, 弦乐四重奏第3号-的B小调 | |
-cwTreeBrahmsWorkSonatas = 2奏鸣曲单簧管-F小调, 2单簧管奏鸣曲- E大调大 | |
-cwTreeBrahmsWorkSymphonies =第1号-C小调, 第2号- D小调, 第3号- F大, 第4号- E小调 | |
-cwTreeMozartWorkConcertos =钢琴协奏曲第12号, 钢琴协奏曲第17号, 单簧管协奏曲, 小提琴协奏曲第5号, 小提琴协奏曲第4号 | |
-cwDatePickerName =日期选择器 | |
-cwDatePickerDescription =让用户选择日期使用DatePicker 。 | |
-cwDatePickerBoxLabel = <br><br><br><b>DateBox与弹出DatePicker:</b> | |
-cwDatePickerLabel =<b>常驻DatePicker:</b> | |
-cwPluralFormsExampleName = 复数形式 | |
-cwPluralFormsExampleDescription = 复数形式提供了一种方法来创建消息翻译依赖于数的东西。 | |
- | |
diff --git a/src/com/google/gwt/sample/showcase/client/ShowcaseImages.java b/src/com/google/gwt/sample/showcase/client/ShowcaseImages.java | |
deleted file mode 100644 | |
index 3e0b559..0000000 | |
--- a/src/com/google/gwt/sample/showcase/client/ShowcaseImages.java | |
+++ /dev/null | |
@@ -1,53 +0,0 @@ | |
-/* | |
- * Copyright 2008 Google Inc. | |
- * | |
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not | |
- * use this file except in compliance with the License. You may obtain a copy of | |
- * the License at | |
- * | |
- * http://www.apache.org/licenses/LICENSE-2.0 | |
- * | |
- * Unless required by applicable law or agreed to in writing, software | |
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | |
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | |
- * License for the specific language governing permissions and limitations under | |
- * the License. | |
- */ | |
-package com.google.gwt.sample.showcase.client; | |
- | |
-import com.google.gwt.resources.client.ClientBundle; | |
-import com.google.gwt.resources.client.ImageResource; | |
- | |
-/** | |
- * The images used throughout the Showcase. | |
- */ | |
-public interface ShowcaseImages extends ClientBundle { | |
- ImageResource catI18N(); | |
- | |
- ImageResource catLists(); | |
- | |
- ImageResource catOther(); | |
- | |
- ImageResource catPanels(); | |
- | |
- ImageResource catPopups(); | |
- | |
- ImageResource catTables(); | |
- | |
- ImageResource catTextInput(); | |
- | |
- ImageResource catWidgets(); | |
- | |
- ImageResource gwtLogo(); | |
- | |
- ImageResource gwtLogoThumb(); | |
- | |
- ImageResource jimmy(); | |
- | |
- ImageResource jimmyThumb(); | |
- | |
- /** | |
- * Indicates the locale selection box. | |
- */ | |
- ImageResource locale(); | |
-} | |
\ No newline at end of file | |
diff --git a/src/com/google/gwt/sample/showcase/client/StyleSheetLoader.java b/src/com/google/gwt/sample/showcase/client/StyleSheetLoader.java | |
deleted file mode 100644 | |
index 0252d9d..0000000 | |
--- a/src/com/google/gwt/sample/showcase/client/StyleSheetLoader.java | |
+++ /dev/null | |
@@ -1,135 +0,0 @@ | |
-/* | |
- * Copyright 2008 Google Inc. | |
- * | |
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not | |
- * use this file except in compliance with the License. You may obtain a copy of | |
- * the License at | |
- * | |
- * http://www.apache.org/licenses/LICENSE-2.0 | |
- * | |
- * Unless required by applicable law or agreed to in writing, software | |
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | |
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | |
- * License for the specific language governing permissions and limitations under | |
- * the License. | |
- */ | |
-package com.google.gwt.sample.showcase.client; | |
- | |
-import com.google.gwt.dom.client.Document; | |
-import com.google.gwt.dom.client.HeadElement; | |
-import com.google.gwt.dom.client.LinkElement; | |
-import com.google.gwt.user.client.Command; | |
-import com.google.gwt.user.client.DeferredCommand; | |
-import com.google.gwt.user.client.Timer; | |
-import com.google.gwt.user.client.ui.Label; | |
-import com.google.gwt.user.client.ui.RootPanel; | |
- | |
-/** | |
- * A utility class that loads style sheets. | |
- */ | |
-public class StyleSheetLoader { | |
- /** | |
- * A {@link Timer} that creates a small reference widget used to determine | |
- * when a new style sheet has finished loading. The widget has a natural width | |
- * of 0px, but when the style sheet is loaded, the width changes to 5px. The | |
- * style sheet should contain a style definition that is passed into the | |
- * constructor that defines a height and width greater than 0px. | |
- */ | |
- private static class StyleTesterTimer extends Timer { | |
- private Command callback; | |
- private Label refWidget; | |
- | |
- /** | |
- * Create a new {@link StyleTesterTimer}. | |
- * | |
- * @param refStyleName the reference style name | |
- * @param callback the callback to execute when the style sheet loads | |
- */ | |
- public StyleTesterTimer(String refStyleName, Command callback) { | |
- this.callback = callback; | |
- | |
- // Create the reference Widget | |
- refWidget = new Label(); | |
- refWidget.setStyleName(refStyleName); | |
- refWidget.getElement().getStyle().setProperty("position", "absolute"); | |
- refWidget.getElement().getStyle().setProperty("visibility", "hidden"); | |
- refWidget.getElement().getStyle().setProperty("display", "inline"); | |
- refWidget.getElement().getStyle().setPropertyPx("padding", 0); | |
- refWidget.getElement().getStyle().setPropertyPx("margin", 0); | |
- refWidget.getElement().getStyle().setPropertyPx("border", 0); | |
- refWidget.getElement().getStyle().setPropertyPx("top", 0); | |
- refWidget.getElement().getStyle().setPropertyPx("left", 0); | |
- RootPanel.get().add(refWidget); | |
- } | |
- | |
- @Override | |
- public void run() { | |
- // Redisplay the reference widget so it redraws itself | |
- refWidget.setVisible(false); | |
- refWidget.setVisible(true); | |
- | |
- // Check the dimensions of the reference widget | |
- if (refWidget.getOffsetWidth() > 0) { | |
- RootPanel.get().remove(refWidget); | |
- | |
- // Fire the callback in a DeferredCommand to ensure the browser has | |
- // enough time to parse the styles. Otherwise, we'll get weird styling | |
- // issues. | |
- DeferredCommand.addCommand(callback); | |
- } else { | |
- schedule(10); | |
- } | |
- } | |
- } | |
- | |
- /** | |
- * Convenience method for getting the document's head element. | |
- * | |
- * @return the document's head element | |
- */ | |
- public static native HeadElement getHeadElement() | |
- /*-{ | |
- return $doc.getElementsByTagName("head")[0]; | |
- }-*/; | |
- | |
- /** | |
- * Load a style sheet onto the page. | |
- * | |
- * @param href the url of the style sheet | |
- */ | |
- public static void loadStyleSheet(String href) { | |
- LinkElement linkElem = Document.get().createLinkElement(); | |
- linkElem.setRel("stylesheet"); | |
- linkElem.setType("text/css"); | |
- linkElem.setHref(href); | |
- getHeadElement().appendChild(linkElem); | |
- } | |
- | |
- /** | |
- * Load a style sheet onto the page and fire a callback when it has loaded. | |
- * The style sheet should contain a style definition called refStyleName that | |
- * defines a height and width greater than 0px. | |
- * | |
- * @param href the url of the style sheet | |
- * @param refStyleName the style name of the reference element | |
- * @param callback the callback executed when the style sheet has loaded | |
- */ | |
- public static void loadStyleSheet(String href, String refStyleName, | |
- Command callback) { | |
- loadStyleSheet(href); | |
- waitForStyleSheet(refStyleName, callback); | |
- } | |
- | |
- /** | |
- * Detect when a style sheet has loaded by placing an element on the page that | |
- * is affected by a rule in the style sheet, as described in | |
- * {@link #loadStyleSheet(String, String, Command)}. When the style sheet has | |
- * loaded, the callback will be executed. | |
- * | |
- * @param refStyleName the style name of the reference element | |
- * @param callback the callback executed when the style sheet has loaded | |
- */ | |
- public static void waitForStyleSheet(String refStyleName, Command callback) { | |
- new StyleTesterTimer(refStyleName, callback).run(); | |
- } | |
-} | |
diff --git a/src/com/google/gwt/sample/showcase/client/blank.png b/src/com/google/gwt/sample/showcase/client/blank.png | |
deleted file mode 100644 | |
index b3f90a1..0000000 | |
Binary files a/src/com/google/gwt/sample/showcase/client/blank.png and /dev/null differ | |
diff --git a/src/com/google/gwt/sample/showcase/client/content/i18n/CwConstantsExample.java b/src/com/google/gwt/sample/showcase/client/content/i18n/CwConstantsExample.java | |
index 7c9e6ed..0635f7d 100644 | |
--- a/src/com/google/gwt/sample/showcase/client/content/i18n/CwConstantsExample.java | |
+++ b/src/com/google/gwt/sample/showcase/client/content/i18n/CwConstantsExample.java | |
@@ -1,12 +1,12 @@ | |
/* | |
* 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 | |
@@ -19,21 +19,20 @@ import com.google.gwt.core.client.GWT; | |
import com.google.gwt.core.client.RunAsyncCallback; | |
import com.google.gwt.event.dom.client.ClickEvent; | |
import com.google.gwt.event.dom.client.ClickHandler; | |
-import com.google.gwt.event.logical.shared.SelectionEvent; | |
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.rpc.AsyncCallback; | |
+import com.google.gwt.user.client.ui.Anchor; | |
import com.google.gwt.user.client.ui.FlexTable; | |
+import com.google.gwt.user.client.ui.FlexTable.FlexCellFormatter; | |
import com.google.gwt.user.client.ui.HTML; | |
import com.google.gwt.user.client.ui.HorizontalPanel; | |
import com.google.gwt.user.client.ui.ListBox; | |
import com.google.gwt.user.client.ui.TextBox; | |
import com.google.gwt.user.client.ui.Widget; | |
-import com.google.gwt.user.client.ui.FlexTable.FlexCellFormatter; | |
import java.util.Map; | |
@@ -46,8 +45,7 @@ public class CwConstantsExample extends ContentWidget { | |
* The constants used in this Content Widget. | |
*/ | |
@ShowcaseSource | |
- public static interface CwConstants extends Constants, | |
- ContentWidget.CwConstants { | |
+ public static interface CwConstants extends Constants { | |
String cwConstantsExampleDescription(); | |
String cwConstantsExampleLinkText(); | |
@@ -59,55 +57,20 @@ public class CwConstantsExample extends ContentWidget { | |
* An instance of the constants. | |
*/ | |
@ShowcaseData | |
- private CwConstants constants; | |
- | |
- /** | |
- * Indicates whether or not we have loaded the {@link ExampleConstants} java | |
- * source yet. | |
- */ | |
- private boolean javaLoaded = false; | |
- | |
- /** | |
- * The widget used to display {@link ExampleConstants} java source. | |
- */ | |
- private HTML javaWidget = null; | |
- | |
- /** | |
- * Indicates whether or not we have loaded the {@link ExampleConstants} | |
- * properties source yet. | |
- */ | |
- private boolean propertiesLoaded = false; | |
- | |
- /** | |
- * The widget used to display {@link ExampleConstants} properties source. | |
- */ | |
- private HTML propertiesWidget = null; | |
+ private final CwConstants constants; | |
/** | |
* Constructor. | |
- * | |
+ * | |
* @param constants the constants | |
*/ | |
public CwConstantsExample(CwConstants constants) { | |
- super(constants); | |
+ super(constants.cwConstantsExampleName(), | |
+ constants.cwConstantsExampleDescription(), false, | |
+ "ExampleConstants.java", "ExampleConstants.properties"); | |
this.constants = constants; | |
} | |
- @Override | |
- public String getDescription() { | |
- return constants.cwConstantsExampleDescription(); | |
- } | |
- | |
- @Override | |
- public String getName() { | |
- return constants.cwConstantsExampleName(); | |
- } | |
- | |
- @Override | |
- public boolean hasStyle() { | |
- return false; | |
- } | |
- | |
/** | |
* Initialize this example. | |
*/ | |
@@ -123,11 +86,11 @@ public class CwConstantsExample extends ContentWidget { | |
layout.setCellSpacing(5); | |
// Add a link to the source code of the Interface | |
- HTML link = new HTML( | |
- " <a href=\"javascript:void(0);\">ExampleConstants</a>"); | |
+ final String rawFile = getSimpleName(ExampleConstants.class); | |
+ Anchor link = new Anchor(rawFile); | |
link.addClickHandler(new ClickHandler() { | |
public void onClick(ClickEvent event) { | |
- selectTab(2); | |
+ fireRawSourceRequest(rawFile + ".java"); | |
} | |
}); | |
HorizontalPanel linkPanel = new HorizontalPanel(); | |
@@ -167,35 +130,8 @@ public class CwConstantsExample extends ContentWidget { | |
} | |
@Override | |
- public void onInitializeComplete() { | |
- addConstantsTab(); | |
- } | |
- | |
- @Override | |
- public void onSelection(SelectionEvent<Integer> event) { | |
- super.onSelection(event); | |
- | |
- int tabIndex = event.getSelectedItem().intValue(); | |
- if (!javaLoaded && tabIndex == 2) { | |
- // Load ErrorMessages.java | |
- javaLoaded = true; | |
- String className = ExampleConstants.class.getName(); | |
- className = className.substring(className.lastIndexOf(".") + 1); | |
- 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(); | |
- className = className.substring(className.lastIndexOf(".") + 1); | |
- requestSourceContents(ShowcaseConstants.DST_SOURCE_RAW + className | |
- + ".properties.html", propertiesWidget, null); | |
- } | |
- } | |
- | |
- @Override | |
protected void asyncOnInitialize(final AsyncCallback<Widget> callback) { | |
- GWT.runAsync(new RunAsyncCallback() { | |
+ GWT.runAsync(CwConstantsExample.class, new RunAsyncCallback() { | |
public void onFailure(Throwable caught) { | |
callback.onFailure(caught); | |
@@ -206,17 +142,4 @@ public class CwConstantsExample extends ContentWidget { | |
} | |
}); | |
} | |
- | |
- /** | |
- * Add a tab to this example to show the messages interface. | |
- */ | |
- private void addConstantsTab() { | |
- // Add a tab to show the interface | |
- javaWidget = new HTML(); | |
- add(javaWidget, "ExampleConstants.java"); | |
- | |
- // Add a tab to show the properties | |
- propertiesWidget = new HTML(); | |
- add(propertiesWidget, "ExampleConstants.properties"); | |
- } | |
} | |
diff --git a/src/com/google/gwt/sample/showcase/client/content/i18n/CwConstantsWithLookupExample.java b/src/com/google/gwt/sample/showcase/client/content/i18n/CwConstantsWithLookupExample.java | |
index 5d09515..b111120 100644 | |
--- a/src/com/google/gwt/sample/showcase/client/content/i18n/CwConstantsWithLookupExample.java | |
+++ b/src/com/google/gwt/sample/showcase/client/content/i18n/CwConstantsWithLookupExample.java | |
@@ -1,12 +1,12 @@ | |
/* | |
* 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 | |
@@ -21,20 +21,19 @@ import com.google.gwt.event.dom.client.ClickEvent; | |
import com.google.gwt.event.dom.client.ClickHandler; | |
import com.google.gwt.event.dom.client.KeyUpEvent; | |
import com.google.gwt.event.dom.client.KeyUpHandler; | |
-import com.google.gwt.event.logical.shared.SelectionEvent; | |
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.rpc.AsyncCallback; | |
+import com.google.gwt.user.client.ui.Anchor; | |
import com.google.gwt.user.client.ui.FlexTable; | |
+import com.google.gwt.user.client.ui.FlexTable.FlexCellFormatter; | |
import com.google.gwt.user.client.ui.HTML; | |
import com.google.gwt.user.client.ui.HorizontalPanel; | |
import com.google.gwt.user.client.ui.TextBox; | |
import com.google.gwt.user.client.ui.Widget; | |
-import com.google.gwt.user.client.ui.FlexTable.FlexCellFormatter; | |
import java.util.MissingResourceException; | |
@@ -47,8 +46,7 @@ public class CwConstantsWithLookupExample extends ContentWidget { | |
* The constants used in this Content Widget. | |
*/ | |
@ShowcaseSource | |
- public static interface CwConstants extends Constants, | |
- ContentWidget.CwConstants { | |
+ public static interface CwConstants extends Constants { | |
String cwConstantsWithLookupExampleDescription(); | |
String cwConstantsWithLookupExampleLinkText(); | |
@@ -85,55 +83,20 @@ public class CwConstantsWithLookupExample extends ContentWidget { | |
* An instance of the constants. | |
*/ | |
@ShowcaseData | |
- private CwConstants constants; | |
- | |
- /** | |
- * Indicates whether or not we have loaded the {@link ExampleConstants} java | |
- * source yet. | |
- */ | |
- private boolean javaLoaded = false; | |
- | |
- /** | |
- * The widget used to display {@link ExampleConstants} java source. | |
- */ | |
- private HTML javaWidget = null; | |
- | |
- /** | |
- * Indicates whether or not we have loaded the {@link ExampleConstants} | |
- * properties source yet. | |
- */ | |
- private boolean propertiesLoaded = false; | |
- | |
- /** | |
- * The widget used to display {@link ExampleConstants} properties source. | |
- */ | |
- private HTML propertiesWidget = null; | |
+ private final CwConstants constants; | |
/** | |
* Constructor. | |
- * | |
+ * | |
* @param constants the constants | |
*/ | |
public CwConstantsWithLookupExample(CwConstants constants) { | |
- super(constants); | |
+ super(constants.cwConstantsWithLookupExampleName(), | |
+ constants.cwConstantsWithLookupExampleDescription(), false, | |
+ "ColorConstants.java", "ColorConstants.properties"); | |
this.constants = constants; | |
} | |
- @Override | |
- public String getDescription() { | |
- return constants.cwConstantsWithLookupExampleDescription(); | |
- } | |
- | |
- @Override | |
- public String getName() { | |
- return constants.cwConstantsWithLookupExampleName(); | |
- } | |
- | |
- @Override | |
- public boolean hasStyle() { | |
- return false; | |
- } | |
- | |
/** | |
* Initialize this example. | |
*/ | |
@@ -149,10 +112,11 @@ public class CwConstantsWithLookupExample extends ContentWidget { | |
layout.setCellSpacing(5); | |
// Add a link to the source code of the Interface | |
- HTML link = new HTML(" <a href=\"javascript:void(0);\">ColorConstants</a>"); | |
+ final String rawFile = getSimpleName(ColorConstants.class); | |
+ Anchor link = new Anchor(rawFile); | |
link.addClickHandler(new ClickHandler() { | |
public void onClick(ClickEvent event) { | |
- selectTab(2); | |
+ fireRawSourceRequest(rawFile + ".java"); | |
} | |
}); | |
HorizontalPanel linkPanel = new HorizontalPanel(); | |
@@ -189,35 +153,8 @@ public class CwConstantsWithLookupExample extends ContentWidget { | |
} | |
@Override | |
- public void onInitializeComplete() { | |
- addConstantsTab(); | |
- } | |
- | |
- @Override | |
- public void onSelection(SelectionEvent<Integer> event) { | |
- super.onSelection(event); | |
- | |
- int tabIndex = event.getSelectedItem().intValue(); | |
- if (!javaLoaded && tabIndex == 2) { | |
- // Load ErrorMessages.java | |
- javaLoaded = true; | |
- String className = ColorConstants.class.getName(); | |
- className = className.substring(className.lastIndexOf(".") + 1); | |
- 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(); | |
- className = className.substring(className.lastIndexOf(".") + 1); | |
- requestSourceContents(ShowcaseConstants.DST_SOURCE_RAW + className | |
- + ".properties.html", propertiesWidget, null); | |
- } | |
- } | |
- | |
- @Override | |
protected void asyncOnInitialize(final AsyncCallback<Widget> callback) { | |
- GWT.runAsync(new RunAsyncCallback() { | |
+ GWT.runAsync(CwConstantsWithLookupExample.class, new RunAsyncCallback() { | |
public void onFailure(Throwable caught) { | |
callback.onFailure(caught); | |
@@ -230,19 +167,6 @@ public class CwConstantsWithLookupExample extends ContentWidget { | |
} | |
/** | |
- * Add a tab to this example to show the messages interface. | |
- */ | |
- private void addConstantsTab() { | |
- // Add a tab to show the interface | |
- javaWidget = new HTML(); | |
- add(javaWidget, "ColorConstants.java"); | |
- | |
- // Add a tab to show the properties | |
- propertiesWidget = new HTML(); | |
- add(propertiesWidget, "ColorConstants.properties"); | |
- } | |
- | |
- /** | |
* Lookup the color based on the value the user entered. | |
*/ | |
@ShowcaseSource | |
@@ -255,7 +179,8 @@ public class CwConstantsWithLookupExample extends ContentWidget { | |
String color = colorConstants.getString(key); | |
colorResultsBox.setText(color); | |
} catch (MissingResourceException e) { | |
- colorResultsBox.setText(constants.cwConstantsWithLookupExampleNoMatches()); | |
+ colorResultsBox.setText( | |
+ constants.cwConstantsWithLookupExampleNoMatches()); | |
} | |
} | |
} | |
diff --git a/src/com/google/gwt/sample/showcase/client/content/i18n/CwDateTimeFormat.java b/src/com/google/gwt/sample/showcase/client/content/i18n/CwDateTimeFormat.java | |
index 677bcb9..2a2a0dd 100644 | |
--- a/src/com/google/gwt/sample/showcase/client/content/i18n/CwDateTimeFormat.java | |
+++ b/src/com/google/gwt/sample/showcase/client/content/i18n/CwDateTimeFormat.java | |
@@ -1,12 +1,12 @@ | |
/* | |
* 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 | |
@@ -23,6 +23,7 @@ import com.google.gwt.event.dom.client.KeyUpEvent; | |
import com.google.gwt.event.dom.client.KeyUpHandler; | |
import com.google.gwt.i18n.client.Constants; | |
import com.google.gwt.i18n.client.DateTimeFormat; | |
+import com.google.gwt.i18n.client.DateTimeFormat.PredefinedFormat; | |
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; | |
@@ -47,8 +48,7 @@ public class CwDateTimeFormat extends ContentWidget { | |
* The constants used in this Content Widget. | |
*/ | |
@ShowcaseSource | |
- public static interface CwConstants extends Constants, | |
- ContentWidget.CwConstants { | |
+ public static interface CwConstants extends Constants { | |
String cwDateTimeFormatDescription(); | |
String cwDateTimeFormatFailedToParseInput(); | |
@@ -75,7 +75,7 @@ public class CwDateTimeFormat extends ContentWidget { | |
* An instance of the constants. | |
*/ | |
@ShowcaseData | |
- private CwConstants constants; | |
+ private final CwConstants constants; | |
/** | |
* The {@link Label} where the formatted value is displayed. | |
@@ -103,24 +103,15 @@ public class CwDateTimeFormat extends ContentWidget { | |
/** | |
* Constructor. | |
- * | |
+ * | |
* @param constants the constants | |
*/ | |
public CwDateTimeFormat(CwConstants constants) { | |
- super(constants); | |
+ super(constants.cwDateTimeFormatName(), | |
+ constants.cwDateTimeFormatDescription(), true); | |
this.constants = constants; | |
} | |
- @Override | |
- public String getDescription() { | |
- return constants.cwDateTimeFormatDescription(); | |
- } | |
- | |
- @Override | |
- public String getName() { | |
- return constants.cwDateTimeFormatName(); | |
- } | |
- | |
/** | |
* Initialize this example. | |
*/ | |
@@ -187,7 +178,7 @@ public class CwDateTimeFormat extends ContentWidget { | |
@Override | |
protected void asyncOnInitialize(final AsyncCallback<Widget> callback) { | |
- GWT.runAsync(new RunAsyncCallback() { | |
+ GWT.runAsync(CwDateTimeFormat.class, new RunAsyncCallback() { | |
public void onFailure(Throwable caught) { | |
callback.onFailure(caught); | |
@@ -201,7 +192,7 @@ public class CwDateTimeFormat extends ContentWidget { | |
/** | |
* Show an error message. Pass in null to clear the error message. | |
- * | |
+ * | |
* @param errorMsg the error message | |
*/ | |
@ShowcaseSource | |
@@ -243,69 +234,73 @@ public class CwDateTimeFormat extends ContentWidget { | |
switch (patternList.getSelectedIndex()) { | |
// Date + Time | |
case 0: | |
- activeFormat = DateTimeFormat.getFullDateTimeFormat(); | |
+ activeFormat = DateTimeFormat.getFormat( | |
+ PredefinedFormat.DATE_TIME_FULL); | |
patternBox.setText(activeFormat.getPattern()); | |
patternBox.setEnabled(false); | |
break; | |
case 1: | |
- activeFormat = DateTimeFormat.getLongDateTimeFormat(); | |
+ activeFormat = DateTimeFormat.getFormat( | |
+ PredefinedFormat.DATE_TIME_LONG); | |
patternBox.setText(activeFormat.getPattern()); | |
patternBox.setEnabled(false); | |
break; | |
case 2: | |
- activeFormat = DateTimeFormat.getMediumDateTimeFormat(); | |
+ activeFormat = DateTimeFormat.getFormat( | |
+ PredefinedFormat.DATE_TIME_MEDIUM); | |
patternBox.setText(activeFormat.getPattern()); | |
patternBox.setEnabled(false); | |
break; | |
case 3: | |
- activeFormat = DateTimeFormat.getShortDateTimeFormat(); | |
+ activeFormat = DateTimeFormat.getFormat( | |
+ PredefinedFormat.DATE_TIME_SHORT); | |
patternBox.setText(activeFormat.getPattern()); | |
patternBox.setEnabled(false); | |
break; | |
// Date only | |
case 4: | |
- activeFormat = DateTimeFormat.getFullDateFormat(); | |
+ activeFormat = DateTimeFormat.getFormat(PredefinedFormat.DATE_FULL); | |
patternBox.setText(activeFormat.getPattern()); | |
patternBox.setEnabled(false); | |
break; | |
case 5: | |
- activeFormat = DateTimeFormat.getLongDateFormat(); | |
+ activeFormat = DateTimeFormat.getFormat(PredefinedFormat.DATE_LONG); | |
patternBox.setText(activeFormat.getPattern()); | |
patternBox.setEnabled(false); | |
break; | |
case 6: | |
- activeFormat = DateTimeFormat.getMediumDateFormat(); | |
+ activeFormat = DateTimeFormat.getFormat(PredefinedFormat.DATE_MEDIUM); | |
patternBox.setText(activeFormat.getPattern()); | |
patternBox.setEnabled(false); | |
break; | |
case 7: | |
- activeFormat = DateTimeFormat.getShortDateFormat(); | |
+ activeFormat = DateTimeFormat.getFormat(PredefinedFormat.DATE_SHORT); | |
patternBox.setText(activeFormat.getPattern()); | |
patternBox.setEnabled(false); | |
break; | |
// Time only | |
case 8: | |
- activeFormat = DateTimeFormat.getFullTimeFormat(); | |
+ activeFormat = DateTimeFormat.getFormat(PredefinedFormat.TIME_FULL); | |
patternBox.setText(activeFormat.getPattern()); | |
patternBox.setEnabled(false); | |
break; | |
case 9: | |
- activeFormat = DateTimeFormat.getLongTimeFormat(); | |
+ activeFormat = DateTimeFormat.getFormat(PredefinedFormat.TIME_LONG); | |
patternBox.setText(activeFormat.getPattern()); | |
patternBox.setEnabled(false); | |
break; | |
case 10: | |
- activeFormat = DateTimeFormat.getMediumTimeFormat(); | |
+ activeFormat = DateTimeFormat.getFormat(PredefinedFormat.TIME_MEDIUM); | |
patternBox.setText(activeFormat.getPattern()); | |
patternBox.setEnabled(false); | |
break; | |
case 11: | |
- activeFormat = DateTimeFormat.getShortTimeFormat(); | |
+ activeFormat = DateTimeFormat.getFormat(PredefinedFormat.TIME_SHORT); | |
patternBox.setText(activeFormat.getPattern()); | |
patternBox.setEnabled(false); | |
break; | |
diff --git a/src/com/google/gwt/sample/showcase/client/content/i18n/CwDictionaryExample.java b/src/com/google/gwt/sample/showcase/client/content/i18n/CwDictionaryExample.java | |
index 16a02bf..3bf4319 100644 | |
--- a/src/com/google/gwt/sample/showcase/client/content/i18n/CwDictionaryExample.java | |
+++ b/src/com/google/gwt/sample/showcase/client/content/i18n/CwDictionaryExample.java | |
@@ -1,12 +1,12 @@ | |
/* | |
* 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 | |
@@ -26,6 +26,7 @@ import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseStyle; | |
import com.google.gwt.user.client.rpc.AsyncCallback; | |
import com.google.gwt.user.client.ui.FlexTable; | |
import com.google.gwt.user.client.ui.HTML; | |
+import com.google.gwt.user.client.ui.HTMLTable.CellFormatter; | |
import com.google.gwt.user.client.ui.VerticalPanel; | |
import com.google.gwt.user.client.ui.Widget; | |
@@ -40,8 +41,7 @@ public class CwDictionaryExample extends ContentWidget { | |
* The constants used in this Content Widget. | |
*/ | |
@ShowcaseSource | |
- public static interface CwConstants extends Constants, | |
- ContentWidget.CwConstants { | |
+ public static interface CwConstants extends Constants { | |
String cwDictionaryExampleDescription(); | |
String cwDictionaryExampleLinkText(); | |
@@ -53,28 +53,19 @@ public class CwDictionaryExample extends ContentWidget { | |
* An instance of the constants. | |
*/ | |
@ShowcaseData | |
- private CwConstants constants; | |
+ private final CwConstants constants; | |
/** | |
* Constructor. | |
- * | |
+ * | |
* @param constants the constants | |
*/ | |
public CwDictionaryExample(CwConstants constants) { | |
- super(constants); | |
+ super(constants.cwDictionaryExampleName(), | |
+ constants.cwDictionaryExampleDescription(), true); | |
this.constants = constants; | |
} | |
- @Override | |
- public String getDescription() { | |
- return constants.cwDictionaryExampleDescription(); | |
- } | |
- | |
- @Override | |
- public String getName() { | |
- return constants.cwDictionaryExampleName(); | |
- } | |
- | |
/** | |
* Initialize this example. | |
*/ | |
@@ -85,10 +76,11 @@ public class CwDictionaryExample extends ContentWidget { | |
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"); | |
+ 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"); | |
source.getElement().setDir("ltr"); | |
source.getElement().getStyle().setProperty("textAlign", "left"); | |
layout.add(new HTML(constants.cwDictionaryExampleLinkText())); | |
@@ -96,6 +88,7 @@ public class CwDictionaryExample extends ContentWidget { | |
// Create the Dictionary of data | |
FlexTable userInfoGrid = new FlexTable(); | |
+ CellFormatter formatter = userInfoGrid.getCellFormatter(); | |
Dictionary userInfo = Dictionary.getDictionary("userInfo"); | |
Set<String> keySet = userInfo.keySet(); | |
int columnCount = 0; | |
@@ -105,15 +98,13 @@ public class CwDictionaryExample extends ContentWidget { | |
// Add a column with the data | |
userInfoGrid.setHTML(0, columnCount, key); | |
+ formatter.addStyleName(0, columnCount, "cw-DictionaryExample-header"); | |
userInfoGrid.setHTML(1, columnCount, value); | |
+ formatter.addStyleName(1, columnCount, "cw-DictionaryExample-data"); | |
// 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); | |
@@ -123,7 +114,7 @@ public class CwDictionaryExample extends ContentWidget { | |
@Override | |
protected void asyncOnInitialize(final AsyncCallback<Widget> callback) { | |
- GWT.runAsync(new RunAsyncCallback() { | |
+ GWT.runAsync(CwDictionaryExample.class, new RunAsyncCallback() { | |
public void onFailure(Throwable caught) { | |
callback.onFailure(caught); | |
diff --git a/src/com/google/gwt/sample/showcase/client/content/i18n/CwMessagesExample.java b/src/com/google/gwt/sample/showcase/client/content/i18n/CwMessagesExample.java | |
index 6e58216..6e6bd29 100644 | |
--- a/src/com/google/gwt/sample/showcase/client/content/i18n/CwMessagesExample.java | |
+++ b/src/com/google/gwt/sample/showcase/client/content/i18n/CwMessagesExample.java | |
@@ -1,12 +1,12 @@ | |
/* | |
* 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 | |
@@ -21,21 +21,20 @@ import com.google.gwt.event.dom.client.ClickEvent; | |
import com.google.gwt.event.dom.client.ClickHandler; | |
import com.google.gwt.event.dom.client.KeyUpEvent; | |
import com.google.gwt.event.dom.client.KeyUpHandler; | |
-import com.google.gwt.event.logical.shared.SelectionEvent; | |
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.rpc.AsyncCallback; | |
+import com.google.gwt.user.client.ui.Anchor; | |
import com.google.gwt.user.client.ui.FlexTable; | |
+import com.google.gwt.user.client.ui.FlexTable.FlexCellFormatter; | |
import com.google.gwt.user.client.ui.HTML; | |
import com.google.gwt.user.client.ui.HasVerticalAlignment; | |
import com.google.gwt.user.client.ui.HorizontalPanel; | |
import com.google.gwt.user.client.ui.TextBox; | |
import com.google.gwt.user.client.ui.Widget; | |
-import com.google.gwt.user.client.ui.FlexTable.FlexCellFormatter; | |
/** | |
* Example file. | |
@@ -46,8 +45,7 @@ public class CwMessagesExample extends ContentWidget { | |
* The constants used in this Content Widget. | |
*/ | |
@ShowcaseSource | |
- public static interface CwConstants extends Constants, | |
- ContentWidget.CwConstants { | |
+ public static interface CwConstants extends Constants { | |
String cwMessagesExampleArg0Label(); | |
String cwMessagesExampleArg1Label(); | |
@@ -87,7 +85,7 @@ public class CwMessagesExample extends ContentWidget { | |
* An instance of the constants. | |
*/ | |
@ShowcaseData | |
- private CwConstants constants; | |
+ private final CwConstants constants; | |
/** | |
* The error messages used in this example. | |
@@ -102,52 +100,17 @@ public class CwMessagesExample extends ContentWidget { | |
private HTML formattedMessage = null; | |
/** | |
- * Indicates whether or not we have loaded the {@link ErrorMessages} java | |
- * source yet. | |
- */ | |
- private boolean javaLoaded = false; | |
- | |
- /** | |
- * The widget used to display {@link ErrorMessages} java source. | |
- */ | |
- private HTML javaWidget = null; | |
- | |
- /** | |
- * Indicates whether or not we have loaded the {@link ErrorMessages} | |
- * properties source yet. | |
- */ | |
- private boolean propertiesLoaded = false; | |
- | |
- /** | |
- * The widget used to display {@link ErrorMessages} properties source. | |
- */ | |
- private HTML propertiesWidget = null; | |
- | |
- /** | |
* Constructor. | |
- * | |
+ * | |
* @param constants the constants | |
*/ | |
public CwMessagesExample(CwConstants constants) { | |
- super(constants); | |
+ super(constants.cwMessagesExampleName(), | |
+ constants.cwMessagesExampleDescription(), false, "ErrorMessages.java", | |
+ "ErrorMessages.properties"); | |
this.constants = constants; | |
} | |
- @Override | |
- public String getDescription() { | |
- return constants.cwMessagesExampleDescription(); | |
- } | |
- | |
- @Override | |
- public String getName() { | |
- return constants.cwMessagesExampleName(); | |
- } | |
- | |
- @Override | |
- public boolean hasStyle() { | |
- return false; | |
- } | |
- | |
/** | |
* Initialize this example. | |
*/ | |
@@ -163,10 +126,11 @@ public class CwMessagesExample extends ContentWidget { | |
layout.setCellSpacing(5); | |
// Add a link to the source code of the Interface | |
- HTML link = new HTML(" <a href=\"javascript:void(0);\">ErrorMessages</a>"); | |
+ final String rawFile = getSimpleName(ErrorMessages.class); | |
+ Anchor link = new Anchor(rawFile); | |
link.addClickHandler(new ClickHandler() { | |
public void onClick(ClickEvent event) { | |
- selectTab(2); | |
+ fireRawSourceRequest(rawFile + ".java"); | |
} | |
}); | |
HorizontalPanel linkPanel = new HorizontalPanel(); | |
@@ -221,35 +185,8 @@ public class CwMessagesExample extends ContentWidget { | |
} | |
@Override | |
- public void onInitializeComplete() { | |
- addMessagesTab(); | |
- } | |
- | |
- @Override | |
- public void onSelection(SelectionEvent<Integer> event) { | |
- super.onSelection(event); | |
- | |
- int tabIndex = event.getSelectedItem().intValue(); | |
- if (!javaLoaded && tabIndex == 2) { | |
- // Load ErrorMessages.java | |
- javaLoaded = true; | |
- String className = ErrorMessages.class.getName(); | |
- className = className.substring(className.lastIndexOf(".") + 1); | |
- 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(); | |
- className = className.substring(className.lastIndexOf(".") + 1); | |
- requestSourceContents(ShowcaseConstants.DST_SOURCE_RAW + className | |
- + ".properties.html", propertiesWidget, null); | |
- } | |
- } | |
- | |
- @Override | |
protected void asyncOnInitialize(final AsyncCallback<Widget> callback) { | |
- GWT.runAsync(new RunAsyncCallback() { | |
+ GWT.runAsync(CwMessagesExample.class, new RunAsyncCallback() { | |
public void onFailure(Throwable caught) { | |
callback.onFailure(caught); | |
@@ -262,19 +199,6 @@ public class CwMessagesExample extends ContentWidget { | |
} | |
/** | |
- * Add a tab to this example to show the {@link ErrorMessages} source code. | |
- */ | |
- private void addMessagesTab() { | |
- // Add a tab to show the interface | |
- javaWidget = new HTML(); | |
- add(javaWidget, "ErrorMessages.java"); | |
- | |
- // Add a tab to show the properties | |
- propertiesWidget = new HTML(); | |
- add(propertiesWidget, "ErrorMessages.properties"); | |
- } | |
- | |
- /** | |
* Update the formatted message. | |
*/ | |
@ShowcaseSource | |
diff --git a/src/com/google/gwt/sample/showcase/client/content/i18n/CwNumberFormat.java b/src/com/google/gwt/sample/showcase/client/content/i18n/CwNumberFormat.java | |
index b90490b..a759f2a 100644 | |
--- a/src/com/google/gwt/sample/showcase/client/content/i18n/CwNumberFormat.java | |
+++ b/src/com/google/gwt/sample/showcase/client/content/i18n/CwNumberFormat.java | |
@@ -1,12 +1,12 @@ | |
/* | |
* 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 | |
@@ -43,8 +43,7 @@ public class CwNumberFormat extends ContentWidget { | |
* The constants used in this Content Widget. | |
*/ | |
@ShowcaseSource | |
- public static interface CwConstants extends Constants, | |
- ContentWidget.CwConstants { | |
+ public static interface CwConstants extends Constants { | |
String cwNumberFormatDescription(); | |
String cwNumberFormatFailedToParseInput(); | |
@@ -71,7 +70,7 @@ public class CwNumberFormat extends ContentWidget { | |
* An instance of the constants. | |
*/ | |
@ShowcaseData | |
- private CwConstants constants; | |
+ private final CwConstants constants; | |
/** | |
* The {@link Label} where the formatted value is displayed. | |
@@ -99,24 +98,15 @@ public class CwNumberFormat extends ContentWidget { | |
/** | |
* Constructor. | |
- * | |
+ * | |
* @param constants the constants | |
*/ | |
public CwNumberFormat(CwConstants constants) { | |
- super(constants); | |
+ super(constants.cwNumberFormatName(), constants.cwNumberFormatDescription(), | |
+ true); | |
this.constants = constants; | |
} | |
- @Override | |
- public String getDescription() { | |
- return constants.cwNumberFormatDescription(); | |
- } | |
- | |
- @Override | |
- public String getName() { | |
- return constants.cwNumberFormatName(); | |
- } | |
- | |
/** | |
* Initialize this example. | |
*/ | |
@@ -177,7 +167,7 @@ public class CwNumberFormat extends ContentWidget { | |
@Override | |
protected void asyncOnInitialize(final AsyncCallback<Widget> callback) { | |
- GWT.runAsync(new RunAsyncCallback() { | |
+ GWT.runAsync(CwNumberFormat.class, new RunAsyncCallback() { | |
public void onFailure(Throwable caught) { | |
callback.onFailure(caught); | |
@@ -191,7 +181,7 @@ public class CwNumberFormat extends ContentWidget { | |
/** | |
* Show an error message. Pass in null to clear the error message. | |
- * | |
+ * | |
* @param errorMsg the error message | |
*/ | |
@ShowcaseSource | |
diff --git a/src/com/google/gwt/sample/showcase/client/content/i18n/CwPluralFormsExample.java b/src/com/google/gwt/sample/showcase/client/content/i18n/CwPluralFormsExample.java | |
index c4f3696..d4017c8 100644 | |
--- a/src/com/google/gwt/sample/showcase/client/content/i18n/CwPluralFormsExample.java | |
+++ b/src/com/google/gwt/sample/showcase/client/content/i18n/CwPluralFormsExample.java | |
@@ -1,12 +1,12 @@ | |
/* | |
* Copyright 2009 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 | |
@@ -21,22 +21,21 @@ import com.google.gwt.event.dom.client.ClickEvent; | |
import com.google.gwt.event.dom.client.ClickHandler; | |
import com.google.gwt.event.dom.client.KeyUpEvent; | |
import com.google.gwt.event.dom.client.KeyUpHandler; | |
-import com.google.gwt.event.logical.shared.SelectionEvent; | |
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.rpc.AsyncCallback; | |
+import com.google.gwt.user.client.ui.Anchor; | |
import com.google.gwt.user.client.ui.FlexTable; | |
+import com.google.gwt.user.client.ui.FlexTable.FlexCellFormatter; | |
import com.google.gwt.user.client.ui.HTML; | |
import com.google.gwt.user.client.ui.HasVerticalAlignment; | |
import com.google.gwt.user.client.ui.HorizontalPanel; | |
import com.google.gwt.user.client.ui.Label; | |
import com.google.gwt.user.client.ui.TextBox; | |
import com.google.gwt.user.client.ui.Widget; | |
-import com.google.gwt.user.client.ui.FlexTable.FlexCellFormatter; | |
/** | |
* Example file. | |
@@ -47,8 +46,7 @@ public class CwPluralFormsExample extends ContentWidget { | |
* The constants used in this Content Widget. | |
*/ | |
@ShowcaseSource | |
- public static interface CwConstants extends Constants, | |
- ContentWidget.CwConstants { | |
+ public static interface CwConstants extends Constants { | |
String cwPluralFormsExampleArg0Label(); | |
String cwPluralFormsExampleDescription(); | |
@@ -70,13 +68,7 @@ public class CwPluralFormsExample extends ContentWidget { | |
* An instance of the constants. | |
*/ | |
@ShowcaseData | |
- private CwConstants constants; | |
- | |
- /** | |
- * The plural messages used in this example. | |
- */ | |
- @ShowcaseData | |
- private PluralMessages pluralMessages = null; | |
+ private final CwConstants constants; | |
/** | |
* The {@link Label} used to display the message. | |
@@ -85,52 +77,23 @@ public class CwPluralFormsExample extends ContentWidget { | |
private Label formattedMessage = null; | |
/** | |
- * Indicates whether or not we have loaded the {@link PluralMessages} java | |
- * source yet. | |
- */ | |
- private boolean javaLoaded = false; | |
- | |
- /** | |
- * The widget used to display {@link PluralMessages} java source. | |
- */ | |
- private HTML javaWidget = null; | |
- | |
- /** | |
- * Indicates whether or not we have loaded the {@link ErrorMessages} | |
- * properties source yet. | |
- */ | |
- private boolean propertiesLoaded = false; | |
- | |
- /** | |
- * The widget used to display {@link ErrorMessages} properties source. | |
+ * The plural messages used in this example. | |
*/ | |
- private HTML propertiesWidget = null; | |
+ @ShowcaseData | |
+ private PluralMessages pluralMessages = null; | |
/** | |
* Constructor. | |
- * | |
+ * | |
* @param constants the constants | |
*/ | |
public CwPluralFormsExample(CwConstants constants) { | |
- super(constants); | |
+ super(constants.cwPluralFormsExampleName(), | |
+ constants.cwPluralFormsExampleDescription(), false, | |
+ "PluralMessages.java", "PluralMessages_fr.properties"); | |
this.constants = constants; | |
} | |
- @Override | |
- public String getDescription() { | |
- return constants.cwPluralFormsExampleDescription(); | |
- } | |
- | |
- @Override | |
- public String getName() { | |
- return constants.cwPluralFormsExampleName(); | |
- } | |
- | |
- @Override | |
- public boolean hasStyle() { | |
- return false; | |
- } | |
- | |
/** | |
* Initialize this example. | |
*/ | |
@@ -146,10 +109,11 @@ public class CwPluralFormsExample extends ContentWidget { | |
layout.setCellSpacing(5); | |
// Add a link to the source code of the Interface | |
- HTML link = new HTML(" <a href=\"javascript:void(0);\">PluralMessages</a>"); | |
+ final String rawFile = getSimpleName(PluralMessages.class); | |
+ Anchor link = new Anchor(rawFile); | |
link.addClickHandler(new ClickHandler() { | |
public void onClick(ClickEvent event) { | |
- selectTab(2); | |
+ fireRawSourceRequest(rawFile + ".java"); | |
} | |
}); | |
HorizontalPanel linkPanel = new HorizontalPanel(); | |
@@ -185,35 +149,8 @@ public class CwPluralFormsExample extends ContentWidget { | |
} | |
@Override | |
- public void onInitializeComplete() { | |
- addMessagesTab(); | |
- } | |
- | |
- @Override | |
- public void onSelection(SelectionEvent<Integer> event) { | |
- super.onSelection(event); | |
- | |
- int tabIndex = event.getSelectedItem().intValue(); | |
- if (!javaLoaded && tabIndex == 2) { | |
- // Load PluralMessages.java | |
- javaLoaded = true; | |
- String className = PluralMessages.class.getName(); | |
- className = className.substring(className.lastIndexOf(".") + 1); | |
- requestSourceContents(ShowcaseConstants.DST_SOURCE_RAW + className | |
- + ".java.html", javaWidget, null); | |
- } else if (!propertiesLoaded && tabIndex == 3) { | |
- // Load ErrorMessages.properties | |
- propertiesLoaded = true; | |
- String className = PluralMessages.class.getName(); | |
- className = className.substring(className.lastIndexOf(".") + 1); | |
- requestSourceContents(ShowcaseConstants.DST_SOURCE_RAW + className | |
- + "_fr.properties.html", propertiesWidget, null); | |
- } | |
- } | |
- | |
- @Override | |
protected void asyncOnInitialize(final AsyncCallback<Widget> callback) { | |
- GWT.runAsync(new RunAsyncCallback() { | |
+ GWT.runAsync(CwPluralFormsExample.class, new RunAsyncCallback() { | |
public void onFailure(Throwable caught) { | |
callback.onFailure(caught); | |
@@ -226,19 +163,6 @@ public class CwPluralFormsExample extends ContentWidget { | |
} | |
/** | |
- * Add a tab to this example to show the {@link PluralMessages} source code. | |
- */ | |
- private void addMessagesTab() { | |
- // Add a tab to show the interface | |
- javaWidget = new HTML(); | |
- add(javaWidget, "PluralMessages.java"); | |
- | |
- // Add a tab to show the properties | |
- propertiesWidget = new HTML(); | |
- add(propertiesWidget, "PluralMessages_fr.properties"); | |
- } | |
- | |
- /** | |
* Update the formatted message. | |
*/ | |
@ShowcaseSource | |
@@ -250,5 +174,4 @@ public class CwPluralFormsExample extends ContentWidget { | |
// Ignore. | |
} | |
} | |
- | |
} | |
diff --git a/src/com/google/gwt/sample/showcase/client/content/i18n/PluralMessages.java b/src/com/google/gwt/sample/showcase/client/content/i18n/PluralMessages.java | |
index ced13b6..a9b1947 100644 | |
--- a/src/com/google/gwt/sample/showcase/client/content/i18n/PluralMessages.java | |
+++ b/src/com/google/gwt/sample/showcase/client/content/i18n/PluralMessages.java | |
@@ -25,6 +25,7 @@ import com.google.gwt.i18n.client.LocalizableResource.DefaultLocale; | |
@DefaultLocale("en") | |
public interface PluralMessages extends Messages { | |
@DefaultMessage("You have {0} trees.") | |
- @PluralText({"one", "You have one tree."}) | |
+ @PluralText({"one", "You have one tree.", | |
+ "=0", "You have no trees"}) | |
String treeCount(@PluralCount int count); | |
} | |
diff --git a/src/com/google/gwt/sample/showcase/client/content/lists/CwListBox.java b/src/com/google/gwt/sample/showcase/client/content/lists/CwListBox.java | |
index ed632cc..a484a4f 100644 | |
--- a/src/com/google/gwt/sample/showcase/client/content/lists/CwListBox.java | |
+++ b/src/com/google/gwt/sample/showcase/client/content/lists/CwListBox.java | |
@@ -1,12 +1,12 @@ | |
/* | |
* 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 | |
@@ -40,8 +40,7 @@ public class CwListBox extends ContentWidget { | |
* The constants used in this Content Widget. | |
*/ | |
@ShowcaseSource | |
- public static interface CwConstants extends Constants, | |
- ContentWidget.CwConstants { | |
+ public static interface CwConstants extends Constants { | |
String[] cwListBoxCars(); | |
String[] cwListBoxCategories(); | |
@@ -63,28 +62,18 @@ public class CwListBox extends ContentWidget { | |
* An instance of the constants. | |
*/ | |
@ShowcaseData | |
- private CwConstants constants; | |
+ private final CwConstants constants; | |
/** | |
* Constructor. | |
- * | |
+ * | |
* @param constants the constants | |
*/ | |
public CwListBox(CwConstants constants) { | |
- super(constants); | |
+ super(constants.cwListBoxName(), constants.cwListBoxDescription(), true); | |
this.constants = constants; | |
} | |
- @Override | |
- public String getDescription() { | |
- return constants.cwListBoxDescription(); | |
- } | |
- | |
- @Override | |
- public String getName() { | |
- return constants.cwListBoxName(); | |
- } | |
- | |
/** | |
* Initialize this example. | |
*/ | |
@@ -137,7 +126,7 @@ public class CwListBox extends ContentWidget { | |
@Override | |
protected void asyncOnInitialize(final AsyncCallback<Widget> callback) { | |
- GWT.runAsync(new RunAsyncCallback() { | |
+ GWT.runAsync(CwListBox.class, new RunAsyncCallback() { | |
public void onFailure(Throwable caught) { | |
callback.onFailure(caught); | |
@@ -151,7 +140,7 @@ public class CwListBox extends ContentWidget { | |
/** | |
* 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 | |
*/ | |
diff --git a/src/com/google/gwt/sample/showcase/client/content/lists/CwMenuBar.java b/src/com/google/gwt/sample/showcase/client/content/lists/CwMenuBar.java | |
index cc22c0d..ba121cc 100644 | |
--- a/src/com/google/gwt/sample/showcase/client/content/lists/CwMenuBar.java | |
+++ b/src/com/google/gwt/sample/showcase/client/content/lists/CwMenuBar.java | |
@@ -1,12 +1,12 @@ | |
/* | |
* 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 | |
@@ -40,8 +40,7 @@ public class CwMenuBar extends ContentWidget { | |
* The constants used in this Content Widget. | |
*/ | |
@ShowcaseSource | |
- public static interface CwConstants extends Constants, | |
- ContentWidget.CwConstants { | |
+ public static interface CwConstants extends Constants { | |
String cwMenuBarDescription(); | |
String cwMenuBarEditCategory(); | |
@@ -69,28 +68,18 @@ public class CwMenuBar extends ContentWidget { | |
* An instance of the constants. | |
*/ | |
@ShowcaseData | |
- private CwConstants constants; | |
+ private final CwConstants constants; | |
/** | |
* Constructor. | |
- * | |
+ * | |
* @param constants the constants | |
*/ | |
public CwMenuBar(CwConstants constants) { | |
- super(constants); | |
+ super(constants.cwMenuBarName(), constants.cwMenuBarDescription(), true); | |
this.constants = constants; | |
} | |
- @Override | |
- public String getDescription() { | |
- return constants.cwMenuBarDescription(); | |
- } | |
- | |
- @Override | |
- public String getName() { | |
- return constants.cwMenuBarName(); | |
- } | |
- | |
/** | |
* Initialize this example. | |
*/ | |
@@ -168,7 +157,7 @@ public class CwMenuBar extends ContentWidget { | |
@Override | |
protected void asyncOnInitialize(final AsyncCallback<Widget> callback) { | |
- GWT.runAsync(new RunAsyncCallback() { | |
+ GWT.runAsync(CwMenuBar.class, new RunAsyncCallback() { | |
public void onFailure(Throwable caught) { | |
callback.onFailure(caught); | |
diff --git a/src/com/google/gwt/sample/showcase/client/content/lists/CwStackPanel.java b/src/com/google/gwt/sample/showcase/client/content/lists/CwStackPanel.java | |
index 493417b..610a011 100644 | |
--- a/src/com/google/gwt/sample/showcase/client/content/lists/CwStackPanel.java | |
+++ b/src/com/google/gwt/sample/showcase/client/content/lists/CwStackPanel.java | |
@@ -1,12 +1,12 @@ | |
/* | |
* 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 | |
@@ -27,6 +27,7 @@ import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseSource; | |
import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseStyle; | |
import com.google.gwt.user.client.rpc.AsyncCallback; | |
import com.google.gwt.user.client.ui.AbstractImagePrototype; | |
+import com.google.gwt.user.client.ui.Anchor; | |
import com.google.gwt.user.client.ui.CheckBox; | |
import com.google.gwt.user.client.ui.DecoratedStackPanel; | |
import com.google.gwt.user.client.ui.HTML; | |
@@ -42,7 +43,7 @@ import com.google.gwt.user.client.ui.Widget; | |
/** | |
* Example file. | |
*/ | |
-@ShowcaseStyle(value = { | |
+@ShowcaseStyle({ | |
".gwt-DecoratedStackPanel", "html>body .gwt-DecoratedStackPanel", | |
"* html .gwt-DecoratedStackPanel", ".cw-StackPanelHeader"}) | |
public class CwStackPanel extends ContentWidget { | |
@@ -50,8 +51,7 @@ public class CwStackPanel extends ContentWidget { | |
* The constants used in this Content Widget. | |
*/ | |
@ShowcaseSource | |
- public static interface CwConstants extends Constants, | |
- ContentWidget.CwConstants { | |
+ public static interface CwConstants extends Constants { | |
String[] cwStackPanelContacts(); | |
String[] cwStackPanelContactsEmails(); | |
@@ -73,7 +73,7 @@ public class CwStackPanel extends ContentWidget { | |
/** | |
* 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. | |
@@ -109,33 +109,19 @@ public class CwStackPanel extends ContentWidget { | |
* An instance of the constants. | |
*/ | |
@ShowcaseData | |
- private CwConstants constants; | |
+ private final CwConstants constants; | |
/** | |
* Constructor. | |
- * | |
+ * | |
* @param constants the constants | |
*/ | |
public CwStackPanel(CwConstants constants) { | |
- super(constants); | |
+ super(constants.cwStackPanelName(), constants.cwStackPanelDescription(), | |
+ true); | |
this.constants = constants; | |
} | |
- @Override | |
- public String getDescription() { | |
- return constants.cwStackPanelDescription(); | |
- } | |
- | |
- @Override | |
- public String getName() { | |
- return constants.cwStackPanelName(); | |
- } | |
- | |
- @Override | |
- public boolean hasStyle() { | |
- return true; | |
- } | |
- | |
/** | |
* Initialize this example. | |
*/ | |
@@ -150,8 +136,8 @@ public class CwStackPanel extends ContentWidget { | |
stackPanel.setWidth("200px"); | |
// Add the Mail folders | |
- String mailHeader = getHeaderString(constants.cwStackPanelMailHeader(), | |
- images.mailgroup()); | |
+ String mailHeader = getHeaderString( | |
+ constants.cwStackPanelMailHeader(), images.mailgroup()); | |
stackPanel.add(createMailItem(images), mailHeader, true); | |
// Add a list of filters | |
@@ -171,7 +157,7 @@ public class CwStackPanel extends ContentWidget { | |
@Override | |
protected void asyncOnInitialize(final AsyncCallback<Widget> callback) { | |
- GWT.runAsync(new RunAsyncCallback() { | |
+ GWT.runAsync(CwStackPanel.class, new RunAsyncCallback() { | |
public void onFailure(Throwable caught) { | |
callback.onFailure(caught); | |
@@ -189,7 +175,7 @@ public class CwStackPanel extends ContentWidget { | |
/** | |
* Create the list of Contacts. | |
- * | |
+ * | |
* @param images the {@link Images} used in the Contacts | |
* @return the list of contacts | |
*/ | |
@@ -212,8 +198,7 @@ public class CwStackPanel extends ContentWidget { | |
for (int i = 0; i < contactNames.length; i++) { | |
final String contactName = contactNames[i]; | |
final String contactEmail = contactEmails[i]; | |
- final HTML contactLink = new HTML("<a href=\"javascript:undefined;\">" | |
- + contactName + "</a>"); | |
+ final Anchor contactLink = new Anchor(contactName); | |
contactsPanel.add(contactLink); | |
// Open the contact info popup when the user clicks a contact | |
@@ -235,7 +220,7 @@ public class CwStackPanel extends ContentWidget { | |
/** | |
* Create the list of filters for the Filters item. | |
- * | |
+ * | |
* @return the list of filters | |
*/ | |
@ShowcaseSource | |
@@ -250,7 +235,7 @@ public class CwStackPanel extends ContentWidget { | |
/** | |
* Create the {@link Tree} of Mail options. | |
- * | |
+ * | |
* @param images the {@link Images} used in the Mail options | |
* @return the {@link Tree} of mail options | |
*/ | |
@@ -271,7 +256,7 @@ public class CwStackPanel extends ContentWidget { | |
/** | |
* Get a string representation of the header that includes an image and some | |
* text. | |
- * | |
+ * | |
* @param text the header text | |
* @param image the {@link ImageResource} to add next to the header | |
* @return the header as a string | |
diff --git a/src/com/google/gwt/sample/showcase/client/content/lists/CwSuggestBox.java b/src/com/google/gwt/sample/showcase/client/content/lists/CwSuggestBox.java | |
index 1d720be..3b400e9 100644 | |
--- a/src/com/google/gwt/sample/showcase/client/content/lists/CwSuggestBox.java | |
+++ b/src/com/google/gwt/sample/showcase/client/content/lists/CwSuggestBox.java | |
@@ -1,12 +1,12 @@ | |
/* | |
* 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 | |
@@ -33,15 +33,15 @@ import com.google.gwt.user.client.ui.Widget; | |
* Example file. | |
*/ | |
@ShowcaseStyle({ | |
- ".gwt-SuggestBox", ".gwt-SuggestBoxPopup", | |
- "html>body .gwt-SuggestBoxPopup", "* html .gwt-SuggestBoxPopup"}) | |
+ ".gwt-SuggestBox", ".gwt-SuggestBoxPopup", "html>body .gwt-SuggestBoxPopup", | |
+ "* html .gwt-SuggestBoxPopup"}) | |
public class CwSuggestBox extends ContentWidget { | |
+ | |
/** | |
* The constants used in this Content Widget. | |
*/ | |
@ShowcaseSource | |
- public static interface CwConstants extends Constants, | |
- ContentWidget.CwConstants { | |
+ public static interface CwConstants extends Constants { | |
String cwSuggestBoxDescription(); | |
String cwSuggestBoxLabel(); | |
@@ -55,28 +55,19 @@ public class CwSuggestBox extends ContentWidget { | |
* An instance of the constants. | |
*/ | |
@ShowcaseData | |
- private CwConstants constants; | |
+ private final CwConstants constants; | |
/** | |
* Constructor. | |
- * | |
+ * | |
* @param constants the constants | |
*/ | |
public CwSuggestBox(CwConstants constants) { | |
- super(constants); | |
+ super(constants.cwSuggestBoxName(), constants.cwSuggestBoxDescription(), | |
+ true); | |
this.constants = constants; | |
} | |
- @Override | |
- public String getDescription() { | |
- return constants.cwSuggestBoxDescription(); | |
- } | |
- | |
- @Override | |
- public String getName() { | |
- return constants.cwSuggestBoxName(); | |
- } | |
- | |
/** | |
* Initialize this example. | |
*/ | |
@@ -103,7 +94,7 @@ public class CwSuggestBox extends ContentWidget { | |
@Override | |
protected void asyncOnInitialize(final AsyncCallback<Widget> callback) { | |
- GWT.runAsync(new RunAsyncCallback() { | |
+ GWT.runAsync(CwSuggestBox.class, new RunAsyncCallback() { | |
public void onFailure(Throwable caught) { | |
callback.onFailure(caught); | |
diff --git a/src/com/google/gwt/sample/showcase/client/content/lists/CwTree.java b/src/com/google/gwt/sample/showcase/client/content/lists/CwTree.java | |
index a17ae8a..9f4ce98 100644 | |
--- a/src/com/google/gwt/sample/showcase/client/content/lists/CwTree.java | |
+++ b/src/com/google/gwt/sample/showcase/client/content/lists/CwTree.java | |
@@ -1,12 +1,12 @@ | |
/* | |
* 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 | |
@@ -43,8 +43,7 @@ public class CwTree extends ContentWidget { | |
* The constants used in this Content Widget. | |
*/ | |
@ShowcaseSource | |
- public static interface CwConstants extends Constants, | |
- ContentWidget.CwConstants { | |
+ public static interface CwConstants extends Constants { | |
String[] cwTreeBeethovenWorkConcertos(); | |
String[] cwTreeBeethovenWorkQuartets(); | |
@@ -88,28 +87,18 @@ public class CwTree extends ContentWidget { | |
* An instance of the constants. | |
*/ | |
@ShowcaseData | |
- private CwConstants constants; | |
+ private final CwConstants constants; | |
/** | |
* Constructor. | |
- * | |
+ * | |
* @param constants the constants | |
*/ | |
public CwTree(CwConstants constants) { | |
- super(constants); | |
+ super(constants.cwTreeName(), constants.cwTreeDescription(), true); | |
this.constants = constants; | |
} | |
- @Override | |
- public String getDescription() { | |
- return constants.cwTreeDescription(); | |
- } | |
- | |
- @Override | |
- public String getName() { | |
- return constants.cwTreeName(); | |
- } | |
- | |
/** | |
* Initialize this example. | |
*/ | |
@@ -156,7 +145,7 @@ public class CwTree extends ContentWidget { | |
@Override | |
protected void asyncOnInitialize(final AsyncCallback<Widget> callback) { | |
- GWT.runAsync(new RunAsyncCallback() { | |
+ GWT.runAsync(CwTree.class, new RunAsyncCallback() { | |
public void onFailure(Throwable caught) { | |
callback.onFailure(caught); | |
@@ -170,14 +159,14 @@ public class CwTree extends ContentWidget { | |
/** | |
* Add a new section of music created by a specific composer. | |
- * | |
+ * | |
* @param parent the parent {@link TreeItem} where the section will be added | |
* @param label the label of the new section of music | |
* @param composerWorks an array of works created by the composer | |
*/ | |
@ShowcaseSource | |
- private void addMusicSection(TreeItem parent, String label, | |
- String[] composerWorks) { | |
+ private void addMusicSection( | |
+ TreeItem parent, String label, String[] composerWorks) { | |
TreeItem section = parent.addItem(label); | |
for (String work : composerWorks) { | |
section.addItem(work); | |
@@ -187,7 +176,7 @@ public class CwTree extends ContentWidget { | |
/** | |
* Create a dynamic tree that will add a random number of children to each | |
* node as it is clicked. | |
- * | |
+ * | |
* @return the new tree | |
*/ | |
@ShowcaseSource | |
@@ -234,7 +223,7 @@ public class CwTree extends ContentWidget { | |
/** | |
* Create a static tree with some data in it. | |
- * | |
+ * | |
* @return the new tree | |
*/ | |
@ShowcaseSource | |
@@ -251,28 +240,28 @@ public class CwTree extends ContentWidget { | |
TreeItem beethovenItem = staticTree.addItem(composers[0]); | |
addMusicSection(beethovenItem, concertosLabel, | |
constants.cwTreeBeethovenWorkConcertos()); | |
- addMusicSection(beethovenItem, quartetsLabel, | |
- constants.cwTreeBeethovenWorkQuartets()); | |
- addMusicSection(beethovenItem, sonatasLabel, | |
- constants.cwTreeBeethovenWorkSonatas()); | |
+ addMusicSection( | |
+ beethovenItem, quartetsLabel, constants.cwTreeBeethovenWorkQuartets()); | |
+ addMusicSection( | |
+ beethovenItem, sonatasLabel, constants.cwTreeBeethovenWorkSonatas()); | |
addMusicSection(beethovenItem, symphoniesLabel, | |
constants.cwTreeBeethovenWorkSymphonies()); | |
// Add some of Brahms's music | |
TreeItem brahmsItem = staticTree.addItem(composers[1]); | |
- addMusicSection(brahmsItem, concertosLabel, | |
- constants.cwTreeBrahmsWorkConcertos()); | |
- addMusicSection(brahmsItem, quartetsLabel, | |
- constants.cwTreeBrahmsWorkQuartets()); | |
- addMusicSection(brahmsItem, sonatasLabel, | |
- constants.cwTreeBrahmsWorkSonatas()); | |
- addMusicSection(brahmsItem, symphoniesLabel, | |
- constants.cwTreeBrahmsWorkSymphonies()); | |
+ addMusicSection( | |
+ brahmsItem, concertosLabel, constants.cwTreeBrahmsWorkConcertos()); | |
+ addMusicSection( | |
+ brahmsItem, quartetsLabel, constants.cwTreeBrahmsWorkQuartets()); | |
+ addMusicSection( | |
+ brahmsItem, sonatasLabel, constants.cwTreeBrahmsWorkSonatas()); | |
+ addMusicSection( | |
+ brahmsItem, symphoniesLabel, constants.cwTreeBrahmsWorkSymphonies()); | |
// Add some of Mozart's music | |
TreeItem mozartItem = staticTree.addItem(composers[2]); | |
- addMusicSection(mozartItem, concertosLabel, | |
- constants.cwTreeMozartWorkConcertos()); | |
+ addMusicSection( | |
+ mozartItem, concertosLabel, constants.cwTreeMozartWorkConcertos()); | |
// Return the tree | |
return staticTree; | |
diff --git a/src/com/google/gwt/sample/showcase/client/content/other/CwAnimation.java b/src/com/google/gwt/sample/showcase/client/content/other/CwAnimation.java | |
index d861a59..0fcb0df 100644 | |
--- a/src/com/google/gwt/sample/showcase/client/content/other/CwAnimation.java | |
+++ b/src/com/google/gwt/sample/showcase/client/content/other/CwAnimation.java | |
@@ -1,12 +1,12 @@ | |
/* | |
* 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 | |
@@ -86,7 +86,7 @@ public class CwAnimation extends ContentWidget { | |
/** | |
* 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 | |
@@ -103,8 +103,7 @@ public class CwAnimation extends ContentWidget { | |
* The constants used in this Content Widget. | |
*/ | |
@ShowcaseSource | |
- public static interface CwConstants extends Constants, | |
- ContentWidget.CwConstants { | |
+ public static interface CwConstants extends Constants { | |
@DefaultStringValue("Cancel") | |
String cwAnimationCancel(); | |
@@ -165,7 +164,7 @@ public class CwAnimation extends ContentWidget { | |
* An instance of the constants. | |
*/ | |
@ShowcaseData | |
- private CwConstants constants; | |
+ private final CwConstants constants; | |
/** | |
* The {@link Button} used to start the {@link Animation}. | |
@@ -175,29 +174,15 @@ public class CwAnimation extends ContentWidget { | |
/** | |
* Constructor. | |
- * | |
+ * | |
* @param constants the constants | |
*/ | |
public CwAnimation(CwConstants constants) { | |
- super(constants); | |
+ super( | |
+ constants.cwAnimationName(), constants.cwAnimationDescription(), false); | |
this.constants = constants; | |
} | |
- @Override | |
- public String getDescription() { | |
- return constants.cwAnimationDescription(); | |
- } | |
- | |
- @Override | |
- public String getName() { | |
- return constants.cwAnimationName(); | |
- } | |
- | |
- @Override | |
- public boolean hasStyle() { | |
- return false; | |
- } | |
- | |
/** | |
* Initialize this example. | |
*/ | |
@@ -245,7 +230,7 @@ public class CwAnimation extends ContentWidget { | |
@Override | |
protected void asyncOnInitialize(final AsyncCallback<Widget> callback) { | |
- GWT.runAsync(new RunAsyncCallback() { | |
+ GWT.runAsync(CwAnimation.class, new RunAsyncCallback() { | |
public void onFailure(Throwable caught) { | |
callback.onFailure(caught); | |
@@ -260,7 +245,7 @@ public class CwAnimation extends ContentWidget { | |
/** | |
* Create an options panel that allows users to select a widget and reposition | |
* it. | |
- * | |
+ * | |
* @return the new options panel | |
*/ | |
@ShowcaseSource | |
diff --git a/src/com/google/gwt/sample/showcase/client/content/other/CwCookies.java b/src/com/google/gwt/sample/showcase/client/content/other/CwCookies.java | |
index 882b712..c432c6a 100644 | |
--- a/src/com/google/gwt/sample/showcase/client/content/other/CwCookies.java | |
+++ b/src/com/google/gwt/sample/showcase/client/content/other/CwCookies.java | |
@@ -1,12 +1,12 @@ | |
/* | |
* 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 | |
@@ -17,6 +17,8 @@ package com.google.gwt.sample.showcase.client.content.other; | |
import com.google.gwt.core.client.GWT; | |
import com.google.gwt.core.client.RunAsyncCallback; | |
+import com.google.gwt.core.client.Scheduler; | |
+import com.google.gwt.core.client.Scheduler.ScheduledCommand; | |
import com.google.gwt.event.dom.client.ChangeEvent; | |
import com.google.gwt.event.dom.client.ChangeHandler; | |
import com.google.gwt.event.dom.client.ClickEvent; | |
@@ -25,9 +27,7 @@ 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; | |
import com.google.gwt.user.client.Window; | |
import com.google.gwt.user.client.rpc.AsyncCallback; | |
import com.google.gwt.user.client.ui.Button; | |
@@ -47,8 +47,7 @@ public class CwCookies extends ContentWidget { | |
* The constants used in this Content Widget. | |
*/ | |
@ShowcaseSource | |
- public static interface CwConstants extends Constants, | |
- ContentWidget.CwConstants { | |
+ public static interface CwConstants extends Constants { | |
String cwCookiesDeleteCookie(); | |
String cwCookiesDescription(); | |
@@ -76,7 +75,7 @@ public class CwCookies extends ContentWidget { | |
* An instance of the constants. | |
*/ | |
@ShowcaseData | |
- private CwConstants constants; | |
+ private final CwConstants constants; | |
/** | |
* A {@link TextBox} that holds the name of the cookie. | |
@@ -98,29 +97,14 @@ public class CwCookies extends ContentWidget { | |
/** | |
* Constructor. | |
- * | |
+ * | |
* @param constants the constants | |
*/ | |
public CwCookies(CwConstants constants) { | |
- super(constants); | |
+ super(constants.cwCookiesName(), constants.cwCookiesDescription(), false); | |
this.constants = constants; | |
} | |
- @Override | |
- public String getDescription() { | |
- return constants.cwCookiesDescription(); | |
- } | |
- | |
- @Override | |
- public String getName() { | |
- return constants.cwCookiesName(); | |
- } | |
- | |
- @Override | |
- public boolean hasStyle() { | |
- return false; | |
- } | |
- | |
/** | |
* Initialize this example. | |
*/ | |
@@ -134,8 +118,8 @@ public class CwCookies extends ContentWidget { | |
existingCookiesBox = new ListBox(); | |
Button deleteCookieButton = new Button(constants.cwCookiesDeleteCookie()); | |
deleteCookieButton.addStyleName("sc-FixedWidthButton"); | |
- mainLayout.setHTML(0, 0, "<b>" + constants.cwCookiesExistingLabel() | |
- + "</b>"); | |
+ mainLayout.setHTML( | |
+ 0, 0, "<b>" + constants.cwCookiesExistingLabel() + "</b>"); | |
mainLayout.setWidget(0, 1, existingCookiesBox); | |
mainLayout.setWidget(0, 2, deleteCookieButton); | |
@@ -199,7 +183,7 @@ public class CwCookies extends ContentWidget { | |
@Override | |
protected void asyncOnInitialize(final AsyncCallback<Widget> callback) { | |
- GWT.runAsync(new RunAsyncCallback() { | |
+ GWT.runAsync(CwCookies.class, new RunAsyncCallback() { | |
public void onFailure(Throwable caught) { | |
callback.onFailure(caught); | |
@@ -213,7 +197,7 @@ public class CwCookies extends ContentWidget { | |
/** | |
* Refresh the list of existing cookies. | |
- * | |
+ * | |
* @param selectedCookie the cookie to select by default | |
*/ | |
@ShowcaseSource | |
@@ -231,10 +215,10 @@ public class CwCookies extends ContentWidget { | |
} | |
} | |
- // Select the index of the selectedCookie. Use a DeferredCommand to give | |
+ // Select the index of the selectedCookie. Use a ScheduledCommand to give | |
// the options time to register in Opera. | |
final int selectedIndexFinal = selectedIndex; | |
- DeferredCommand.addCommand(new Command() { | |
+ Scheduler.get().scheduleDeferred(new ScheduledCommand() { | |
public void execute() { | |
// Select the default cookie | |
if (selectedIndexFinal < existingCookiesBox.getItemCount()) { | |
diff --git a/src/com/google/gwt/sample/showcase/client/content/other/CwFrame.java b/src/com/google/gwt/sample/showcase/client/content/other/CwFrame.java | |
index 2e14568..aa38baa 100644 | |
--- a/src/com/google/gwt/sample/showcase/client/content/other/CwFrame.java | |
+++ b/src/com/google/gwt/sample/showcase/client/content/other/CwFrame.java | |
@@ -1,12 +1,12 @@ | |
/* | |
* 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 | |
@@ -42,8 +42,7 @@ public class CwFrame extends ContentWidget { | |
* The constants used in this Content Widget. | |
*/ | |
@ShowcaseSource | |
- public static interface CwConstants extends Constants, | |
- ContentWidget.CwConstants { | |
+ public static interface CwConstants extends Constants { | |
String cwFrameDescription(); | |
String cwFrameName(); | |
@@ -55,33 +54,18 @@ public class CwFrame extends ContentWidget { | |
* An instance of the constants. | |
*/ | |
@ShowcaseData | |
- private CwConstants constants; | |
+ private final CwConstants constants; | |
/** | |
* Constructor. | |
- * | |
+ * | |
* @param constants the constants | |
*/ | |
public CwFrame(CwConstants constants) { | |
- super(constants); | |
+ super(constants.cwFrameName(), constants.cwFrameDescription(), false); | |
this.constants = constants; | |
} | |
- @Override | |
- public String getDescription() { | |
- return constants.cwFrameDescription(); | |
- } | |
- | |
- @Override | |
- public String getName() { | |
- return constants.cwFrameName(); | |
- } | |
- | |
- @Override | |
- public boolean hasStyle() { | |
- return false; | |
- } | |
- | |
/** | |
* Initialize this example. | |
*/ | |
@@ -129,7 +113,7 @@ public class CwFrame extends ContentWidget { | |
@Override | |
protected void asyncOnInitialize(final AsyncCallback<Widget> callback) { | |
- GWT.runAsync(new RunAsyncCallback() { | |
+ GWT.runAsync(CwFrame.class, new RunAsyncCallback() { | |
public void onFailure(Throwable caught) { | |
callback.onFailure(caught); | |
diff --git a/src/com/google/gwt/sample/showcase/client/content/panels/CwAbsolutePanel.java b/src/com/google/gwt/sample/showcase/client/content/panels/CwAbsolutePanel.java | |
index d775dcb..7de10ec 100644 | |
--- a/src/com/google/gwt/sample/showcase/client/content/panels/CwAbsolutePanel.java | |
+++ b/src/com/google/gwt/sample/showcase/client/content/panels/CwAbsolutePanel.java | |
@@ -1,12 +1,12 @@ | |
/* | |
* 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 | |
@@ -17,6 +17,8 @@ package com.google.gwt.sample.showcase.client.content.panels; | |
import com.google.gwt.core.client.GWT; | |
import com.google.gwt.core.client.RunAsyncCallback; | |
+import com.google.gwt.core.client.Scheduler; | |
+import com.google.gwt.core.client.Scheduler.ScheduledCommand; | |
import com.google.gwt.event.dom.client.ChangeEvent; | |
import com.google.gwt.event.dom.client.ChangeHandler; | |
import com.google.gwt.event.dom.client.KeyUpEvent; | |
@@ -26,8 +28,6 @@ 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.rpc.AsyncCallback; | |
import com.google.gwt.user.client.ui.AbsolutePanel; | |
import com.google.gwt.user.client.ui.Button; | |
@@ -52,8 +52,7 @@ public class CwAbsolutePanel extends ContentWidget { | |
* The constants used in this Content Widget. | |
*/ | |
@ShowcaseSource | |
- public static interface CwConstants extends Constants, | |
- ContentWidget.CwConstants { | |
+ public static interface CwConstants extends Constants { | |
String cwAbsolutePanelClickMe(); | |
String cwAbsolutePanelDescription(); | |
@@ -80,7 +79,7 @@ public class CwAbsolutePanel extends ContentWidget { | |
* An instance of the constants. | |
*/ | |
@ShowcaseData | |
- private CwConstants constants; | |
+ private final CwConstants constants; | |
/** | |
* The input field used to set the left position of a {@link Widget}. | |
@@ -109,29 +108,15 @@ public class CwAbsolutePanel extends ContentWidget { | |
/** | |
* Constructor. | |
- * | |
+ * | |
* @param constants the constants | |
*/ | |
public CwAbsolutePanel(CwConstants constants) { | |
- super(constants); | |
+ super(constants.cwAbsolutePanelName(), | |
+ constants.cwAbsolutePanelDescription(), false); | |
this.constants = constants; | |
} | |
- @Override | |
- public String getDescription() { | |
- return constants.cwAbsolutePanelDescription(); | |
- } | |
- | |
- @Override | |
- public String getName() { | |
- return constants.cwAbsolutePanelName(); | |
- } | |
- | |
- @Override | |
- public boolean hasStyle() { | |
- return false; | |
- } | |
- | |
/** | |
* Initialize this example. | |
*/ | |
@@ -189,7 +174,7 @@ public class CwAbsolutePanel extends ContentWidget { | |
@ShowcaseSource | |
@Override | |
public void onInitializeComplete() { | |
- DeferredCommand.addCommand(new Command() { | |
+ Scheduler.get().scheduleDeferred(new ScheduledCommand() { | |
public void execute() { | |
updateSelectedItem(); | |
} | |
@@ -198,7 +183,7 @@ public class CwAbsolutePanel extends ContentWidget { | |
@Override | |
protected void asyncOnInitialize(final AsyncCallback<Widget> callback) { | |
- GWT.runAsync(new RunAsyncCallback() { | |
+ GWT.runAsync(CwAbsolutePanel.class, new RunAsyncCallback() { | |
public void onFailure(Throwable caught) { | |
callback.onFailure(caught); | |
@@ -213,7 +198,7 @@ public class CwAbsolutePanel extends ContentWidget { | |
/** | |
* Create an options panel that allows users to select a widget and reposition | |
* it. | |
- * | |
+ * | |
* @return the new options panel | |
*/ | |
@ShowcaseSource | |
diff --git a/src/com/google/gwt/sample/showcase/client/content/panels/CwDecoratorPanel.java b/src/com/google/gwt/sample/showcase/client/content/panels/CwDecoratorPanel.java | |
index 71bb6ee..0546e6c 100644 | |
--- a/src/com/google/gwt/sample/showcase/client/content/panels/CwDecoratorPanel.java | |
+++ b/src/com/google/gwt/sample/showcase/client/content/panels/CwDecoratorPanel.java | |
@@ -1,12 +1,12 @@ | |
/* | |
* 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 | |
@@ -41,10 +41,9 @@ public class CwDecoratorPanel extends ContentWidget { | |
* The constants used in this Content Widget. | |
*/ | |
@ShowcaseSource | |
- public static interface CwConstants extends Constants, | |
- ContentWidget.CwConstants { | |
- @DefaultStringValue("Add rounded corners to any Widget using the Decorator Panel") | |
- String cwDecoratorPanelDescription(); | |
+ public static interface CwConstants extends Constants { | |
+ @DefaultStringValue("Add rounded corners to any Widget using the Decorator Panel") | |
+ String cwDecoratorPanelDescription(); | |
@DefaultStringValue("Description:") | |
String cwDecoratorPanelFormDescription(); | |
@@ -63,28 +62,19 @@ public class CwDecoratorPanel extends ContentWidget { | |
* An instance of the constants. | |
*/ | |
@ShowcaseData | |
- private CwConstants constants; | |
+ private final CwConstants constants; | |
/** | |
* Constructor. | |
- * | |
+ * | |
* @param constants the constants | |
*/ | |
public CwDecoratorPanel(CwConstants constants) { | |
- super(constants); | |
+ super(constants.cwDecoratorPanelName(), | |
+ constants.cwDecoratorPanelDescription(), true); | |
this.constants = constants; | |
} | |
- @Override | |
- public String getDescription() { | |
- return constants.cwDecoratorPanelDescription(); | |
- } | |
- | |
- @Override | |
- public String getName() { | |
- return constants.cwDecoratorPanelName(); | |
- } | |
- | |
/** | |
* Initialize this example. | |
*/ | |
@@ -99,8 +89,8 @@ public class CwDecoratorPanel extends ContentWidget { | |
// Add a title to the form | |
layout.setHTML(0, 0, constants.cwDecoratorPanelFormTitle()); | |
cellFormatter.setColSpan(0, 0, 2); | |
- cellFormatter.setHorizontalAlignment(0, 0, | |
- HasHorizontalAlignment.ALIGN_CENTER); | |
+ cellFormatter.setHorizontalAlignment( | |
+ 0, 0, HasHorizontalAlignment.ALIGN_CENTER); | |
// Add some standard form options | |
layout.setHTML(1, 0, constants.cwDecoratorPanelFormName()); | |
@@ -116,7 +106,7 @@ public class CwDecoratorPanel extends ContentWidget { | |
@Override | |
protected void asyncOnInitialize(final AsyncCallback<Widget> callback) { | |
- GWT.runAsync(new RunAsyncCallback() { | |
+ GWT.runAsync(CwDecoratorPanel.class, new RunAsyncCallback() { | |
public void onFailure(Throwable caught) { | |
callback.onFailure(caught); | |
diff --git a/src/com/google/gwt/sample/showcase/client/content/panels/CwDisclosurePanel.java b/src/com/google/gwt/sample/showcase/client/content/panels/CwDisclosurePanel.java | |
index 4250a27..789a196 100644 | |
--- a/src/com/google/gwt/sample/showcase/client/content/panels/CwDisclosurePanel.java | |
+++ b/src/com/google/gwt/sample/showcase/client/content/panels/CwDisclosurePanel.java | |
@@ -1,12 +1,12 @@ | |
/* | |
* 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 | |
@@ -44,8 +44,7 @@ public class CwDisclosurePanel extends ContentWidget { | |
* The constants used in this Content Widget. | |
*/ | |
@ShowcaseSource | |
- public static interface CwConstants extends Constants, | |
- ContentWidget.CwConstants { | |
+ public static interface CwConstants extends Constants { | |
String cwDisclosurePanelDescription(); | |
String cwDisclosurePanelFormAdvancedCriteria(); | |
@@ -69,28 +68,19 @@ public class CwDisclosurePanel extends ContentWidget { | |
* An instance of the constants. | |
*/ | |
@ShowcaseData | |
- private CwConstants constants; | |
+ private final CwConstants constants; | |
/** | |
* Constructor. | |
- * | |
+ * | |
* @param constants the constants | |
*/ | |
public CwDisclosurePanel(CwConstants constants) { | |
- super(constants); | |
+ super(constants.cwDisclosurePanelName(), | |
+ constants.cwDisclosurePanelDescription(), true); | |
this.constants = constants; | |
} | |
- @Override | |
- public String getDescription() { | |
- return constants.cwDisclosurePanelDescription(); | |
- } | |
- | |
- @Override | |
- public String getName() { | |
- return constants.cwDisclosurePanelName(); | |
- } | |
- | |
/** | |
* Initialize this example. | |
*/ | |
@@ -108,7 +98,7 @@ public class CwDisclosurePanel extends ContentWidget { | |
@Override | |
protected void asyncOnInitialize(final AsyncCallback<Widget> callback) { | |
- GWT.runAsync(new RunAsyncCallback() { | |
+ GWT.runAsync(CwDisclosurePanel.class, new RunAsyncCallback() { | |
public void onFailure(Throwable caught) { | |
callback.onFailure(caught); | |
@@ -134,8 +124,8 @@ public class CwDisclosurePanel extends ContentWidget { | |
// Add a title to the form | |
layout.setHTML(0, 0, constants.cwDisclosurePanelFormTitle()); | |
cellFormatter.setColSpan(0, 0, 2); | |
- cellFormatter.setHorizontalAlignment(0, 0, | |
- HasHorizontalAlignment.ALIGN_CENTER); | |
+ cellFormatter.setHorizontalAlignment( | |
+ 0, 0, HasHorizontalAlignment.ALIGN_CENTER); | |
// Add some standard form options | |
layout.setHTML(1, 0, constants.cwDisclosurePanelFormName()); | |
diff --git a/src/com/google/gwt/sample/showcase/client/content/panels/CwDockPanel.java b/src/com/google/gwt/sample/showcase/client/content/panels/CwDockPanel.java | |
index 60677f0..7a04c18 100644 | |
--- a/src/com/google/gwt/sample/showcase/client/content/panels/CwDockPanel.java | |
+++ b/src/com/google/gwt/sample/showcase/client/content/panels/CwDockPanel.java | |
@@ -1,12 +1,12 @@ | |
/* | |
* 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 | |
@@ -37,8 +37,7 @@ public class CwDockPanel extends ContentWidget { | |
* The constants used in this Content Widget. | |
*/ | |
@ShowcaseSource | |
- public static interface CwConstants extends Constants, | |
- ContentWidget.CwConstants { | |
+ public static interface CwConstants extends Constants { | |
String cwDockPanelCenter(); | |
@@ -63,28 +62,19 @@ public class CwDockPanel extends ContentWidget { | |
* An instance of the constants. | |
*/ | |
@ShowcaseData | |
- private CwConstants constants; | |
+ private final CwConstants constants; | |
/** | |
* Constructor. | |
- * | |
+ * | |
* @param constants the constants | |
*/ | |
public CwDockPanel(CwConstants constants) { | |
- super(constants); | |
+ super( | |
+ constants.cwDockPanelName(), constants.cwDockPanelDescription(), true); | |
this.constants = constants; | |
} | |
- @Override | |
- public String getDescription() { | |
- return constants.cwDockPanelDescription(); | |
- } | |
- | |
- @Override | |
- public String getName() { | |
- return constants.cwDockPanelName(); | |
- } | |
- | |
/** | |
* Initialize this example. | |
*/ | |
@@ -118,7 +108,7 @@ public class CwDockPanel extends ContentWidget { | |
@Override | |
protected void asyncOnInitialize(final AsyncCallback<Widget> callback) { | |
- GWT.runAsync(new RunAsyncCallback() { | |
+ GWT.runAsync(CwDockPanel.class, new RunAsyncCallback() { | |
public void onFailure(Throwable caught) { | |
callback.onFailure(caught); | |
diff --git a/src/com/google/gwt/sample/showcase/client/content/panels/CwFlowPanel.java b/src/com/google/gwt/sample/showcase/client/content/panels/CwFlowPanel.java | |
index dd19fa5..b479ef9 100644 | |
--- a/src/com/google/gwt/sample/showcase/client/content/panels/CwFlowPanel.java | |
+++ b/src/com/google/gwt/sample/showcase/client/content/panels/CwFlowPanel.java | |
@@ -1,12 +1,12 @@ | |
/* | |
* 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 | |
@@ -36,8 +36,7 @@ public class CwFlowPanel extends ContentWidget { | |
* The constants used in this Content Widget. | |
*/ | |
@ShowcaseSource | |
- public static interface CwConstants extends Constants, | |
- ContentWidget.CwConstants { | |
+ public static interface CwConstants extends Constants { | |
String cwFlowPanelDescription(); | |
String cwFlowPanelItem(); | |
@@ -49,28 +48,19 @@ public class CwFlowPanel extends ContentWidget { | |
* An instance of the constants. | |
*/ | |
@ShowcaseData | |
- private CwConstants constants; | |
+ private final CwConstants constants; | |
/** | |
* Constructor. | |
- * | |
+ * | |
* @param constants the constants | |
*/ | |
public CwFlowPanel(CwConstants constants) { | |
- super(constants); | |
+ super( | |
+ constants.cwFlowPanelName(), constants.cwFlowPanelDescription(), true); | |
this.constants = constants; | |
} | |
- @Override | |
- public String getDescription() { | |
- return constants.cwFlowPanelDescription(); | |
- } | |
- | |
- @Override | |
- public String getName() { | |
- return constants.cwFlowPanelName(); | |
- } | |
- | |
/** | |
* Initialize this example. | |
*/ | |
@@ -94,7 +84,7 @@ public class CwFlowPanel extends ContentWidget { | |
@Override | |
protected void asyncOnInitialize(final AsyncCallback<Widget> callback) { | |
- GWT.runAsync(new RunAsyncCallback() { | |
+ GWT.runAsync(CwFlowPanel.class, new RunAsyncCallback() { | |
public void onFailure(Throwable caught) { | |
callback.onFailure(caught); | |
diff --git a/src/com/google/gwt/sample/showcase/client/content/panels/CwHorizontalPanel.java b/src/com/google/gwt/sample/showcase/client/content/panels/CwHorizontalPanel.java | |
index 2f49674..8e0de29 100644 | |
--- a/src/com/google/gwt/sample/showcase/client/content/panels/CwHorizontalPanel.java | |
+++ b/src/com/google/gwt/sample/showcase/client/content/panels/CwHorizontalPanel.java | |
@@ -1,12 +1,12 @@ | |
/* | |
* 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 | |
@@ -34,8 +34,7 @@ public class CwHorizontalPanel extends ContentWidget { | |
* The constants used in this Content Widget. | |
*/ | |
@ShowcaseSource | |
- public static interface CwConstants extends Constants, | |
- ContentWidget.CwConstants { | |
+ public static interface CwConstants extends Constants { | |
String cwHorizontalPanelButton(); | |
String cwHorizontalPanelDescription(); | |
@@ -47,33 +46,19 @@ public class CwHorizontalPanel extends ContentWidget { | |
* An instance of the constants. | |
*/ | |
@ShowcaseData | |
- private CwConstants constants; | |
+ private final CwConstants constants; | |
/** | |
* Constructor. | |
- * | |
+ * | |
* @param constants the constants | |
*/ | |
public CwHorizontalPanel(CwConstants constants) { | |
- super(constants); | |
+ super(constants.cwHorizontalPanelName(), | |
+ constants.cwHorizontalPanelDescription(), false); | |
this.constants = constants; | |
} | |
- @Override | |
- public String getDescription() { | |
- return constants.cwHorizontalPanelDescription(); | |
- } | |
- | |
- @Override | |
- public String getName() { | |
- return constants.cwHorizontalPanelName(); | |
- } | |
- | |
- @Override | |
- public boolean hasStyle() { | |
- return false; | |
- } | |
- | |
/** | |
* Initialize this example. | |
*/ | |
@@ -96,7 +81,7 @@ public class CwHorizontalPanel extends ContentWidget { | |
@Override | |
protected void asyncOnInitialize(final AsyncCallback<Widget> callback) { | |
- GWT.runAsync(new RunAsyncCallback() { | |
+ GWT.runAsync(CwHorizontalPanel.class, new RunAsyncCallback() { | |
public void onFailure(Throwable caught) { | |
callback.onFailure(caught); | |
diff --git a/src/com/google/gwt/sample/showcase/client/content/panels/CwHorizontalSplitPanel.java b/src/com/google/gwt/sample/showcase/client/content/panels/CwHorizontalSplitPanel.java | |
deleted file mode 100644 | |
index b989453..0000000 | |
--- a/src/com/google/gwt/sample/showcase/client/content/panels/CwHorizontalSplitPanel.java | |
+++ /dev/null | |
@@ -1,116 +0,0 @@ | |
-/* | |
- * Copyright 2008 Google Inc. | |
- * | |
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not | |
- * use this file except in compliance with the License. You may obtain a copy of | |
- * the License at | |
- * | |
- * http://www.apache.org/licenses/LICENSE-2.0 | |
- * | |
- * Unless required by applicable law or agreed to in writing, software | |
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | |
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | |
- * License for the specific language governing permissions and limitations under | |
- * the License. | |
- */ | |
-package com.google.gwt.sample.showcase.client.content.panels; | |
- | |
-import com.google.gwt.core.client.GWT; | |
-import com.google.gwt.core.client.RunAsyncCallback; | |
-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.rpc.AsyncCallback; | |
-import com.google.gwt.user.client.ui.DecoratorPanel; | |
-import com.google.gwt.user.client.ui.HTML; | |
-import com.google.gwt.user.client.ui.HorizontalSplitPanel; | |
-import com.google.gwt.user.client.ui.Widget; | |
- | |
-/** | |
- * Example file. | |
- */ | |
-@ShowcaseStyle(".gwt-HorizontalSplitPanel") | |
-public class CwHorizontalSplitPanel extends ContentWidget { | |
- /** | |
- * The constants used in this Content Widget. | |
- */ | |
- @ShowcaseSource | |
- public static interface CwConstants extends Constants, | |
- ContentWidget.CwConstants { | |
- String cwHorizontalSplitPanelDescription(); | |
- | |
- String cwHorizontalSplitPanelName(); | |
- | |
- String cwHorizontalSplitPanelText(); | |
- } | |
- | |
- /** | |
- * An instance of the constants. | |
- */ | |
- @ShowcaseData | |
- private CwConstants constants; | |
- | |
- /** | |
- * Constructor. | |
- * | |
- * @param constants the constants | |
- */ | |
- public CwHorizontalSplitPanel(CwConstants constants) { | |
- super(constants); | |
- this.constants = constants; | |
- } | |
- | |
- @Override | |
- public String getDescription() { | |
- return constants.cwHorizontalSplitPanelDescription(); | |
- } | |
- | |
- @Override | |
- public String getName() { | |
- return constants.cwHorizontalSplitPanelName(); | |
- } | |
- | |
- /** | |
- * Initialize this example. | |
- */ | |
- @ShowcaseSource | |
- @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; | |
- } | |
- | |
- @Override | |
- protected void asyncOnInitialize(final AsyncCallback<Widget> callback) { | |
- GWT.runAsync(new RunAsyncCallback() { | |
- | |
- public void onFailure(Throwable caught) { | |
- callback.onFailure(caught); | |
- } | |
- | |
- public void onSuccess() { | |
- callback.onSuccess(onInitialize()); | |
- } | |
- }); | |
- } | |
-} | |
diff --git a/src/com/google/gwt/sample/showcase/client/content/panels/CwTabPanel.java b/src/com/google/gwt/sample/showcase/client/content/panels/CwTabPanel.java | |
deleted file mode 100644 | |
index e8c8234..0000000 | |
--- a/src/com/google/gwt/sample/showcase/client/content/panels/CwTabPanel.java | |
+++ /dev/null | |
@@ -1,127 +0,0 @@ | |
-/* | |
- * Copyright 2008 Google Inc. | |
- * | |
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not | |
- * use this file except in compliance with the License. You may obtain a copy of | |
- * the License at | |
- * | |
- * http://www.apache.org/licenses/LICENSE-2.0 | |
- * | |
- * Unless required by applicable law or agreed to in writing, software | |
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | |
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | |
- * License for the specific language governing permissions and limitations under | |
- * the License. | |
- */ | |
-package com.google.gwt.sample.showcase.client.content.panels; | |
- | |
-import com.google.gwt.core.client.GWT; | |
-import com.google.gwt.core.client.RunAsyncCallback; | |
-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.rpc.AsyncCallback; | |
-import com.google.gwt.user.client.ui.DecoratedTabPanel; | |
-import com.google.gwt.user.client.ui.HTML; | |
-import com.google.gwt.user.client.ui.Image; | |
-import com.google.gwt.user.client.ui.VerticalPanel; | |
-import com.google.gwt.user.client.ui.Widget; | |
- | |
-/** | |
- * Example file. | |
- */ | |
-@ShowcaseStyle({ | |
- ".gwt-DecoratedTabBar", "html>body .gwt-DecoratedTabBar", | |
- "* html .gwt-DecoratedTabBar", ".gwt-TabPanel"}) | |
-public class CwTabPanel extends ContentWidget { | |
- /** | |
- * The constants used in this Content Widget. | |
- */ | |
- @ShowcaseSource | |
- public static interface CwConstants extends Constants, | |
- ContentWidget.CwConstants { | |
- String cwTabPanelDescription(); | |
- | |
- String cwTabPanelName(); | |
- | |
- String cwTabPanelTab0(); | |
- | |
- String cwTabPanelTab2(); | |
- | |
- String[] cwTabPanelTabs(); | |
- } | |
- | |
- /** | |
- * An instance of the constants. | |
- */ | |
- @ShowcaseData | |
- private CwConstants constants; | |
- | |
- /** | |
- * Constructor. | |
- * | |
- * @param constants the constants | |
- */ | |
- public CwTabPanel(CwConstants constants) { | |
- super(constants); | |
- this.constants = constants; | |
- } | |
- | |
- @Override | |
- public String getDescription() { | |
- return constants.cwTabPanelDescription(); | |
- } | |
- | |
- @Override | |
- public String getName() { | |
- return constants.cwTabPanelName(); | |
- } | |
- | |
- /** | |
- * Initialize this example. | |
- */ | |
- @ShowcaseSource | |
- @Override | |
- public Widget onInitialize() { | |
- // Create a tab panel | |
- DecoratedTabPanel tabPanel = new DecoratedTabPanel(); | |
- tabPanel.setWidth("400px"); | |
- tabPanel.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(new Image(Showcase.images.gwtLogo())); | |
- 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; | |
- } | |
- | |
- @Override | |
- protected void asyncOnInitialize(final AsyncCallback<Widget> callback) { | |
- GWT.runAsync(new RunAsyncCallback() { | |
- | |
- public void onFailure(Throwable caught) { | |
- callback.onFailure(caught); | |
- } | |
- | |
- public void onSuccess() { | |
- callback.onSuccess(onInitialize()); | |
- } | |
- }); | |
- } | |
-} | |
diff --git a/src/com/google/gwt/sample/showcase/client/content/panels/CwVerticalPanel.java b/src/com/google/gwt/sample/showcase/client/content/panels/CwVerticalPanel.java | |
index 01446bd..80f7b13 100644 | |
--- a/src/com/google/gwt/sample/showcase/client/content/panels/CwVerticalPanel.java | |
+++ b/src/com/google/gwt/sample/showcase/client/content/panels/CwVerticalPanel.java | |
@@ -1,12 +1,12 @@ | |
/* | |
* 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 | |
@@ -34,8 +34,7 @@ public class CwVerticalPanel extends ContentWidget { | |
* The constants used in this Content Widget. | |
*/ | |
@ShowcaseSource | |
- public static interface CwConstants extends Constants, | |
- ContentWidget.CwConstants { | |
+ public static interface CwConstants extends Constants { | |
String cwVerticalPanelButton(); | |
String cwVerticalPanelDescription(); | |
@@ -47,33 +46,19 @@ public class CwVerticalPanel extends ContentWidget { | |
* An instance of the constants. | |
*/ | |
@ShowcaseData | |
- private CwConstants constants; | |
+ private final CwConstants constants; | |
/** | |
* Constructor. | |
- * | |
+ * | |
* @param constants the constants | |
*/ | |
public CwVerticalPanel(CwConstants constants) { | |
- super(constants); | |
+ super(constants.cwVerticalPanelName(), | |
+ constants.cwVerticalPanelDescription(), false); | |
this.constants = constants; | |
} | |
- @Override | |
- public String getDescription() { | |
- return constants.cwVerticalPanelDescription(); | |
- } | |
- | |
- @Override | |
- public String getName() { | |
- return constants.cwVerticalPanelName(); | |
- } | |
- | |
- @Override | |
- public boolean hasStyle() { | |
- return false; | |
- } | |
- | |
/** | |
* Initialize this example. | |
*/ | |
@@ -96,7 +81,7 @@ public class CwVerticalPanel extends ContentWidget { | |
@Override | |
protected void asyncOnInitialize(final AsyncCallback<Widget> callback) { | |
- GWT.runAsync(new RunAsyncCallback() { | |
+ GWT.runAsync(CwVerticalPanel.class, new RunAsyncCallback() { | |
public void onFailure(Throwable caught) { | |
callback.onFailure(caught); | |
diff --git a/src/com/google/gwt/sample/showcase/client/content/panels/CwVerticalSplitPanel.java b/src/com/google/gwt/sample/showcase/client/content/panels/CwVerticalSplitPanel.java | |
deleted file mode 100644 | |
index 0f60296..0000000 | |
--- a/src/com/google/gwt/sample/showcase/client/content/panels/CwVerticalSplitPanel.java | |
+++ /dev/null | |
@@ -1,116 +0,0 @@ | |
-/* | |
- * Copyright 2008 Google Inc. | |
- * | |
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not | |
- * use this file except in compliance with the License. You may obtain a copy of | |
- * the License at | |
- * | |
- * http://www.apache.org/licenses/LICENSE-2.0 | |
- * | |
- * Unless required by applicable law or agreed to in writing, software | |
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | |
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | |
- * License for the specific language governing permissions and limitations under | |
- * the License. | |
- */ | |
-package com.google.gwt.sample.showcase.client.content.panels; | |
- | |
-import com.google.gwt.core.client.GWT; | |
-import com.google.gwt.core.client.RunAsyncCallback; | |
-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.rpc.AsyncCallback; | |
-import com.google.gwt.user.client.ui.DecoratorPanel; | |
-import com.google.gwt.user.client.ui.HTML; | |
-import com.google.gwt.user.client.ui.VerticalSplitPanel; | |
-import com.google.gwt.user.client.ui.Widget; | |
- | |
-/** | |
- * Example file. | |
- */ | |
-@ShowcaseStyle(".gwt-VerticalSplitPanel") | |
-public class CwVerticalSplitPanel extends ContentWidget { | |
- /** | |
- * The constants used in this Content Widget. | |
- */ | |
- @ShowcaseSource | |
- public static interface CwConstants extends Constants, | |
- ContentWidget.CwConstants { | |
- String cwVerticalSplitPanelDescription(); | |
- | |
- String cwVerticalSplitPanelName(); | |
- | |
- String cwVerticalSplitPanelText(); | |
- } | |
- | |
- /** | |
- * An instance of the constants. | |
- */ | |
- @ShowcaseData | |
- private CwConstants constants; | |
- | |
- /** | |
- * Constructor. | |
- * | |
- * @param constants the constants | |
- */ | |
- public CwVerticalSplitPanel(CwConstants constants) { | |
- super(constants); | |
- this.constants = constants; | |
- } | |
- | |
- @Override | |
- public String getDescription() { | |
- return constants.cwVerticalSplitPanelDescription(); | |
- } | |
- | |
- @Override | |
- public String getName() { | |
- return constants.cwVerticalSplitPanelName(); | |
- } | |
- | |
- /** | |
- * Initialize this example. | |
- */ | |
- @ShowcaseSource | |
- @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; | |
- } | |
- | |
- @Override | |
- protected void asyncOnInitialize(final AsyncCallback<Widget> callback) { | |
- GWT.runAsync(new RunAsyncCallback() { | |
- | |
- public void onFailure(Throwable caught) { | |
- callback.onFailure(caught); | |
- } | |
- | |
- public void onSuccess() { | |
- callback.onSuccess(onInitialize()); | |
- } | |
- }); | |
- } | |
-} | |
diff --git a/src/com/google/gwt/sample/showcase/client/content/popups/CwBasicPopup.java b/src/com/google/gwt/sample/showcase/client/content/popups/CwBasicPopup.java | |
index 2f81461..88b4f35 100644 | |
--- a/src/com/google/gwt/sample/showcase/client/content/popups/CwBasicPopup.java | |
+++ b/src/com/google/gwt/sample/showcase/client/content/popups/CwBasicPopup.java | |
@@ -1,12 +1,12 @@ | |
/* | |
* 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 | |
@@ -37,7 +37,7 @@ import com.google.gwt.user.client.ui.Widget; | |
/** | |
* Example file. | |
*/ | |
-@ShowcaseStyle(value = { | |
+@ShowcaseStyle({ | |
".gwt-PopupPanel", "html>body .gwt-PopupPanel", "* html .gwt-PopupPanel", | |
".gwt-DecoratedPopupPanel", "html>body .gwt-DecoratedPopupPanel", | |
"* html .gwt-DecoratedPopupPanel"}) | |
@@ -46,8 +46,7 @@ public class CwBasicPopup extends ContentWidget { | |
* The constants used in this Content Widget. | |
*/ | |
@ShowcaseSource | |
- public static interface CwConstants extends Constants, | |
- ContentWidget.CwConstants { | |
+ public static interface CwConstants extends Constants { | |
String cwBasicPopupClickOutsideInstructions(); | |
String cwBasicPopupDescription(); | |
@@ -63,28 +62,19 @@ public class CwBasicPopup extends ContentWidget { | |
* An instance of the constants. | |
*/ | |
@ShowcaseData | |
- private CwConstants constants; | |
+ private final CwConstants constants; | |
/** | |
* Constructor. | |
- * | |
+ * | |
* @param constants the constants | |
*/ | |
public CwBasicPopup(CwConstants constants) { | |
- super(constants); | |
+ super(constants.cwBasicPopupName(), constants.cwBasicPopupDescription(), | |
+ true); | |
this.constants = constants; | |
} | |
- @Override | |
- public String getDescription() { | |
- return constants.cwBasicPopupDescription(); | |
- } | |
- | |
- @Override | |
- public String getName() { | |
- return constants.cwBasicPopupName(); | |
- } | |
- | |
/** | |
* Initialize this example. | |
*/ | |
@@ -95,12 +85,12 @@ public class CwBasicPopup extends ContentWidget { | |
final DecoratedPopupPanel simplePopup = new DecoratedPopupPanel(true); | |
simplePopup.ensureDebugId("cwBasicPopup-simplePopup"); | |
simplePopup.setWidth("150px"); | |
- simplePopup.setWidget(new HTML( | |
- constants.cwBasicPopupClickOutsideInstructions())); | |
+ simplePopup.setWidget( | |
+ new HTML(constants.cwBasicPopupClickOutsideInstructions())); | |
// Create a button to show the popup | |
- Button openButton = new Button(constants.cwBasicPopupShowButton(), | |
- new ClickHandler() { | |
+ Button openButton = new Button( | |
+ constants.cwBasicPopupShowButton(), new ClickHandler() { | |
public void onClick(ClickEvent event) { | |
// Reposition the popup relative to the button | |
Widget source = (Widget) event.getSource(); | |
@@ -148,7 +138,7 @@ public class CwBasicPopup extends ContentWidget { | |
@Override | |
protected void asyncOnInitialize(final AsyncCallback<Widget> callback) { | |
- GWT.runAsync(new RunAsyncCallback() { | |
+ GWT.runAsync(CwBasicPopup.class, new RunAsyncCallback() { | |
public void onFailure(Throwable caught) { | |
callback.onFailure(caught); | |
diff --git a/src/com/google/gwt/sample/showcase/client/content/popups/CwDialogBox.java b/src/com/google/gwt/sample/showcase/client/content/popups/CwDialogBox.java | |
index b13b6f2..5e19c3b 100644 | |
--- a/src/com/google/gwt/sample/showcase/client/content/popups/CwDialogBox.java | |
+++ b/src/com/google/gwt/sample/showcase/client/content/popups/CwDialogBox.java | |
@@ -1,12 +1,12 @@ | |
/* | |
* 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 | |
@@ -47,8 +47,7 @@ public class CwDialogBox extends ContentWidget { | |
* The constants used in this Content Widget. | |
*/ | |
@ShowcaseSource | |
- public static interface CwConstants extends Constants, | |
- ContentWidget.CwConstants { | |
+ public static interface CwConstants extends Constants { | |
String cwDialogBoxCaption(); | |
String cwDialogBoxClose(); | |
@@ -72,28 +71,19 @@ public class CwDialogBox extends ContentWidget { | |
* An instance of the constants. | |
*/ | |
@ShowcaseData | |
- private CwConstants constants; | |
+ private final CwConstants constants; | |
/** | |
* Constructor. | |
- * | |
+ * | |
* @param constants the constants | |
*/ | |
public CwDialogBox(CwConstants constants) { | |
- super(constants); | |
+ super( | |
+ constants.cwDialogBoxName(), constants.cwDialogBoxDescription(), true); | |
this.constants = constants; | |
} | |
- @Override | |
- public String getDescription() { | |
- return constants.cwDialogBoxDescription(); | |
- } | |
- | |
- @Override | |
- public String getName() { | |
- return constants.cwDialogBoxName(); | |
- } | |
- | |
/** | |
* Initialize this example. | |
*/ | |
@@ -106,8 +96,8 @@ public class CwDialogBox extends ContentWidget { | |
dialogBox.setAnimationEnabled(true); | |
// Create a button to show the dialog Box | |
- Button openButton = new Button(constants.cwDialogBoxShowButton(), | |
- new ClickHandler() { | |
+ Button openButton = new Button( | |
+ constants.cwDialogBoxShowButton(), new ClickHandler() { | |
public void onClick(ClickEvent sender) { | |
dialogBox.center(); | |
dialogBox.show(); | |
@@ -115,8 +105,8 @@ public class CwDialogBox extends ContentWidget { | |
}); | |
// Create a ListBox | |
- HTML listDesc = new HTML("<br><br><br>" | |
- + constants.cwDialogBoxListBoxInfo()); | |
+ HTML listDesc = new HTML( | |
+ "<br><br><br>" + constants.cwDialogBoxListBoxInfo()); | |
ListBox list = new ListBox(); | |
list.setVisibleItemCount(1); | |
@@ -137,7 +127,7 @@ public class CwDialogBox extends ContentWidget { | |
@Override | |
protected void asyncOnInitialize(final AsyncCallback<Widget> callback) { | |
- GWT.runAsync(new RunAsyncCallback() { | |
+ GWT.runAsync(CwDialogBox.class, new RunAsyncCallback() { | |
public void onFailure(Throwable caught) { | |
callback.onFailure(caught); | |
@@ -151,7 +141,7 @@ public class CwDialogBox extends ContentWidget { | |
/** | |
* Create the dialog box for this example. | |
- * | |
+ * | |
* @return the new dialog box | |
*/ | |
@ShowcaseSource | |
@@ -169,30 +159,30 @@ public class CwDialogBox extends ContentWidget { | |
// Add some text to the top of the dialog | |
HTML details = new HTML(constants.cwDialogBoxDetails()); | |
dialogContents.add(details); | |
- dialogContents.setCellHorizontalAlignment(details, | |
- HasHorizontalAlignment.ALIGN_CENTER); | |
+ dialogContents.setCellHorizontalAlignment( | |
+ details, HasHorizontalAlignment.ALIGN_CENTER); | |
// Add an image to the dialog | |
Image image = new Image(Showcase.images.jimmy()); | |
dialogContents.add(image); | |
- dialogContents.setCellHorizontalAlignment(image, | |
- HasHorizontalAlignment.ALIGN_CENTER); | |
+ dialogContents.setCellHorizontalAlignment( | |
+ image, HasHorizontalAlignment.ALIGN_CENTER); | |
// Add a close button at the bottom of the dialog | |
- Button closeButton = new Button(constants.cwDialogBoxClose(), | |
- new ClickHandler() { | |
+ Button closeButton = new Button( | |
+ constants.cwDialogBoxClose(), new ClickHandler() { | |
public void onClick(ClickEvent event) { | |
dialogBox.hide(); | |
} | |
}); | |
dialogContents.add(closeButton); | |
if (LocaleInfo.getCurrentLocale().isRTL()) { | |
- dialogContents.setCellHorizontalAlignment(closeButton, | |
- HasHorizontalAlignment.ALIGN_LEFT); | |
+ dialogContents.setCellHorizontalAlignment( | |
+ closeButton, HasHorizontalAlignment.ALIGN_LEFT); | |
} else { | |
- dialogContents.setCellHorizontalAlignment(closeButton, | |
- HasHorizontalAlignment.ALIGN_RIGHT); | |
+ dialogContents.setCellHorizontalAlignment( | |
+ closeButton, HasHorizontalAlignment.ALIGN_RIGHT); | |
} | |
// Return the dialog box | |
diff --git a/src/com/google/gwt/sample/showcase/client/content/tables/CwFlexTable.java b/src/com/google/gwt/sample/showcase/client/content/tables/CwFlexTable.java | |
index 7e4422a..0c2a294 100644 | |
--- a/src/com/google/gwt/sample/showcase/client/content/tables/CwFlexTable.java | |
+++ b/src/com/google/gwt/sample/showcase/client/content/tables/CwFlexTable.java | |
@@ -1,12 +1,12 @@ | |
/* | |
* 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 | |
@@ -44,8 +44,7 @@ public class CwFlexTable extends ContentWidget { | |
* The constants used in this Content Widget. | |
*/ | |
@ShowcaseSource | |
- public static interface CwConstants extends Constants, | |
- ContentWidget.CwConstants { | |
+ public static interface CwConstants extends Constants { | |
String cwFlexTableAddRow(); | |
String cwFlexTableDescription(); | |
@@ -61,28 +60,19 @@ public class CwFlexTable extends ContentWidget { | |
* An instance of the constants. | |
*/ | |
@ShowcaseData | |
- private CwConstants constants; | |
+ private final CwConstants constants; | |
/** | |
* Constructor. | |
- * | |
+ * | |
* @param constants the constants | |
*/ | |
public CwFlexTable(CwConstants constants) { | |
- super(constants); | |
+ super( | |
+ constants.cwFlexTableName(), constants.cwFlexTableDescription(), true); | |
this.constants = constants; | |
} | |
- @Override | |
- public String getDescription() { | |
- return constants.cwFlexTableDescription(); | |
- } | |
- | |
- @Override | |
- public String getName() { | |
- return constants.cwFlexTableName(); | |
- } | |
- | |
/** | |
* Initialize this example. | |
*/ | |
@@ -98,22 +88,22 @@ public class CwFlexTable extends ContentWidget { | |
flexTable.setCellPadding(3); | |
// Add some text | |
- cellFormatter.setHorizontalAlignment(0, 1, | |
- HasHorizontalAlignment.ALIGN_LEFT); | |
+ 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 ClickHandler() { | |
+ Button addRowButton = new Button( | |
+ constants.cwFlexTableAddRow(), new ClickHandler() { | |
public void onClick(ClickEvent event) { | |
addRow(flexTable); | |
} | |
}); | |
addRowButton.addStyleName("sc-FixedWidthButton"); | |
- Button removeRowButton = new Button(constants.cwFlexTableRemoveRow(), | |
- new ClickHandler() { | |
+ Button removeRowButton = new Button( | |
+ constants.cwFlexTableRemoveRow(), new ClickHandler() { | |
public void onClick(ClickEvent event) { | |
removeRow(flexTable); | |
} | |
@@ -137,7 +127,7 @@ public class CwFlexTable extends ContentWidget { | |
@Override | |
protected void asyncOnInitialize(final AsyncCallback<Widget> callback) { | |
- GWT.runAsync(new RunAsyncCallback() { | |
+ GWT.runAsync(CwFlexTable.class, new RunAsyncCallback() { | |
public void onFailure(Throwable caught) { | |
callback.onFailure(caught); | |
diff --git a/src/com/google/gwt/sample/showcase/client/content/tables/CwGrid.java b/src/com/google/gwt/sample/showcase/client/content/tables/CwGrid.java | |
index beea730..3077b31 100644 | |
--- a/src/com/google/gwt/sample/showcase/client/content/tables/CwGrid.java | |
+++ b/src/com/google/gwt/sample/showcase/client/content/tables/CwGrid.java | |
@@ -1,12 +1,12 @@ | |
/* | |
* 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 | |
@@ -20,7 +20,6 @@ import com.google.gwt.core.client.RunAsyncCallback; | |
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.rpc.AsyncCallback; | |
import com.google.gwt.user.client.ui.Grid; | |
@@ -35,42 +34,19 @@ public class CwGrid extends ContentWidget { | |
* The constants used in this Content Widget. | |
*/ | |
@ShowcaseSource | |
- public static interface CwConstants extends Constants, | |
- ContentWidget.CwConstants { | |
+ public static interface CwConstants extends Constants { | |
String cwGridDescription(); | |
String cwGridName(); | |
} | |
/** | |
- * An instance of the constants. | |
- */ | |
- @ShowcaseData | |
- private CwConstants constants; | |
- | |
- /** | |
* Constructor. | |
- * | |
+ * | |
* @param constants the constants | |
*/ | |
public CwGrid(CwConstants constants) { | |
- super(constants); | |
- this.constants = constants; | |
- } | |
- | |
- @Override | |
- public String getDescription() { | |
- return constants.cwGridDescription(); | |
- } | |
- | |
- @Override | |
- public String getName() { | |
- return constants.cwGridName(); | |
- } | |
- | |
- @Override | |
- public boolean hasStyle() { | |
- return false; | |
+ super(constants.cwGridName(), constants.cwGridDescription(), false); | |
} | |
/** | |
@@ -98,7 +74,7 @@ public class CwGrid extends ContentWidget { | |
@Override | |
protected void asyncOnInitialize(final AsyncCallback<Widget> callback) { | |
- GWT.runAsync(new RunAsyncCallback() { | |
+ GWT.runAsync(CwGrid.class, new RunAsyncCallback() { | |
public void onFailure(Throwable caught) { | |
callback.onFailure(caught); | |
diff --git a/src/com/google/gwt/sample/showcase/client/content/text/CwBasicText.java b/src/com/google/gwt/sample/showcase/client/content/text/CwBasicText.java | |
index 9829e3e..bddeb35 100644 | |
--- a/src/com/google/gwt/sample/showcase/client/content/text/CwBasicText.java | |
+++ b/src/com/google/gwt/sample/showcase/client/content/text/CwBasicText.java | |
@@ -1,12 +1,12 @@ | |
/* | |
* 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 | |
@@ -22,6 +22,7 @@ import com.google.gwt.event.dom.client.ClickHandler; | |
import com.google.gwt.event.dom.client.KeyUpEvent; | |
import com.google.gwt.event.dom.client.KeyUpHandler; | |
import com.google.gwt.i18n.client.Constants; | |
+import com.google.gwt.i18n.shared.AnyRtlDirectionEstimator; | |
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; | |
@@ -47,8 +48,7 @@ public class CwBasicText extends ContentWidget { | |
* The constants used in this Content Widget. | |
*/ | |
@ShowcaseSource | |
- public static interface CwConstants extends Constants, | |
- ContentWidget.CwConstants { | |
+ public static interface CwConstants extends Constants { | |
String cwBasicTextAreaLabel(); | |
String cwBasicTextDescription(); | |
@@ -68,28 +68,19 @@ public class CwBasicText extends ContentWidget { | |
* An instance of the constants. | |
*/ | |
@ShowcaseData | |
- private CwConstants constants; | |
+ private final CwConstants constants; | |
/** | |
* Constructor. | |
- * | |
+ * | |
* @param constants the constants | |
*/ | |
public CwBasicText(CwConstants constants) { | |
- super(constants); | |
+ super( | |
+ constants.cwBasicTextName(), constants.cwBasicTextDescription(), true); | |
this.constants = constants; | |
} | |
- @Override | |
- public String getDescription() { | |
- return constants.cwBasicTextDescription(); | |
- } | |
- | |
- @Override | |
- public String getName() { | |
- return constants.cwBasicTextName(); | |
- } | |
- | |
/** | |
* Initialize this example. | |
*/ | |
@@ -103,6 +94,10 @@ public class CwBasicText extends ContentWidget { | |
// Add a normal and disabled text box | |
TextBox normalText = new TextBox(); | |
normalText.ensureDebugId("cwBasicText-textbox"); | |
+ // Set the normal text box to automatically adjust its direction according | |
+ // to the input text. Use the Any-RTL heuristic, which sets an RTL direction | |
+ // iff the text contains at least one RTL character. | |
+ normalText.setDirectionEstimator(AnyRtlDirectionEstimator.get()); | |
TextBox disabledText = new TextBox(); | |
disabledText.ensureDebugId("cwBasicText-textbox-disabled"); | |
disabledText.setText(constants.cwBasicTextReadOnly()); | |
@@ -135,7 +130,7 @@ public class CwBasicText extends ContentWidget { | |
@Override | |
protected void asyncOnInitialize(final AsyncCallback<Widget> callback) { | |
- GWT.runAsync(new RunAsyncCallback() { | |
+ GWT.runAsync(CwBasicText.class, new RunAsyncCallback() { | |
public void onFailure(Throwable caught) { | |
callback.onFailure(caught); | |
@@ -148,16 +143,16 @@ public class CwBasicText extends ContentWidget { | |
} | |
/** | |
- * Create a TextBox example that includes the text box and an optional | |
- * handler that updates a Label with the currently selected text. | |
- * | |
+ * Create a TextBox example that includes the text box and an optional handler | |
+ * that updates a Label with the currently selected text. | |
+ * | |
* @param textBox the text box to handle | |
* @param addSelection add handlers to update label | |
* @return the Label that will be updated | |
*/ | |
@ShowcaseSource | |
- private HorizontalPanel createTextExample(final TextBoxBase textBox, | |
- boolean addSelection) { | |
+ private HorizontalPanel createTextExample( | |
+ final TextBoxBase textBox, boolean addSelection) { | |
// Add the text box and label to a panel | |
HorizontalPanel hPanel = new HorizontalPanel(); | |
hPanel.setSpacing(4); | |
@@ -192,13 +187,14 @@ public class CwBasicText extends ContentWidget { | |
/** | |
* Update the text in one of the selection labels. | |
- * | |
+ * | |
* @param textBox the text box | |
* @param label the label to update | |
*/ | |
@ShowcaseSource | |
private void updateSelectionLabel(TextBoxBase textBox, Label label) { | |
- label.setText(constants.cwBasicTextSelected() + ": " | |
- + textBox.getCursorPos() + ", " + textBox.getSelectionLength()); | |
+ label.setText( | |
+ constants.cwBasicTextSelected() + ": " + textBox.getCursorPos() + ", " | |
+ + textBox.getSelectionLength()); | |
} | |
} | |
diff --git a/src/com/google/gwt/sample/showcase/client/content/text/CwRichText.java b/src/com/google/gwt/sample/showcase/client/content/text/CwRichText.java | |
index 2e15e28..e85e338 100644 | |
--- a/src/com/google/gwt/sample/showcase/client/content/text/CwRichText.java | |
+++ b/src/com/google/gwt/sample/showcase/client/content/text/CwRichText.java | |
@@ -1,12 +1,12 @@ | |
/* | |
* 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 | |
@@ -19,7 +19,6 @@ import com.google.gwt.core.client.GWT; | |
import com.google.gwt.core.client.RunAsyncCallback; | |
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.rpc.AsyncCallback; | |
@@ -38,37 +37,19 @@ public class CwRichText extends ContentWidget { | |
* The constants used in this Content Widget. | |
*/ | |
@ShowcaseSource | |
- public static interface CwConstants extends Constants, | |
- ContentWidget.CwConstants { | |
+ public static interface CwConstants extends Constants { | |
String cwRichTextDescription(); | |
String cwRichTextName(); | |
} | |
/** | |
- * An instance of the constants. | |
- */ | |
- @ShowcaseData | |
- private CwConstants constants; | |
- | |
- /** | |
* Constructor. | |
- * | |
+ * | |
* @param constants the constants | |
*/ | |
public CwRichText(CwConstants constants) { | |
- super(constants); | |
- this.constants = constants; | |
- } | |
- | |
- @Override | |
- public String getDescription() { | |
- return constants.cwRichTextDescription(); | |
- } | |
- | |
- @Override | |
- public String getName() { | |
- return constants.cwRichTextName(); | |
+ super(constants.cwRichTextName(), constants.cwRichTextDescription(), true); | |
} | |
/** | |
@@ -95,7 +76,7 @@ public class CwRichText extends ContentWidget { | |
@Override | |
protected void asyncOnInitialize(final AsyncCallback<Widget> callback) { | |
- GWT.runAsync(new RunAsyncCallback() { | |
+ GWT.runAsync(CwRichText.class, new RunAsyncCallback() { | |
public void onFailure(Throwable caught) { | |
callback.onFailure(caught); | |
diff --git a/src/com/google/gwt/sample/showcase/client/content/text/RichTextToolbar$Strings.properties b/src/com/google/gwt/sample/showcase/client/content/text/RichTextToolbar$Strings.properties | |
deleted file mode 100644 | |
index 363b704..0000000 | |
--- a/src/com/google/gwt/sample/showcase/client/content/text/RichTextToolbar$Strings.properties | |
+++ /dev/null | |
@@ -1,35 +0,0 @@ | |
-bold = Toggle Bold | |
-createLink = Create Link | |
-hr = Insert Horizontal Rule | |
-indent = Indent Right | |
-insertImage = Insert Image | |
-italic = Toggle Italic | |
-justifyCenter = Center | |
-justifyLeft = Left Justify | |
-justifyRight = Right Justify | |
-ol = Insert Ordered List | |
-outdent = Indent Left | |
-removeFormat = Remove Formatting | |
-removeLink = Remove Link | |
-strikeThrough = Toggle Strikethrough | |
-subscript = Toggle Subscript | |
-superscript = Toggle Superscript | |
-ul = Insert Unordered List | |
-underline = Toggle Underline | |
-color = Color | |
-black = Black | |
-white = White | |
-red = Red | |
-green = Green | |
-yellow = Yellow | |
-blue = Blue | |
-font = Font | |
-normal = Normal | |
-size = Size | |
-xxsmall = XX-Small | |
-xsmall = X-Small | |
-small = Small | |
-medium = Medium | |
-large = Large | |
-xlarge = X-Large | |
-xxlarge = XX-Large | |
\ No newline at end of file | |
diff --git a/src/com/google/gwt/sample/showcase/client/content/text/RichTextToolbar.java b/src/com/google/gwt/sample/showcase/client/content/text/RichTextToolbar.java | |
index da6bfc9..d89dec8 100644 | |
--- a/src/com/google/gwt/sample/showcase/client/content/text/RichTextToolbar.java | |
+++ b/src/com/google/gwt/sample/showcase/client/content/text/RichTextToolbar.java | |
@@ -41,6 +41,7 @@ import com.google.gwt.user.client.ui.Widget; | |
* for all rich text formatting, dynamically displayed only for the available | |
* functionality. | |
*/ | |
+@SuppressWarnings("deprecation") | |
public class RichTextToolbar extends Composite { | |
/** | |
diff --git a/src/com/google/gwt/sample/showcase/client/content/widgets/CwBasicButton.java b/src/com/google/gwt/sample/showcase/client/content/widgets/CwBasicButton.java | |
index 1217cd3..22ccb1e 100644 | |
--- a/src/com/google/gwt/sample/showcase/client/content/widgets/CwBasicButton.java | |
+++ b/src/com/google/gwt/sample/showcase/client/content/widgets/CwBasicButton.java | |
@@ -1,12 +1,12 @@ | |
/* | |
* 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 | |
@@ -39,8 +39,7 @@ public class CwBasicButton extends ContentWidget { | |
* The constants used in this Content Widget. | |
*/ | |
@ShowcaseSource | |
- public static interface CwConstants extends Constants, | |
- ContentWidget.CwConstants { | |
+ public static interface CwConstants extends Constants { | |
String cwBasicButtonClickMessage(); | |
String cwBasicButtonDescription(); | |
@@ -56,28 +55,19 @@ public class CwBasicButton extends ContentWidget { | |
* An instance of the constants. | |
*/ | |
@ShowcaseData | |
- private CwConstants constants; | |
+ private final CwConstants constants; | |
/** | |
* Constructor. | |
- * | |
+ * | |
* @param constants the constants | |
*/ | |
public CwBasicButton(CwConstants constants) { | |
- super(constants); | |
+ super(constants.cwBasicButtonName(), constants.cwBasicButtonDescription(), | |
+ true); | |
this.constants = constants; | |
} | |
- @Override | |
- public String getDescription() { | |
- return constants.cwBasicButtonDescription(); | |
- } | |
- | |
- @Override | |
- public String getName() { | |
- return constants.cwBasicButtonName(); | |
- } | |
- | |
/** | |
* Initialize this example. | |
*/ | |
@@ -89,8 +79,8 @@ public class CwBasicButton extends ContentWidget { | |
hPanel.setSpacing(10); | |
// Add a normal button | |
- Button normalButton = new Button(constants.cwBasicButtonNormal(), | |
- new ClickHandler() { | |
+ Button normalButton = new Button( | |
+ constants.cwBasicButtonNormal(), new ClickHandler() { | |
public void onClick(ClickEvent event) { | |
Window.alert(constants.cwBasicButtonClickMessage()); | |
} | |
@@ -110,7 +100,7 @@ public class CwBasicButton extends ContentWidget { | |
@Override | |
protected void asyncOnInitialize(final AsyncCallback<Widget> callback) { | |
- GWT.runAsync(new RunAsyncCallback() { | |
+ GWT.runAsync(CwBasicButton.class, new RunAsyncCallback() { | |
public void onFailure(Throwable caught) { | |
callback.onFailure(caught); | |
diff --git a/src/com/google/gwt/sample/showcase/client/content/widgets/CwCheckBox.java b/src/com/google/gwt/sample/showcase/client/content/widgets/CwCheckBox.java | |
index 1322790..be1c8eb 100644 | |
--- a/src/com/google/gwt/sample/showcase/client/content/widgets/CwCheckBox.java | |
+++ b/src/com/google/gwt/sample/showcase/client/content/widgets/CwCheckBox.java | |
@@ -1,12 +1,12 @@ | |
/* | |
* 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 | |
@@ -35,8 +35,7 @@ public class CwCheckBox extends ContentWidget { | |
* The constants used in this Content Widget. | |
*/ | |
@ShowcaseSource | |
- public static interface CwConstants extends Constants, | |
- ContentWidget.CwConstants { | |
+ public static interface CwConstants extends Constants { | |
String cwCheckBoxCheckAll(); | |
String[] cwCheckBoxDays(); | |
@@ -50,28 +49,18 @@ public class CwCheckBox extends ContentWidget { | |
* An instance of the constants. | |
*/ | |
@ShowcaseData | |
- private CwConstants constants; | |
+ private final CwConstants constants; | |
/** | |
* Constructor. | |
- * | |
+ * | |
* @param constants the constants | |
*/ | |
public CwCheckBox(CwConstants constants) { | |
- super(constants); | |
+ super(constants.cwCheckBoxName(), constants.cwCheckBoxDescription(), true); | |
this.constants = constants; | |
} | |
- @Override | |
- public String getDescription() { | |
- return constants.cwCheckBoxDescription(); | |
- } | |
- | |
- @Override | |
- public String getName() { | |
- return constants.cwCheckBoxName(); | |
- } | |
- | |
/** | |
* Initialize this example. | |
*/ | |
diff --git a/src/com/google/gwt/sample/showcase/client/content/widgets/CwCustomButton.java b/src/com/google/gwt/sample/showcase/client/content/widgets/CwCustomButton.java | |
index f8ce454..5256809 100644 | |
--- a/src/com/google/gwt/sample/showcase/client/content/widgets/CwCustomButton.java | |
+++ b/src/com/google/gwt/sample/showcase/client/content/widgets/CwCustomButton.java | |
@@ -1,12 +1,12 @@ | |
/* | |
* 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 | |
@@ -41,8 +41,7 @@ public class CwCustomButton extends ContentWidget { | |
* The constants used in this Content Widget. | |
*/ | |
@ShowcaseSource | |
- public static interface CwConstants extends Constants, | |
- ContentWidget.CwConstants { | |
+ public static interface CwConstants extends Constants { | |
String cwCustomButtonDescription(); | |
String cwCustomButtonName(); | |
@@ -56,28 +55,19 @@ public class CwCustomButton extends ContentWidget { | |
* An instance of the constants. | |
*/ | |
@ShowcaseData | |
- private CwConstants constants; | |
+ private final CwConstants constants; | |
/** | |
* Constructor. | |
- * | |
+ * | |
* @param constants the constants | |
*/ | |
public CwCustomButton(CwConstants constants) { | |
- super(constants); | |
+ super(constants.cwCustomButtonName(), constants.cwCustomButtonDescription(), | |
+ true); | |
this.constants = constants; | |
} | |
- @Override | |
- public String getDescription() { | |
- return constants.cwCustomButtonDescription(); | |
- } | |
- | |
- @Override | |
- public String getName() { | |
- return constants.cwCustomButtonName(); | |
- } | |
- | |
/** | |
* Initialize this example. | |
*/ | |
@@ -129,7 +119,7 @@ public class CwCustomButton extends ContentWidget { | |
@Override | |
protected void asyncOnInitialize(final AsyncCallback<Widget> callback) { | |
- GWT.runAsync(new RunAsyncCallback() { | |
+ GWT.runAsync(CwCustomButton.class, new RunAsyncCallback() { | |
public void onFailure(Throwable caught) { | |
callback.onFailure(caught); | |
diff --git a/src/com/google/gwt/sample/showcase/client/content/widgets/CwDatePicker.java b/src/com/google/gwt/sample/showcase/client/content/widgets/CwDatePicker.java | |
index d645b90..8c3b5e7 100644 | |
--- a/src/com/google/gwt/sample/showcase/client/content/widgets/CwDatePicker.java | |
+++ b/src/com/google/gwt/sample/showcase/client/content/widgets/CwDatePicker.java | |
@@ -1,12 +1,12 @@ | |
/* | |
* 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 | |
@@ -42,12 +42,12 @@ import java.util.Date; | |
".gwt-DatePicker", ".datePicker", "td.datePickerMonth", ".gwt-DateBox", | |
".dateBox"}) | |
public class CwDatePicker extends ContentWidget { | |
+ | |
/** | |
* The constants used in this Content Widget. | |
*/ | |
@ShowcaseSource | |
- public static interface CwConstants extends Constants, | |
- ContentWidget.CwConstants { | |
+ public static interface CwConstants extends Constants { | |
String cwDatePickerBoxLabel(); | |
String cwDatePickerDescription(); | |
@@ -61,31 +61,23 @@ public class CwDatePicker extends ContentWidget { | |
* An instance of the constants. | |
*/ | |
@ShowcaseData | |
- private CwConstants constants; | |
+ private final CwConstants constants; | |
/** | |
* Constructor. | |
- * | |
+ * | |
* @param constants the constants | |
*/ | |
public CwDatePicker(CwConstants constants) { | |
- super(constants); | |
+ super(constants.cwDatePickerName(), constants.cwDatePickerDescription(), | |
+ true); | |
this.constants = constants; | |
} | |
- @Override | |
- public String getDescription() { | |
- return constants.cwDatePickerDescription(); | |
- } | |
- | |
- @Override | |
- public String getName() { | |
- return constants.cwDatePickerName(); | |
- } | |
- | |
/** | |
* Initialize this example. | |
*/ | |
+ @SuppressWarnings("deprecation") | |
@ShowcaseSource | |
@Override | |
public Widget onInitialize() { | |
@@ -122,7 +114,7 @@ public class CwDatePicker extends ContentWidget { | |
@Override | |
protected void asyncOnInitialize(final AsyncCallback<Widget> callback) { | |
- GWT.runAsync(new RunAsyncCallback() { | |
+ GWT.runAsync(CwDatePicker.class, new RunAsyncCallback() { | |
public void onFailure(Throwable caught) { | |
callback.onFailure(caught); | |
diff --git a/src/com/google/gwt/sample/showcase/client/content/widgets/CwFileUpload.java b/src/com/google/gwt/sample/showcase/client/content/widgets/CwFileUpload.java | |
index f6b84f7..7f91c4c 100644 | |
--- a/src/com/google/gwt/sample/showcase/client/content/widgets/CwFileUpload.java | |
+++ b/src/com/google/gwt/sample/showcase/client/content/widgets/CwFileUpload.java | |
@@ -1,12 +1,12 @@ | |
/* | |
* 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 | |
@@ -41,8 +41,7 @@ public class CwFileUpload extends ContentWidget { | |
* The constants used in this Content Widget. | |
*/ | |
@ShowcaseSource | |
- public static interface CwConstants extends Constants, | |
- ContentWidget.CwConstants { | |
+ public static interface CwConstants extends Constants { | |
String cwFileUploadButton(); | |
String cwFileUploadDescription(); | |
@@ -60,28 +59,19 @@ public class CwFileUpload extends ContentWidget { | |
* An instance of the constants. | |
*/ | |
@ShowcaseData | |
- private CwConstants constants; | |
+ private final CwConstants constants; | |
/** | |
* Constructor. | |
- * | |
+ * | |
* @param constants the constants | |
*/ | |
public CwFileUpload(CwConstants constants) { | |
- super(constants); | |
+ super(constants.cwFileUploadName(), constants.cwFileUploadDescription(), | |
+ true); | |
this.constants = constants; | |
} | |
- @Override | |
- public String getDescription() { | |
- return constants.cwFileUploadDescription(); | |
- } | |
- | |
- @Override | |
- public String getName() { | |
- return constants.cwFileUploadName(); | |
- } | |
- | |
/** | |
* Initialize this example. | |
*/ | |
@@ -120,7 +110,7 @@ public class CwFileUpload extends ContentWidget { | |
@Override | |
protected void asyncOnInitialize(final AsyncCallback<Widget> callback) { | |
- GWT.runAsync(new RunAsyncCallback() { | |
+ GWT.runAsync(CwFileUpload.class, new RunAsyncCallback() { | |
public void onFailure(Throwable caught) { | |
callback.onFailure(caught); | |
diff --git a/src/com/google/gwt/sample/showcase/client/content/widgets/CwHyperlink.java b/src/com/google/gwt/sample/showcase/client/content/widgets/CwHyperlink.java | |
index 2ed3d5a..3c9c2e6 100644 | |
--- a/src/com/google/gwt/sample/showcase/client/content/widgets/CwHyperlink.java | |
+++ b/src/com/google/gwt/sample/showcase/client/content/widgets/CwHyperlink.java | |
@@ -1,12 +1,12 @@ | |
/* | |
* 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 | |
@@ -19,6 +19,7 @@ import com.google.gwt.core.client.GWT; | |
import com.google.gwt.core.client.RunAsyncCallback; | |
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.ShowcaseConstants; | |
import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseData; | |
import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseSource; | |
@@ -38,8 +39,7 @@ public class CwHyperlink extends ContentWidget { | |
* The constants used in this Content Widget. | |
*/ | |
@ShowcaseSource | |
- public static interface CwConstants extends Constants, | |
- ContentWidget.CwConstants { | |
+ public static interface CwConstants extends Constants { | |
String cwHyperlinkChoose(); | |
String cwHyperlinkDescription(); | |
@@ -51,28 +51,19 @@ public class CwHyperlink extends ContentWidget { | |
* An instance of the constants. | |
*/ | |
@ShowcaseData | |
- private CwConstants constants; | |
+ private final CwConstants constants; | |
/** | |
* Constructor. | |
- * | |
+ * | |
* @param constants the constants | |
*/ | |
public CwHyperlink(CwConstants constants) { | |
- super(constants); | |
+ super( | |
+ constants.cwHyperlinkName(), constants.cwHyperlinkDescription(), true); | |
this.constants = constants; | |
} | |
- @Override | |
- public String getDescription() { | |
- return constants.cwHyperlinkDescription(); | |
- } | |
- | |
- @Override | |
- public String getName() { | |
- return constants.cwHyperlinkName(); | |
- } | |
- | |
/** | |
* Initialize this example. | |
*/ | |
@@ -87,14 +78,16 @@ public class CwHyperlink extends ContentWidget { | |
// 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())); | |
- vPanel.add(getHyperlink(CwDatePicker.class, allConstants.cwDatePickerName())); | |
+ 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())); | |
+ vPanel.add( | |
+ getHyperlink(CwDatePicker.class, allConstants.cwDatePickerName())); | |
// Return the panel | |
return vPanel; | |
@@ -102,7 +95,7 @@ public class CwHyperlink extends ContentWidget { | |
@Override | |
protected void asyncOnInitialize(final AsyncCallback<Widget> callback) { | |
- GWT.runAsync(new RunAsyncCallback() { | |
+ GWT.runAsync(CwHyperlink.class, new RunAsyncCallback() { | |
public void onFailure(Throwable caught) { | |
callback.onFailure(caught); | |
@@ -117,19 +110,17 @@ public class CwHyperlink extends ContentWidget { | |
/** | |
* Get a {@link Hyperlink} to a section based on the name of the | |
* {@link ContentWidget} example. | |
- * | |
+ * | |
* @param cwClass the {@link ContentWidget} class | |
* @param name the name to display for the link | |
* @return a {@link Hyperlink} | |
*/ | |
- private Hyperlink getHyperlink(Class<?> cwClass, String name) { | |
- // Get the class name of the content widget | |
- String className = cwClass.getName(); | |
- className = className.substring(className.lastIndexOf('.') + 1); | |
- | |
- // Convert to a hyper link | |
- Hyperlink link = new Hyperlink(name, className); | |
- link.ensureDebugId("cwHyperlink-" + className); | |
+ @ShowcaseSource | |
+ private <C extends ContentWidget> Hyperlink getHyperlink( | |
+ Class<C> cwClass, String name) { | |
+ Hyperlink link = new Hyperlink( | |
+ name, Showcase.getContentWidgetToken(cwClass)); | |
+ link.ensureDebugId("cwHyperlink-" + cwClass.getName()); | |
return link; | |
} | |
} | |
diff --git a/src/com/google/gwt/sample/showcase/client/content/widgets/CwRadioButton.java b/src/com/google/gwt/sample/showcase/client/content/widgets/CwRadioButton.java | |
index c59aa79..ff35798 100644 | |
--- a/src/com/google/gwt/sample/showcase/client/content/widgets/CwRadioButton.java | |
+++ b/src/com/google/gwt/sample/showcase/client/content/widgets/CwRadioButton.java | |
@@ -1,12 +1,12 @@ | |
/* | |
* 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 | |
@@ -37,8 +37,7 @@ public class CwRadioButton extends ContentWidget { | |
* The constants used in this Content Widget. | |
*/ | |
@ShowcaseSource | |
- public static interface CwConstants extends Constants, | |
- ContentWidget.CwConstants { | |
+ public static interface CwConstants extends Constants { | |
String[] cwRadioButtonColors(); | |
String cwRadioButtonDescription(); | |
@@ -56,28 +55,19 @@ public class CwRadioButton extends ContentWidget { | |
* An instance of the constants. | |
*/ | |
@ShowcaseData | |
- private CwConstants constants; | |
+ private final CwConstants constants; | |
/** | |
* Constructor. | |
- * | |
+ * | |
* @param constants the constants | |
*/ | |
public CwRadioButton(CwConstants constants) { | |
- super(constants); | |
+ super(constants.cwRadioButtonName(), constants.cwRadioButtonDescription(), | |
+ true); | |
this.constants = constants; | |
} | |
- @Override | |
- public String getDescription() { | |
- return constants.cwRadioButtonDescription(); | |
- } | |
- | |
- @Override | |
- public String getName() { | |
- return constants.cwRadioButtonName(); | |
- } | |
- | |
/** | |
* Initialize this example. | |
*/ | |
@@ -108,8 +98,8 @@ public class CwRadioButton extends ContentWidget { | |
for (int i = 0; i < sports.length; i++) { | |
String sport = sports[i]; | |
RadioButton radioButton = new RadioButton("sport", sport); | |
- radioButton.ensureDebugId("cwRadioButton-sport-" | |
- + sport.replaceAll(" ", "")); | |
+ radioButton.ensureDebugId( | |
+ "cwRadioButton-sport-" + sport.replaceAll(" ", "")); | |
if (i == 2) { | |
radioButton.setValue(true); | |
} | |
@@ -121,7 +111,7 @@ public class CwRadioButton extends ContentWidget { | |
@Override | |
protected void asyncOnInitialize(final AsyncCallback<Widget> callback) { | |
- GWT.runAsync(new RunAsyncCallback() { | |
+ GWT.runAsync(CwRadioButton.class, new RunAsyncCallback() { | |
public void onFailure(Throwable caught) { | |
callback.onFailure(caught); | |
diff --git a/src/com/google/gwt/sample/showcase/generator/ShowcaseGenerator.java b/src/com/google/gwt/sample/showcase/generator/ShowcaseGenerator.java | |
index 2d5b079..019347c 100644 | |
--- a/src/com/google/gwt/sample/showcase/generator/ShowcaseGenerator.java | |
+++ b/src/com/google/gwt/sample/showcase/generator/ShowcaseGenerator.java | |
@@ -1,12 +1,12 @@ | |
/* | |
* 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 | |
@@ -22,6 +22,7 @@ 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.Showcase; | |
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; | |
@@ -33,8 +34,10 @@ import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.InputStreamReader; | |
import java.io.OutputStream; | |
+import java.util.HashSet; | |
import java.util.LinkedHashMap; | |
import java.util.Map; | |
+import java.util.Set; | |
/** | |
* Generate the source code, css styles, and raw source used in the Showcase | |
@@ -44,12 +47,12 @@ public class ShowcaseGenerator extends Generator { | |
/** | |
* 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. | |
+ * replaced by the current theme. The variable $RTL will be replaced by "_rtl" | |
+ * for RTL locales. | |
*/ | |
private static final String[] SRC_CSS = { | |
- "com/google/gwt/user/theme/$THEME/public/gwt/$THEME/$THEME.css", | |
- "com/google/gwt/sample/showcase/public/$THEME/Showcase.css"}; | |
+ "com/google/gwt/user/theme/$THEME/public/gwt/$THEME/$THEME$RTL.css", | |
+ "com/google/gwt/sample/showcase/client/Showcase.css"}; | |
/** | |
* The class loader used to get resources. | |
@@ -66,9 +69,16 @@ public class ShowcaseGenerator extends Generator { | |
*/ | |
private TreeLogger logger = null; | |
+ /** | |
+ * The set of raw files that have already been generated. Raw files can be | |
+ * reused by different examples, but we only generate them once. | |
+ */ | |
+ private Set<String> rawFiles = new HashSet<String>(); | |
+ | |
@Override | |
- public String generate(TreeLogger logger, GeneratorContext context, | |
- String typeName) throws UnableToCompleteException { | |
+ public String generate( | |
+ TreeLogger logger, GeneratorContext context, String typeName) | |
+ throws UnableToCompleteException { | |
this.logger = logger; | |
this.context = context; | |
this.classLoader = Thread.currentThread().getContextClassLoader(); | |
@@ -95,7 +105,8 @@ public class ShowcaseGenerator extends Generator { | |
} | |
// Generate the CSS source files | |
- for (String theme : ShowcaseConstants.STYLE_THEMES) { | |
+ String[] themes = new String[]{Showcase.THEME}; | |
+ for (String theme : themes) { | |
String styleDefsLTR = getStyleDefinitions(theme, false); | |
String styleDefsRTL = getStyleDefinitions(theme, true); | |
String outDirLTR = ShowcaseConstants.DST_SOURCE_STYLE + theme + "/"; | |
@@ -111,25 +122,32 @@ public class ShowcaseGenerator extends Generator { | |
/** | |
* Set the full contents of a resource in the public directory. | |
- * | |
+ * | |
* @param partialPath the path to the file relative to the public directory | |
* @param contents the file contents | |
*/ | |
- private void createPublicResource(String partialPath, String contents) { | |
+ private void createPublicResource(String partialPath, String contents) | |
+ throws UnableToCompleteException { | |
try { | |
OutputStream outStream = context.tryCreateResource(logger, partialPath); | |
+ if (outStream == null) { | |
+ String message = "Attempting to generate duplicate public resource: " | |
+ + partialPath | |
+ + ".\nAll generated source files must have unique names."; | |
+ logger.log(TreeLogger.ERROR, message); | |
+ throw new UnableToCompleteException(); | |
+ } | |
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); | |
+ logger.log(TreeLogger.ERROR, "Error writing file: " + partialPath, e); | |
+ throw new UnableToCompleteException(); | |
} | |
} | |
/** | |
* Generate the raw files used by a {@link ContentWidget}. | |
- * | |
+ * | |
* @param type the {@link ContentWidget} subclass | |
*/ | |
private void generateRawFiles(JClassType type) | |
@@ -146,6 +164,13 @@ public class ShowcaseGenerator extends Generator { | |
// Generate each raw source file | |
String[] filenames = type.getAnnotation(ShowcaseRaw.class).value(); | |
for (String filename : filenames) { | |
+ // Check if the file has already been generated. | |
+ String path = pkgName + filename; | |
+ if (rawFiles.contains(path)) { | |
+ continue; | |
+ } | |
+ rawFiles.add(path); | |
+ | |
// Get the file contents | |
String fileContents = getResourceContents(pkgPath + filename); | |
@@ -163,7 +188,7 @@ public class ShowcaseGenerator extends Generator { | |
/** | |
* Generate the formatted source code for a {@link ContentWidget}. | |
- * | |
+ * | |
* @param type the {@link ContentWidget} subclass | |
*/ | |
private void generateSourceFiles(JClassType type) | |
@@ -179,7 +204,8 @@ public class ShowcaseGenerator extends Generator { | |
int dataTagIndex = fileContents.indexOf(dataTag); | |
int srcTagIndex = fileContents.indexOf(sourceTag); | |
while (dataTagIndex >= 0 || srcTagIndex >= 0) { | |
- if (dataTagIndex >= 0 && (dataTagIndex < srcTagIndex || 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; | |
@@ -224,13 +250,14 @@ public class ShowcaseGenerator extends Generator { | |
/** | |
* Generate the styles used by a {@link ContentWidget}. | |
- * | |
+ * | |
* @param type the {@link ContentWidget} subclass | |
* @param styleDefs the concatenated style definitions | |
* @param outDir the output directory | |
*/ | |
- private void generateStyleFiles(JClassType type, String styleDefs, | |
- String outDir) { | |
+ private void generateStyleFiles( | |
+ JClassType type, String styleDefs, String outDir) | |
+ throws UnableToCompleteException { | |
// Look for annotation | |
if (!type.isAnnotationPresent(ShowcaseStyle.class)) { | |
return; | |
@@ -277,7 +304,7 @@ public class ShowcaseGenerator extends Generator { | |
/** | |
* Get the full contents of a resource. | |
- * | |
+ * | |
* @param path the path to the resource | |
* @return the contents of the resource | |
*/ | |
@@ -316,7 +343,7 @@ public class ShowcaseGenerator extends Generator { | |
/** | |
* Load the contents of all CSS files used in the Showcase for a given | |
* theme/RTL mode, concatenated into one string. | |
- * | |
+ * | |
* @param theme the style theme | |
* @param isRTL true if RTL mode | |
* @return the concatenated styles | |
@@ -327,7 +354,9 @@ public class ShowcaseGenerator extends Generator { | |
for (String path : SRC_CSS) { | |
path = path.replace("$THEME", theme); | |
if (isRTL) { | |
- path = path.replace(".css", "_rtl.css"); | |
+ path = path.replace("$RTL", "_rtl"); | |
+ } else { | |
+ path = path.replace("$RTL", ""); | |
} | |
cssContents += getResourceContents(path) + "\n\n"; | |
} | |
@@ -337,7 +366,7 @@ public class ShowcaseGenerator extends Generator { | |
/** | |
* 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() { | |
diff --git a/src/com/google/gwt/sample/showcase/public/chrome/Showcase.css b/src/com/google/gwt/sample/showcase/public/chrome/Showcase.css | |
deleted file mode 100644 | |
index 954979a..0000000 | |
--- a/src/com/google/gwt/sample/showcase/public/chrome/Showcase.css | |
+++ /dev/null | |
@@ -1,168 +0,0 @@ | |
-/** | |
- * Applied to the main layout of the page. | |
- */ | |
-.Application-Reference-chrome { | |
- height: 5px; | |
- width: 5px; | |
- zoom: 1; | |
-} | |
-.Application-top { | |
- width: 100%; | |
- margin-bottom: 10px; | |
-} | |
-.Application-title { | |
- padding: 0px 0px 0px 10px; | |
-} | |
-.Application-title h1 { | |
- color: #666; | |
- margin: 0px; | |
- padding: 0px 0px 0px 4px; | |
- font-size: 22px; | |
-} | |
-.Application-title h2 { | |
- color: #333; | |
- margin: 0px; | |
- padding: 0px 0px 0px 4px; | |
- font-size: 16px; | |
-} | |
-.Application-links { | |
- padding: 2px 13px 2px 0px; | |
- background: #eee; | |
-} | |
-.Application-links .gwt-HTML{ | |
- font-size: 12px; | |
-} | |
-.Application-options { | |
- padding: 6px 10px 0px 0px; | |
-} | |
-.Application-options .gwt-ListBox { | |
- font-size: 11px; | |
- color: blue; | |
- margin-left: 4px; | |
-} | |
-.Application-options td { | |
- font-size: 12px; | |
-} | |
-.Application-options .gwt-ToggleButton { | |
- width: 36px; | |
- height: 16px; | |
- margin: 3px 0px 0px 10px; | |
- padding: 0px; | |
-} | |
-.Application-options .gwt-ToggleButton-down, | |
-.Application-options .gwt-ToggleButton-down-hovering { | |
- cursor: default; | |
-} | |
-.Application-options .sc-ThemeButton-standard { | |
- background: #d0e4f6; | |
-} | |
-.Application-options .sc-ThemeButton-chrome { | |
- background: #ccc; | |
-} | |
-.Application-options .sc-ThemeButton-dark { | |
- background: #3d3d3d; | |
-} | |
-.Application-menu { | |
- width: 18em; | |
- text-align: left; | |
-} | |
- | |
-/** | |
- * Applied to widgets in the content area. | |
- */ | |
-.Application-content-decorator { | |
- margin-right: 8px; | |
-} | |
-.Application-content-title { | |
- padding: 4px 0px 3px 6px; | |
- text-align: left; | |
- background: #530a0a url(../gwt/chrome/images/hborder.png) repeat-x 0px -2003px; | |
- border-bottom: 2px solid #e3e3e3; | |
-} | |
-.Application-content-title .gwt-TabBarItem { | |
- background: none; | |
- padding: 0px; | |
-} | |
-.Application-content-title .gwt-TabBarItem .gwt-Label { | |
- padding-right: 20px; | |
- color: #888888; | |
-} | |
-.Application-content-title .gwt-TabBarItem-selected .gwt-Label { | |
- color: black; | |
-} | |
-.Application-content-wrapper { | |
- text-align: left; | |
-} | |
-.sc-ContentWidget { | |
- padding: 10px 20px; | |
-} | |
-.sc-ContentWidget-name { | |
- font-size: 1.5em; | |
- font-weight: bold; | |
- padding-bottom: 15px; | |
-} | |
-.sc-ContentWidget-description { | |
- padding-bottom: 15px; | |
- border-bottom: 1px solid #CDCDCD; | |
- margin-bottom: 15px; | |
-} | |
-.sc-ContentWidget pre { | |
- border: 1px solid #888; | |
- background: #eeeeee; | |
- padding: 10px 2px; | |
- margin: 10px 0px; | |
-} | |
-.sc-FixedWidthButton { | |
- width: 10em; | |
-} | |
- | |
-/** | |
- * Applied to specific components in Content Widgets. | |
- */ | |
-.cw-BasicPopup-thumb { | |
- cursor: pointer; | |
- cursor: hand; | |
-} | |
- | |
-.cw-DictionaryExample-headerRow td { | |
- color: #7aa5d6; | |
- text-decoration: underline; | |
- font-weight: bold; | |
- padding-left: 20px; | |
-} | |
-.cw-DictionaryExample-dataRow td { | |
- padding-left: 20px; | |
-} | |
- | |
-.cw-DockPanel td { | |
- border: 1px solid #BBBBBB; | |
- padding: 3px; | |
-} | |
- | |
-.cw-FlexTable td { | |
- border: 1px solid #BBBBBB; | |
- padding: 3px; | |
-} | |
- | |
-.cw-FlexTable-buttonPanel td { | |
- border: 0px; | |
-} | |
- | |
-.cw-FlowPanel-checkBox { | |
- margin-right: 20px; | |
-} | |
- | |
-.cw-RedText { | |
- color: red; | |
-} | |
- | |
-.cw-RichText { | |
- border: 1px solid #BBBBBB; | |
- border-spacing: 0px; | |
-} | |
- | |
-.cw-StackPanelHeader { | |
- padding-left: 7px; | |
- font-weight: bold; | |
- font-size: 1.4em; | |
-} | |
diff --git a/src/com/google/gwt/sample/showcase/public/chrome/Showcase_rtl.css b/src/com/google/gwt/sample/showcase/public/chrome/Showcase_rtl.css | |
deleted file mode 100644 | |
index c52b33e..0000000 | |
--- a/src/com/google/gwt/sample/showcase/public/chrome/Showcase_rtl.css | |
+++ /dev/null | |
@@ -1,168 +0,0 @@ | |
-/** | |
- * Applied to the main layout of the page. | |
- */ | |
-.Application-Reference-chrome-rtl { | |
- height: 5px; | |
- width: 5px; | |
- zoom: 1; | |
-} | |
-.Application-top { | |
- width: 100%; | |
- margin-bottom: 10px; | |
-} | |
-.Application-title { | |
- padding: 0px 10px 0px 0px; | |
-} | |
-.Application-title h1 { | |
- color: #666; | |
- margin: 0px; | |
- padding: 0px 4px 0px 0px; | |
- font-size: 22px; | |
-} | |
-.Application-title h2 { | |
- color: #333; | |
- margin: 0px; | |
- padding: 0px 4px 0px 0px; | |
- font-size: 16px; | |
-} | |
-.Application-links { | |
- padding: 2px 0px 2px 13px; | |
- background: #eee; | |
-} | |
-.Application-links .gwt-HTML{ | |
- font-size: 12px; | |
-} | |
-.Application-options { | |
- padding: 6px 0px 0px 10px; | |
-} | |
-.Application-options .gwt-ListBox { | |
- font-size: 11px; | |
- color: blue; | |
- margin-right: 4px; | |
-} | |
-.Application-options td { | |
- font-size: 12px; | |
-} | |
-.Application-options .gwt-ToggleButton { | |
- width: 36px; | |
- height: 16px; | |
- margin: 3px 10px 0px 0px; | |
- padding: 0px; | |
-} | |
-.Application-options .gwt-ToggleButton-down, | |
-.Application-options .gwt-ToggleButton-down-hovering { | |
- cursor: default; | |
-} | |
-.Application-options .sc-ThemeButton-standard { | |
- background: #d0e4f6; | |
-} | |
-.Application-options .sc-ThemeButton-chrome { | |
- background: #ccc; | |
-} | |
-.Application-options .sc-ThemeButton-dark { | |
- background: #3d3d3d; | |
-} | |
-.Application-menu { | |
- width: 18em; | |
- text-align: right; | |
-} | |
- | |
-/** | |
- * Applied to widgets in the content area. | |
- */ | |
-.Application-content-decorator { | |
- margin-left: 8px; | |
-} | |
-.Application-content-title { | |
- padding: 4px 6px 3px 0px; | |
- text-align: right; | |
- background: #530a0a url(../gwt/chrome/images/hborder.png) repeat-x 0px -2003px; | |
- border-bottom: 2px solid #e3e3e3; | |
-} | |
-.Application-content-title .gwt-TabBarItem { | |
- background: none; | |
- padding: 0px; | |
-} | |
-.Application-content-title .gwt-TabBarItem .gwt-Label { | |
- padding-left: 20px; | |
- color: #888888; | |
-} | |
-.Application-content-title .gwt-TabBarItem-selected .gwt-Label { | |
- color: black; | |
-} | |
-.Application-content-wrapper { | |
- text-align: right; | |
-} | |
-.sc-ContentWidget { | |
- padding: 10px 20px; | |
-} | |
-.sc-ContentWidget-name { | |
- font-size: 1.5em; | |
- font-weight: bold; | |
- padding-bottom: 15px; | |
-} | |
-.sc-ContentWidget-description { | |
- padding-bottom: 15px; | |
- border-bottom: 1px solid #CDCDCD; | |
- margin-bottom: 15px; | |
-} | |
-.sc-ContentWidget pre { | |
- border: 1px solid #888; | |
- background: #eeeeee; | |
- padding: 10px 2px; | |
- margin: 10px 0px; | |
-} | |
-.sc-FixedWidthButton { | |
- width: 10em; | |
-} | |
- | |
-/** | |
- * Applied to specific components in Content Widgets. | |
- */ | |
-.cw-BasicPopup-thumb { | |
- cursor: pointer; | |
- cursor: hand; | |
-} | |
- | |
-.cw-DictionaryExample-headerRow td { | |
- color: #7aa5d6; | |
- text-decoration: underline; | |
- font-weight: bold; | |
- padding-right: 20px; | |
-} | |
-.cw-DictionaryExample-dataRow td { | |
- padding-right: 20px; | |
-} | |
- | |
-.cw-DockPanel td { | |
- border: 1px solid #BBBBBB; | |
- padding: 3px; | |
-} | |
- | |
-.cw-FlexTable td { | |
- border: 1px solid #BBBBBB; | |
- padding: 3px; | |
-} | |
- | |
-.cw-FlexTable-buttonPanel td { | |
- border: 0px; | |
-} | |
- | |
-.cw-FlowPanel-checkBox { | |
- margin-left: 20px; | |
-} | |
- | |
-.cw-RedText { | |
- color: red; | |
-} | |
- | |
-.cw-RichText { | |
- border: 1px solid #BBBBBB; | |
- border-spacing: 0px; | |
-} | |
- | |
-.cw-StackPanelHeader { | |
- padding-right: 7px; | |
- font-weight: bold; | |
- font-size: 1.4em; | |
-} | |
diff --git a/src/com/google/gwt/sample/showcase/public/dark/Showcase.css b/src/com/google/gwt/sample/showcase/public/dark/Showcase.css | |
deleted file mode 100644 | |
index bdc375a..0000000 | |
--- a/src/com/google/gwt/sample/showcase/public/dark/Showcase.css | |
+++ /dev/null | |
@@ -1,175 +0,0 @@ | |
-/** | |
- * Applied to the main layout of the page. | |
- */ | |
-.Application-Reference-dark { | |
- height: 5px; | |
- width: 5px; | |
- zoom: 1; | |
-} | |
-.Application-top { | |
- width: 100%; | |
- margin-bottom: 10px; | |
-} | |
-.Application-title { | |
- padding: 0px 0px 0px 10px; | |
-} | |
-.Application-title h1 { | |
- color: #67A7E3; | |
- margin: 0px; | |
- padding: 0px 0px 0px 4px; | |
- font-size: 22px; | |
-} | |
-.Application-title h2 { | |
- color: #888; | |
- margin: 0px; | |
- padding: 0px 0px 0px 4px; | |
- font-size: 16px; | |
-} | |
-.Application-links { | |
- padding: 2px 13px 2px 0px; | |
- background: #888888; | |
-} | |
-.Application-links .gwt-HTML{ | |
- font-size: 12px; | |
-} | |
-.Application-options { | |
- padding: 6px 10px 0px 0px; | |
-} | |
-.Application-options .gwt-ListBox { | |
- font-size: 11px; | |
- color: blue; | |
- margin-left: 4px; | |
-} | |
-.Application-options td { | |
- font-size: 12px; | |
-} | |
-.Application-options .gwt-ToggleButton { | |
- width: 36px; | |
- height: 16px; | |
- margin: 3px 0px 0px 10px; | |
- padding: 0px; | |
-} | |
-.Application-options .gwt-ToggleButton-down, | |
-.Application-options .gwt-ToggleButton-down-hovering { | |
- cursor: default; | |
-} | |
-.Application-options .sc-ThemeButton-standard { | |
- background: #d0e4f6; | |
-} | |
-.Application-options .sc-ThemeButton-chrome { | |
- background: #ccc; | |
-} | |
-.Application-options .sc-ThemeButton-dark { | |
- background: #3d3d3d; | |
-} | |
-.Application-menu { | |
- width: 18em; | |
- text-align: left; | |
-} | |
- | |
-/** | |
- * Applied to widgets in the content area. | |
- */ | |
-.Application-content-decorator { | |
- margin-right: 8px; | |
-} | |
-.Application-content-title { | |
- padding: 4px 0px 3px 6px; | |
- text-align: left; | |
- background: #222; | |
- border-bottom: 2px solid #000; | |
-} | |
-.Application-content-title .gwt-TabBarItem { | |
- background: none; | |
- padding: 0px; | |
-} | |
-.Application-content-title .gwt-TabBarItem .gwt-Label { | |
- padding-right: 20px; | |
-} | |
-.Application-content-title .gwt-TabBarItem-selected .gwt-Label { | |
- color: #0cf; | |
-} | |
-.Application-content-wrapper { | |
- text-align: left; | |
-} | |
-.sc-ContentWidget { | |
- padding: 10px 20px; | |
-} | |
-.sc-ContentWidget-name { | |
- color: #BEC7CC; | |
- font-size: 1.5em; | |
- font-weight: bold; | |
- padding-bottom: 15px; | |
-} | |
-.sc-ContentWidget-description { | |
- color: #fff; | |
- padding-bottom: 15px; | |
- border-bottom: 1px solid #999; | |
- margin-bottom: 15px; | |
-} | |
-.sc-ContentWidget pre { | |
- border: 1px solid #000; | |
- background: #fff; | |
- color: #000; | |
- padding: 10px 2px; | |
- margin: 10px 0px; | |
-} | |
-.sc-FixedWidthButton { | |
- width: 10em; | |
-} | |
- | |
-/** | |
- * Applied to specific components in Content Widgets. | |
- */ | |
-.cw-BasicPopup-thumb { | |
- cursor: pointer; | |
- cursor: hand; | |
-} | |
- | |
-.cw-DictionaryExample-headerRow td { | |
- color: #7aa5d6; | |
- text-decoration: underline; | |
- font-weight: bold; | |
- padding-left: 20px; | |
-} | |
-.cw-DictionaryExample-dataRow td { | |
- padding-left: 20px; | |
-} | |
- | |
-.cw-DockPanel td { | |
- border: 1px solid #BBBBBB; | |
- padding: 3px; | |
-} | |
- | |
-.cw-FlexTable td { | |
- border: 1px solid #BBBBBB; | |
- padding: 3px; | |
-} | |
- | |
-.cw-FlexTable-buttonPanel td { | |
- border: 0px; | |
-} | |
- | |
-.cw-FlowPanel-checkBox { | |
- margin-right: 20px; | |
-} | |
- | |
-.cw-RedText { | |
- color: red; | |
-} | |
- | |
-.cw-RichText { | |
- background-color: #fff; | |
- border: 1px solid #fff; | |
- border-spacing: 0px; | |
- padding: 0px; | |
-} | |
-.cw-RichText td { | |
- padding: 0px; | |
-} | |
- | |
-.cw-StackPanelHeader { | |
- padding-left: 7px; | |
- font-weight: bold; | |
- font-size: 1.4em; | |
-} | |
diff --git a/src/com/google/gwt/sample/showcase/public/dark/Showcase_rtl.css b/src/com/google/gwt/sample/showcase/public/dark/Showcase_rtl.css | |
deleted file mode 100644 | |
index 126312a..0000000 | |
--- a/src/com/google/gwt/sample/showcase/public/dark/Showcase_rtl.css | |
+++ /dev/null | |
@@ -1,175 +0,0 @@ | |
-/** | |
- * Applied to the main layout of the page. | |
- */ | |
-.Application-Reference-dark-rtl { | |
- height: 5px; | |
- width: 5px; | |
- zoom: 1; | |
-} | |
-.Application-top { | |
- width: 100%; | |
- margin-bottom: 10px; | |
-} | |
-.Application-title { | |
- padding: 0px 10px 0px 0px; | |
-} | |
-.Application-title h1 { | |
- color: #67A7E3; | |
- margin: 0px; | |
- padding: 0px 4px 0px 0px; | |
- font-size: 22px; | |
-} | |
-.Application-title h2 { | |
- color: #888; | |
- margin: 0px; | |
- padding: 0px 4px 0px 0px; | |
- font-size: 16px; | |
-} | |
-.Application-links { | |
- padding: 2px 0px 2px 13px; | |
- background: #888888; | |
-} | |
-.Application-links .gwt-HTML{ | |
- font-size: 12px; | |
-} | |
-.Application-options { | |
- padding: 6px 0px 0px 10px; | |
-} | |
-.Application-options .gwt-ListBox { | |
- font-size: 11px; | |
- color: blue; | |
- margin-right: 4px; | |
-} | |
-.Application-options td { | |
- font-size: 12px; | |
-} | |
-.Application-options .gwt-ToggleButton { | |
- width: 36px; | |
- height: 16px; | |
- margin: 3px 10px 0px 0px; | |
- padding: 0px; | |
-} | |
-.Application-options .gwt-ToggleButton-down, | |
-.Application-options .gwt-ToggleButton-down-hovering { | |
- cursor: default; | |
-} | |
-.Application-options .sc-ThemeButton-standard { | |
- background: #d0e4f6; | |
-} | |
-.Application-options .sc-ThemeButton-chrome { | |
- background: #ccc; | |
-} | |
-.Application-options .sc-ThemeButton-dark { | |
- background: #3d3d3d; | |
-} | |
-.Application-menu { | |
- width: 18em; | |
- text-align: right; | |
-} | |
- | |
-/** | |
- * Applied to widgets in the content area. | |
- */ | |
-.Application-content-decorator { | |
- margin-left: 8px; | |
-} | |
-.Application-content-title { | |
- padding: 4px 6px 3px 0px; | |
- text-align: right; | |
- background: #222; | |
- border-bottom: 2px solid #000; | |
-} | |
-.Application-content-title .gwt-TabBarItem { | |
- background: none; | |
- padding: 0px; | |
-} | |
-.Application-content-title .gwt-TabBarItem .gwt-Label { | |
- padding-left: 20px; | |
-} | |
-.Application-content-title .gwt-TabBarItem-selected .gwt-Label { | |
- color: #0cf; | |
-} | |
-.Application-content-wrapper { | |
- text-align: right; | |
-} | |
-.sc-ContentWidget { | |
- padding: 10px 20px; | |
-} | |
-.sc-ContentWidget-name { | |
- color: #BEC7CC; | |
- font-size: 1.5em; | |
- font-weight: bold; | |
- padding-bottom: 15px; | |
-} | |
-.sc-ContentWidget-description { | |
- color: #fff; | |
- padding-bottom: 15px; | |
- border-bottom: 1px solid #999; | |
- margin-bottom: 15px; | |
-} | |
-.sc-ContentWidget pre { | |
- border: 1px solid #000; | |
- background: #fff; | |
- color: #000; | |
- padding: 10px 2px; | |
- margin: 10px 0px; | |
-} | |
-.sc-FixedWidthButton { | |
- width: 10em; | |
-} | |
- | |
-/** | |
- * Applied to specific components in Content Widgets. | |
- */ | |
-.cw-BasicPopup-thumb { | |
- cursor: pointer; | |
- cursor: hand; | |
-} | |
- | |
-.cw-DictionaryExample-headerRow td { | |
- color: #7aa5d6; | |
- text-decoration: underline; | |
- font-weight: bold; | |
- padding-right: 20px; | |
-} | |
-.cw-DictionaryExample-dataRow td { | |
- padding-right: 20px; | |
-} | |
- | |
-.cw-DockPanel td { | |
- border: 1px solid #BBBBBB; | |
- padding: 3px; | |
-} | |
- | |
-.cw-FlexTable td { | |
- border: 1px solid #BBBBBB; | |
- padding: 3px; | |
-} | |
- | |
-.cw-FlexTable-buttonPanel td { | |
- border: 0px; | |
-} | |
- | |
-.cw-FlowPanel-checkBox { | |
- margin-left: 20px; | |
-} | |
- | |
-.cw-RedText { | |
- color: red; | |
-} | |
- | |
-.cw-RichText { | |
- background-color: #fff; | |
- border: 1px solid #fff; | |
- border-spacing: 0px; | |
- padding: 0px; | |
-} | |
-.cw-RichText td { | |
- padding: 0px; | |
-} | |
- | |
-.cw-StackPanelHeader { | |
- padding-right: 7px; | |
- font-weight: bold; | |
- font-size: 1.4em; | |
-} | |
diff --git a/src/com/google/gwt/sample/showcase/public/images/loading.gif b/src/com/google/gwt/sample/showcase/public/images/loading.gif | |
deleted file mode 100644 | |
index a0e7007..0000000 | |
Binary files a/src/com/google/gwt/sample/showcase/public/images/loading.gif and /dev/null differ | |
diff --git a/src/com/google/gwt/sample/showcase/public/standard/Showcase.css b/src/com/google/gwt/sample/showcase/public/standard/Showcase.css | |
deleted file mode 100644 | |
index 674b029..0000000 | |
--- a/src/com/google/gwt/sample/showcase/public/standard/Showcase.css | |
+++ /dev/null | |
@@ -1,168 +0,0 @@ | |
-/** | |
- * Applied to the main layout of the page. | |
- */ | |
-.Application-Reference-standard { | |
- height: 5px; | |
- width: 5px; | |
- zoom: 1; | |
-} | |
-.Application-top { | |
- width: 100%; | |
- margin-bottom: 10px; | |
-} | |
-.Application-title { | |
- padding: 0px 0px 0px 10px; | |
-} | |
-.Application-title h1 { | |
- color: #67A7E3; | |
- margin: 0px; | |
- padding: 0px 0px 0px 4px; | |
- font-size: 22px; | |
-} | |
-.Application-title h2 { | |
- color: #888; | |
- margin: 0px; | |
- padding: 0px 0px 0px 4px; | |
- font-size: 16px; | |
-} | |
-.Application-links { | |
- padding: 2px 13px 2px 0px; | |
- background: #C3D9FF; | |
-} | |
-.Application-links .gwt-HTML{ | |
- font-size: 12px; | |
-} | |
-.Application-options { | |
- padding: 6px 10px 0px 0px; | |
-} | |
-.Application-options .gwt-ListBox { | |
- font-size: 11px; | |
- color: blue; | |
- margin-left: 4px; | |
-} | |
-.Application-options td { | |
- font-size: 12px; | |
-} | |
-.Application-options .gwt-ToggleButton { | |
- width: 36px; | |
- height: 16px; | |
- margin: 3px 0px 0px 10px; | |
- padding: 0px; | |
-} | |
-.Application-options .gwt-ToggleButton-down, | |
-.Application-options .gwt-ToggleButton-down-hovering { | |
- cursor: default; | |
-} | |
-.Application-options .sc-ThemeButton-standard { | |
- background: #d0e4f6; | |
-} | |
-.Application-options .sc-ThemeButton-chrome { | |
- background: #ccc; | |
-} | |
-.Application-options .sc-ThemeButton-dark { | |
- background: #3d3d3d; | |
-} | |
-.Application-menu { | |
- width: 18em; | |
- text-align: left; | |
-} | |
- | |
-/** | |
- * Applied to widgets in the content area. | |
- */ | |
-.Application-content-decorator { | |
- margin-right: 8px; | |
-} | |
-.Application-content-title { | |
- padding: 4px 0px 3px 6px; | |
- text-align: left; | |
- background: #e3e8f3 url(../gwt/standard/images/hborder.png) repeat-x 0px -2003px; | |
- border-bottom: 2px solid #bbcdf3; | |
-} | |
-.Application-content-title .gwt-TabBarItem { | |
- background: none; | |
- padding: 0px; | |
-} | |
-.Application-content-title .gwt-TabBarItem .gwt-Label { | |
- padding-right: 20px; | |
- color: #888888; | |
-} | |
-.Application-content-title .gwt-TabBarItem-selected .gwt-Label { | |
- color: black; | |
-} | |
-.Application-content-wrapper { | |
- text-align: left; | |
-} | |
-.sc-ContentWidget { | |
- padding: 10px 20px; | |
-} | |
-.sc-ContentWidget-name { | |
- font-size: 1.5em; | |
- font-weight: bold; | |
- padding-bottom: 15px; | |
-} | |
-.sc-ContentWidget-description { | |
- padding-bottom: 15px; | |
- border-bottom: 1px solid #7aa5d6; | |
- margin-bottom: 15px; | |
-} | |
-.sc-ContentWidget pre { | |
- border: 1px solid #888; | |
- background: #eeeeee; | |
- padding: 10px 2px; | |
- margin: 10px 0px; | |
-} | |
-.sc-FixedWidthButton { | |
- width: 10em; | |
-} | |
- | |
-/** | |
- * Applied to specific components in Content Widgets. | |
- */ | |
-.cw-BasicPopup-thumb { | |
- cursor: pointer; | |
- cursor: hand; | |
-} | |
- | |
-.cw-DictionaryExample-headerRow td { | |
- color: #7aa5d6; | |
- text-decoration: underline; | |
- font-weight: bold; | |
- padding-left: 20px; | |
-} | |
-.cw-DictionaryExample-dataRow td { | |
- padding-left: 20px; | |
-} | |
- | |
-.cw-DockPanel td { | |
- border: 1px solid #BBBBBB; | |
- padding: 3px; | |
-} | |
- | |
-.cw-FlexTable td { | |
- border: 1px solid #BBBBBB; | |
- padding: 3px; | |
-} | |
- | |
-.cw-FlexTable-buttonPanel td { | |
- border: 0px; | |
-} | |
- | |
-.cw-FlowPanel-checkBox { | |
- margin-right: 20px; | |
-} | |
- | |
-.cw-RedText { | |
- color: red; | |
-} | |
- | |
-.cw-RichText { | |
- border: 1px solid #BBBBBB; | |
- border-spacing: 0px; | |
-} | |
- | |
-.cw-StackPanelHeader { | |
- padding-left: 7px; | |
- font-weight: bold; | |
- font-size: 1.4em; | |
-} | |
diff --git a/src/com/google/gwt/sample/showcase/public/standard/Showcase_rtl.css b/src/com/google/gwt/sample/showcase/public/standard/Showcase_rtl.css | |
deleted file mode 100644 | |
index 597c6b0..0000000 | |
--- a/src/com/google/gwt/sample/showcase/public/standard/Showcase_rtl.css | |
+++ /dev/null | |
@@ -1,168 +0,0 @@ | |
-/** | |
- * Applied to the main layout of the page. | |
- */ | |
-.Application-Reference-standard-rtl { | |
- height: 5px; | |
- width: 5px; | |
- zoom: 1; | |
-} | |
-.Application-top { | |
- width: 100%; | |
- margin-bottom: 10px; | |
-} | |
-.Application-title { | |
- padding: 0px 10px 0px 0px; | |
-} | |
-.Application-title h1 { | |
- color: #67A7E3; | |
- margin: 0px; | |
- padding: 0px 4px 0px 0px; | |
- font-size: 22px; | |
-} | |
-.Application-title h2 { | |
- color: #888; | |
- margin: 0px; | |
- padding: 0px 4px 0px 0px; | |
- font-size: 16px; | |
-} | |
-.Application-links { | |
- padding: 2px 0px 2px 13px; | |
- background: #C3D9FF; | |
-} | |
-.Application-links .gwt-HTML{ | |
- font-size: 12px; | |
-} | |
-.Application-options { | |
- padding: 6px 0px 0px 10px; | |
-} | |
-.Application-options .gwt-ListBox { | |
- font-size: 11px; | |
- color: blue; | |
- margin-right: 4px; | |
-} | |
-.Application-options td { | |
- font-size: 12px; | |
-} | |
-.Application-options .gwt-ToggleButton { | |
- width: 36px; | |
- height: 16px; | |
- margin: 3px 10px 0px 0px; | |
- padding: 0px; | |
-} | |
-.Application-options .gwt-ToggleButton-down, | |
-.Application-options .gwt-ToggleButton-down-hovering { | |
- cursor: default; | |
-} | |
-.Application-options .sc-ThemeButton-standard { | |
- background: #d0e4f6; | |
-} | |
-.Application-options .sc-ThemeButton-chrome { | |
- background: #ccc; | |
-} | |
-.Application-options .sc-ThemeButton-dark { | |
- background: #3d3d3d; | |
-} | |
-.Application-menu { | |
- width: 18em; | |
- text-align: right; | |
-} | |
- | |
-/** | |
- * Applied to widgets in the content area. | |
- */ | |
-.Application-content-decorator { | |
- margin-left: 8px; | |
-} | |
-.Application-content-title { | |
- padding: 4px 6px 3px 0px; | |
- text-align: right; | |
- background: #e3e8f3 url(../gwt/standard/images/hborder.png) repeat-x 0px -2003px; | |
- border-bottom: 2px solid #bbcdf3; | |
-} | |
-.Application-content-title .gwt-TabBarItem { | |
- background: none; | |
- padding: 0px; | |
-} | |
-.Application-content-title .gwt-TabBarItem .gwt-Label { | |
- padding-left: 20px; | |
- color: #888888; | |
-} | |
-.Application-content-title .gwt-TabBarItem-selected .gwt-Label { | |
- color: black; | |
-} | |
-.Application-content-wrapper { | |
- text-align: right; | |
-} | |
-.sc-ContentWidget { | |
- padding: 10px 20px; | |
-} | |
-.sc-ContentWidget-name { | |
- font-size: 1.5em; | |
- font-weight: bold; | |
- padding-bottom: 15px; | |
-} | |
-.sc-ContentWidget-description { | |
- padding-bottom: 15px; | |
- border-bottom: 1px solid #7aa5d6; | |
- margin-bottom: 15px; | |
-} | |
-.sc-ContentWidget pre { | |
- border: 1px solid #888; | |
- background: #eeeeee; | |
- padding: 10px 2px; | |
- margin: 10px 0px; | |
-} | |
-.sc-FixedWidthButton { | |
- width: 10em; | |
-} | |
- | |
-/** | |
- * Applied to specific components in Content Widgets. | |
- */ | |
-.cw-BasicPopup-thumb { | |
- cursor: pointer; | |
- cursor: hand; | |
-} | |
- | |
-.cw-DictionaryExample-headerRow td { | |
- color: #7aa5d6; | |
- text-decoration: underline; | |
- font-weight: bold; | |
- padding-right: 20px; | |
-} | |
-.cw-DictionaryExample-dataRow td { | |
- padding-right: 20px; | |
-} | |
- | |
-.cw-DockPanel td { | |
- border: 1px solid #BBBBBB; | |
- padding: 3px; | |
-} | |
- | |
-.cw-FlexTable td { | |
- border: 1px solid #BBBBBB; | |
- padding: 3px; | |
-} | |
- | |
-.cw-FlexTable-buttonPanel td { | |
- border: 0px; | |
-} | |
- | |
-.cw-FlowPanel-checkBox { | |
- margin-left: 20px; | |
-} | |
- | |
-.cw-RedText { | |
- color: red; | |
-} | |
- | |
-.cw-RichText { | |
- border: 1px solid #BBBBBB; | |
- border-spacing: 0px; | |
-} | |
- | |
-.cw-StackPanelHeader { | |
- padding-right: 7px; | |
- font-weight: bold; | |
- font-size: 1.4em; | |
-} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment