Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 6th, 2012  |  syntax: None  |  size: 352.47 KB  |  hits: 17  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. diff --git a/src/com/google/gwt/sample/showcase/Showcase.gwt.xml b/src/com/google/gwt/sample/showcase/Showcase.gwt.xml
  2. index 180e2a8..6dad235 100644
  3. --- a/src/com/google/gwt/sample/showcase/Showcase.gwt.xml
  4. +++ b/src/com/google/gwt/sample/showcase/Showcase.gwt.xml
  5. @@ -4,9 +4,7 @@
  6.    <inherits name='com.google.gwt.user.User'/>
  7.    <inherits name="com.google.gwt.i18n.I18N"/>
  8.    <inherits name="com.google.gwt.i18n.CldrLocales"/>
  9. -  <inherits name="com.google.gwt.user.theme.standard.StandardResources"/>
  10. -  <inherits name="com.google.gwt.user.theme.chrome.ChromeResources"/>
  11. -  <inherits name="com.google.gwt.user.theme.dark.DarkResources"/>
  12. +  <inherits name="com.google.gwt.user.theme.clean.CleanResources"/>
  13.  
  14.    <!-- Enable debug ID. -->
  15.    <inherits name="com.google.gwt.user.Debug"/>
  16. @@ -22,8 +20,12 @@
  17.  
  18.    <!-- Internationalization support. -->
  19.    <extend-property name="locale" values="en"/>
  20. +  <!--
  21.    <extend-property name="locale" values="ar"/>
  22.    <extend-property name="locale" values="fr"/>
  23.    <extend-property name="locale" values="zh"/>
  24. +  -->
  25.    <set-property-fallback name="locale" value="en"/>
  26. +  <set-configuration-property name="locale.cookie" value="SHOWCASE_LOCALE"/>
  27. +  <set-configuration-property name="locale.useragent" value="Y"/>
  28.  </module>
  29. diff --git a/src/com/google/gwt/sample/showcase/client/Application.java b/src/com/google/gwt/sample/showcase/client/Application.java
  30. deleted file mode 100644
  31. index e0336fa..0000000
  32. --- a/src/com/google/gwt/sample/showcase/client/Application.java
  33. +++ /dev/null
  34. @@ -1,354 +0,0 @@
  35. -/*
  36. - * Copyright 2008 Google Inc.
  37. - *
  38. - * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  39. - * use this file except in compliance with the License. You may obtain a copy of
  40. - * the License at
  41. - *
  42. - * http://www.apache.org/licenses/LICENSE-2.0
  43. - *
  44. - * Unless required by applicable law or agreed to in writing, software
  45. - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  46. - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  47. - * License for the specific language governing permissions and limitations under
  48. - * the License.
  49. - */
  50. -package com.google.gwt.sample.showcase.client;
  51. -
  52. -import com.google.gwt.core.client.GWT;
  53. -import com.google.gwt.event.logical.shared.HasSelectionHandlers;
  54. -import com.google.gwt.event.logical.shared.ResizeEvent;
  55. -import com.google.gwt.event.logical.shared.ResizeHandler;
  56. -import com.google.gwt.event.logical.shared.SelectionHandler;
  57. -import com.google.gwt.event.shared.HandlerRegistration;
  58. -import com.google.gwt.i18n.client.LocaleInfo;
  59. -import com.google.gwt.resources.client.ImageResource;
  60. -import com.google.gwt.user.client.Window;
  61. -import com.google.gwt.user.client.ui.Composite;
  62. -import com.google.gwt.user.client.ui.DecoratorPanel;
  63. -import com.google.gwt.user.client.ui.FlexTable;
  64. -import com.google.gwt.user.client.ui.FlowPanel;
  65. -import com.google.gwt.user.client.ui.Grid;
  66. -import com.google.gwt.user.client.ui.HTML;
  67. -import com.google.gwt.user.client.ui.HasHorizontalAlignment;
  68. -import com.google.gwt.user.client.ui.HasVerticalAlignment;
  69. -import com.google.gwt.user.client.ui.HorizontalPanel;
  70. -import com.google.gwt.user.client.ui.SimplePanel;
  71. -import com.google.gwt.user.client.ui.Tree;
  72. -import com.google.gwt.user.client.ui.TreeItem;
  73. -import com.google.gwt.user.client.ui.Widget;
  74. -import com.google.gwt.user.client.ui.FlexTable.FlexCellFormatter;
  75. -import com.google.gwt.user.client.ui.HTMLTable.CellFormatter;
  76. -
  77. -/**
  78. - * <p>
  79. - * A generic application that includes a title bar, main menu, content area, and
  80. - * some external links at the top.
  81. - * </p>
  82. - * <h3>CSS Style Rules</h3>
  83. - *
  84. - * <ul class="css">
  85. - *
  86. - * <li>.Application { Applied to the entire Application }</li>
  87. - *
  88. - * <li>.Application-top { The top portion of the Application }</li>
  89. - *
  90. - * <li>.Application-title { The title widget }</li>
  91. - *
  92. - * <li>.Application-links { The main external links }</li>
  93. - *
  94. - * <li>.Application-options { The options widget }</li>
  95. - *
  96. - * <li>.Application-menu { The main menu }</li>
  97. - *
  98. - * <li>.Application-content-wrapper { The scrollable element around the content }</li>
  99. - *
  100. - * </ul>
  101. - */
  102. -public class Application extends Composite implements ResizeHandler,
  103. -    HasSelectionHandlers<TreeItem> {
  104. -  /**
  105. -   * Images used in the {@link Application}.
  106. -   */
  107. -  public interface ApplicationImages extends Tree.Resources {
  108. -    /**
  109. -     * An image indicating a leaf.
  110. -     *
  111. -     * @return a prototype of this image
  112. -     */
  113. -    @Source("noimage.png")
  114. -    ImageResource treeLeaf();
  115. -  }
  116. -
  117. -  /**
  118. -   * The base style name.
  119. -   */
  120. -  public static final String DEFAULT_STYLE_NAME = "Application";
  121. -
  122. -  /**
  123. -   * The panel that contains the menu and content.
  124. -   */
  125. -  private HorizontalPanel bottomPanel;
  126. -
  127. -  /**
  128. -   * The decorator around the content.
  129. -   */
  130. -  private DecoratorPanel contentDecorator;
  131. -
  132. -  /**
  133. -   * The main wrapper around the content and content title.
  134. -   */
  135. -  private Grid contentLayout;
  136. -
  137. -  /**
  138. -   * The wrapper around the content.
  139. -   */
  140. -  private SimplePanel contentWrapper;
  141. -
  142. -  /**
  143. -   * The panel that holds the main links.
  144. -   */
  145. -  private HorizontalPanel linksPanel;
  146. -
  147. -  /**
  148. -   * The main menu.
  149. -   */
  150. -  private Tree mainMenu;
  151. -
  152. -  /**
  153. -   * The last known width of the window.
  154. -   */
  155. -  private int windowWidth = -1;
  156. -
  157. -  /**
  158. -   * The panel that contains the title widget and links.
  159. -   */
  160. -  private FlexTable topPanel;
  161. -
  162. -  /**
  163. -   * Constructor.
  164. -   */
  165. -  public Application() {
  166. -    // Setup the main layout widget
  167. -    FlowPanel layout = new FlowPanel();
  168. -    initWidget(layout);
  169. -
  170. -    // Setup the top panel with the title and links
  171. -    createTopPanel();
  172. -    layout.add(topPanel);
  173. -
  174. -    // Add the main menu
  175. -    bottomPanel = new HorizontalPanel();
  176. -    bottomPanel.setWidth("100%");
  177. -    bottomPanel.setSpacing(0);
  178. -    bottomPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_TOP);
  179. -    layout.add(bottomPanel);
  180. -    createMainMenu();
  181. -    bottomPanel.add(mainMenu);
  182. -
  183. -    // Setup the content layout
  184. -    contentLayout = new Grid(2, 1);
  185. -    contentLayout.setCellPadding(0);
  186. -    contentLayout.setCellSpacing(0);
  187. -    contentDecorator = new DecoratorPanel();
  188. -    contentDecorator.setWidget(contentLayout);
  189. -    contentDecorator.addStyleName(DEFAULT_STYLE_NAME + "-content-decorator");
  190. -    bottomPanel.add(contentDecorator);
  191. -    if (LocaleInfo.getCurrentLocale().isRTL()) {
  192. -      bottomPanel.setCellHorizontalAlignment(contentDecorator,
  193. -          HasHorizontalAlignment.ALIGN_LEFT);
  194. -      contentDecorator.getElement().setAttribute("align", "LEFT");
  195. -    } else {
  196. -      bottomPanel.setCellHorizontalAlignment(contentDecorator,
  197. -          HasHorizontalAlignment.ALIGN_RIGHT);
  198. -      contentDecorator.getElement().setAttribute("align", "RIGHT");
  199. -    }
  200. -    CellFormatter formatter = contentLayout.getCellFormatter();
  201. -
  202. -    // Add the content title
  203. -    setContentTitle(new HTML("Content"));
  204. -    formatter.setStyleName(0, 0, DEFAULT_STYLE_NAME + "-content-title");
  205. -
  206. -    // Add the content wrapper
  207. -    contentWrapper = new SimplePanel();
  208. -    contentLayout.setWidget(1, 0, contentWrapper);
  209. -    formatter.setStyleName(1, 0, DEFAULT_STYLE_NAME + "-content-wrapper");
  210. -    setContent(null);
  211. -
  212. -    // Add a window resize handler
  213. -    Window.addResizeHandler(this);
  214. -  }
  215. -
  216. -  /**
  217. -   * Add a link to the top of the page.
  218. -   *
  219. -   * @param link the widget to add to the mainLinks
  220. -   */
  221. -  public void addLink(Widget link) {
  222. -    if (linksPanel.getWidgetCount() > 0) {
  223. -      linksPanel.add(new HTML("&nbsp;|&nbsp;"));
  224. -    }
  225. -    linksPanel.add(link);
  226. -  }
  227. -
  228. -  public HandlerRegistration addSelectionHandler(
  229. -      SelectionHandler<TreeItem> handler) {
  230. -    return mainMenu.addSelectionHandler(handler);
  231. -  }
  232. -
  233. -  /**
  234. -   * @return the {@link Widget} in the content area
  235. -   */
  236. -  public Widget getContent() {
  237. -    return contentWrapper.getWidget();
  238. -  }
  239. -
  240. -  /**
  241. -   * @return the content title widget
  242. -   */
  243. -  public Widget getContentTitle() {
  244. -    return contentLayout.getWidget(0, 0);
  245. -  }
  246. -
  247. -  /**
  248. -   * @return the main menu.
  249. -   */
  250. -  public Tree getMainMenu() {
  251. -    return mainMenu;
  252. -  }
  253. -
  254. -  /**
  255. -   * @return the {@link Widget} used as the title
  256. -   */
  257. -  public Widget getTitleWidget() {
  258. -    return topPanel.getWidget(0, 0);
  259. -  }
  260. -
  261. -  public void onResize(ResizeEvent event) {
  262. -    onWindowResized(event.getWidth(), event.getHeight());
  263. -  }
  264. -
  265. -  public void onWindowResized(int width, int height) {
  266. -    if (width == windowWidth || width < 1) {
  267. -      return;
  268. -    }
  269. -    windowWidth = width;
  270. -    onWindowResizedImpl(width);
  271. -  }
  272. -
  273. -  /**
  274. -   * Set the {@link Widget} to display in the content area.
  275. -   *
  276. -   * @param content the content widget
  277. -   */
  278. -  public void setContent(Widget content) {
  279. -    if (content == null) {
  280. -      contentWrapper.setWidget(new HTML("&nbsp;"));
  281. -    } else {
  282. -      contentWrapper.setWidget(content);
  283. -    }
  284. -  }
  285. -
  286. -  /**
  287. -   * Set the title of the content area.
  288. -   *
  289. -   * @param title the content area title
  290. -   */
  291. -  public void setContentTitle(Widget title) {
  292. -    contentLayout.setWidget(0, 0, title);
  293. -  }
  294. -
  295. -  /**
  296. -   * Set the {@link Widget} to use as options, which appear to the right of the
  297. -   * title bar.
  298. -   *
  299. -   * @param options the options widget
  300. -   */
  301. -  public void setOptionsWidget(Widget options) {
  302. -    topPanel.setWidget(1, 1, options);
  303. -  }
  304. -
  305. -  /**
  306. -   * Set the {@link Widget} to use as the title bar.
  307. -   *
  308. -   * @param title the title widget
  309. -   */
  310. -  public void setTitleWidget(Widget title) {
  311. -    topPanel.setWidget(1, 0, title);
  312. -  }
  313. -
  314. -  @Override
  315. -  protected void onLoad() {
  316. -    super.onLoad();
  317. -    onWindowResized(Window.getClientWidth(), Window.getClientHeight());
  318. -  }
  319. -
  320. -  @Override
  321. -  protected void onUnload() {
  322. -    super.onUnload();
  323. -    windowWidth = -1;
  324. -  }
  325. -
  326. -  protected void onWindowResizedImpl(int width) {
  327. -    int menuWidth = mainMenu.getOffsetWidth();
  328. -    int contentWidth = Math.max(width - menuWidth - 30, 1);
  329. -    int contentWidthInner = Math.max(contentWidth - 10, 1);
  330. -    bottomPanel.setCellWidth(mainMenu, menuWidth + "px");
  331. -    bottomPanel.setCellWidth(contentDecorator, contentWidth + "px");
  332. -    contentLayout.getCellFormatter().setWidth(0, 0, contentWidthInner + "px");
  333. -    contentLayout.getCellFormatter().setWidth(1, 0, contentWidthInner + "px");
  334. -  }
  335. -
  336. -  /**
  337. -   * Create the main menu.
  338. -   */
  339. -  private void createMainMenu() {
  340. -    // Setup the main menu
  341. -    ApplicationImages treeImages = GWT.create(ApplicationImages.class);
  342. -    mainMenu = new Tree(treeImages);
  343. -    mainMenu.setAnimationEnabled(true);
  344. -    mainMenu.addStyleName(DEFAULT_STYLE_NAME + "-menu");
  345. -  }
  346. -
  347. -  /**
  348. -   * Create the panel at the top of the page that contains the title and links.
  349. -   */
  350. -  private void createTopPanel() {
  351. -    boolean isRTL = LocaleInfo.getCurrentLocale().isRTL();
  352. -    topPanel = new FlexTable();
  353. -    topPanel.setCellPadding(0);
  354. -    topPanel.setCellSpacing(0);
  355. -    topPanel.setStyleName(DEFAULT_STYLE_NAME + "-top");
  356. -    FlexCellFormatter formatter = topPanel.getFlexCellFormatter();
  357. -
  358. -    // Setup the links cell
  359. -    linksPanel = new HorizontalPanel();
  360. -    topPanel.setWidget(0, 0, linksPanel);
  361. -    formatter.setStyleName(0, 0, DEFAULT_STYLE_NAME + "-links");
  362. -    if (isRTL) {
  363. -      formatter.setHorizontalAlignment(0, 0, HasHorizontalAlignment.ALIGN_LEFT);
  364. -    } else {
  365. -      formatter.setHorizontalAlignment(0, 0, HasHorizontalAlignment.ALIGN_RIGHT);
  366. -    }
  367. -    formatter.setColSpan(0, 0, 2);
  368. -
  369. -    // Setup the title cell
  370. -    setTitleWidget(null);
  371. -    formatter.setStyleName(1, 0, DEFAULT_STYLE_NAME + "-title");
  372. -
  373. -    // Setup the options cell
  374. -    setOptionsWidget(null);
  375. -    formatter.setStyleName(1, 1, DEFAULT_STYLE_NAME + "-options");
  376. -    if (isRTL) {
  377. -      formatter.setHorizontalAlignment(1, 1, HasHorizontalAlignment.ALIGN_LEFT);
  378. -    } else {
  379. -      formatter.setHorizontalAlignment(1, 1, HasHorizontalAlignment.ALIGN_RIGHT);
  380. -    }
  381. -
  382. -    // Align the content to the top
  383. -    topPanel.getRowFormatter().setVerticalAlign(0,
  384. -        HasVerticalAlignment.ALIGN_TOP);
  385. -    topPanel.getRowFormatter().setVerticalAlign(1,
  386. -        HasVerticalAlignment.ALIGN_TOP);
  387. -  }
  388. -}
  389. diff --git a/src/com/google/gwt/sample/showcase/client/ContentWidget.java b/src/com/google/gwt/sample/showcase/client/ContentWidget.java
  390. index 880affb..d224c0b 100644
  391. --- a/src/com/google/gwt/sample/showcase/client/ContentWidget.java
  392. +++ b/src/com/google/gwt/sample/showcase/client/ContentWidget.java
  393. @@ -16,108 +16,104 @@
  394.  package com.google.gwt.sample.showcase.client;
  395.  
  396.  import com.google.gwt.core.client.GWT;
  397. -import com.google.gwt.event.logical.shared.SelectionEvent;
  398. -import com.google.gwt.event.logical.shared.SelectionHandler;
  399. +import com.google.gwt.event.logical.shared.HasValueChangeHandlers;
  400. +import com.google.gwt.event.logical.shared.ValueChangeEvent;
  401. +import com.google.gwt.event.logical.shared.ValueChangeHandler;
  402. +import com.google.gwt.event.shared.HandlerRegistration;
  403.  import com.google.gwt.http.client.Request;
  404.  import com.google.gwt.http.client.RequestBuilder;
  405.  import com.google.gwt.http.client.RequestCallback;
  406.  import com.google.gwt.http.client.RequestException;
  407.  import com.google.gwt.http.client.Response;
  408. -import com.google.gwt.i18n.client.Constants;
  409. -import com.google.gwt.i18n.client.HasDirection;
  410.  import com.google.gwt.i18n.client.LocaleInfo;
  411. -import com.google.gwt.user.client.DOM;
  412. +import com.google.gwt.safehtml.shared.SafeHtml;
  413. +import com.google.gwt.safehtml.shared.SafeHtmlUtils;
  414.  import com.google.gwt.user.client.Window;
  415.  import com.google.gwt.user.client.rpc.AsyncCallback;
  416. -import com.google.gwt.user.client.ui.DeckPanel;
  417. -import com.google.gwt.user.client.ui.HTML;
  418. -import com.google.gwt.user.client.ui.LazyPanel;
  419. -import com.google.gwt.user.client.ui.TabBar;
  420. -import com.google.gwt.user.client.ui.VerticalPanel;
  421. +import com.google.gwt.user.client.ui.SimpleLayoutPanel;
  422.  import com.google.gwt.user.client.ui.Widget;
  423.  
  424. +import java.util.ArrayList;
  425. +import java.util.Collections;
  426.  import java.util.HashMap;
  427. +import java.util.List;
  428.  import java.util.Map;
  429.  
  430.  /**
  431.   * <p>
  432. - * A widget used to show GWT examples in the ContentPanel. It includes a tab bar
  433. - * with options to view the example, view the source, or view the css style
  434. - * rules.
  435. + * A widget used to show GWT examples in the ContentPanel.
  436.   * </p>
  437.   * <p>
  438.   * This {@link Widget} uses a lazy initialization mechanism so that the content
  439.   * is not rendered until the onInitialize method is called, which happens the
  440. - * first time the {@link Widget} is added to the page.. The data in the source
  441. + * first time the {@link Widget} is added to the page. The data in the source
  442.   * and css tabs are loaded using an RPC call to the server.
  443.   * </p>
  444. - * <h3>CSS Style Rules</h3>
  445. - * <ul class="css">
  446. - * <li>.sc-ContentWidget { Applied to the entire widget }</li>
  447. - * <li>.sc-ContentWidget-tabBar { Applied to the TabBar }</li>
  448. - * <li>.sc-ContentWidget-deckPanel { Applied to the DeckPanel }</li>
  449. - * <li>.sc-ContentWidget-name { Applied to the name }</li>
  450. - * <li>.sc-ContentWidget-description { Applied to the description }</li>
  451. - * </ul>
  452.   */
  453. -public abstract class ContentWidget extends LazyPanel implements
  454. -    SelectionHandler<Integer> {
  455. +public abstract class ContentWidget extends SimpleLayoutPanel implements
  456. +    HasValueChangeHandlers<String> {
  457. +
  458.    /**
  459. -   * The constants used in this Content Widget.
  460. +   * Generic callback used for asynchronously loaded data.
  461. +   *
  462. +   * @param <T> the data type
  463.     */
  464. -  public static interface CwConstants extends Constants {
  465. -    String contentWidgetExample();
  466. +  public static interface Callback<T> {
  467. +    void onError();
  468.  
  469. -    String contentWidgetSource();
  470. -
  471. -    String contentWidgetStyle();
  472. +    void onSuccess(T value);
  473.    }
  474.  
  475.    /**
  476. -   * The default style name.
  477. +   * Get the simple filename of a class.
  478. +   *
  479. +   * @param c the class
  480.     */
  481. -  private static final String DEFAULT_STYLE_NAME = "sc-ContentWidget";
  482. +  protected static String getSimpleName(Class<?> c) {
  483. +    String name = c.getName();
  484. +    return name.substring(name.lastIndexOf(".") + 1);
  485. +  }
  486.  
  487.    /**
  488. -   * The static loading image displayed when loading CSS or source code.
  489. +   * A description of the example.
  490.     */
  491. -  private static String loadingImage;
  492. +  private final SafeHtml description;
  493.  
  494.    /**
  495. -   * The tab bar of options.
  496. +   * True if this example has associated styles, false if not.
  497.     */
  498. -  protected TabBar tabBar = null;
  499. +  private final boolean hasStyle;
  500.  
  501.    /**
  502. -   * An instance of the constants.
  503. +   * The name of the example.
  504.     */
  505. -  private final CwConstants constants;
  506. +  private final String name;
  507.  
  508.    /**
  509. -   * The deck panel with the contents.
  510. +   * A mapping of filenames to their raw source code. The map is populated as
  511. +   * source is loaded.
  512.     */
  513. -  private DeckPanel deckPanel = null;
  514. +  private final Map<String, String> rawSource = new HashMap<String, String>();
  515.  
  516.    /**
  517. -   * A boolean indicating whether or not the RPC request for the source code has
  518. -   * been sent.
  519. +   * A list of filenames of the raw source code included with this example.
  520.     */
  521. -  private boolean sourceLoaded = false;
  522. +  private final List<String> rawSourceFilenames = new ArrayList<String>();
  523.  
  524.    /**
  525. -   * The widget used to display source code.
  526. +   * The source code associated with this widget.
  527.     */
  528. -  private HTML sourceWidget = null;
  529. +  private String sourceCode;
  530.  
  531.    /**
  532. -   * A mapping of themes to style definitions.
  533. +   * A style definitions used by this widget.
  534.     */
  535. -  private Map<String, String> styleDefs = null;
  536. +  private String styleDefs;
  537.  
  538.    /**
  539. -   * The widget used to display css style.
  540. +   * The view that holds the name, description, and example.
  541.     */
  542. -  private HTML styleWidget = null;
  543. +  private ContentWidgetView view;
  544.  
  545.    /**
  546.     * Whether the demo widget has been initialized.
  547. @@ -130,36 +126,39 @@ public abstract class ContentWidget extends LazyPanel implements
  548.    private boolean widgetInitializing;
  549.  
  550.    /**
  551. -   * A vertical panel that holds the demo widget once it is initialized.
  552. -   */
  553. -  private VerticalPanel widgetVpanel;
  554. -
  555. -  /**
  556. -   * Constructor.
  557. +   * Construct a {@link ContentWidget}.
  558.     *
  559. -   * @param constants the constants
  560. +   * @param name the text name of the example
  561. +   * @param description a text description of the example
  562. +   * @param hasStyle true if the example has associated styles
  563. +   * @param rawSourceFiles the list of raw source files to include
  564.     */
  565. -  public ContentWidget(CwConstants constants) {
  566. -    this.constants = constants;
  567. -    tabBar = new TabBar();
  568. +  public ContentWidget(String name, String description, boolean hasStyle, String... rawSourceFiles) {
  569. +    this(name, SafeHtmlUtils.fromString(description), hasStyle, rawSourceFiles);
  570.    }
  571.  
  572.    /**
  573. -   * Add an item to this content widget. Should not be called before
  574. -   * {@link #onInitializeComplete} has been called.
  575. +   * Construct a {@link ContentWidget}.
  576.     *
  577. -   * @param w the widget to add
  578. -   * @param tabText the text to display in the tab
  579. +   * @param name the text name of the example
  580. +   * @param description a safe html description of the example
  581. +   * @param hasStyle true if the example has associated styles
  582. +   * @param rawSourceFiles the list of raw source files to include
  583.     */
  584. -  public void add(Widget w, String tabText) {
  585. -    tabBar.addTab(tabText);
  586. -    deckPanel.add(w);
  587. +  public ContentWidget(String name, SafeHtml description, boolean hasStyle,
  588. +      String... rawSourceFiles) {
  589. +    this.name = name;
  590. +    this.description = description;
  591. +    this.hasStyle = hasStyle;
  592. +    if (rawSourceFiles != null) {
  593. +      for (String rawSourceFile : rawSourceFiles) {
  594. +        rawSourceFilenames.add(rawSourceFile);
  595. +      }
  596. +    }
  597.    }
  598.  
  599. -  @Override
  600. -  public void ensureWidget() {
  601. -    super.ensureWidget();
  602. -    ensureWidgetInitialized(widgetVpanel);
  603. +  public HandlerRegistration addValueChangeHandler(ValueChangeHandler<String> handler) {
  604. +    return addHandler(handler, ValueChangeEvent.getType());
  605.    }
  606.  
  607.    /**
  608. @@ -167,217 +166,188 @@ public abstract class ContentWidget extends LazyPanel implements
  609.     *
  610.     * @return a description for this example
  611.     */
  612. -  public abstract String getDescription();
  613. +  public final SafeHtml getDescription() {
  614. +    return description;
  615. +  }
  616.  
  617.    /**
  618.     * Get the name of this example to use as a title.
  619.     *
  620.     * @return a name for this example
  621.     */
  622. -  public abstract String getName();
  623. -
  624. -  /**
  625. -   * @return the tab bar
  626. -   */
  627. -  public TabBar getTabBar() {
  628. -    return tabBar;
  629. +  public final String getName() {
  630. +    return name;
  631.    }
  632.  
  633.    /**
  634. -   * Returns true if this widget has a source section.
  635. +   * Get the source code for a raw file.
  636.     *
  637. -   * @return true if source tab available
  638. +   * @param filename the filename to load
  639. +   * @param callback the callback to call when loaded
  640.     */
  641. -  public boolean hasSource() {
  642. -    return true;
  643. +  public void getRawSource(final String filename, final Callback<String> callback) {
  644. +    if (rawSource.containsKey(filename)) {
  645. +      callback.onSuccess(rawSource.get(filename));
  646. +    } else {
  647. +      RequestCallback rc = new RequestCallback() {
  648. +        public void onError(Request request, Throwable exception) {
  649. +          callback.onError();
  650. +        }
  651. +
  652. +        public void onResponseReceived(Request request, Response response) {
  653. +          String text = response.getText();
  654. +          rawSource.put(filename, text);
  655. +          callback.onSuccess(text);
  656. +        }
  657. +      };
  658. +
  659. +      String className = this.getClass().getName();
  660. +      className = className.substring(className.lastIndexOf(".") + 1);
  661. +      sendSourceRequest(rc, ShowcaseConstants.DST_SOURCE_RAW + filename + ".html");
  662. +    }
  663.    }
  664.  
  665.    /**
  666. -   * Returns true if this widget has a style section.
  667. +   * Get the filenames of the raw source files.
  668.     *
  669. -   * @return true if style tab available
  670. +   * @return the raw source files.
  671.     */
  672. -  public boolean hasStyle() {
  673. -    return true;
  674. +  public List<String> getRawSourceFilenames() {
  675. +    return Collections.unmodifiableList(rawSourceFilenames);
  676.    }
  677.  
  678.    /**
  679. -   * When the widget is first initialized, this method is called. If it returns
  680. -   * a Widget, the widget will be added as the first tab. Return null to disable
  681. -   * the first tab.
  682. +   * Request the styles associated with the widget.
  683.     *
  684. -   * @return the widget to add to the first tab
  685. -   */
  686. -  public abstract Widget onInitialize();
  687. -
  688. -  /**
  689. -   * Called when initialization has completed and the widget has been added to
  690. -   * the page.
  691. +   * @param callback the callback used when the styles become available
  692.     */
  693. -  public void onInitializeComplete() {
  694. -  }
  695. +  public void getStyle(final Callback<String> callback) {
  696. +    if (styleDefs != null) {
  697. +      callback.onSuccess(styleDefs);
  698. +    } else {
  699. +      RequestCallback rc = new RequestCallback() {
  700. +        public void onError(Request request, Throwable exception) {
  701. +          callback.onError();
  702. +        }
  703.  
  704. -  public void onSelection(SelectionEvent<Integer> event) {
  705. -    // Show the associated widget in the deck panel
  706. -    int tabIndex = event.getSelectedItem().intValue();
  707. -    deckPanel.showWidget(tabIndex);
  708. +        public void onResponseReceived(Request request, Response response) {
  709. +          styleDefs = response.getText();
  710. +          callback.onSuccess(styleDefs);
  711. +        }
  712. +      };
  713.  
  714. -    // Load the source code
  715. -    String tabHTML = getTabBar().getTabHTML(tabIndex);
  716. -    if (!sourceLoaded && tabHTML.equals(constants.contentWidgetSource())) {
  717. -      sourceLoaded = true;
  718. +      String srcPath = ShowcaseConstants.DST_SOURCE_STYLE + Showcase.THEME;
  719. +      if (LocaleInfo.getCurrentLocale().isRTL()) {
  720. +        srcPath += "_rtl";
  721. +      }
  722.        String className = this.getClass().getName();
  723.        className = className.substring(className.lastIndexOf(".") + 1);
  724. -      requestSourceContents(ShowcaseConstants.DST_SOURCE_EXAMPLE + className
  725. -          + ".html", sourceWidget, null);
  726. +      sendSourceRequest(rc, srcPath + "/" + className + ".html");
  727.      }
  728. +  }
  729.  
  730. -    // Load the style definitions
  731. -    if (hasStyle() && tabHTML.equals(constants.contentWidgetStyle())) {
  732. -      final String theme = Showcase.CUR_THEME;
  733. -      if (styleDefs.containsKey(theme)) {
  734. -        styleWidget.setHTML(styleDefs.get(theme));
  735. -      } else {
  736. -        styleDefs.put(theme, "");
  737. -        RequestCallback callback = new RequestCallback() {
  738. -          public void onError(Request request, Throwable exception) {
  739. -            styleDefs.put(theme, "Style not available.");
  740. -          }
  741. -
  742. -          public void onResponseReceived(Request request, Response response) {
  743. -            styleDefs.put(theme, response.getText());
  744. -          }
  745. -        };
  746. -
  747. -        String srcPath = ShowcaseConstants.DST_SOURCE_STYLE + theme;
  748. -        if (LocaleInfo.getCurrentLocale().isRTL()) {
  749. -          srcPath += "_rtl";
  750. +  /**
  751. +   * Request the source code associated with the widget.
  752. +   *
  753. +   * @param callback the callback used when the source become available
  754. +   */
  755. +  public void getSource(final Callback<String> callback) {
  756. +    if (sourceCode != null) {
  757. +      callback.onSuccess(sourceCode);
  758. +    } else {
  759. +      RequestCallback rc = new RequestCallback() {
  760. +        public void onError(Request request, Throwable exception) {
  761. +          callback.onError();
  762.          }
  763. -        String className = this.getClass().getName();
  764. -        className = className.substring(className.lastIndexOf(".") + 1);
  765. -        requestSourceContents(srcPath + "/" + className + ".html", styleWidget,
  766. -            callback);
  767. -      }
  768. +
  769. +        public void onResponseReceived(Request request, Response response) {
  770. +          sourceCode = response.getText();
  771. +          callback.onSuccess(sourceCode);
  772. +        }
  773. +      };
  774. +
  775. +      String className = this.getClass().getName();
  776. +      className = className.substring(className.lastIndexOf(".") + 1);
  777. +      sendSourceRequest(rc, ShowcaseConstants.DST_SOURCE_EXAMPLE + className + ".html");
  778.      }
  779.    }
  780.  
  781.    /**
  782. -   * Select a tab.
  783. +   * Check if the widget should have margins.
  784.     *
  785. -   * @param index the tab index
  786. +   * @return true to use margins, false to flush against edges
  787.     */
  788. -  public void selectTab(int index) {
  789. -    tabBar.selectTab(index);
  790. +  public boolean hasMargins() {
  791. +    return true;
  792.    }
  793.  
  794. -  protected abstract void asyncOnInitialize(final AsyncCallback<Widget> callback);
  795. -
  796.    /**
  797. -   * Initialize this widget by creating the elements that should be added to the
  798. -   * page.
  799. +   * Check if the widget should be wrapped in a scrollable div.
  800. +   *
  801. +   * @return true to use add scrollbars, false not to
  802.     */
  803. -  @Override
  804. -  protected final Widget createWidget() {
  805. -    deckPanel = new DeckPanel();
  806. -
  807. -    setStyleName(DEFAULT_STYLE_NAME);
  808. -
  809. -    // Add a tab handler
  810. -    tabBar.addSelectionHandler(this);
  811. -
  812. -    // Create a container for the main example
  813. -    widgetVpanel = new VerticalPanel();
  814. -    add(widgetVpanel, constants.contentWidgetExample());
  815. -
  816. -    // Add the name
  817. -    HTML nameWidget = new HTML(getName());
  818. -    nameWidget.setStyleName(DEFAULT_STYLE_NAME + "-name");
  819. -    widgetVpanel.add(nameWidget);
  820. -
  821. -    // Add the description
  822. -    HTML descWidget = new HTML(getDescription());
  823. -    descWidget.setStyleName(DEFAULT_STYLE_NAME + "-description");
  824. -    widgetVpanel.add(descWidget);
  825. -
  826. -    // Add source code tab
  827. -    if (hasSource()) {
  828. -      sourceWidget = new HTML();
  829. -      add(sourceWidget, constants.contentWidgetSource());
  830. -    } else {
  831. -      sourceLoaded = true;
  832. -    }
  833. -
  834. -    // Add style tab
  835. -    if (hasStyle()) {
  836. -      styleDefs = new HashMap<String, String>();
  837. -      styleWidget = new HTML();
  838. -      add(styleWidget, constants.contentWidgetStyle());
  839. -    }
  840. +  public boolean hasScrollableContent() {
  841. +    return true;
  842. +  }
  843.  
  844. -    return deckPanel;
  845. +  /**
  846. +   * Returns true if this widget has a style section.
  847. +   *
  848. +   * @return true if style tab available
  849. +   */
  850. +  public final boolean hasStyle() {
  851. +    return hasStyle;
  852.    }
  853.  
  854. -  @Override
  855. -  protected void onLoad() {
  856. -    ensureWidget();
  857. +  /**
  858. +   * When the widget is first initialized, this method is called. If it returns
  859. +   * a Widget, the widget will be added as the first tab. Return null to disable
  860. +   * the first tab.
  861. +   *
  862. +   * @return the widget to add to the first tab
  863. +   */
  864. +  public abstract Widget onInitialize();
  865.  
  866. -    // Select the first tab
  867. -    if (getTabBar().getTabCount() > 0) {
  868. -      tabBar.selectTab(0);
  869. -    }
  870. +  /**
  871. +   * Called when initialization has completed and the widget has been added to
  872. +   * the page.
  873. +   */
  874. +  public void onInitializeComplete() {
  875.    }
  876.  
  877. +  protected abstract void asyncOnInitialize(final AsyncCallback<Widget> callback);
  878. +
  879.    /**
  880. -   * Load the contents of a remote file into the specified widget.
  881. +   * Fire a {@link ValueChangeEvent} indicating that the user wishes to see the
  882. +   * specified source file.
  883.     *
  884. -   * @param url a partial path relative to the module base URL
  885. -   * @param target the target Widget to place the contents
  886. -   * @param callback the callback when the call completes
  887. +   * @param filename the filename that the user wishes to see
  888.     */
  889. -  protected void requestSourceContents(String url, final HTML target,
  890. -      final RequestCallback callback) {
  891. -    // Show the loading image
  892. -    if (loadingImage == null) {
  893. -      loadingImage = "<img src=\"" + GWT.getModuleBaseURL()
  894. -          + "images/loading.gif\">";
  895. +  protected void fireRawSourceRequest(String filename) {
  896. +    if (!rawSourceFilenames.contains(filename)) {
  897. +      throw new IllegalArgumentException("Filename is not registered with this example: "
  898. +          + filename);
  899.      }
  900. -    target.setDirection(HasDirection.Direction.LTR);
  901. -    DOM.setStyleAttribute(target.getElement(), "textAlign", "left");
  902. -    target.setHTML("&nbsp;&nbsp;" + loadingImage);
  903. -
  904. -    // Request the contents of the file
  905. -    RequestBuilder builder = new RequestBuilder(RequestBuilder.GET,
  906. -        GWT.getModuleBaseURL() + url);
  907. -    RequestCallback realCallback = new RequestCallback() {
  908. -      public void onError(Request request, Throwable exception) {
  909. -        target.setHTML("Cannot find resource");
  910. -        if (callback != null) {
  911. -          callback.onError(request, exception);
  912. -        }
  913. -      }
  914. -
  915. -      public void onResponseReceived(Request request, Response response) {
  916. -        target.setHTML(response.getText());
  917. -        if (callback != null) {
  918. -          callback.onResponseReceived(request, response);
  919. -        }
  920. -      }
  921. -    };
  922. -    builder.setCallback(realCallback);
  923. +    ValueChangeEvent.fire(this, filename);
  924. +  }
  925.  
  926. -    // Send the request
  927. -    try {
  928. -      builder.send();
  929. -    } catch (RequestException e) {
  930. -      realCallback.onError(null, e);
  931. +  @Override
  932. +  protected void onLoad() {
  933. +    if (view == null) {
  934. +      view = new ContentWidgetView(hasMargins(), hasScrollableContent());
  935. +      view.setName(getName());
  936. +      view.setDescription(getDescription());
  937. +      setWidget(view);
  938.      }
  939. +    ensureWidgetInitialized();
  940. +    super.onLoad();
  941.    }
  942.  
  943.    /**
  944.     * Ensure that the demo widget has been initialized. Note that initialization
  945.     * can fail if there is a network failure.
  946.     */
  947. -  private void ensureWidgetInitialized(final VerticalPanel vPanel) {
  948. +  private void ensureWidgetInitialized() {
  949.      if (widgetInitializing || widgetInitialized) {
  950.        return;
  951.      }
  952. @@ -396,10 +366,26 @@ public abstract class ContentWidget extends LazyPanel implements
  953.  
  954.          Widget widget = result;
  955.          if (widget != null) {
  956. -          vPanel.add(widget);
  957. +          view.setExample(widget);
  958.          }
  959.          onInitializeComplete();
  960.        }
  961.      });
  962.    }
  963. +
  964. +  /**
  965. +   * Send a request for source code.
  966. +   *
  967. +   * @param callback the {@link RequestCallback} to send
  968. +   * @param url the URL to target
  969. +   */
  970. +  private void sendSourceRequest(RequestCallback callback, String url) {
  971. +    RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, GWT.getModuleBaseURL() + url);
  972. +    builder.setCallback(callback);
  973. +    try {
  974. +      builder.send();
  975. +    } catch (RequestException e) {
  976. +      callback.onError(null, e);
  977. +    }
  978. +  }
  979.  }
  980. diff --git a/src/com/google/gwt/sample/showcase/client/Showcase.java b/src/com/google/gwt/sample/showcase/client/Showcase.java
  981. index 190821b..cb2efb3 100644
  982. --- a/src/com/google/gwt/sample/showcase/client/Showcase.java
  983. +++ b/src/com/google/gwt/sample/showcase/client/Showcase.java
  984. @@ -1,12 +1,12 @@
  985.  /*
  986.   * Copyright 2008 Google Inc.
  987. - *
  988. + *
  989.   * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  990.   * use this file except in compliance with the License. You may obtain a copy of
  991.   * the License at
  992. - *
  993. + *
  994.   * http://www.apache.org/licenses/LICENSE-2.0
  995. - *
  996. + *
  997.   * Unless required by applicable law or agreed to in writing, software
  998.   * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  999.   * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  1000. @@ -17,80 +17,31 @@ package com.google.gwt.sample.showcase.client;
  1001.  
  1002.  import com.google.gwt.core.client.EntryPoint;
  1003.  import com.google.gwt.core.client.GWT;
  1004. -import com.google.gwt.dom.client.Element;
  1005. +import com.google.gwt.core.client.prefetch.Prefetcher;
  1006. +import com.google.gwt.dom.client.Document;
  1007.  import com.google.gwt.dom.client.HeadElement;
  1008. -import com.google.gwt.dom.client.Node;
  1009. -import com.google.gwt.dom.client.NodeList;
  1010. -import com.google.gwt.event.dom.client.ChangeEvent;
  1011. -import com.google.gwt.event.dom.client.ChangeHandler;
  1012. -import com.google.gwt.event.dom.client.ClickEvent;
  1013. -import com.google.gwt.event.dom.client.ClickHandler;
  1014. -import com.google.gwt.event.logical.shared.SelectionEvent;
  1015. -import com.google.gwt.event.logical.shared.SelectionHandler;
  1016. +import com.google.gwt.dom.client.LinkElement;
  1017. +import com.google.gwt.event.logical.shared.OpenEvent;
  1018. +import com.google.gwt.event.logical.shared.OpenHandler;
  1019.  import com.google.gwt.event.logical.shared.ValueChangeEvent;
  1020.  import com.google.gwt.event.logical.shared.ValueChangeHandler;
  1021. -import com.google.gwt.http.client.UrlBuilder;
  1022.  import com.google.gwt.i18n.client.LocaleInfo;
  1023. -import com.google.gwt.resources.client.ImageResource;
  1024. -import com.google.gwt.sample.showcase.client.content.i18n.CwConstantsExample;
  1025. -import com.google.gwt.sample.showcase.client.content.i18n.CwConstantsWithLookupExample;
  1026. -import com.google.gwt.sample.showcase.client.content.i18n.CwDateTimeFormat;
  1027. -import com.google.gwt.sample.showcase.client.content.i18n.CwDictionaryExample;
  1028. -import com.google.gwt.sample.showcase.client.content.i18n.CwMessagesExample;
  1029. -import com.google.gwt.sample.showcase.client.content.i18n.CwNumberFormat;
  1030. -import com.google.gwt.sample.showcase.client.content.i18n.CwPluralFormsExample;
  1031. -import com.google.gwt.sample.showcase.client.content.lists.CwListBox;
  1032. -import com.google.gwt.sample.showcase.client.content.lists.CwMenuBar;
  1033. -import com.google.gwt.sample.showcase.client.content.lists.CwStackPanel;
  1034. -import com.google.gwt.sample.showcase.client.content.lists.CwSuggestBox;
  1035. -import com.google.gwt.sample.showcase.client.content.lists.CwTree;
  1036. -import com.google.gwt.sample.showcase.client.content.other.CwAnimation;
  1037. -import com.google.gwt.sample.showcase.client.content.other.CwCookies;
  1038. -import com.google.gwt.sample.showcase.client.content.panels.CwAbsolutePanel;
  1039. -import com.google.gwt.sample.showcase.client.content.panels.CwDecoratorPanel;
  1040. -import com.google.gwt.sample.showcase.client.content.panels.CwDisclosurePanel;
  1041. -import com.google.gwt.sample.showcase.client.content.panels.CwDockPanel;
  1042. -import com.google.gwt.sample.showcase.client.content.panels.CwFlowPanel;
  1043. -import com.google.gwt.sample.showcase.client.content.panels.CwHorizontalPanel;
  1044. -import com.google.gwt.sample.showcase.client.content.panels.CwHorizontalSplitPanel;
  1045. -import com.google.gwt.sample.showcase.client.content.panels.CwTabPanel;
  1046. -import com.google.gwt.sample.showcase.client.content.panels.CwVerticalPanel;
  1047. -import com.google.gwt.sample.showcase.client.content.panels.CwVerticalSplitPanel;
  1048. -import com.google.gwt.sample.showcase.client.content.popups.CwBasicPopup;
  1049. -import com.google.gwt.sample.showcase.client.content.popups.CwDialogBox;
  1050. -import com.google.gwt.sample.showcase.client.content.tables.CwFlexTable;
  1051. -import com.google.gwt.sample.showcase.client.content.tables.CwGrid;
  1052. -import com.google.gwt.sample.showcase.client.content.text.CwBasicText;
  1053. -import com.google.gwt.sample.showcase.client.content.text.CwRichText;
  1054. -import com.google.gwt.sample.showcase.client.content.widgets.CwBasicButton;
  1055. -import com.google.gwt.sample.showcase.client.content.widgets.CwCheckBox;
  1056. -import com.google.gwt.sample.showcase.client.content.widgets.CwCustomButton;
  1057. -import com.google.gwt.sample.showcase.client.content.widgets.CwDatePicker;
  1058. -import com.google.gwt.sample.showcase.client.content.widgets.CwFileUpload;
  1059. -import com.google.gwt.sample.showcase.client.content.widgets.CwHyperlink;
  1060. -import com.google.gwt.sample.showcase.client.content.widgets.CwRadioButton;
  1061. -import com.google.gwt.user.client.Command;
  1062. +import com.google.gwt.safehtml.shared.SafeHtmlBuilder;
  1063. +import com.google.gwt.safehtml.shared.SafeHtmlUtils;
  1064. +import com.google.gwt.sample.showcase.client.MainMenuTreeViewModel.Category;
  1065. +import com.google.gwt.user.cellview.client.CellTree;
  1066. +import com.google.gwt.user.cellview.client.TreeNode;
  1067.  import com.google.gwt.user.client.History;
  1068.  import com.google.gwt.user.client.Window;
  1069. -import com.google.gwt.user.client.Window.Location;
  1070. -import com.google.gwt.user.client.ui.AbstractImagePrototype;
  1071.  import com.google.gwt.user.client.ui.HTML;
  1072. -import com.google.gwt.user.client.ui.HasHorizontalAlignment;
  1073. -import com.google.gwt.user.client.ui.HasVerticalAlignment;
  1074. -import com.google.gwt.user.client.ui.HorizontalPanel;
  1075. -import com.google.gwt.user.client.ui.Image;
  1076. -import com.google.gwt.user.client.ui.ListBox;
  1077. +import com.google.gwt.user.client.ui.RootLayoutPanel;
  1078.  import com.google.gwt.user.client.ui.RootPanel;
  1079. -import com.google.gwt.user.client.ui.TabBar;
  1080. -import com.google.gwt.user.client.ui.ToggleButton;
  1081. -import com.google.gwt.user.client.ui.Tree;
  1082. -import com.google.gwt.user.client.ui.TreeItem;
  1083. -import com.google.gwt.user.client.ui.VerticalPanel;
  1084. +import com.google.gwt.view.client.SelectionChangeEvent;
  1085. +import com.google.gwt.view.client.SingleSelectionModel;
  1086.  
  1087.  import java.util.ArrayList;
  1088. -import java.util.HashMap;
  1089.  import java.util.List;
  1090. -import java.util.Map;
  1091. +import java.util.Set;
  1092.  
  1093.  /**
  1094.   * Entry point classes define <code>onModuleLoad()</code>.
  1095. @@ -104,71 +55,41 @@ public class Showcase implements EntryPoint {
  1096.    }
  1097.  
  1098.    /**
  1099. -   * A special version of the ToggleButton that cannot be clicked if down. If
  1100. -   * one theme button is pressed, all of the others are depressed.
  1101. -   */
  1102. -  private static class ThemeButton extends ToggleButton {
  1103. -    private static List<ThemeButton> allButtons = null;
  1104. -
  1105. -    private String theme;
  1106. -
  1107. -    public ThemeButton(String theme) {
  1108. -      super();
  1109. -      this.theme = theme;
  1110. -      addStyleName("sc-ThemeButton-" + theme);
  1111. -
  1112. -      // Add this button to the static list
  1113. -      if (allButtons == null) {
  1114. -        allButtons = new ArrayList<ThemeButton>();
  1115. -        setDown(true);
  1116. -      }
  1117. -      allButtons.add(this);
  1118. -    }
  1119. -
  1120. -    public String getTheme() {
  1121. -      return theme;
  1122. -    }
  1123. -
  1124. -    @Override
  1125. -    protected void onClick() {
  1126. -      if (!isDown()) {
  1127. -        // Raise all of the other buttons
  1128. -        for (ThemeButton button : allButtons) {
  1129. -          if (button != this) {
  1130. -            button.setDown(false);
  1131. -          }
  1132. -        }
  1133. -
  1134. -        // Fire the click handlers
  1135. -        super.onClick();
  1136. -      }
  1137. -    }
  1138. -  }
  1139. -
  1140. -  /**
  1141.     * The static images used throughout the Showcase.
  1142.     */
  1143. -  public static final ShowcaseImages images = (ShowcaseImages) GWT.create(ShowcaseImages.class);
  1144. +  public static final ShowcaseResources images = GWT.create(
  1145. +      ShowcaseResources.class);
  1146.  
  1147.    /**
  1148. -   * The current style theme.
  1149. +   * The name of the style theme used in showcase.
  1150.     */
  1151. -  static String CUR_THEME = ShowcaseConstants.STYLE_THEMES[0];
  1152. +  public static final String THEME = "clean";
  1153.  
  1154.    /**
  1155. -   * The {@link Application}.
  1156. +   * Get the token for a given content widget.
  1157. +   *
  1158. +   * @return the content widget token.
  1159.     */
  1160. -  private Application app = new Application();
  1161. +  public static String getContentWidgetToken(ContentWidget content) {
  1162. +    return getContentWidgetToken(content.getClass());
  1163. +  }
  1164.  
  1165.    /**
  1166. -   * A mapping of history tokens to their associated menu items.
  1167. +   * Get the token for a given content widget.
  1168. +   *
  1169. +   * @return the content widget token.
  1170.     */
  1171. -  private Map<String, TreeItem> itemTokens = new HashMap<String, TreeItem>();
  1172. +  public static <C extends ContentWidget> String getContentWidgetToken(
  1173. +      Class<C> cwClass) {
  1174. +    String className = cwClass.getName();
  1175. +    className = className.substring(className.lastIndexOf('.') + 1);
  1176. +    return "!" + className;
  1177. +  }
  1178.  
  1179.    /**
  1180. -   * A mapping of menu items to the widget display when the item is selected.
  1181. +   * The main application shell.
  1182.     */
  1183. -  private Map<TreeItem, ContentWidget> itemWidgets = new HashMap<TreeItem, ContentWidget>();
  1184. +  private ShowcaseShell shell;
  1185.  
  1186.    /**
  1187.     * This is the entry point method.
  1188. @@ -177,394 +98,157 @@ public class Showcase implements EntryPoint {
  1189.      // Generate the source code and css for the examples
  1190.      GWT.create(GeneratorInfo.class);
  1191.  
  1192. -    // Create the constants
  1193. -    ShowcaseConstants constants = (ShowcaseConstants) GWT.create(ShowcaseConstants.class);
  1194. +    // Inject global styles.
  1195. +    injectThemeStyleSheet();
  1196. +    images.css().ensureInjected();
  1197. +
  1198. +    // Initialize the constants.
  1199. +    ShowcaseConstants constants = GWT.create(ShowcaseConstants.class);
  1200. +
  1201. +    // Create the application shell.
  1202. +    final SingleSelectionModel<ContentWidget> selectionModel = new SingleSelectionModel<ContentWidget>();
  1203. +    final MainMenuTreeViewModel treeModel = new MainMenuTreeViewModel(
  1204. +        constants, selectionModel);
  1205. +    Set<ContentWidget> contentWidgets = treeModel.getAllContentWidgets();
  1206. +    shell = new ShowcaseShell(treeModel);
  1207. +    RootLayoutPanel.get().add(shell);
  1208. +
  1209. +    // Prefetch examples when opening the Category tree nodes.
  1210. +    final List<Category> prefetched = new ArrayList<Category>();
  1211. +    final CellTree mainMenu = shell.getMainMenu();
  1212. +    mainMenu.addOpenHandler(new OpenHandler<TreeNode>() {
  1213. +      public void onOpen(OpenEvent<TreeNode> event) {
  1214. +        Object value = event.getTarget().getValue();
  1215. +        if (!(value instanceof Category)) {
  1216. +          return;
  1217. +        }
  1218.  
  1219. -    // Swap out the style sheets for the RTL versions if needed.
  1220. -    updateStyleSheets();
  1221. +        Category category = (Category) value;
  1222. +        if (!prefetched.contains(category)) {
  1223. +          prefetched.add(category);
  1224. +          Prefetcher.prefetch(category.getSplitPoints());
  1225. +        }
  1226. +      }
  1227. +    });
  1228.  
  1229. -    // Create the application
  1230. -    setupTitlePanel(constants);
  1231. -    setupMainLinks(constants);
  1232. -    setupOptionsPanel();
  1233. -    setupMainMenu(constants);
  1234. +    // Always prefetch.
  1235. +    Prefetcher.start();
  1236. +
  1237. +    // Change the history token when a main menu item is selected.
  1238. +    selectionModel.addSelectionChangeHandler(
  1239. +        new SelectionChangeEvent.Handler() {
  1240. +          public void onSelectionChange(SelectionChangeEvent event) {
  1241. +            ContentWidget selected = selectionModel.getSelectedObject();
  1242. +            if (selected != null) {
  1243. +              History.newItem(getContentWidgetToken(selected), true);
  1244. +            }
  1245. +          }
  1246. +        });
  1247.  
  1248. -    // Setup a history handler to reselect the associate menu item
  1249. -    final ValueChangeHandler<String> historyHandler = new ValueChangeHandler<String>() {
  1250. +    // Setup a history handler to reselect the associate menu item.
  1251. +    final ValueChangeHandler<String> historyHandler = new ValueChangeHandler<
  1252. +        String>() {
  1253.        public void onValueChange(ValueChangeEvent<String> event) {
  1254. -        TreeItem item = itemTokens.get(event.getValue());
  1255. -        if (item == null) {
  1256. -          item = app.getMainMenu().getItem(0).getChild(0);
  1257. +        // Get the content widget associated with the history token.
  1258. +        ContentWidget contentWidget = treeModel.getContentWidgetForToken(
  1259. +            event.getValue());
  1260. +        if (contentWidget == null) {
  1261. +          return;
  1262. +        }
  1263. +
  1264. +        // Expand the tree node associated with the content.
  1265. +        Category category = treeModel.getCategoryForContentWidget(
  1266. +            contentWidget);
  1267. +        TreeNode node = mainMenu.getRootTreeNode();
  1268. +        int childCount = node.getChildCount();
  1269. +        for (int i = 0; i < childCount; i++) {
  1270. +          if (node.getChildValue(i) == category) {
  1271. +            node.setChildOpen(i, true, true);
  1272. +            break;
  1273. +          }
  1274.          }
  1275.  
  1276. -        // Select the associated TreeItem
  1277. -        app.getMainMenu().setSelectedItem(item, false);
  1278. -        app.getMainMenu().ensureSelectedItemVisible();
  1279. +        // Select the node in the tree.
  1280. +        selectionModel.setSelected(contentWidget, true);
  1281.  
  1282. -        // Show the associated ContentWidget
  1283. -        displayContentWidget(itemWidgets.get(item));
  1284. +        // Display the content widget.
  1285. +        displayContentWidget(contentWidget);
  1286.        }
  1287.      };
  1288.      History.addValueChangeHandler(historyHandler);
  1289.  
  1290. -    // Add a handler that sets the content widget when a menu item is selected
  1291. -    app.addSelectionHandler(new SelectionHandler<TreeItem>() {
  1292. -      public void onSelection(SelectionEvent<TreeItem> event) {
  1293. -        TreeItem item = event.getSelectedItem();
  1294. -        ContentWidget content = itemWidgets.get(item);
  1295. -        if (content != null && !content.equals(app.getContent())) {
  1296. -          History.newItem(getContentWidgetToken(content));
  1297. -        }
  1298. -      }
  1299. -    });
  1300. -
  1301. -    // Show the initial example
  1302. +    // Show the initial example.
  1303.      if (History.getToken().length() > 0) {
  1304.        History.fireCurrentHistoryState();
  1305.      } else {
  1306. -      // Use the first token available
  1307. -      TreeItem firstItem = app.getMainMenu().getItem(0).getChild(0);
  1308. -      app.getMainMenu().setSelectedItem(firstItem, false);
  1309. -      app.getMainMenu().ensureSelectedItemVisible();
  1310. -      displayContentWidget(itemWidgets.get(firstItem));
  1311. +      // Use the first token available.
  1312. +      TreeNode root = mainMenu.getRootTreeNode();
  1313. +      TreeNode category = root.setChildOpen(0, true);
  1314. +      ContentWidget content = (ContentWidget) category.getChildValue(0);
  1315. +      selectionModel.setSelected(content, true);
  1316.      }
  1317. -  }
  1318.  
  1319. -  /**
  1320. -   * Set the content to the {@link ContentWidget}.
  1321. -   *
  1322. -   * @param content the {@link ContentWidget} to display
  1323. -   */
  1324. -  private void displayContentWidget(ContentWidget content) {
  1325. -    if (content != null) {
  1326. -      app.setContent(content);
  1327. -      app.setContentTitle(content.getTabBar());
  1328. -    }
  1329. -  }
  1330. -
  1331. -  /**
  1332. -   * Get the token for a given content widget.
  1333. -   *
  1334. -   * @return the content widget token.
  1335. -   */
  1336. -  private String getContentWidgetToken(ContentWidget content) {
  1337. -    String className = content.getClass().getName();
  1338. -    className = className.substring(className.lastIndexOf('.') + 1);
  1339. -    return className;
  1340. +    // Generate a site map.
  1341. +    createSiteMap(contentWidgets);
  1342.    }
  1343.  
  1344.    /**
  1345. -   * Get the style name of the reference element defined in the current GWT
  1346. -   * theme style sheet.
  1347. +   * Create a hidden site map for crawlability.
  1348.     *
  1349. -   * @param prefix the prefix of the reference style name
  1350. -   * @return the style name
  1351. -   */
  1352. -  private String getCurrentReferenceStyleName(String prefix) {
  1353. -    String gwtRef = prefix + "-Reference-" + CUR_THEME;
  1354. -    if (LocaleInfo.getCurrentLocale().isRTL()) {
  1355. -      gwtRef += "-rtl";
  1356. +   * @param contentWidgets the {@link ContentWidget}s used in Showcase
  1357. +   */
  1358. +  private void createSiteMap(Set<ContentWidget> contentWidgets) {
  1359. +    SafeHtmlBuilder sb = new SafeHtmlBuilder();
  1360. +    for (ContentWidget cw : contentWidgets) {
  1361. +      String token = getContentWidgetToken(cw);
  1362. +      sb.append(SafeHtmlUtils.fromTrustedString("<a href=\"#" + token + "\">"
  1363. +          + token + "</a>"));
  1364.      }
  1365. -    return gwtRef;
  1366. -  }
  1367. -
  1368. -  /**
  1369. -   * Create the main links at the top of the application.
  1370. -   *
  1371. -   * @param constants the constants with text
  1372. -   */
  1373. -  private void setupMainLinks(ShowcaseConstants constants) {
  1374. -    // Link to GWT Homepage
  1375. -    app.addLink(new HTML("<a href=\"" + ShowcaseConstants.GWT_HOMEPAGE + "\">"
  1376. -        + constants.mainLinkHomepage() + "</a>"));
  1377. -
  1378. -    // Link to More Examples
  1379. -    app.addLink(new HTML("<a href=\"" + ShowcaseConstants.GWT_EXAMPLES + "\">"
  1380. -        + constants.mainLinkExamples() + "</a>"));
  1381. -  }
  1382. -
  1383. -  /**
  1384. -   * Setup all of the options in the main menu.
  1385. -   *
  1386. -   * @param constants the constant values to use
  1387. -   */
  1388. -  private void setupMainMenu(ShowcaseConstants constants) {
  1389. -    Tree mainMenu = app.getMainMenu();
  1390. -
  1391. -    // Widgets
  1392. -    TreeItem catWidgets = mainMenu.addItem(constants.categoryWidgets());
  1393. -    setupMainMenuOption(catWidgets, new CwCheckBox(constants),
  1394. -        images.catWidgets());
  1395. -    setupMainMenuOption(catWidgets, new CwRadioButton(constants),
  1396. -        images.catWidgets());
  1397. -    setupMainMenuOption(catWidgets, new CwBasicButton(constants),
  1398. -        images.catWidgets());
  1399. -    setupMainMenuOption(catWidgets, new CwCustomButton(constants),
  1400. -        images.catWidgets());
  1401. -    setupMainMenuOption(catWidgets, new CwFileUpload(constants),
  1402. -        images.catWidgets());
  1403. -    setupMainMenuOption(catWidgets, new CwDatePicker(constants),
  1404. -        images.catWidgets());
  1405. -    setupMainMenuOption(catWidgets, new CwHyperlink(constants),
  1406. -        images.catWidgets());
  1407. -
  1408. -    // Lists
  1409. -    TreeItem catLists = mainMenu.addItem(constants.categoryLists());
  1410. -    setupMainMenuOption(catLists, new CwListBox(constants), images.catLists());
  1411. -    setupMainMenuOption(catLists, new CwSuggestBox(constants),
  1412. -        images.catLists());
  1413. -    setupMainMenuOption(catLists, new CwTree(constants), images.catLists());
  1414. -    setupMainMenuOption(catLists, new CwMenuBar(constants), images.catLists());
  1415. -    setupMainMenuOption(catLists, new CwStackPanel(constants),
  1416. -        images.catLists());
  1417. -
  1418. -    // Text
  1419. -    TreeItem catText = mainMenu.addItem(constants.categoryTextInput());
  1420. -    setupMainMenuOption(catText, new CwBasicText(constants),
  1421. -        images.catTextInput());
  1422. -    setupMainMenuOption(catText, new CwRichText(constants),
  1423. -        images.catTextInput());
  1424. -
  1425. -    // Popups
  1426. -    TreeItem catPopup = mainMenu.addItem(constants.categoryPopups());
  1427. -    setupMainMenuOption(catPopup, new CwBasicPopup(constants),
  1428. -        images.catPopups());
  1429. -    setupMainMenuOption(catPopup, new CwDialogBox(constants),
  1430. -        images.catPopups());
  1431. -
  1432. -    // Panels
  1433. -    TreeItem catPanels = mainMenu.addItem(constants.categoryPanels());
  1434. -    setupMainMenuOption(catPanels, new CwDecoratorPanel(constants),
  1435. -        images.catPanels());
  1436. -    setupMainMenuOption(catPanels, new CwFlowPanel(constants),
  1437. -        images.catPanels());
  1438. -    setupMainMenuOption(catPanels, new CwHorizontalPanel(constants),
  1439. -        images.catPanels());
  1440. -    setupMainMenuOption(catPanels, new CwVerticalPanel(constants),
  1441. -        images.catPanels());
  1442. -    setupMainMenuOption(catPanels, new CwAbsolutePanel(constants),
  1443. -        images.catPanels());
  1444. -    setupMainMenuOption(catPanels, new CwDockPanel(constants),
  1445. -        images.catPanels());
  1446. -    setupMainMenuOption(catPanels, new CwDisclosurePanel(constants),
  1447. -        images.catPanels());
  1448. -    setupMainMenuOption(catPanels, new CwTabPanel(constants),
  1449. -        images.catPanels());
  1450. -    setupMainMenuOption(catPanels, new CwHorizontalSplitPanel(constants),
  1451. -        images.catPanels());
  1452. -    setupMainMenuOption(catPanels, new CwVerticalSplitPanel(constants),
  1453. -        images.catPanels());
  1454. -
  1455. -    // Tables
  1456. -    TreeItem catTables = mainMenu.addItem(constants.categoryTables());
  1457. -    setupMainMenuOption(catTables, new CwGrid(constants), images.catTables());
  1458. -    setupMainMenuOption(catTables, new CwFlexTable(constants),
  1459. -        images.catTables());
  1460. -
  1461. -    // Internationalization
  1462. -    TreeItem catI18N = mainMenu.addItem(constants.categoryI18N());
  1463. -    setupMainMenuOption(catI18N, new CwNumberFormat(constants),
  1464. -        images.catI18N());
  1465. -    setupMainMenuOption(catI18N, new CwDateTimeFormat(constants),
  1466. -        images.catI18N());
  1467. -    setupMainMenuOption(catI18N, new CwMessagesExample(constants),
  1468. -        images.catI18N());
  1469. -    setupMainMenuOption(catI18N, new CwPluralFormsExample(constants),
  1470. -        images.catI18N());
  1471. -    setupMainMenuOption(catI18N, new CwConstantsExample(constants),
  1472. -        images.catI18N());
  1473. -    setupMainMenuOption(catI18N, new CwConstantsWithLookupExample(constants),
  1474. -        images.catI18N());
  1475. -    setupMainMenuOption(catI18N, new CwDictionaryExample(constants),
  1476. -        images.catI18N());
  1477. -
  1478. -    // Other
  1479. -    TreeItem catOther = mainMenu.addItem(constants.categoryOther());
  1480. -    setupMainMenuOption(catOther, new CwAnimation(constants), images.catOther());
  1481. -    setupMainMenuOption(catOther, new CwCookies(constants), images.catOther());
  1482. -  }
  1483. -
  1484. -  /**
  1485. -   * Add an option to the main menu.
  1486. -   *
  1487. -   * @param parent the {@link TreeItem} that is the option
  1488. -   * @param content the {@link ContentWidget} to display when selected
  1489. -   * @param image the icon to display next to the {@link TreeItem}
  1490. -   */
  1491. -  private void setupMainMenuOption(TreeItem parent, ContentWidget content,
  1492. -      ImageResource image) {
  1493. -    // Create the TreeItem
  1494. -    TreeItem option = parent.addItem(AbstractImagePrototype.create(image).getHTML()
  1495. -        + " " + content.getName());
  1496.  
  1497. -    // Map the item to its history token and content widget
  1498. -    itemWidgets.put(option, content);
  1499. -    itemTokens.put(getContentWidgetToken(content), option);
  1500. +    // Add the site map to the page.
  1501. +    HTML siteMap = new HTML(sb.toSafeHtml());
  1502. +    siteMap.setVisible(false);
  1503. +    RootPanel.get().add(siteMap, 0, 0);
  1504.    }
  1505. -
  1506. +  
  1507.    /**
  1508. -   * Create the options that appear next to the title.
  1509. +   * Set the content to the {@link ContentWidget}.
  1510. +   *
  1511. +   * @param content the {@link ContentWidget} to display
  1512.     */
  1513. -  private void setupOptionsPanel() {
  1514. -    VerticalPanel vPanel = new VerticalPanel();
  1515. -    vPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_RIGHT);
  1516. -    if (LocaleInfo.getCurrentLocale().isRTL()) {
  1517. -      vPanel.getElement().setAttribute("align", "left");
  1518. -    } else {
  1519. -      vPanel.getElement().setAttribute("align", "right");
  1520. -    }
  1521. -    app.setOptionsWidget(vPanel);
  1522. -
  1523. -    // Add the option to change the locale
  1524. -    final ListBox localeBox = new ListBox();
  1525. -    String currentLocale = LocaleInfo.getCurrentLocale().getLocaleName();
  1526. -    if (currentLocale.equals("default")) {
  1527. -      currentLocale = "en";
  1528. -    }
  1529. -    String[] localeNames = LocaleInfo.getAvailableLocaleNames();
  1530. -    for (String localeName : localeNames) {
  1531. -      if (!localeName.equals("default")) {
  1532. -        String nativeName = LocaleInfo.getLocaleNativeDisplayName(localeName);
  1533. -        localeBox.addItem(nativeName, localeName);
  1534. -        if (localeName.equals(currentLocale)) {
  1535. -          localeBox.setSelectedIndex(localeBox.getItemCount() - 1);
  1536. -        }
  1537. -      }
  1538. +  private void displayContentWidget(ContentWidget content) {
  1539. +    if (content == null) {
  1540. +      return;
  1541.      }
  1542. -    localeBox.addChangeHandler(new ChangeHandler() {
  1543. -      public void onChange(ChangeEvent event) {
  1544. -        String localeName = localeBox.getValue(localeBox.getSelectedIndex());
  1545. -        UrlBuilder builder = Location.createUrlBuilder().setParameter("locale",
  1546. -            localeName);
  1547. -        Window.Location.replace(builder.buildString());
  1548. -      }
  1549. -    });
  1550. -    HorizontalPanel localeWrapper = new HorizontalPanel();
  1551. -    localeWrapper.add(new Image(images.locale()));
  1552. -    localeWrapper.add(localeBox);
  1553. -    vPanel.add(localeWrapper);
  1554. -
  1555. -    // Add the option to change the style
  1556. -    final HorizontalPanel styleWrapper = new HorizontalPanel();
  1557. -    vPanel.add(styleWrapper);
  1558. -    for (int i = 0; i < ShowcaseConstants.STYLE_THEMES.length; i++) {
  1559. -      final ThemeButton button = new ThemeButton(
  1560. -          ShowcaseConstants.STYLE_THEMES[i]);
  1561. -      styleWrapper.add(button);
  1562. -      button.addClickHandler(new ClickHandler() {
  1563. -        public void onClick(ClickEvent event) {
  1564. -          // Update the current theme
  1565. -          CUR_THEME = button.getTheme();
  1566.  
  1567. -          // Reload the current tab, loading the new theme if necessary
  1568. -          TabBar bar = ((TabBar) app.getContentTitle());
  1569. -          bar.selectTab(bar.getSelectedTab());
  1570. -
  1571. -          // Load the new style sheets
  1572. -          updateStyleSheets();
  1573. -        }
  1574. -      });
  1575. -    }
  1576. +    shell.setContent(content);
  1577. +    Window.setTitle("Showcase of Features: " + content.getName());
  1578.    }
  1579.  
  1580.    /**
  1581. -   * Create the title bar at the top of the application.
  1582. -   *
  1583. -   * @param constants the constant values to use
  1584. +   * Convenience method for getting the document's head element.
  1585. +   *
  1586. +   * @return the document's head element
  1587.     */
  1588. -  private void setupTitlePanel(ShowcaseConstants constants) {
  1589. -    // Get the title from the internationalized constants
  1590. -    String pageTitle = "<h1>" + constants.mainTitle() + "</h1><h2>"
  1591. -        + constants.mainSubTitle() + "</h2>";
  1592. -
  1593. -    // Add the title and some images to the title bar
  1594. -    HorizontalPanel titlePanel = new HorizontalPanel();
  1595. -    titlePanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
  1596. -    titlePanel.add(new Image(images.gwtLogo()));
  1597. -    titlePanel.add(new HTML(pageTitle));
  1598. -    app.setTitleWidget(titlePanel);
  1599. -  }
  1600. +  private native HeadElement getHeadElement() /*-{
  1601. +    return $doc.getElementsByTagName("head")[0];
  1602. +  }-*/;
  1603.  
  1604.    /**
  1605. -   * Update the style sheets to reflect the current theme and direction.
  1606. +   * Inject the GWT theme style sheet based on the RTL direction of the current
  1607. +   * locale.
  1608.     */
  1609. -  private void updateStyleSheets() {
  1610. -    // Generate the names of the style sheets to include
  1611. -    String gwtStyleSheet = "gwt/" + CUR_THEME + "/" + CUR_THEME + ".css";
  1612. -    String showcaseStyleSheet = CUR_THEME + "/Showcase.css";
  1613. -    if (LocaleInfo.getCurrentLocale().isRTL()) {
  1614. -      gwtStyleSheet = gwtStyleSheet.replace(".css", "_rtl.css");
  1615. -      showcaseStyleSheet = showcaseStyleSheet.replace(".css", "_rtl.css");
  1616. -    }
  1617. -
  1618. -    // Find existing style sheets that need to be removed
  1619. -    boolean styleSheetsFound = false;
  1620. -    final HeadElement headElem = StyleSheetLoader.getHeadElement();
  1621. -    final List<Element> toRemove = new ArrayList<Element>();
  1622. -    NodeList<Node> children = headElem.getChildNodes();
  1623. -    for (int i = 0; i < children.getLength(); i++) {
  1624. -      Node node = children.getItem(i);
  1625. -      if (node.getNodeType() == Node.ELEMENT_NODE) {
  1626. -        Element elem = Element.as(node);
  1627. -        if (elem.getTagName().equalsIgnoreCase("link")
  1628. -            && elem.getPropertyString("rel").equalsIgnoreCase("stylesheet")) {
  1629. -          styleSheetsFound = true;
  1630. -          String href = elem.getPropertyString("href");
  1631. -          // If the correct style sheets are already loaded, then we should have
  1632. -          // nothing to remove.
  1633. -          if (!href.contains(gwtStyleSheet)
  1634. -              && !href.contains(showcaseStyleSheet)) {
  1635. -            toRemove.add(elem);
  1636. -          }
  1637. -        }
  1638. -      }
  1639. -    }
  1640. -
  1641. -    // Return if we already have the correct style sheets
  1642. -    if (styleSheetsFound && toRemove.size() == 0) {
  1643. -      return;
  1644. -    }
  1645. -
  1646. -    // Detach the app while we manipulate the styles to avoid rendering issues
  1647. -    RootPanel.get().remove(app);
  1648. -
  1649. -    // Remove the old style sheets
  1650. -    for (Element elem : toRemove) {
  1651. -      headElem.removeChild(elem);
  1652. -    }
  1653. +  private void injectThemeStyleSheet() {
  1654. +    // Choose the name style sheet based on the locale.
  1655. +    String styleSheet = "gwt/" + THEME + "/" + THEME;
  1656. +    styleSheet += LocaleInfo.getCurrentLocale().isRTL() ? "_rtl.css" : ".css";
  1657.  
  1658.      // Load the GWT theme style sheet
  1659.      String modulePath = GWT.getModuleBaseURL();
  1660. -    Command callback = new Command() {
  1661. -      /**
  1662. -       * The number of style sheets that have been loaded and executed this
  1663. -       * command.
  1664. -       */
  1665. -      private int numStyleSheetsLoaded = 0;
  1666. -
  1667. -      public void execute() {
  1668. -        // Wait until all style sheets have loaded before re-attaching the app
  1669. -        numStyleSheetsLoaded++;
  1670. -        if (numStyleSheetsLoaded < 2) {
  1671. -          return;
  1672. -        }
  1673. -
  1674. -        // Different themes use different background colors for the body
  1675. -        // element, but IE only changes the background of the visible content
  1676. -        // on the page instead of changing the background color of the entire
  1677. -        // page. By changing the display style on the body element, we force
  1678. -        // IE to redraw the background correctly.
  1679. -        RootPanel.getBodyElement().getStyle().setProperty("display", "none");
  1680. -        RootPanel.getBodyElement().getStyle().setProperty("display", "");
  1681. -        RootPanel.get().add(app);
  1682. -      }
  1683. -    };
  1684. -    StyleSheetLoader.loadStyleSheet(modulePath + gwtStyleSheet,
  1685. -        getCurrentReferenceStyleName("gwt"), callback);
  1686. -
  1687. -    // Load the showcase specific style sheet after the GWT theme style sheet so
  1688. -    // that custom styles supercede the theme styles.
  1689. -    StyleSheetLoader.loadStyleSheet(modulePath + showcaseStyleSheet,
  1690. -        getCurrentReferenceStyleName("Application"), callback);
  1691. +    LinkElement linkElem = Document.get().createLinkElement();
  1692. +    linkElem.setRel("stylesheet");
  1693. +    linkElem.setType("text/css");
  1694. +    linkElem.setHref(modulePath + styleSheet);
  1695. +    getHeadElement().appendChild(linkElem);
  1696.    }
  1697.  }
  1698. diff --git a/src/com/google/gwt/sample/showcase/client/ShowcaseConstants.java b/src/com/google/gwt/sample/showcase/client/ShowcaseConstants.java
  1699. index e30e5fe..f676456 100644
  1700. --- a/src/com/google/gwt/sample/showcase/client/ShowcaseConstants.java
  1701. +++ b/src/com/google/gwt/sample/showcase/client/ShowcaseConstants.java
  1702. @@ -15,7 +15,17 @@
  1703.   */
  1704.  package com.google.gwt.sample.showcase.client;
  1705.  
  1706. -import com.google.gwt.i18n.client.Constants;
  1707. +import com.google.gwt.sample.showcase.client.MainMenuTreeViewModel.MenuConstants;
  1708. +import com.google.gwt.sample.showcase.client.content.cell.CwCellBrowser;
  1709. +import com.google.gwt.sample.showcase.client.content.cell.CwCellList;
  1710. +import com.google.gwt.sample.showcase.client.content.cell.CwCellSampler;
  1711. +import com.google.gwt.sample.showcase.client.content.cell.CwCellTable;
  1712. +import com.google.gwt.sample.showcase.client.content.cell.CwCellTree;
  1713. +import com.google.gwt.sample.showcase.client.content.cell.CwCellValidation;
  1714. +import com.google.gwt.sample.showcase.client.content.cell.CwCustomDataGrid;
  1715. +import com.google.gwt.sample.showcase.client.content.cell.CwDataGrid;
  1716. +import com.google.gwt.sample.showcase.client.content.i18n.CwBidiFormatting;
  1717. +import com.google.gwt.sample.showcase.client.content.i18n.CwBidiInput;
  1718.  import com.google.gwt.sample.showcase.client.content.i18n.CwConstantsExample;
  1719.  import com.google.gwt.sample.showcase.client.content.i18n.CwConstantsWithLookupExample;
  1720.  import com.google.gwt.sample.showcase.client.content.i18n.CwDateTimeFormat;
  1721. @@ -25,6 +35,7 @@ import com.google.gwt.sample.showcase.client.content.i18n.CwNumberFormat;
  1722.  import com.google.gwt.sample.showcase.client.content.i18n.CwPluralFormsExample;
  1723.  import com.google.gwt.sample.showcase.client.content.lists.CwListBox;
  1724.  import com.google.gwt.sample.showcase.client.content.lists.CwMenuBar;
  1725. +import com.google.gwt.sample.showcase.client.content.lists.CwStackLayoutPanel;
  1726.  import com.google.gwt.sample.showcase.client.content.lists.CwStackPanel;
  1727.  import com.google.gwt.sample.showcase.client.content.lists.CwSuggestBox;
  1728.  import com.google.gwt.sample.showcase.client.content.lists.CwTree;
  1729. @@ -37,10 +48,9 @@ import com.google.gwt.sample.showcase.client.content.panels.CwDisclosurePanel;
  1730.  import com.google.gwt.sample.showcase.client.content.panels.CwDockPanel;
  1731.  import com.google.gwt.sample.showcase.client.content.panels.CwFlowPanel;
  1732.  import com.google.gwt.sample.showcase.client.content.panels.CwHorizontalPanel;
  1733. -import com.google.gwt.sample.showcase.client.content.panels.CwHorizontalSplitPanel;
  1734. -import com.google.gwt.sample.showcase.client.content.panels.CwTabPanel;
  1735. +import com.google.gwt.sample.showcase.client.content.panels.CwSplitLayoutPanel;
  1736. +import com.google.gwt.sample.showcase.client.content.panels.CwTabLayoutPanel;
  1737.  import com.google.gwt.sample.showcase.client.content.panels.CwVerticalPanel;
  1738. -import com.google.gwt.sample.showcase.client.content.panels.CwVerticalSplitPanel;
  1739.  import com.google.gwt.sample.showcase.client.content.popups.CwBasicPopup;
  1740.  import com.google.gwt.sample.showcase.client.content.popups.CwDialogBox;
  1741.  import com.google.gwt.sample.showcase.client.content.tables.CwFlexTable;
  1742. @@ -58,25 +68,23 @@ import com.google.gwt.sample.showcase.client.content.widgets.CwRadioButton;
  1743.  /**
  1744.   * Constants used throughout the showcase.
  1745.   */
  1746. -public interface ShowcaseConstants extends Constants,
  1747. -    ContentWidget.CwConstants, CwCheckBox.CwConstants,
  1748. -    CwRadioButton.CwConstants, CwBasicButton.CwConstants,
  1749. -    CwCustomButton.CwConstants, CwListBox.CwConstants,
  1750. -    CwSuggestBox.CwConstants, CwTree.CwConstants, CwMenuBar.CwConstants,
  1751. -    CwFlowPanel.CwConstants, CwDisclosurePanel.CwConstants,
  1752. -    CwTabPanel.CwConstants, CwDockPanel.CwConstants,
  1753. -    CwHorizontalPanel.CwConstants, CwHorizontalSplitPanel.CwConstants,
  1754. -    CwVerticalPanel.CwConstants, CwVerticalSplitPanel.CwConstants,
  1755. -    CwBasicPopup.CwConstants, CwDialogBox.CwConstants, CwGrid.CwConstants,
  1756. -    CwFlexTable.CwConstants, CwBasicText.CwConstants, CwRichText.CwConstants,
  1757. -    CwFileUpload.CwConstants, CwAbsolutePanel.CwConstants,
  1758. -    CwHyperlink.CwConstants, CwFrame.CwConstants, CwStackPanel.CwConstants,
  1759. -    CwCookies.CwConstants, CwNumberFormat.CwConstants,
  1760. -    CwDateTimeFormat.CwConstants, CwMessagesExample.CwConstants,
  1761. -    CwConstantsExample.CwConstants, CwConstantsWithLookupExample.CwConstants,
  1762. -    CwDictionaryExample.CwConstants, CwDecoratorPanel.CwConstants,
  1763. -    CwAnimation.CwConstants, CwDatePicker.CwConstants,
  1764. -    CwPluralFormsExample.CwConstants {
  1765. +public interface ShowcaseConstants extends MenuConstants, CwCheckBox.CwConstants,
  1766. +    CwRadioButton.CwConstants, CwBasicButton.CwConstants, CwCustomButton.CwConstants,
  1767. +    CwListBox.CwConstants, CwSuggestBox.CwConstants, CwTree.CwConstants, CwMenuBar.CwConstants,
  1768. +    CwFlowPanel.CwConstants, CwDisclosurePanel.CwConstants, CwTabLayoutPanel.CwConstants,
  1769. +    CwDockPanel.CwConstants, CwHorizontalPanel.CwConstants, CwVerticalPanel.CwConstants,
  1770. +    CwBasicPopup.CwConstants, CwDialogBox.CwConstants, CwGrid.CwConstants, CwFlexTable.CwConstants,
  1771. +    CwBasicText.CwConstants, CwRichText.CwConstants, CwFileUpload.CwConstants,
  1772. +    CwAbsolutePanel.CwConstants, CwHyperlink.CwConstants, CwFrame.CwConstants,
  1773. +    CwStackPanel.CwConstants, CwCookies.CwConstants, CwNumberFormat.CwConstants,
  1774. +    CwBidiInput.CwConstants, CwBidiFormatting.CwConstants, CwDateTimeFormat.CwConstants,
  1775. +    CwMessagesExample.CwConstants, CwConstantsExample.CwConstants,
  1776. +    CwConstantsWithLookupExample.CwConstants, CwDictionaryExample.CwConstants,
  1777. +    CwDecoratorPanel.CwConstants, CwAnimation.CwConstants, CwDatePicker.CwConstants,
  1778. +    CwPluralFormsExample.CwConstants, CwCellList.CwConstants, CwCellTable.CwConstants,
  1779. +    CwDataGrid.CwConstants, CwCellTree.CwConstants, CwCellBrowser.CwConstants,
  1780. +    CwCellValidation.CwConstants, CwCellSampler.CwConstants, CwSplitLayoutPanel.CwConstants,
  1781. +    CwStackLayoutPanel.CwConstants, CwCustomDataGrid.CwConstants  {
  1782.  
  1783.    /**
  1784.     * The path to source code for examples, raw files, and style definitions.
  1785. @@ -97,60 +105,4 @@ public interface ShowcaseConstants extends Constants,
  1786.     * The destination folder for parsed CSS styles used in Showcase examples.
  1787.     */
  1788.    String DST_SOURCE_STYLE = DST_SOURCE + "css/";
  1789. -
  1790. -  /**
  1791. -   * Link to GWT homepage.
  1792. -   */
  1793. -  String GWT_HOMEPAGE = "http://code.google.com/webtoolkit/";
  1794. -
  1795. -  /**
  1796. -   * Link to GWT examples page.
  1797. -   */
  1798. -  String GWT_EXAMPLES = GWT_HOMEPAGE + "examples/";
  1799. -
  1800. -  /**
  1801. -   * The available style themes that the user can select.
  1802. -   */
  1803. -  String[] STYLE_THEMES = {"standard", "chrome", "dark"};
  1804. -
  1805. -  String categoryI18N();
  1806. -
  1807. -  String categoryLists();
  1808. -
  1809. -  String categoryOther();
  1810. -
  1811. -  String categoryPanels();
  1812. -
  1813. -  String categoryPopups();
  1814. -
  1815. -  String categoryTables();
  1816. -
  1817. -  String categoryTextInput();
  1818. -
  1819. -  String categoryWidgets();
  1820. -
  1821. -  /**
  1822. -   * @return text for the link to more examples
  1823. -   */
  1824. -  String mainLinkExamples();
  1825. -
  1826. -  /**
  1827. -   * @return text for the link to the GWT homepage
  1828. -   */
  1829. -  String mainLinkHomepage();
  1830. -
  1831. -  /**
  1832. -   * @return the title of the main menu
  1833. -   */
  1834. -  String mainMenuTitle();
  1835. -
  1836. -  /**
  1837. -   * @return the sub title of the application
  1838. -   */
  1839. -  String mainSubTitle();
  1840. -
  1841. -  /**
  1842. -   * @return the title of the application
  1843. -   */
  1844. -  String mainTitle();
  1845.  }
  1846. diff --git a/src/com/google/gwt/sample/showcase/client/ShowcaseConstants.properties b/src/com/google/gwt/sample/showcase/client/ShowcaseConstants.properties
  1847. deleted file mode 100644
  1848. index 8428646..0000000
  1849. --- a/src/com/google/gwt/sample/showcase/client/ShowcaseConstants.properties
  1850. +++ /dev/null
  1851. @@ -1,241 +0,0 @@
  1852. -mainMenuTitle = GWT Examples
  1853. -mainSubTitle = Showcase of Features
  1854. -mainTitle = Google Web Toolkit
  1855. -mainLinkHomepage = GWT Homepage
  1856. -mainLinkExamples = More Examples
  1857. -
  1858. -categoryI18N = Internationalization
  1859. -categoryLists = Lists and Menus
  1860. -categoryOther = Other Features
  1861. -categoryPanels = Panels
  1862. -categoryPopups = Popups
  1863. -categoryTables = Tables
  1864. -categoryTextInput = Text Input
  1865. -categoryWidgets = Widgets
  1866. -
  1867. -contentWidgetExample = Example
  1868. -contentWidgetSource = Source Code
  1869. -contentWidgetStyle = CSS Style
  1870. -
  1871. -cwAbsolutePanelName = Absolute Panel
  1872. -cwAbsolutePanelDescription = An absolute panel positions all of its children absolutely, allowing them to overlap.
  1873. -cwAbsolutePanelClickMe = Click Me!
  1874. -cwAbsolutePanelHelloWorld = Hello World
  1875. -cwAbsolutePanelLeft = <b>Left:</b>
  1876. -cwAbsolutePanelItemsToMove = <b>Items to move:</b>
  1877. -cwAbsolutePanelTop = <b>Top:</b>
  1878. -cwAbsolutePanelWidgetNames = Hello World, Button, Grid
  1879. -cwAnimationName = Animations
  1880. -cwAnimationDescription = Animate your application with timed effects.
  1881. -cwAnimationStart = Start
  1882. -cwAnimationCancel = Cancel
  1883. -cwAnimationOptions = Animation Options
  1884. -cwBasicButtonName = Basic Button
  1885. -cwBasicButtonDescription = Basic button widgets
  1886. -cwBasicButtonClickMessage = Stop poking me!
  1887. -cwBasicButtonDisabled = Disabled Button
  1888. -cwBasicButtonNormal = Normal Button
  1889. -cwBasicPopupName = Basic Popup
  1890. -cwBasicPopupDescription = GWT provides the framework to create a custom popup.
  1891. -cwBasicPopupClickOutsideInstructions = Click anywhere outside this popup to make it disappear.
  1892. -cwBasicPopupInstructions = <b>Click an image to see full size:</b>
  1893. -cwBasicPopupShowButton = Show Basic Popup
  1894. -cwBasicTextName = Basic Text
  1895. -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.
  1896. -cwBasicTextAreaLabel = <b>Text area:</b>
  1897. -cwBasicTextNormalLabel = <b>Normal text box:</b>
  1898. -cwBasicTextPasswordLabel = <b>Password text box:</b>
  1899. -cwBasicTextReadOnly = read only
  1900. -cwBasicTextSelected = Selected
  1901. -cwCheckBoxName = Checkbox
  1902. -cwCheckBoxDescription = Basic Checkbox Widgets
  1903. -cwCheckBoxCheckAll = <b>Check all days that you are available:</b>
  1904. -cwCheckBoxDays = Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday
  1905. -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.
  1906. -cwConstantsExampleName = Constants
  1907. -cwConstantsExampleLinkText = This example interacts with the sample interface:
  1908. -cwConstantsWithLookupExampleDescription = Interface ConstantsWithLookup makes it possible to dynamically look up localized values using method names as string keys.
  1909. -cwConstantsWithLookupExampleLinkText = This example interacts with the sample interface:
  1910. -cwConstantsWithLookupExampleMethodName = <b>Name of method:</b>
  1911. -cwConstantsWithLookupExampleName = Constants With Lookup
  1912. -cwConstantsWithLookupExampleResults = <b>Lookup results:</b>
  1913. -cwConstantsWithLookupExampleNoInput = <Please enter a method name above>
  1914. -cwConstantsWithLookupExampleNoMatches = <Not found>
  1915. -cwCookiesName = Cookies
  1916. -cwCookiesDescription = Track users with ease and save data on the client side using cookies.
  1917. -cwCookiesDeleteCookie = Delete
  1918. -cwCookiesExistingLabel = <b>Existing Cookies:</b>
  1919. -cwCookiesInvalidCookie = You must specify a cookie name
  1920. -cwCookiesNameLabel = <b>Name:</b>
  1921. -cwCookiesSetCookie = Set Cookie
  1922. -cwCookiesValueLabel = <b>Value:</b>
  1923. -cwCustomButtonName = Custom Button
  1924. -cwCustomButtonDescription = PushButtons and ToggleButtons allow you to customize the look of your buttons
  1925. -cwCustomButtonPush = <b>Push Buttons:</b>
  1926. -cwCustomButtonToggle = <b>Toggle Buttons:</b>
  1927. -cwDatePickerName = Date Picker
  1928. -cwDatePickerDescription = Let users select a date using the DatePicker.
  1929. -cwDatePickerBoxLabel = <br><br><br><b>DateBox with popup DatePicker:</b>
  1930. -cwDatePickerLabel = <b>Permanent DatePicker:</b>
  1931. -cwDateTimeFormatName = Date Time Format
  1932. -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.
  1933. -cwDateTimeFormatFailedToParseInput = Unable to parse input
  1934. -cwDateTimeFormatFormattedLabel = <b>Formatted value:</b>
  1935. -cwDateTimeFormatInvalidPattern = Invalid pattern
  1936. -cwDateTimeFormatPatternLabel = <b>Pattern:</b>
  1937. -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
  1938. -cwDateTimeFormatValueLabel = <b>Value to format:</b>
  1939. -cwDecoratorPanelFormDescription = Description:
  1940. -cwDecoratorPanelFormName = Name:
  1941. -cwDecoratorPanelFormTitle = Enter Search Criteria
  1942. -cwDecoratorPanelName = Decorator Panel
  1943. -cwDecoratorPanelDescription = Add rounded corners to any Widget using the Decorator Panel.
  1944. -cwDialogBoxName = Dialog Box
  1945. -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.
  1946. -cwDialogBoxMakeTransparent = Make Translucent
  1947. -cwDialogBoxCaption = Sample DialogBox
  1948. -cwDialogBoxClose = Close
  1949. -cwDialogBoxDetails = This is an example of a standard dialog box component.
  1950. -cwDialogBoxItem = item
  1951. -cwDialogBoxListBoxInfo = This list box demonstrates that you can drag the popup over it. This obscure corner case renders incorrectly for many other libraries.
  1952. -cwDialogBoxShowButton = Show Dialog Box
  1953. -cwDictionaryExampleName = Dictionary
  1954. -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.
  1955. -cwDictionaryExampleLinkText = <b>This example interacts with the following JavaScript variable:</b>
  1956. -cwDisclosurePanelName = Disclosure Panel
  1957. -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.
  1958. -cwDisclosurePanelFormAdvancedCriteria = Advanced Criteria
  1959. -cwDisclosurePanelFormDescription = Description:
  1960. -cwDisclosurePanelFormGender = Gender:
  1961. -cwDisclosurePanelFormGenderOptions = male, female
  1962. -cwDisclosurePanelFormLocation = Location:
  1963. -cwDisclosurePanelFormName = Name:
  1964. -cwDisclosurePanelFormTitle = <b>Enter Search Criteria</b>
  1965. -cwDockPanelName = Dock Panel
  1966. -cwDockPanelDescription = A Dock Panel aligns its content using compass directions.
  1967. -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!
  1968. -cwDockPanelEast = This is the east component
  1969. -cwDockPanelNorth1 = This is the first north component
  1970. -cwDockPanelNorth2 = This is the second north component
  1971. -cwDockPanelSouth1 = This is the first south component
  1972. -cwDockPanelSouth2 = This is the second south component
  1973. -cwDockPanelWest = This is the west component
  1974. -cwFileUploadName = File Upload
  1975. -cwFileUploadDescription = Upload files asynchronously using AJAX file uploads.
  1976. -cwFileUploadNoFileError = You must select a file to upload
  1977. -cwFileUploadSelectFile = <b>Select a file:</b>
  1978. -cwFileUploadSuccessful = File uploaded!
  1979. -cwFileUploadButton = Upload File
  1980. -cwFlexTableName = Flex Table
  1981. -cwFlexTableDescription = The Flex Table supports row spans and column spans, allowing you to layout data in a variety of ways.
  1982. -cwFlexTableAddRow = Add a row
  1983. -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.
  1984. -cwFlexTableRemoveRow = Remove a row
  1985. -cwFlowPanelName = Flow Panel
  1986. -cwFlowPanelDescription = A Flow Panel lets its content flow naturally.
  1987. -cwFlowPanelItem = Item
  1988. -cwFrameName = Frames
  1989. -cwFrameDescription = Embed content from other sites into your page using the Frame, a wrapper around an IFRAME element.
  1990. -cwFrameSetLocation = Set Location
  1991. -cwGridName = Grid
  1992. -cwGridDescription = A simple grid
  1993. -cwHorizontalPanelName = Horizontal Panel
  1994. -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.
  1995. -cwHorizontalPanelButton = Button
  1996. -cwHorizontalSplitPanelName = Horizontal Split Panel
  1997. -cwHorizontalSplitPanelDescription = Give users the freedom to decide how to allocate space using this split panel.
  1998. -cwHorizontalSplitPanelText = This is some text to show how the contents on either side of the splitter flow.
  1999. -cwHyperlinkName = Hyperlink
  2000. -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.
  2001. -cwHyperlinkChoose = <b>Choose a section:</b>
  2002. -cwListBoxName = List Box
  2003. -cwListBoxDescription = Built-in selection box and drop down lists
  2004. -cwListBoxCars = compact, sedan, coupe, convertible, SUV, truck
  2005. -cwListBoxCategories = Cars, Sports, Vacation Spots
  2006. -cwListBoxSelectAll = <b>Select all that apply:</b>
  2007. -cwListBoxSelectCategory = <b>Select a category:</b>
  2008. -cwListBoxSports = Baseball, Basketball, Football, Hockey, Lacrosse, Polo, Soccer, Softball, Water Polo
  2009. -cwListBoxVacations = Carribean, Grand Canyon, Paris, Italy, New York, Las Vegas
  2010. -cwMenuBarName = Menu Bar
  2011. -cwMenuBarDescription = The Menu Bar can be used to navigate through many options.  It also supports nested sub menus.
  2012. -cwMenuBarEditCategory = Edit
  2013. -cwMenuBarEditOptions = Undo, Redo, Cut, Copy, Paste
  2014. -cwMenuBarFileCategory = File
  2015. -cwMenuBarFileOptions = New, Open, Close, Recent, Exit
  2016. -cwMenuBarFileRecents = Fishing in the desert.txt, How to tame a wild parrot, Idiots Guide to Emu Farms
  2017. -cwMenuBarGWTOptions = Download, Examples, Source Code, GWT wit' the program
  2018. -cwMenuBarHelpCategory = Help
  2019. -cwMenuBarHelpOptions = Contents, Fortune Cookie, About GWT
  2020. -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
  2021. -cwMessagesExampleName = Messages
  2022. -cwMessagesExampleDescription = Interface Messages provides a way to create strongly-typed parameterized messages that are checked for correctness during compilation.
  2023. -cwMessagesExampleArg0Label = <b>Argument {0}:</b>
  2024. -cwMessagesExampleArg1Label = <b>Argument {1}:</b>
  2025. -cwMessagesExampleArg2Label = <b>Argument {2}:</b>
  2026. -cwMessagesExampleFormattedLabel = <b>Formatted message:</b>
  2027. -cwMessagesExampleLinkText = This example interacts with the sample interface:
  2028. -cwMessagesExampleTemplateLabel = <b>Message template:</b>
  2029. -cwNumberFormatName = Number Format
  2030. -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.
  2031. -cwNumberFormatFailedToParseInput = Unable to parse input
  2032. -cwNumberFormatFormattedLabel = <b>Formatted value:</b>
  2033. -cwNumberFormatInvalidPattern = Invalid pattern
  2034. -cwNumberFormatPatternLabel = <b>Pattern:</b>
  2035. -cwNumberFormatPatterns = Decimal, Currency, Scientific, Percent, Custom
  2036. -cwNumberFormatValueLabel = <b>Value to format:</b>
  2037. -cwPluralFormsExampleName = Plural Forms
  2038. -cwPluralFormsExampleDescription = Plural Forms provide a way to create message translations that depend on the count of something.
  2039. -cwPluralFormsExampleArg0Label = <b>Argument {0}:</b>
  2040. -cwPluralFormsExampleFormattedLabel = <b>Formatted message:</b>
  2041. -cwPluralFormsExampleLinkText = This example interacts with the sample interface:
  2042. -cwRadioButtonName = Radio Button
  2043. -cwRadioButtonDescription = Basic RadioButton Widget
  2044. -cwRadioButtonColors = blue, red, yellow, green
  2045. -cwRadioButtonSelectColor = <b>Select your favorite color:</b>
  2046. -cwRadioButtonSelectSport = <b>Select your favorite sport:</b>
  2047. -cwRadioButtonSports = Baseball, Basketball, Football, Hockey, Soccer, Water Polo
  2048. -cwRichTextName = Rich Text
  2049. -cwRichTextDescription = The Rich Text Area is supported on all major browsers, and will fall back gracefully to the level of functionality supported on each.
  2050. -cwStackPanelName = Stack Panel
  2051. -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.
  2052. -cwStackPanelContactsHeader = Contacts
  2053. -cwStackPanelContacts = Benoit Mandelbrot, Albert Einstein, Rene Descartes, Bob Saget, Ludwig von Beethoven, Richard Feynman, Alan Turing, John von Neumann
  2054. -cwStackPanelContactsEmails = benoit@example.com, albert@example.com, rene@example.com, bob@example.com, ludwig@example.com, richard@example.com, alan@example.com, john@example.com
  2055. -cwStackPanelMailHeader = Mail
  2056. -cwStackPanelMailFolders = Inbox, Drafts, Templates, Sent, Trash
  2057. -cwStackPanelFiltersHeader = Filters
  2058. -cwStackPanelFilters = All, Starred, Read, Unread, Recent, Sent by me
  2059. -cwSuggestBoxName = Suggest Box
  2060. -cwSuggestBoxDescription = Generate suggestions via RPC calls to the server or static data on the page
  2061. -cwSuggestBoxLabel = <b>Choose a word:</b>
  2062. -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
  2063. -cwTabPanelName = Tab Panel
  2064. -cwTabPanelDescription = Divide content over multiple tabs.
  2065. -cwTabPanelTab0 = Click one of the tabs to see more content.
  2066. -cwTabPanelTab2 = Tabs are highly customizable using CSS.
  2067. -cwTabPanelTabs = Home, GWT Logo, More Info
  2068. -cwTreeName = Tree
  2069. -cwTreeDescription = Dynamic Tree Widget supports lazy loading of data via RPC calls to the server
  2070. -cwTreeDynamicLabel = <b>Dynamic Tree:</b>
  2071. -cwTreeItem = Item
  2072. -cwTreeStaticLabel = <b>Static Tree:</b>
  2073. -cwTreeComposers = Beethoven, Brahms, Mozart
  2074. -cwTreeConcertos = Concertos
  2075. -cwTreeQuartets = Quartets
  2076. -cwTreeSonatas = Sonatas
  2077. -cwTreeSymphonies = Symphonies
  2078. -cwTreeBeethovenWorkConcertos = No. 1 - C, No. 2 - B-Flat Major, No. 3 - C Minor, No. 4 - G Major, No. 5 - E-Flat Major
  2079. -cwTreeBeethovenWorkQuartets = Six String Quartets, Three String Quartets, Grosse Fugue for String Quartets
  2080. -cwTreeBeethovenWorkSonatas = Sonata in A Minor, Sonata in F Major
  2081. -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
  2082. -cwTreeBrahmsWorkConcertos = Violin Concerto, Double Concerto - A Minor, Piano Concerto No. 1 - D Minor, Piano Concerto No. 2 - B-Flat Major
  2083. -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
  2084. -cwTreeBrahmsWorkSonatas = Two Sonatas for Clarinet - F Minor, Two Sonatas for Clarinet - E-Flat Major
  2085. -cwTreeBrahmsWorkSymphonies = No. 1 - C Minor, No. 2 - D Minor, No. 3 - F Major, No. 4 - E Minor
  2086. -cwTreeMozartWorkConcertos = Piano Concerto No. 12, Piano Concerto No. 17, Clarinet Concerto, Violin Concerto No. 5, Violin Concerto No. 4
  2087. -cwVerticalPanelName = Vertical Panel
  2088. -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.
  2089. -cwVerticalPanelButton = Button
  2090. -cwVerticalSplitPanelName = Vertical Split Panel
  2091. -cwVerticalSplitPanelDescription = Give users the freedom to decide how to allocate space using this split panel.
  2092. -cwVerticalSplitPanelText = This is some text to show how the contents on either side of the splitter flow.
  2093. diff --git a/src/com/google/gwt/sample/showcase/client/ShowcaseConstants_ar.properties b/src/com/google/gwt/sample/showcase/client/ShowcaseConstants_ar.properties
  2094. deleted file mode 100644
  2095. index 94b42c0..0000000
  2096. --- a/src/com/google/gwt/sample/showcase/client/ShowcaseConstants_ar.properties
  2097. +++ /dev/null
  2098. @@ -1,245 +0,0 @@
  2099. -mainMenuTitle = امثلة GWT
  2100. -mainSubTitle = عرض المزايا
  2101. -mainTitle = ادوات غوغل للويب
  2102. -mainLinkHomepage = صفحة GWT الرئيسية
  2103. -mainLinkExamples = المزيد من الامثله
  2104. -
  2105. -categoryI18N = التدويل
  2106. -categoryLists = القوائم واللوائح
  2107. -categoryOther = مزايا اخرى
  2108. -categoryPanels = الواح
  2109. -categoryPopups =  ÿߟџܟàÿߟÅÿ∞ ÿߟџ֟Üÿ®ÿ´ŸÇÿ©
  2110. -categoryTables = الجداول
  2111. -categoryTextInput = ادخال النص
  2112. -categoryWidgets = ŸàÿØÿ¨ÿßÿ™
  2113. -
  2114. -contentWidgetExample = مثال
  2115. -contentWidgetSource = شفره المصدر
  2116. -contentWidgetStyle = اسلوب CSS
  2117. -
  2118. -cwAbsolutePanelName = اللوح المطلق
  2119. -cwAbsolutePanelDescription = اللوح المطلق يوزع محتوياته بشكل مطلق مما يتيح لهم التداخل
  2120. -cwAbsolutePanelClickMe = انقر هنا!
  2121. -cwAbsolutePanelHelloWorld = اهلا بالعالم
  2122. -cwAbsolutePanelLeft = <b>اليسار:</b>
  2123. -cwAbsolutePanelItemsToMove = <b>العناصر التي ستنقل:</b>
  2124. -cwAbsolutePanelTop = <b>عليا:</b>
  2125. -cwAbsolutePanelWidgetNames = اهلا بالعالم, زر, شبكة
  2126. -cwBasicButtonName = زر اساسي
  2127. -cwBasicButtonDescription = ودجات الزر الاساسي
  2128. -cwBasicButtonClickMessage = توقف عن وكزي!
  2129. -cwBasicButtonDisabled = زر المعوقين
  2130. -cwBasicButtonNormal = ÿ≤ÿ± ÿπÿßÿØŸä
  2131. -cwBasicPopupName = نافذة منبثقة اساسية
  2132. -cwBasicPopupDescription = GWT يوفر الاطار لخلق نوافذ منبثقة مخصصة
  2133. -cwBasicPopupClickOutsideInstructions = انقر في اي مكان خارج هذه النافذة المنبثقة لاخفائها
  2134. -cwBasicPopupInstructions = <b>انقر على الصورة لترى الحجم الكامل:</b>
  2135. -cwBasicPopupShowButton = اظهار النافذة المنبثقة الاساسية
  2136. -cwBasicTextName = النص الاساسي
  2137. -cwBasicTextDescription = GWT يتضمن المتمم القياسي لودجات ادخال النص. كل من هذه الودجات يدعم الاحداث الناتجة من لوحة المفاتيح ومن الاختيار والتي يمكن استخدامها للتحكم بادخال النص. بالتحديد لاحظ ان نطاق الاختيار لكل ودجة يتم تحديثه مع كل كبسة مفتاح.
  2138. -cwBasicTextAreaLabel = <b>منطقة النص:</b>
  2139. -cwBasicTextNormalLabel = <b>ŸÖÿ±ÿ®ÿπ ŸÜÿµ ÿπÿßÿØŸä:</b>
  2140. -cwBasicTextPasswordLabel = <b>مربع نص كلمة السر:</b>
  2141. -cwBasicTextReadOnly = ŸÇÿ±ÿßÿ°ÿ© ŸÅŸÇÿ∑
  2142. -cwBasicTextSelected = ŸÖÿÆÿ™ÿßÿ±ÿ©
  2143. -cwCheckBoxName = خانة تأشير
  2144. -cwCheckBoxDescription = ودجات خانة تاشير اساسية
  2145. -cwCheckBoxCheckAll = <b>تأكد من ان كل الأيام أنت المتاحة:</b>
  2146. -cwCheckBoxDays = الاثنين , الثلاثاء , الاربعاء , الخميس , الجمعة , السبت , الأحد
  2147. -cwConstantsExampleDescription = ان ثوابت الواجهة تمكن من التخصيص المحلي للمنصوصات او الارقام وجداول تعيين المنصوصات على منصوصات. مع ان هذا ليس مثالا ممتازا الا انه يوضح كيف يمكن تخصيص الثوابت محليا. ان اللواصق وخيارات الالوان ادناه مزودة من التطبيق الذي تم تخصيصه محليا لعينة الواجهة ExampleConstants
  2148. -cwConstantsExampleName = الثوابت
  2149. -cwConstantsExampleLinkText = هذا المثال يتفاعل مع عينة الواجهة:
  2150. -cwConstantsWithLookupExampleDescription = ان واجهة ConstantsWithLookup تجعل من الممكن البحث عن قيم تم تخصيصها محليا باستخدام اسم الدالة كمفتاح للبحث
  2151. -cwConstantsWithLookupExampleLinkText = هذا المثال يتفاعل مع عينة الواجهة:
  2152. -cwConstantsWithLookupExampleMethodName = <b>اسم الطريقة:</b>
  2153. -cwConstantsWithLookupExampleName = ÿ´Ÿàÿßÿ®ÿ™ ŸÖÿπ ÿ®ÿ≠ÿ´
  2154. -cwConstantsWithLookupExampleResults = <b>نتائج البحث:</b>
  2155. -cwConstantsWithLookupExampleNoInput =< الرجاء ادخال اسم الطريقة اعلاه >
  2156. -cwConstantsWithLookupExampleNoMatches = <غير موجود>
  2157. -cwCookiesName = الكعكات
  2158. -cwCookiesDescription = تتبع المستخدم بسهولة وحفظ البيانات عند المستخدم باستخدام الكعكات.
  2159. -cwCookiesDeleteCookie = حذف
  2160. -cwCookiesExistingLabel = <b>الكعكات الموجودة:</b>
  2161. -cwCookiesInvalidCookie = عليك ان تحدد اسم كعكه
  2162. -cwCookiesNameLabel = <b>الاسم:</b>
  2163. -cwCookiesSetCookie = تحديد كعكه
  2164. -cwCookiesValueLabel = <b>القيمه:</b>
  2165. -cwCustomButtonName = ÿ≤ÿ± ŸÖÿÆÿµÿµ
  2166. -cwCustomButtonDescription = ازرار الدفع وازرار التبديل تمكنك من تخصيص مظهر الازرار
  2167. -cwCustomButtonPush = <b>ÿßÿ≤ÿ±ÿßÿ± ÿØŸÅÿπ:</b>
  2168. -cwCustomButtonToggle = <b>ازرار تبديل:</b>
  2169. -cwDateTimeFormatName = نسق التاريخ والوقت
  2170. -cwDateTimeFormatDescription = ان صنف نسق التاريخ والوقت يدعم التنسيق تبعا للخصائص المحلية وتحليل قيم التاريخ والوقت مثل NumberFormat, باستخدام صيغة مرنة معتمدة على النمط. ان كل من الانماط القياسية والانماط المخصصة مدعومة.
  2171. -cwDateTimeFormatFailedToParseInput = غير قادر على تحليل المدخلات
  2172. -cwDateTimeFormatFormattedLabel = <b>قيمة منسقة:</b>
  2173. -cwDateTimeFormatInvalidPattern = نمط غير سليم
  2174. -cwDateTimeFormatPatternLabel = <b>ŸÜŸÖÿ∑:</b>
  2175. -cwDateTimeFormatPatterns = التاريخ/الوقت كامل, التاريخ/الوقت طويل, التاريخ/الوقت متوسط, التاريخ/الوقت قصير, التاريخ كامل, التاريخ طويل, التاريخ متوسط, التاريخ قصير, الوقت كامل, الوقت طويل, الوقت متوسط, الوقت قصير, مخصص
  2176. -cwDateTimeFormatValueLabel = <b>قيمة للتنسيق:</b>
  2177. -cwDecoratorPanelFormDescription = الوصف:
  2178. -cwDecoratorPanelFormName = اسم:
  2179. -cwDecoratorPanelFormTitle = <b>ادخال معايير البحث</b>
  2180. -cwDialogBoxName = مربع الحوار
  2181. -cwDialogBoxDescription = ان مربع الوار القابل للسحب يشبه النافذة ويحتوي على شريط عنوان. بالامكان تعديل العتمة لاظهار جزء من الخلفية من خلال النافذة المنبثقة.
  2182. -cwDialogBoxMakeTransparent = تحديد شفافية
  2183. -cwDialogBoxCaption = عينة لمربع حوال
  2184. -cwDialogBoxClose = اغلاق
  2185. -cwDialogBoxDetails = هذا مثال لمكون مربع حوار قياسي.
  2186. -cwDialogBoxItem = عنصر
  2187. -cwDialogBoxListBoxInfo = ان مربع قائمة الخيارات هذا يوضح امكانية سحب النافذة المنبثقة فوقه. ان حالة الزاوية الغامضة هذه تظهر بشكل غير صحيح في معظم المكتبات الاخرى.
  2188. -cwDialogBoxShowButton = اظهار مربع حوار
  2189. -cwDictionaryExampleName = قاموس
  2190. -cwDictionaryExampleDescription = ÿ®ÿßÿ≥ÿ™ÿÆÿØÿßŸÖ ÿµŸÜŸÅ ÿߟџÇÿߟ֟àÿ≥, ŸäŸÖŸÉŸÜŸÉ ÿߟÑÿ®ÿ≠ÿ´ ÿπŸÜ ŸÇŸäŸÖ ÿ™ŸÖ ÿ™ÿÆÿµŸäÿµŸáÿß ŸÖÿ≠ŸÑŸäÿß ÿ∂ŸÖŸÜ ŸÉÿßÿ¶ŸÜÿßÿ™ ÿ¨ÿߟÅÿßÿ≥ŸÉÿ±Ÿäÿ®ÿ™ ŸàÿߟџÖÿπÿ±ŸÅÿ© ÿ∂ŸÖŸÜ ŸÖÿ∂ŸäŸÅ ÿµŸÅÿ≠ÿ© HTML ÿ®ÿØŸÑÿß ŸÖŸÜ ÿ™ÿ¨ŸÖŸäÿπŸáŸÖ ÿØÿßÿÆŸÑ ÿ¥ŸÅÿ±ÿ© GWT ÿߟÑÿÆÿßÿµÿ© ÿ®ŸÉ. Ÿáÿ∞Ÿá ÿߟÑÿߟ֟Éÿߟܟäÿ© ŸÖŸÅŸäÿØÿ© ŸÅŸä ÿ≠ÿߟÑÿ© ÿ™ÿ∫Ÿäÿ± ÿߟÑÿ™ÿ±ÿ¨ŸÖÿ© ŸÉÿ´Ÿäÿ±ÿß ŸÑŸÉŸàŸÜ ÿÆÿßÿØŸÖ HTML ŸäŸÖŸÉŸÜ ÿßŸÜ Ÿäÿ®ÿ´ ÿߟÑÿ™ÿ±ÿ¨ŸÖÿ© ÿߟџÖÿ≠ÿØÿ´ÿ© ÿØÿßÿÆŸÑ ÿµŸÅÿ≠ÿ© HTML ÿߟџÖÿ∂ŸäŸÅÿ© ŸÉŸÑŸÖÿß ÿØÿπÿ™ ÿߟÑÿ≠ÿßÿ¨ÿ©. ŸÉŸÖÿß ŸàŸäŸÖŸÉŸÜ ÿßŸÜ ŸäŸÉŸàŸÜ Ÿáÿ∞ÿß ŸÖŸÅŸäÿØÿß  ŸÑÿØŸÖÿ¨ Ÿàÿ≠ÿØÿ© GWT ŸÖÿπ ÿ™ÿ∑ÿ®ŸäŸÇ ŸàŸäÿ® ÿ™ŸÖ ÿ™ÿÆÿµŸäÿµŸá ŸÖÿ≠ŸÑŸäÿß. ŸÑÿßÿ≠ÿ∏ ÿßŸÜ ŸÇŸäŸÖ ÿߟџÇÿߟ֟àÿ≥ ÿ™ÿπÿ™ŸÖÿØ ŸÅŸÇÿ∑ ÿπŸÑŸâ ÿµŸÅÿ≠ÿ© ŸÖÿ∂ŸäŸÅ HTML ŸàŸÑÿß ÿ™ÿ™ÿ£ÿ´ÿ± ÿ®ÿµŸÅÿßÿ™ ÿπŸÖŸäŸÑGWT ÿߟџÖÿ≠ŸÑŸä. ŸÅŸä Ÿáÿ∞ÿß ÿߟџÖÿ´ÿߟÑ, Ÿäÿ∏Ÿáÿ± ÿßÿπŸÑÿßŸÜ ŸÖÿ™ÿ∫Ÿäÿ± ÿ¨ÿߟÅÿßÿ≥ŸÉÿ±Ÿäÿ®ÿ™ ŸÅŸä ÿߟџÖÿµÿØÿ± ŸÑÿµŸÅÿ≠ÿ© HTML ÿߟџÖÿπŸÜŸäÿ©.
  2191. -cwDictionaryExampleLinkText = <b>هذا المثال يتفاعل مع متغيرات جافاسكريبت التالية :</b>
  2192. -cwDisclosurePanelName = لوحة الكشف
  2193. -cwDisclosurePanelDescription = لوحة الكشف تظهر او تخفي محتوياتها عندما ينقر المستخدم على نص الترويسة. ممكن ان تكون المحتويات نص بسيط, او اي ودجة, مثلا صورة او خيارات متقدمة في استمارة.
  2194. -cwDisclosurePanelFormAdvancedCriteria = معايير متقدمة
  2195. -cwDisclosurePanelFormDescription = الوصف:
  2196. -cwDisclosurePanelFormGender = الجنس:
  2197. -cwDisclosurePanelFormGenderOptions = ذكر, انثى
  2198. -cwDisclosurePanelFormLocation = موقع:
  2199. -cwDisclosurePanelFormName = اسم:
  2200. -cwDisclosurePanelFormTitle = <b>ادخال معايير البحث</b>
  2201. -cwDockPanelName = ŸÑŸàÿ≠ ÿßÿ±ÿ≥ÿßÿ°
  2202. -cwDockPanelDescription = لوح الارساء يحاذي محتوياته باستخدام اتجاهات البوصلة.
  2203. -cwDockPanelCenter = هذا هو <code>scrollpanel</code> المدونه الواردة في هذا المركز من <code>dockpanel</code> المدونه>. من خلال وضع بعض المحتويات الى حد كبير في خط الوسط وتحديد حجمه صراحة , فانه يصبح المجال قابل للتدرج ضمن صفحة , ولكن دون ان يتطلب ذلك استخدام وسيلة iframe. <br><br>اليك لا بأس به اكثر معنى النص من شأنه ان يخدم في المقام الاول لجعل هذا الشيء لفيفه من اسفل منطقة اعمالها للعيان. خلاف ذلك , انك قد تضطر الى جعلها حقا , حقا الصغيرة كي نرى nifty فيفه القضبان!
  2204. -cwDockPanelEast = هذا هو العنصر الشرق
  2205. -cwDockPanelNorth1 = هذا هو العنصر الشمالي الاول
  2206. -cwDockPanelNorth2 = هذا هو العنصر الشمالي الثاني
  2207. -cwDockPanelSouth1 = هذا هو العنصر الجنوبي الاول
  2208. -cwDockPanelSouth2 = هذا هو العنصر الجنوبي الثاني
  2209. -cwDockPanelWest = هذا هو العنصر الغربي
  2210. -cwFileUploadName = تصعيد ملف
  2211. -cwFileUploadDescription = تصعيد الملف بشكل غير متزامن باستخدام امكانية اجاكس لتصعيد الملفات
  2212. -cwFileUploadNoFileError = يجب عليك اختيار ملف للتصعيد
  2213. -cwFileUploadSelectFile = <b>قم باختيار ملف:</b>
  2214. -cwFileUploadSuccessful = تم تصعيد الملف!
  2215. -cwFileUploadButton = تصعيد الملف
  2216. -cwFlexTableName = جدول فلكس
  2217. -cwFlexTableDescription = ان جدول فلكس يدعم اتساع الصفوف والاعمدة مما يتيح لك ترتيب المعلومات بطرق مختلفة
  2218. -cwFlexTableAddRow = اضافة صف
  2219. -cwFlexTableDetails = هذا هو جدول فلكس والذي يدعم <b>colspan</b> و <b>rowspans</b>. يمكنك تنسيق الصفحة الخاصة بك كجدول من نوع خاص
  2220. -cwFlexTableRemoveRow = احذف صف
  2221. -cwFlowPanelName = لوحة الانسياب
  2222. -cwFlowPanelDescription = لوحة الانسياب تتيح لمحتوياتها الانسياب بشكل طبيعي.
  2223. -cwFlowPanelItem = عنصر
  2224. -cwFrameName = ÿßÿ∑ÿßÿ±ÿßÿ™
  2225. -cwFrameDescription = قم بتضمين محتويات من موقع اخر داخل الصفحة الخاصة بك باستخدام الاطار الذي يمثل غلاف حول عنصر IFRAME
  2226. -cwFrameSetLocation = حدد مكان
  2227. -cwGridName = شبكة
  2228. -cwGridDescription = شبكة بسيطة
  2229. -cwHorizontalPanelName = لوح افقي
  2230. -cwHorizontalPanelDescription = اللوح الافقي يحاذي محتوياته افقيا ولا يسمح لها بالالتفاف. قم بتغير حجم الصفحة لتلاحظ يف ان المحتويات تحافظ على محاذاتها الافقية.
  2231. -cwHorizontalPanelButton = ÿ≤ÿ±
  2232. -cwHorizontalSplitPanelName = لوح الانقسام الافقي
  2233. -cwHorizontalSplitPanelDescription = اعطاء المستخدمين حرية تحديد توزيع الفضاء باستخدام لوح الانقسام.
  2234. -cwHorizontalSplitPanelText = هذا النص عبارة عن مثال لتوضيح انسياب النص على كل جانب من الفاصل
  2235. -cwHyperlinkName = وصلة
  2236. -cwHyperlinkDescription = قم بتضمين الوصلات داخل الصفحة للملاحة بين الاقسام المختلفة. ان الوصلات تولد علامات توثق تسلسل (تأريخ) الملاحة بحيث يمكن العودة الى الحالة السابقة باستخدام زر "السابق" في المتصفح
  2237. -cwHyperlinkChoose = <b>اختيار احد الاقسام:</b>
  2238. -cwListBoxName = مربع اللائحة
  2239. -cwListBoxDescription = مربع اختيار ولوائح منسدلة مضمنين
  2240. -cwListBoxCars = الميثاق , سيدان , العربة , للتحويل , جيب , وشاحنة
  2241. -cwListBoxCategories = سيارات, رياضة, مواقع للعطلة
  2242. -cwListBoxSelectAll = <b>اختر كل ما ينطبق:</b>
  2243. -cwListBoxSelectCategory = <b>اختر الفئة:</b>
  2244. -cwListBoxSports = البيسبول , كرة السلة , كرة القدم الامريكية , الهوكي , لاكروس , بولو , كرة القدم , الكرة الناعمة , وكرة الماء
  2245. -cwListBoxVacations = منطقة البحر الكاريبي , جراند كانيون , باريس , ايطاليا , نيويورك , لاس فيجا
  2246. -cwMenuBarName = شريط القوائم
  2247. -cwMenuBarDescription = شريط القوائم يمكنك من التنقل بين العديد من الخيارات, وكذلك يعدم القوائم المتفرعة
  2248. -cwMenuBarEditCategory = تحرير
  2249. -cwMenuBarEditOptions = تراجع , اعادة , قطع , نسخة , وألصق
  2250. -cwMenuBarFileCategory = الملف
  2251. -cwMenuBarFileOptions = جديد, فتح, اغلاق, مؤخرا, خروج
  2252. -cwMenuBarFileRecents = صيد السمك في الصحراء.txt , كيفية تدريب الببغاوات البرية, دليل البلهاء للمزارع
  2253. -cwMenuBarGWTOptions = تنزيل, امثلة, شفرة المصدرة, وت gwt, البرنامج
  2254. -cwMenuBarHelpCategory = ŸÖÿ≥ÿßÿπÿØÿ©
  2255. -cwMenuBarHelpOptions = المحتويات , كعكه الحظ , عن gwt
  2256. -cwMenuBarPrompts = شكرا لاختيارك عنصر من القائمة. اختيار جيد فعلا. الا يوجد شيء افضل تقوم به بدلا من اختيارك عنصرا من القائمة؟
  2257. -cwMessagesExampleName = ÿ±ÿ≥ÿßÿ¶ŸÑ
  2258. -cwMessagesExampleDescription = ان واجهة الرسائل تمكن من توليد رسائل بمتغيرات محددة الانواع والتي يمكن التحقق من صحتها خلال التجميع
  2259. -cwMessagesExampleArg0Label = <b>متغير {0}:</b>
  2260. -cwMessagesExampleArg1Label = <b>متغير {1}:</b>
  2261. -cwMessagesExampleArg2Label = <b>متغير {2}:</b>
  2262. -cwMessagesExampleFormattedLabel = <b>رسالة منسقة:</b>
  2263. -cwMessagesExampleLinkText = هذا المثال يتفاعل مع عينة الواجهة:
  2264. -cwMessagesExampleTemplateLabel = <b>قالب رسالة:</b>
  2265. -cwNumberFormatName = نسق الاعداد
  2266. -cwNumberFormatDescription = الصنف NumberFormat يدعم تنسيق حسب الاعدادات المحلية وتحليل الارقام باستخدام صيغة مرنة تعتمد على نمط الرقم. بالاضافة الى الانماط المخصصة, هنالك مجموعة من الانماط القياسية.
  2267. -cwNumberFormatFailedToParseInput = غير قادر على تحليل المدخلات
  2268. -cwNumberFormatFormattedLabel = <b>قيمة منسقة:</b>
  2269. -cwNumberFormatInvalidPattern = نمط غير صالح
  2270. -cwNumberFormatPatternLabel = <b>ŸÜŸÖÿ∑:</b>
  2271. -cwNumberFormatPatterns = عشري, عملة, علمي, نسبة مؤوية, تخصيص
  2272. -cwNumberFormatValueLabel = <b>قيمة للتنسيق:</b>
  2273. -cwPluralFormsExampleArg0Label = <b>متغير {0}:</b>
  2274. -cwPluralFormsExampleFormattedLabel = <b>رسالة منسقة:</b>
  2275. -cwPluralFormsExampleLinkText = هذا المثال يتفاعل مع عينة الواجهة:
  2276. -cwRadioButtonName = زر انتقاء
  2277. -cwRadioButtonDescription = ودجة زر انتقاء اساسي
  2278. -cwRadioButtonColors = ازرق ,احمر ,اصفر ,اخضر
  2279. -cwRadioButtonSelectColor = <b>اختر اللون المفضل لديك:</b>
  2280. -cwRadioButtonSelectSport = <b>اختر الرياضة المفضلة لديك:</b>
  2281. -cwRadioButtonSports = البيسبول , كرة السلة , كرة القدم الامريكية , الهوكي , كرة القدم , كرة الماء
  2282. -cwRichTextName = النص الغني
  2283. -cwRichTextDescription = ان مكون حيز النص الغني مدعوم من قبل جميع المتصفحات الشائعة, ويتم التقليل من الامكانات المعروضة بشكل مناسب حسب امكانيات المتصفح.
  2284. -cwStackPanelName = لوح التكديس
  2285. -cwStackPanelDescription =ان لوح التكديس يكدس محتوياته عموديا ويعرض واحدة منها فقط في الوقت الواحد مع ترويسة لكل من المحتويات والتي ممكن النقر عليها لعرضها كاملة. ان هذا مفيد للقوائم العمودية.
  2286. -cwStackPanelContactsHeader = جهات الاتصال
  2287. -cwStackPanelContacts = بينويت ماندلبروت , البرت اينشتاين , رينيه ديكارت , بوب ساجيت, لودفيغ فون بيتهوفن , ريتشارد فاينمان , الآن تورنج , جون فون نيومان
  2288. -cwStackPanelContactsEmails = benoit@example.com, albert@example.com, rene@example.com, bob@example.com, ludwig@example.com, richard@example.com, alan@example.com, john@example.com
  2289. -cwStackPanelMailHeader = البريد
  2290. -cwStackPanelMailFolders = البريد الوارد , مسودات , قوالب , أرسلت , المهملات
  2291. -cwStackPanelFiltersHeader = ŸÖÿ±ÿ¥ÿ≠ÿßÿ™
  2292. -cwStackPanelFilters = الجميع, مؤشرة بالنجوم, مقروء , غير مقروء, حديث, مرسلة من قبلي
  2293. -cwSuggestBoxName = صندوق الاقتراحات
  2294. -cwSuggestBoxDescription = توليد اقتراحات خلال استدعاء اجراءات عن بعد (RPC) للخاد او بيانات ساكنة على الصفحة
  2295. -cwSuggestBoxLabel = <b>اختيار كلمة:</b>
  2296. -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 (سادسا القيادة) , المتعصب , زوي , العتابي
  2297. -cwTabPanelName = لوحة الجدولة
  2298. -cwTabPanelDescription = تقسم المحتويات على حقول متعددة
  2299. -cwTabPanelTab0 = انقر على أحد علامات الجدولة للاطلاع على المزيد من المحتوى.
  2300. -cwTabPanelTab2 = ممكن تخصيص حقول الجدولة بمرونة باستخدام CSS
  2301. -cwTabPanelTabs = الموطن , شعار gwt , والمزيد من المعلومات
  2302. -cwTreeName = ÿ¥ÿ¨ÿ±ÿ©
  2303. -cwTreeDescription = ودجة الشجرة الديناميكية تدعم التحميل الكسول للبيانات من خلال استدعاءات RPC للخادم
  2304. -cwTreeDynamicLabel = <b>شجرة ديناميكية</b>
  2305. -cwTreeItem = العنصر
  2306. -cwTreeStaticLabel = <b>شجرة ساكنة</b>
  2307. -cwVerticalPanelName = اللوح العمودي
  2308. -cwVerticalPanelDescription = ان اللوح العمودي يحاذي محتوياته عموديا بدون السماح لهم بالالتفاف. قم بتغيير حجم الصفحة لملاحظة كيفية حفاظ المحتويات على محاذاتها العمودية.
  2309. -cwVerticalPanelButton = ÿ≤ÿ±
  2310. -cwVerticalSplitPanelName = لوح الانقسام العمودي
  2311. -cwVerticalSplitPanelDescription = اعطاء المستخدم حرية توزيع الفضاء باستخدام لوحة الانقسام
  2312. -cwVerticalSplitPanelText = هذا النص عبارة عن مثال لتوضيح انسياب النص على كل جانب من الفاصل.
  2313. -
  2314. -# TODO: sort new translation below into the file
  2315. -cwAnimationName = الرسوم المتحركه
  2316. -cwAnimationDescription = ÿ™ÿ≠ÿ±ŸäŸÉ ÿߟÑÿ™ÿ∑ÿ®ŸäŸÇ ÿ®ŸÖÿ§ÿ´ÿ±ÿßÿ™  ŸÖŸàŸÇŸàÿ™ÿ©.
  2317. -cwAnimationStart = البدء
  2318. -cwAnimationCancel = الغاء
  2319. -cwAnimationOptions = خيارات الرسوم المتحركه
  2320. -cwDecoratorPanelName = لوح الزخرفة
  2321. -cwDecoratorPanelDescription = اضافة زوايا مدورة لأي ودجة باستخدام لوح الزخرفة.
  2322. -
  2323. -# TODO: get official translations
  2324. -cwTreeComposers = بيتهوفن ,برامز ,موزارت
  2325. -cwTreeConcertos = القطع الموسيقيه
  2326. -cwTreeQuartets = الرباعيات
  2327. -cwTreeSonatas = السوناتات
  2328. -cwTreeSymphonies = السمفونيات
  2329. -cwTreeBeethovenWorkConcertos = رقم 1 -- ج ,رقم 2 -- ب - شقة كبيرة ,رقم 3 -- ج طفيفة ,رقم 4 -- ز الرئيسية ,رقم 5 -- ة - شقة الرئيسية
  2330. -cwTreeBeethovenWorkQuartets = الرباعيات ستة الخيط ,الخيط الرباعيات الثلاث, Grosse فقدان الذاكرة لسلسلة الرباعيات
  2331. -cwTreeBeethovenWorkSonatas = سوناتا فى قاصر ,و في سوناتا الرئيسية
  2332. -cwTreeBeethovenWorkSymphonies = رقم 2 -- د الرئيسية ,رقم 2 -- د الرئيسية ,رقم 3 -- ة - شقة كبيرة ,رقم 4 -- ب - شقة كبيرة ,رقم 5 -- ج طفيفة ,رقم 6 -- و الرئيسية ,رقم 7 -- رئيسي ,رقم 8 -- و الرئيسية ,العدد 9 -- د طفيفة
  2333. -cwTreeBrahmsWorkConcertos = كونشرتو الكمان ,اي ضعف كونشرتو -- قاصر ,كونشرتو البيانو رقم 1 -- مد طفيفة ,كونشرتو البيانو رقم 2 -- ب - شقة الرئيسية
  2334. -cwTreeBrahmsWorkQuartets = الرباعيه البيانو رقم 1 -- ز طفيفة ,المجموعة الرباعيه بيانو رقم 2 -- رئيسي ,المجموعة الرباعيه البيانو رقم 3 -- ج طفيفة ,رباعي رقم 3 -- ب - شقة بسيطة
  2335. -cwTreeBrahmsWorkSonatas = اثنين السوناتات لكلارينيت -- و قاصر ,لاثنين من السوناتات كلارينيت -- ة - شقة الرئيسية
  2336. -cwTreeBrahmsWorkSymphonies = رقم 1 -- ج طفيفة ,رقم 2 -- د طفيفة ,رقم 3 -- و الرئيسية ,رقم 4 -- ة طفيفة
  2337. -cwTreeMozartWorkConcertos = كونشرتو البيانو رقم 12 , كونشرتو البيانو رقم 17 , كونشرتو الكلارينت , كونشرتو الكمان رقم 5 , رقم 4 كونشرتو الكمان
  2338. -cwDatePickerName = تاريخ القاطف
  2339. -cwDatePickerDescription = اسمحوا المستخدمين اختيار تاريخ باستخدام DatePicker.
  2340. -cwDatePickerBoxLabel = <br><br><br><b>DateBox مع قافزة DatePicker : </b>
  2341. -cwDatePickerLabel = <b>الدائم DatePicker : </b>
  2342. -cwPluralFormsExampleName = تعدد أشكال
  2343. -cwPluralFormsExampleDescription = تعدد أشكال توفير وسيلة لخلق ترجمة الرسالة التي تعتمد على عدد من شيء.
  2344. diff --git a/src/com/google/gwt/sample/showcase/client/ShowcaseConstants_fr.properties b/src/com/google/gwt/sample/showcase/client/ShowcaseConstants_fr.properties
  2345. deleted file mode 100644
  2346. index c177997..0000000
  2347. --- a/src/com/google/gwt/sample/showcase/client/ShowcaseConstants_fr.properties
  2348. +++ /dev/null
  2349. @@ -1,243 +0,0 @@
  2350. -mainMenuTitle = Exemples GWT
  2351. -mainSubTitle = Présentation des fonctionnalités
  2352. -mainTitle = Google Web Toolkit
  2353. -mainLinkHomepage = Page d'accueil de GWT
  2354. -mainLinkExamples = Autres exemples
  2355. -
  2356. -categoryI18N = Internationalisation
  2357. -categoryLists = Listes et menus
  2358. -categoryOther = Autres fonctions
  2359. -categoryPanels = Panneaux
  2360. -categoryPopups = Fenêtres pop-up
  2361. -categoryTables = Tables
  2362. -categoryTextInput = Saisie de texte
  2363. -categoryWidgets = Widgets
  2364. -
  2365. -contentWidgetExample = Exemple
  2366. -contentWidgetSource = Code source
  2367. -contentWidgetStyle = Style CSS
  2368. -
  2369. -cwAbsolutePanelName = Panneau Absolu
  2370. -cwAbsolutePanelDescription = Un panneau absolu positionne chacun de ces enfants en utilisant des coordonnées absolues, ce qui leurs permet de s'imbriquer.
  2371. -cwAbsolutePanelClickMe = Cliquez-moi!
  2372. -cwAbsolutePanelHelloWorld = Hello World
  2373. -cwAbsolutePanelLeft = <b>Bord gauche:</b>
  2374. -cwAbsolutePanelItemsToMove = <b>Points à circuler:</b>
  2375. -cwAbsolutePanelTop = <b>Bord du dessus:</b>
  2376. -cwAbsolutePanelWidgetNames = Bonjour le monde, Button, Grid
  2377. -cwAnimationName = Animations
  2378. -cwAnimationDescription = Animez vos applications à l'aide d'effets règlés à interval de temps fixe.
  2379. -cwAnimationStart = Commencer
  2380. -cwAnimationCancel = Annuler
  2381. -cwAnimationOptions = Options d'animation
  2382. -cwBasicButtonName = Bouton basique
  2383. -cwBasicButtonDescription = Widgets de bouton basique
  2384. -cwBasicButtonClickMessage = Arrêtez de me tapoter!
  2385. -cwBasicButtonDisabled = Bouton désactivé
  2386. -cwBasicButtonNormal = Bouton normal
  2387. -cwBasicPopupName = Fenêtre pop-up basique
  2388. -cwBasicPopupDescription = GWT fournit le cadre pour créer une fenêtre pop-up personnalisée.
  2389. -cwBasicPopupClickOutsideInstructions = Cliquez en dehors de cette fenêtre pop-up pour la faire disparaître.
  2390. -cwBasicPopupInstructions = <b>Cliquez sur une image pour l'afficher à sa taille maximale:</b>
  2391. -cwBasicPopupShowButton = Afficher la fenêtre pop-up basique
  2392. -cwBasicTextName = Texte basique
  2393. -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.
  2394. -cwBasicTextAreaLabel = <b>Zone de texte:</b>
  2395. -cwBasicTextNormalLabel = <b>Zone de texte normale:</b>
  2396. -cwBasicTextPasswordLabel = <b>Zone de texte &laquo;mot de passe&raquo;:</b>
  2397. -cwBasicTextReadOnly = lecture seulement
  2398. -cwBasicTextSelected = Sélectionné
  2399. -cwCheckBoxName = Case à cocher
  2400. -cwCheckBoxDescription = Widgets de case à cocher basique
  2401. -cwCheckBoxCheckAll = <b>Arrivée tous les jours que vous êtes disponible:</b>
  2402. -cwCheckBoxDays = lundi, mardi, mercredi, jeudi, vendredi, samedi, dimanche
  2403. -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.
  2404. -cwConstantsExampleName = Constantes
  2405. -cwConstantsExampleLinkText = Cet exemple interagit avec l'échatillon de l'interface:
  2406. -cwConstantsWithLookupExampleDescription = L'Interface ConstantsWithLookup permet de rechercher dynamiquement des valeurs localisées en utilisant des méthodes des noms comme chaîne clés.
  2407. -cwConstantsWithLookupExampleLinkText = Cet exemple interagit avec l'échantillon de l'interface:
  2408. -cwConstantsWithLookupExampleMethodName = <b>Nom de la méthode:</b>
  2409. -cwConstantsWithLookupExampleName = Constantes Avec Lookup
  2410. -cwConstantsWithLookupExampleResults = <b>Résultats du Lookup:</b>
  2411. -cwConstantsWithLookupExampleNoInput = <entrer un nom de méthode, s’il vous plaît>
  2412. -cwConstantsWithLookupExampleNoMatches = <Pas de résultats trouvés>
  2413. -cwCookiesName = Cookies
  2414. -cwCookiesDescription = Traquez vos utilisateurs facilement et sauvegardez des données sur le client en utilisant des cookies.
  2415. -cwCookiesDeleteCookie = Supprimer
  2416. -cwCookiesExistingLabel = <b>Cookies existants:</b>
  2417. -cwCookiesInvalidCookie = Vous devez indiquer un nom de cookie
  2418. -cwCookiesNameLabel = <b>Nom:</b>
  2419. -cwCookiesSetCookie = Sauvegarder Cookie
  2420. -cwCookiesValueLabel = <b>Valeur:</b>
  2421. -cwCustomButtonName = Bouton personnalisé
  2422. -cwCustomButtonDescription = Les boutons de commande et les boutons à bascule vous permettent de personnaliser l'apparence de vos boutons
  2423. -cwCustomButtonPush = <b>Boutons de commande:</b>
  2424. -cwCustomButtonToggle = <b>Boutons à bascule:</b>
  2425. -cwDateTimeFormatName = Format Date Heure
  2426. -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.
  2427. -cwDateTimeFormatFailedToParseInput = Impossible d'analyser les données saisies.
  2428. -cwDateTimeFormatFormattedLabel = <b>Valeur formattée:</b>
  2429. -cwDateTimeFormatInvalidPattern = Patron incorrect
  2430. -cwDateTimeFormatPatternLabel = <b>Patron:</b>
  2431. -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é
  2432. -cwDateTimeFormatValueLabel = <b>Valeur au format:</b>
  2433. -cwDecoratorPanelFormDescription = Description:
  2434. -cwDecoratorPanelFormName = Nom:
  2435. -cwDecoratorPanelFormTitle = Saisissez des critères de recherche
  2436. -cwDecoratorPanelName = Panneau décorateur
  2437. -cwDecoratorPanelDescription = Ajouter des coins arrondis à un Widget en utilisant le panneau décorateur.
  2438. -cwDialogBoxName = Boîte de dialogue
  2439. -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.
  2440. -cwDialogBoxMakeTransparent = Ajouter de la transparence
  2441. -cwDialogBoxCaption = Exemple de boîte de dialogue
  2442. -cwDialogBoxClose = Fermer
  2443. -cwDialogBoxDetails = Ceci est un exemple de composant de boîte de dialogue standard.
  2444. -cwDialogBoxItem = élément
  2445. -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.
  2446. -cwDialogBoxShowButton = Afficher la boîte de dialogue
  2447. -cwDictionaryExampleName = Dictionnaire
  2448. -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.
  2449. -cwDictionaryExampleLinkText = <b>Cet exemple interagit avec le JavaScript variable suivant:</b>
  2450. -cwDisclosurePanelName = Panneau de présentation
  2451. -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.
  2452. -cwDisclosurePanelFormAdvancedCriteria = Critères avancés
  2453. -cwDisclosurePanelFormDescription = Description:
  2454. -cwDisclosurePanelFormGender = Sexe:
  2455. -cwDisclosurePanelFormGenderOptions = masculin, féminin
  2456. -cwDisclosurePanelFormLocation = Lieu:
  2457. -cwDisclosurePanelFormName = Nom:
  2458. -cwDisclosurePanelFormTitle = <b>Saisissez des critères de recherche</b>
  2459. -cwDockPanelName = Panneau d'ancrage
  2460. -cwDockPanelDescription = Dans un panneau d'ancrage, le contenu est placé en fonction des points cardinaux.
  2461. -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!
  2462. -cwDockPanelEast = Ceci est le composant est
  2463. -cwDockPanelNorth1 = Ceci est le premier composant nord
  2464. -cwDockPanelNorth2 = Ceci est le second composant nord
  2465. -cwDockPanelSouth1 = Ceci est le premier composant sud
  2466. -cwDockPanelSouth2 = Ceci est le second composant sud
  2467. -cwDockPanelWest = Ceci est le composant ouest
  2468. -cwFileUploadName = Transfert de fichier
  2469. -cwFileUploadDescription = Transférez des fichiers de manière asynchrone à l'aide de transferts de fichiers AJAX
  2470. -cwFileUploadNoFileError = Vous devez sélectionner un fichier à envoyer
  2471. -cwFileUploadSelectFile = <b>Choisissez un fichier:</b>
  2472. -cwFileUploadSuccessful = Fichier téléchargé!
  2473. -cwFileUploadButton = Envoyer un fichier
  2474. -cwFlexTableName = Tableau flexible
  2475. -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.
  2476. -cwFlexTableAddRow = Ajouter une ligne
  2477. -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.
  2478. -cwFlexTableRemoveRow = Supprimer une ligne
  2479. -cwFlowPanelName = Panneau déroulant
  2480. -cwFlowPanelDescription = Dans un panneau déroulant, le contenu défile de manière continue.
  2481. -cwFlowPanelItem = Élément
  2482. -cwFrameName = Cadres
  2483. -cwFrameDescription = Intégrez le contenu d'autres sites dans votre page à l'aide de l'encadrement, une enveloppe autour d'un élément IFRAME.
  2484. -cwFrameSetLocation = Fixez l'emplacement
  2485. -cwGridName = Grille
  2486. -cwGridDescription = Grille simple
  2487. -cwHorizontalPanelName = Panneau horizontal
  2488. -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.
  2489. -cwHorizontalPanelButton = Bouton
  2490. -cwHorizontalSplitPanelName = Panneau à fractionnement horizontal
  2491. -cwHorizontalSplitPanelDescription = Donne aux utilisateurs la possibilité de décider de la manière dont l'espace doit être alloué.
  2492. -cwHorizontalSplitPanelText = Voici un texte permettant de voir comment le contenu situé de chaque côté de la barre de fractionnement se défile.
  2493. -cwHyperlinkName = Hyperlien
  2494. -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.
  2495. -cwHyperlinkChoose = <b>Choisir une section:</b>
  2496. -cwListBoxName = Zone de liste
  2497. -cwListBoxDescription = Zone de sélection et listes déroulantes intégrées
  2498. -cwListBoxCars = compact, berline, coupé, cabriolet, VUS, camions
  2499. -cwListBoxCategories = Voitures, Sports, Lieux de vacances
  2500. -cwListBoxSelectAll = <b>Sélectionnez toutes les options appropriées:</b>
  2501. -cwListBoxSelectCategory = <b>Sélectionnez une catégorie:</b>
  2502. -cwListBoxSports = Base-ball, Basket-ball, Football, Hockey, Crosse, Polo, Soccer, Softball, Water-polo
  2503. -cwListBoxVacations = Caraïbes, Grand Canyon, Paris, Italie, New York, Las Vegas
  2504. -cwMenuBarName = Barre de menus
  2505. -cwMenuBarDescription = La barre de menus permet de naviguer parmi de nombreuses options. Elle prend également en charge des sous-menus.
  2506. -cwMenuBarEditCategory = Édition
  2507. -cwMenuBarEditOptions = Annuler, Rétablir, Couper, Copier, Coller
  2508. -cwMenuBarFileCategory = Fichier
  2509. -cwMenuBarFileOptions = Nouveau, Ouvrir, Fermer, Récent, Quitter
  2510. -cwMenuBarFileRecents = Pêcher dans le désert.txt, Comment apprivoiser un perroquet sauvage, L'élevage des émeus pour les nuls
  2511. -cwMenuBarGWTOptions = Télécharger, Exemples, Code source, GWiTtez avec le programme
  2512. -cwMenuBarHelpCategory = Aide
  2513. -cwMenuBarHelpOptions = Contenu, Biscuit de fortune, À propos de GWT
  2514. -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é
  2515. -cwMessagesExampleName = Messages
  2516. -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.
  2517. -cwMessagesExampleArg0Label = <b>Paramètre {0}:</b>
  2518. -cwMessagesExampleArg1Label = <b>Paramètre {1}:</b>
  2519. -cwMessagesExampleArg2Label = <b>Paramètre {2}:</b>
  2520. -cwMessagesExampleFormattedLabel = <b>Valeur formattée:</b>
  2521. -cwMessagesExampleLinkText = Cet exemple interagit avec l'échantillon de l'interface:
  2522. -cwMessagesExampleTemplateLabel = <b>Message modèle:</b>
  2523. -cwNumberFormatName = Format du Nombre
  2524. -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.
  2525. -cwNumberFormatFailedToParseInput = Impossible d'analyser les données saisies.
  2526. -cwNumberFormatFormattedLabel = <b>Valeur formattée:</b>
  2527. -cwNumberFormatInvalidPattern = Patron incorrect
  2528. -cwNumberFormatPatternLabel = <b>Patron:</b>
  2529. -cwNumberFormatPatterns = Décimales, devise, scientifique, pourcentage, personnalisé
  2530. -cwNumberFormatValueLabel = <b>Valeur au format:</b>
  2531. -cwPluralFormsExampleArg0Label = <b>Paramètre {0}:</b>
  2532. -cwPluralFormsExampleFormattedLabel = <b>Valeur formattée:</b>
  2533. -cwPluralFormsExampleLinkText = Cet exemple interagit avec l'échantillon de l'interface:
  2534. -cwRadioButtonName = Bouton radio
  2535. -cwRadioButtonDescription = Widget de bouton radio basique
  2536. -cwRadioButtonColors = bleu, rouge, jaune, vert
  2537. -cwRadioButtonSelectColor = <b>Sélectionnez votre couleur préférée:</b>
  2538. -cwRadioButtonSelectSport = <b>Sélectionnez votre sport préféré:</b>
  2539. -cwRadioButtonSports = Base-ball, Basket-ball, Football, Hockey, Soccer, Water-polo
  2540. -cwRichTextName = Texte enrichi
  2541. -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.
  2542. -cwStackPanelName = Stack Panel
  2543. -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.
  2544. -cwStackPanelContactsHeader = Contacts
  2545. -cwStackPanelContacts = Benoit Mandelbrot, Albert Einstein, René Descartes, Bob Saget, Ludwig von Beethoven, Richard Feynman, Alan Turing, John de von Neumann
  2546. -cwStackPanelContactsEmails = benoit@example.com, albert@example.com, rene@example.com, bob@example.com, ludwig@example.com, richard@example.com, alan@example.com, john@example.com
  2547. -cwStackPanelMailHeader = Mail
  2548. -cwStackPanelMailFolders = Boîte de réception, Brouillons, Formulaires, Messages envoyés, Corbeille
  2549. -cwStackPanelFiltersHeader = Filtres
  2550. -cwStackPanelFilters = Tous, Suivi, Lus, Non lus, Récemment accédés, Postés par moi
  2551. -cwSuggestBoxName = Zone de suggestion
  2552. -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.
  2553. -cwSuggestBoxLabel = <b>Choisir un mot:</b>
  2554. -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
  2555. -cwTabPanelName = Panneau d'onglets
  2556. -cwTabPanelDescription = Permet de répartir le contenu en plusieurs onglets.
  2557. -cwTabPanelTab0 = Cliquez sur l'un des onglets pour afficher du contenu supplémentaire.
  2558. -cwTabPanelTab2 = Grâce au langage CSS, les onglets sont presque entièrement personnalisables.
  2559. -cwTabPanelTabs = Accueil, Logo GWT, Plus d'info
  2560. -cwTreeName = Arborescence
  2561. -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.
  2562. -cwTreeDynamicLabel = <b>Arborescence dynamique:</b>
  2563. -cwTreeItem = Élément
  2564. -cwTreeStaticLabel = <b>Arborescence statique:</b>
  2565. -cwVerticalPanelName = Panneau vertical
  2566. -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.
  2567. -cwVerticalPanelButton = Bouton
  2568. -cwVerticalSplitPanelName = Panneau à fractionnement vertical
  2569. -cwVerticalSplitPanelDescription = Donne aux utilisateurs la possibilité de décider de la manière dont l'espace doit être alloué.
  2570. -cwVerticalSplitPanelText = Voici un texte permettant de voir comment le contenu situé de chaque côté de la barre de fractionnement se défile.
  2571. -
  2572. -# TODO: get official translations
  2573. -cwTreeComposers = Beethoven, Brahms, Mozart
  2574. -cwTreeConcertos = Concertos
  2575. -cwTreeQuartets = Quatuors
  2576. -cwTreeSonatas = Sonates
  2577. -cwTreeSymphonies = Symphonies
  2578. -cwTreeBeethovenWorkConcertos = n ° 1 - C, n ° 2 - B-Flat Major, n ° 3 - C Minor, n ° 4 - G Major, n ° 5 - mi bémol majeur
  2579. -cwTreeBeethovenWorkQuartets = Six Quatuors à cordes, Trois Quatuors à cordes, Grosse Fugue pour Quatuors à cordes
  2580. -cwTreeBeethovenWorkSonatas = Sonate en la mineur, Sonate en fa majeur
  2581. -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
  2582. -cwTreeBrahmsWorkConcertos = Concerto pour violon, Double Concerto - A minor, Concerto pour piano n ° 1 - D minor, Concerto pour piano n ° 2 - si bémol majeur
  2583. -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
  2584. -cwTreeBrahmsWorkSonatas = Deux Sonates pour clarinette - F Minor, deux sonates pour clarinette - mi bémol majeur
  2585. -cwTreeBrahmsWorkSymphonies = n ° 1 - C Minor, n ° 2 - ré mineur, n ° 3 - F Major, n ° 4 - E Minor
  2586. -cwTreeMozartWorkConcertos = Concerto pour piano n ° 12, Concerto pour piano n ° 17, Concerto pour clarinette, Concerto pour violon n ° 5, Concerto pour violon n ° 4
  2587. -cwDatePickerName = Date Picker
  2588. -cwDatePickerDescription = Permettre aux utilisateurs de sÈlectionner une date ‡ l'aide de la DatePicker.
  2589. -cwDatePickerBoxLabel = <br><br><b>DateBox avec popup DatePicker:</b>
  2590. -cwDatePickerLabel = <b>DatePicker permanent:</b>
  2591. -cwPluralFormsExampleName = Formes plurielles
  2592. -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.
  2593. diff --git a/src/com/google/gwt/sample/showcase/client/ShowcaseConstants_zh.properties b/src/com/google/gwt/sample/showcase/client/ShowcaseConstants_zh.properties
  2594. deleted file mode 100644
  2595. index d917c3c..0000000
  2596. --- a/src/com/google/gwt/sample/showcase/client/ShowcaseConstants_zh.properties
  2597. +++ /dev/null
  2598. @@ -1,244 +0,0 @@
  2599. -mainMenuTitle = GWT 示例
  2600. -mainSubTitle = 功能展示
  2601. -mainTitle = Google Web Toolkit
  2602. -mainLinkHomepage = GWT 主页
  2603. -mainLinkExamples = 更多示例
  2604. -
  2605. -categoryI18N =ÂõΩÈôÖÂåñ
  2606. -categoryLists = 列表和菜单
  2607. -categoryOther =其它功能
  2608. -categoryPanels = 面板
  2609. -categoryPopups = 弹出式窗口
  2610. -categoryTables = 表
  2611. -categoryTextInput = 文本输入
  2612. -categoryWidgets = 部件
  2613. -
  2614. -contentWidgetExample = 示例
  2615. -contentWidgetSource = 源代码
  2616. -contentWidgetStyle = CSS 样式
  2617. -
  2618. -cwAbsolutePanelName = 绝对定位面板
  2619. -cwAbsolutePanelDescription = 绝对定位面板(AbsolutePanel)使用绝对坐标定位子部件,并允许他们重叠。
  2620. -cwAbsolutePanelClickMe =点击我!
  2621. -cwAbsolutePanelHelloWorld =你好世界
  2622. -cwAbsolutePanelLeft = <b>左:</b>
  2623. -cwAbsolutePanelItemsToMove = <b>移动项目:</b>
  2624. -cwAbsolutePanelTop = <b>顶部:</b>
  2625. -cwAbsolutePanelWidgetNames =你好世界, 按钮, 网格
  2626. -cwBasicButtonName = 简单按钮
  2627. -cwBasicButtonDescription = 简单按钮部件
  2628. -cwBasicButtonClickMessage = 不要再点了!
  2629. -cwBasicButtonDisabled = 禁用按钮
  2630. -cwBasicButtonNormal = 常规按钮
  2631. -cwBasicPopupName = 简单弹出式窗口
  2632. -cwBasicPopupDescription = GWT 提供了创建自定义弹出式窗口的架构。
  2633. -cwBasicPopupClickOutsideInstructions = 点击此弹出式窗口外的任意位置可将其隐藏。
  2634. -cwBasicPopupInstructions = <b>点击查看原尺寸图片:</b>
  2635. -cwBasicPopupShowButton = 显示简单弹出式窗口
  2636. -cwBasicTextName = 简单文本
  2637. -cwBasicTextDescription = GWT 包含整套标准文本输入部件,每个部件均支持文本输入所需的键盘和选择事件。 特别是每个部件的选择范围都会在每次按键后更新。
  2638. -cwBasicTextAreaLabel = <b>文本区域:</b>
  2639. -cwBasicTextNormalLabel = <b>常规文本框:</b>
  2640. -cwBasicTextPasswordLabel = <b>密码文本框:</b>
  2641. -cwBasicTextReadOnly = 只读
  2642. -cwBasicTextSelected = 已选择
  2643. -cwCheckBoxName = 复选框
  2644. -cwCheckBoxDescription = 简单复选框部件
  2645. -cwCheckBoxCheckAll = <b>检查所有天知道您有空:</b>
  2646. -cwCheckBoxDays =周一,周二,周三,周四,周五,周六,周日
  2647. -cwConstantsExampleDescription =常量接口(Constants)可以用来本地化字串,数字,字串到字串的映射表。这个例子也许并不特别有趣,但它演示了如何本地化常量。抽象界面ExampleConstants的本地化实现提供了标签文本和颜色选择 。
  2648. -cwConstantsExampleName =常量
  2649. -cwConstantsExampleLinkText = 这个例子使用了示例接口:
  2650. -cwConstantsWithLookupExampleDescription =接口ConstantsWithLookup提供了使用字串键作为方法名动态查找本地化变量。
  2651. -cwConstantsWithLookupExampleLinkText = 这个例子使用了示例接口:
  2652. -cwConstantsWithLookupExampleMethodName = <b>方法名: </b>
  2653. -cwConstantsWithLookupExampleName = 常量查找
  2654. -cwConstantsWithLookupExampleResults = <b>查找结果: </b>
  2655. -cwConstantsWithLookupExampleNoInput = <请在上面输入方法名>
  2656. -cwConstantsWithLookupExampleNoMatches = <未找到>
  2657. -cwCookiesName = Cookie
  2658. -cwCookiesDescription =跟踪用户,使用的Cookie在客户端轻松保存数据 。
  2659. -cwCookiesDeleteCookie =删除
  2660. -cwCookiesExistingLabel = <b>现有Cookie:</b>
  2661. -cwCookiesInvalidCookie = 您必须指定Cookie的名称
  2662. -cwCookiesNameLabel = <b>名称:</b>
  2663. -cwCookiesSetCookie = 设置Cookie
  2664. -cwCookiesValueLabel = <b>值:</b>
  2665. -cwCustomButtonName = 自定义按钮
  2666. -cwCustomButtonDescription = PushButton 和 ToggleButton 可以用来自定义按钮的外观
  2667. -cwCustomButtonPush = <b>PushButton:</b>
  2668. -cwCustomButtonToggle = <b>ToggleButton:</b>
  2669. -cwDateTimeFormatName = 日期时间格式
  2670. -cwDateTimeFormatDescription = DateTimeFormat类会根据区域的不同来格式化或解析日期和时间,如同NumberFormat类一样,使用一种灵活模式语法,支持定制模式和标准模式。
  2671. -cwDateTimeFormatFailedToParseInput =无法解析输入
  2672. -cwDateTimeFormatFormattedLabel = <b>格式化的值: </b>
  2673. -cwDateTimeFormatInvalidPattern =无效模板
  2674. -cwDateTimeFormatPatternLabel = <b>Ê®°ÊùøÔºö </b>
  2675. -cwDateTimeFormatPatterns = 完全日期时间, 长日期时间, 中日期时间, 短日期时间, 完全日期, 长日期, 中日期, 短日期, 完全时间, 长时间, 中时间, 短时间, 自定义风俗
  2676. -cwDateTimeFormatValueLabel = <b>需要格式的值: </b>
  2677. -cwDecoratorPanelFormDescription = 说明:
  2678. -cwDecoratorPanelFormName = Âêç:
  2679. -cwDecoratorPanelFormTitle = 输入搜索条件
  2680. -cwDialogBoxName = 对话框
  2681. -cwDialogBoxDescription = 可拖动的对话框(DialogBox)类似于一个有标题栏的窗口。 这种窗口还支持一种半透明模式,让部分背景透过弹出式窗口。
  2682. -cwDialogBoxMakeTransparent = 使其半透明
  2683. -cwDialogBoxCaption = 对话框示例
  2684. -cwDialogBoxClose = 关闭
  2685. -cwDialogBoxDetails = 以下是一个标准对话框组件的示例。
  2686. -cwDialogBoxItem = 项目
  2687. -cwDialogBoxListBoxInfo = 此列表框演示了将弹出式窗口拖放到上面的情况。 对于其他许多库,这一模糊的边际情形都无法正确显示。
  2688. -cwDialogBoxShowButton = 显示对话框
  2689. -cwDictionaryExampleName =字典
  2690. -cwDictionaryExampleDescription = 使用字典类,你可以查找在HTML网页定义的Javascript变量值。您不需要把这些变量放入GWT代码。有不少时候这样做有好处,比如你的翻译经常变更的,而你的html服务器不时更新翻译过的HTML网页。还比如可以用它来整合GWT模块与现有的网络应用程序。值得注意的是,字典的值是完全来自于作为宿主的HTML页面,而GWT的区域设置无法对其有任何影响。在这个例子中, Javascript的变量的声明是在HTML网页。
  2691. -cwDictionaryExampleLinkText = <b>这个例子使用下列Javascript的变量: </b>
  2692. -cwDisclosurePanelName = 公布面板
  2693. -cwDisclosurePanelDescription = 公布面板(DisclosurePanel)会在用户点击标题文字时显示或隐藏其内容。 该内容可以是简单的文本或任意部件,如图片或表单的高级选项。
  2694. -cwDisclosurePanelFormAdvancedCriteria = 高级条件
  2695. -cwDisclosurePanelFormDescription = 说明:
  2696. -cwDisclosurePanelFormGender = 性别:
  2697. -cwDisclosurePanelFormGenderOptions = 男, 女
  2698. -cwDisclosurePanelFormLocation = 位置:
  2699. -cwDisclosurePanelFormName = 姓名:
  2700. -cwDisclosurePanelFormTitle = <b>输入搜索条件</b>
  2701. -cwDockPanelName = 停靠面板
  2702. -cwDockPanelDescription = 停靠面板会使用罗盘方向来对齐内容。
  2703. -cwDockPanelCenter = 这个示例中在<code>DockPanel</code> 的中间位置有一个<code>ScrollPanel</code>。如果在中间放入很多内容,它就会变成页面内的可滚动区域,无需使用IFRAME。<br><br>此处使用了相当多无意义的文字,主要是为了可以滚动至可视区域的底部。否则,您恐怕不得不把它缩到很小才能看到那小巧的滚动条。
  2704. -cwDockPanelEast = 此为东侧组件
  2705. -cwDockPanelNorth1 = 此为北侧第一个组件
  2706. -cwDockPanelNorth2 = 此为北侧第二个组件
  2707. -cwDockPanelSouth1 = 此为南侧第一个组件
  2708. -cwDockPanelSouth2 = 此为南侧第二个组件
  2709. -cwDockPanelWest = 此为西侧组件
  2710. -cwFileUploadName = 文件上传
  2711. -cwFileUploadDescription = 使用AJAX异步上传文件。
  2712. -cwFileUploadNoFileError = 你必须选择要上传的文件
  2713. -cwFileUploadSelectFile = <b>选择一个文件:</b>
  2714. -cwFileUploadSuccessful = 文件上传完毕!
  2715. -cwFileUploadButton = 上传文件
  2716. -cwFlexTableName = 灵活表
  2717. -cwFlexTableDescription = 灵活表(FlexTable)支持跨行和跨列,这就让您可以用多种方式来布局。
  2718. -cwFlexTableAddRow = 添加行
  2719. -cwFlexTableDetails = ËøôÊò؉∏ĉ∏™ÂèØÊîØÊåÅ <B>colspans</B> Âíå <B>rowspans</B> ÁöÑ FlexTable„ÄÇ  ÊÇ®ÂèØ‰ª•Áî®ÂÆÉÊù•Â∏ɱÄȰµÈù¢Êàñ‰Ωú‰∏∫ÂÖ∂ÂÆÉÁâπÊÆäÁî®ÈÄîÁöÑ˰®„ÄÇ
  2720. -cwFlexTableRemoveRow = 删除行
  2721. -cwFlowPanelName = 自然布局面板
  2722. -cwFlowPanelDescription = 自然布局面板(FlowPanel)可让其中的内容自然布局。
  2723. -cwFlowPanelItem = 项目
  2724. -cwFrameName = 框
  2725. -cwFrameDescription = 框(Frame)是对IFRAME的封装,可以用来在您的网页嵌入其他网站的内容。
  2726. -cwFrameSetLocation =设定位置
  2727. -cwGridName = 网格
  2728. -cwGridDescription = 网格(Grid)
  2729. -cwHorizontalPanelName = 水平面板
  2730. -cwHorizontalPanelDescription = 水平面板(HorizontalPanel)不用换行而横向对齐内容。改变页面大小,看看内容如何保持水平对齐。
  2731. -cwHorizontalPanelButton = 按钮
  2732. -cwHorizontalSplitPanelName = 水平拆分面板
  2733. -cwHorizontalSplitPanelDescription = 水平拆分面板(HorizontalSplitPanel)允许用户可自由决定如何分配空间。
  2734. -cwHorizontalSplitPanelText = 以下文字显示了分隔条两侧的内容是如何布局的。
  2735. -cwHyperlinkName =超链
  2736. -cwHyperlinkDescription =在网页中嵌入超连结(Hyperlink),就可以链接到到网页的不同栏目。超连结会同时会自动生成历史令牌,这样用户就可以用浏览器后退按钮恢复到过去的相应状态。
  2737. -cwHyperlinkChoose = <b>选择一个栏目:</b>
  2738. -cwListBoxName = 列表框
  2739. -cwListBoxDescription = 预制的选择框和下拉列表
  2740. -cwListBoxCars = 紧凑,轿车,跑车,兑换,越野车,卡车
  2741. -cwListBoxCategories = 汽车, 体育, 度假景点
  2742. -cwListBoxSelectAll = <b>选择所有适用内容:</b>
  2743. -cwListBoxSelectCategory = <b>选择类别:</b>
  2744. -cwListBoxSports = 棒球, 篮球, 足球, 冰球, 曲棍球, 马球, 足球, 垒球, 水球
  2745. -cwListBoxVacations = 加勒比地区,大峡谷,巴黎,意大利,纽约,拉斯维加斯
  2746. -cwMenuBarName = 菜单栏
  2747. -cwMenuBarDescription = 菜单栏可用于遍历众多选项,还可支持嵌套子菜单。
  2748. -cwMenuBarEditCategory = 编辑
  2749. -cwMenuBarEditOptions = 撤消, 重复, 剪切, 复制, 粘贴
  2750. -cwMenuBarFileCategory = 文件
  2751. -cwMenuBarFileOptions = 新建, 打开, 关闭, 近期文件, 退出
  2752. -cwMenuBarFileRecents = Fishing in the desert.txt, How to tame a wild parrot, Idiots Guide to Emu Farms
  2753. -cwMenuBarGWTOptions = 下载, 示例, 源代码, GWT 高手程序
  2754. -cwMenuBarHelpCategory = 帮助
  2755. -cwMenuBarHelpOptions = 内容, 幸运饼, 关于GWT
  2756. -cwMenuBarPrompts = 感谢您选择菜单项, 选得很不错, 除了选择菜单项之外难道没有更好的选择?, 试试别的吧, 这不过是个菜单而已!, 又浪费了一次点击
  2757. -cwMessagesExampleName = 消息
  2758. -cwMessagesExampleDescription = 消息(Messages)界面提供了一种具有严格参数类型的信息生成方式,在编译阶段可以检查的参数的正确性。
  2759. -cwMessagesExampleArg0Label = <b>论点(0): </b>
  2760. -cwMessagesExampleArg1Label = <b>论点(1): </b>
  2761. -cwMessagesExampleArg2Label = <b>论点(2): </b>
  2762. -cwMessagesExampleFormattedLabel = <b>格式化信息: </b>
  2763. -cwMessagesExampleLinkText =这个例子使用了示例接口:
  2764. -cwMessagesExampleTemplateLabel = <b>‰ø°ÊÅØÊ®°ÊùøÔºö</b>
  2765. -cwNumberFormatName =数字格式
  2766. -cwNumberFormatDescription = NumberFormat类使用一种模式语法可以根据区域的不同来格式化或解析数字串。除了自定义模式外,还有一些方便的标准预制模式。
  2767. -cwNumberFormatFailedToParseInput =无法解析输入
  2768. -cwNumberFormatFormattedLabel = <b>格式化值:</b>
  2769. -cwNumberFormatInvalidPattern =无效模板
  2770. -cwNumberFormatPatternLabel = <b>Ê®°ÊùøÔºö</b>
  2771. -cwNumberFormatPatterns = 小数, 货币, 科学, 百分数, 自定义
  2772. -cwNumberFormatValueLabel = <b>需要格式的值:</b>
  2773. -cwPluralFormsExampleArg0Label = <b>论点(0): </b>
  2774. -cwPluralFormsExampleFormattedLabel = <b>格式化信息: </b>
  2775. -cwPluralFormsExampleLinkText = 这个例子使用了示例接口:
  2776. -cwRadioButtonName = 单选按钮
  2777. -cwRadioButtonDescription = 单选按钮部件
  2778. -cwRadioButtonColors = 蓝, 红, 黄, 绿
  2779. -cwRadioButtonSelectColor = <b>选择您喜欢的颜色:</b>
  2780. -cwRadioButtonSelectSport = <b>选择您喜欢的运动:</b>
  2781. -cwRadioButtonSports = 棒球, 篮球, 足球, 冰球, 足球, 水球
  2782. -cwRichTextName = 格式文本
  2783. -cwRichTextDescription = 主流浏览器基本都支持格式文本区域,但支持的程度并不同。GWT的格式文本部件可以自动调节到浏览器所能支持的程度。
  2784. -cwStackPanelName =栈面板
  2785. -cwStackPanelDescription = 栈面板(StackPanel)会纵向排列子部件,任意时刻只显示某一部件的内容,其他子部件则只显示其标题,用户可以通过点击标题切换。这是一种十分有用的垂直菜单系统。
  2786. -cwStackPanelContactsHeader = ÈÄöËÆØÂΩï
  2787. -cwStackPanelContacts = 曼德尔布洛特, 爱因斯坦, 笛卡尔, 萨吉特, 贝多芬, 费曼, 阿兰图灵, 冯诺依曼
  2788. -cwStackPanelContactsEmails = benoit@example.com, albert@example.com, rene@example.com, bob@example.com, ludwig@example.com, richard@example.com, alan@example.com, john@example.com
  2789. -cwStackPanelMailHeader =邮件
  2790. -cwStackPanelMailFolders = 收件箱, 草稿箱, 范本, 发送, 垃圾箱
  2791. -cwStackPanelFiltersHeader =过滤器
  2792. -cwStackPanelFilters = 所有, 重要, 读过, 未读过, 最近, 我发出的
  2793. -cwSuggestBoxName = 建议框
  2794. -cwSuggestBoxDescription = 通过服务器RPC调用或页面的静态数据来生成建议
  2795. -cwSuggestBoxLabel = <b>选择字词:</b>
  2796. -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
  2797. -cwTabPanelName = 标签面板
  2798. -cwTabPanelDescription = 通过多个标签划分内容。
  2799. -cwTabPanelTab0 = 点击标签可查看更多内容。
  2800. -cwTabPanelTab2 = 标签可通过 CSS 实现高度自定义化。
  2801. -cwTabPanelTabs = 主页, GWT 徽标, 更多信息
  2802. -cwTreeName = 树
  2803. -cwTreeDescription = 动态树部件可通过对服务器进行RPC调用来实现数据的延迟加载
  2804. -cwTreeDynamicLabel = <b>动态树:</b>
  2805. -cwTreeItem = 项目
  2806. -cwTreeStaticLabel = <b>静态树:</b>
  2807. -cwVerticalPanelName = 垂直面板
  2808. -cwVerticalPanelDescription = 垂直面板(VerticalPanel)可以纵向对齐相关内容。改变页面大小,看看内容如何保持垂直对齐的。
  2809. -cwVerticalPanelButton = 按钮
  2810. -cwVerticalSplitPanelName = 垂直拆分面板
  2811. -cwVerticalSplitPanelDescription = 垂直拆分面板(VerticalSplitPanel)允许用户自由决定如何分配空间。
  2812. -cwVerticalSplitPanelText = 以下文字显示了分隔条两侧的内容是如何流动的。
  2813. -
  2814. -# TODO: get official translations
  2815. -cwAnimationName = 动画
  2816. -cwAnimationDescription = 动画使你的程序具备时间效果。
  2817. -cwAnimationStart = 开始
  2818. -cwAnimationCancel = 取消
  2819. -cwAnimationOptions = 动画选项
  2820. -cwDecoratorPanelName = 装饰面板
  2821. -cwDecoratorPanelDescription = 装饰面板(DecoratorPanel)可以给任何部件添加圆角。
  2822. -cwTreeComposers =贝多芬, 布拉姆斯, 莫札特
  2823. -cwTreeConcertos =协奏曲
  2824. -cwTreeQuartets =四重奏
  2825. -cwTreeSonatas =奏鸣曲
  2826. -cwTreeSymphonies =交响乐
  2827. -cwTreeBeethovenWorkConcertos =第1号-○, 第2号- B大调大, 第3号- C小调, 第4号- G大, 第5号-电子商务大调
  2828. -cwTreeBeethovenWorkQuartets =六弦四重奏, 弦乐四重奏三, grosse赋格曲为弦乐四重奏
  2829. -cwTreeBeethovenWorkSonatas =奏鸣曲在未成年人, 调奏鸣曲F大
  2830. -cwTreeBeethovenWorkSymphonies =第2号-D大, 第2号- D大, 第3号- E大调大, 第4号- B大调大, 第5号- C小调, 第6号- F大, 号7 -一大, 第8号- F大, 第9号- D小调
  2831. -cwTreeBrahmsWorkConcertos =小提琴协奏曲, -未成年人, 钢琴协奏曲第1号- D小调, 钢琴协奏曲第2号-的B大调
  2832. -cwTreeBrahmsWorkQuartets =钢琴四重奏第1号-G小调钢琴四重奏第2号-的一个主要, 钢琴四重奏第3号- C小调, 弦乐四重奏第3号-的B小调
  2833. -cwTreeBrahmsWorkSonatas = 2•èÈ∏£Êõ≤ÂçïÁ∞ßÁư-FÂ∞èË∞É,  2ÂçïÁ∞ßÁư•èÈ∏£Êõ≤- E§ßË∞ɧß
  2834. -cwTreeBrahmsWorkSymphonies =第1号-C小调, 第2号- D小调, 第3号- F大, 第4号- E小调
  2835. -cwTreeMozartWorkConcertos =钢琴协奏曲第12号, 钢琴协奏曲第17号, 单簧管协奏曲, 小提琴协奏曲第5号, 小提琴协奏曲第4号
  2836. -cwDatePickerName =日期选择器
  2837. -cwDatePickerDescription =让用户选择日期使用DatePicker 。
  2838. -cwDatePickerBoxLabel = <br><br><br><b>DateBox与弹出DatePicker:</b>
  2839. -cwDatePickerLabel =<b>常驻DatePicker:</b>
  2840. -cwPluralFormsExampleName = 复数形式
  2841. -cwPluralFormsExampleDescription = 复数形式提供了一种方法来创建消息翻译依赖于数的东西。
  2842. -
  2843. diff --git a/src/com/google/gwt/sample/showcase/client/ShowcaseImages.java b/src/com/google/gwt/sample/showcase/client/ShowcaseImages.java
  2844. deleted file mode 100644
  2845. index 3e0b559..0000000
  2846. --- a/src/com/google/gwt/sample/showcase/client/ShowcaseImages.java
  2847. +++ /dev/null
  2848. @@ -1,53 +0,0 @@
  2849. -/*
  2850. - * Copyright 2008 Google Inc.
  2851. - *
  2852. - * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  2853. - * use this file except in compliance with the License. You may obtain a copy of
  2854. - * the License at
  2855. - *
  2856. - * http://www.apache.org/licenses/LICENSE-2.0
  2857. - *
  2858. - * Unless required by applicable law or agreed to in writing, software
  2859. - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  2860. - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  2861. - * License for the specific language governing permissions and limitations under
  2862. - * the License.
  2863. - */
  2864. -package com.google.gwt.sample.showcase.client;
  2865. -
  2866. -import com.google.gwt.resources.client.ClientBundle;
  2867. -import com.google.gwt.resources.client.ImageResource;
  2868. -
  2869. -/**
  2870. - * The images used throughout the Showcase.
  2871. - */
  2872. -public interface ShowcaseImages extends ClientBundle {
  2873. -  ImageResource catI18N();
  2874. -
  2875. -  ImageResource catLists();
  2876. -
  2877. -  ImageResource catOther();
  2878. -
  2879. -  ImageResource catPanels();
  2880. -
  2881. -  ImageResource catPopups();
  2882. -
  2883. -  ImageResource catTables();
  2884. -
  2885. -  ImageResource catTextInput();
  2886. -
  2887. -  ImageResource catWidgets();
  2888. -
  2889. -  ImageResource gwtLogo();
  2890. -
  2891. -  ImageResource gwtLogoThumb();
  2892. -
  2893. -  ImageResource jimmy();
  2894. -
  2895. -  ImageResource jimmyThumb();
  2896. -
  2897. -  /**
  2898. -   * Indicates the locale selection box.
  2899. -   */
  2900. -  ImageResource locale();
  2901. -}
  2902. \ No newline at end of file
  2903. diff --git a/src/com/google/gwt/sample/showcase/client/StyleSheetLoader.java b/src/com/google/gwt/sample/showcase/client/StyleSheetLoader.java
  2904. deleted file mode 100644
  2905. index 0252d9d..0000000
  2906. --- a/src/com/google/gwt/sample/showcase/client/StyleSheetLoader.java
  2907. +++ /dev/null
  2908. @@ -1,135 +0,0 @@
  2909. -/*
  2910. - * Copyright 2008 Google Inc.
  2911. - *
  2912. - * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  2913. - * use this file except in compliance with the License. You may obtain a copy of
  2914. - * the License at
  2915. - *
  2916. - * http://www.apache.org/licenses/LICENSE-2.0
  2917. - *
  2918. - * Unless required by applicable law or agreed to in writing, software
  2919. - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  2920. - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  2921. - * License for the specific language governing permissions and limitations under
  2922. - * the License.
  2923. - */
  2924. -package com.google.gwt.sample.showcase.client;
  2925. -
  2926. -import com.google.gwt.dom.client.Document;
  2927. -import com.google.gwt.dom.client.HeadElement;
  2928. -import com.google.gwt.dom.client.LinkElement;
  2929. -import com.google.gwt.user.client.Command;
  2930. -import com.google.gwt.user.client.DeferredCommand;
  2931. -import com.google.gwt.user.client.Timer;
  2932. -import com.google.gwt.user.client.ui.Label;
  2933. -import com.google.gwt.user.client.ui.RootPanel;
  2934. -
  2935. -/**
  2936. - * A utility class that loads style sheets.
  2937. - */
  2938. -public class StyleSheetLoader {
  2939. -  /**
  2940. -   * A {@link Timer} that creates a small reference widget used to determine
  2941. -   * when a new style sheet has finished loading. The widget has a natural width
  2942. -   * of 0px, but when the style sheet is loaded, the width changes to 5px. The
  2943. -   * style sheet should contain a style definition that is passed into the
  2944. -   * constructor that defines a height and width greater than 0px.
  2945. -   */
  2946. -  private static class StyleTesterTimer extends Timer {
  2947. -    private Command callback;
  2948. -    private Label refWidget;
  2949. -
  2950. -    /**
  2951. -     * Create a new {@link StyleTesterTimer}.
  2952. -     *
  2953. -     * @param refStyleName the reference style name
  2954. -     * @param callback the callback to execute when the style sheet loads
  2955. -     */
  2956. -    public StyleTesterTimer(String refStyleName, Command callback) {
  2957. -      this.callback = callback;
  2958. -
  2959. -      // Create the reference Widget
  2960. -      refWidget = new Label();
  2961. -      refWidget.setStyleName(refStyleName);
  2962. -      refWidget.getElement().getStyle().setProperty("position", "absolute");
  2963. -      refWidget.getElement().getStyle().setProperty("visibility", "hidden");
  2964. -      refWidget.getElement().getStyle().setProperty("display", "inline");
  2965. -      refWidget.getElement().getStyle().setPropertyPx("padding", 0);
  2966. -      refWidget.getElement().getStyle().setPropertyPx("margin", 0);
  2967. -      refWidget.getElement().getStyle().setPropertyPx("border", 0);
  2968. -      refWidget.getElement().getStyle().setPropertyPx("top", 0);
  2969. -      refWidget.getElement().getStyle().setPropertyPx("left", 0);
  2970. -      RootPanel.get().add(refWidget);
  2971. -    }
  2972. -
  2973. -    @Override
  2974. -    public void run() {
  2975. -      // Redisplay the reference widget so it redraws itself
  2976. -      refWidget.setVisible(false);
  2977. -      refWidget.setVisible(true);
  2978. -
  2979. -      // Check the dimensions of the reference widget
  2980. -      if (refWidget.getOffsetWidth() > 0) {
  2981. -        RootPanel.get().remove(refWidget);
  2982. -
  2983. -        // Fire the callback in a DeferredCommand to ensure the browser has
  2984. -        // enough time to parse the styles. Otherwise, we'll get weird styling
  2985. -        // issues.
  2986. -        DeferredCommand.addCommand(callback);
  2987. -      } else {
  2988. -        schedule(10);
  2989. -      }
  2990. -    }
  2991. -  }
  2992. -
  2993. -  /**
  2994. -   * Convenience method for getting the document's head element.
  2995. -   *
  2996. -   * @return the document's head element
  2997. -   */
  2998. -  public static native HeadElement getHeadElement()
  2999. -  /*-{
  3000. -    return $doc.getElementsByTagName("head")[0];
  3001. -  }-*/;
  3002. -
  3003. -  /**
  3004. -   * Load a style sheet onto the page.
  3005. -   *
  3006. -   * @param href the url of the style sheet
  3007. -   */
  3008. -  public static void loadStyleSheet(String href) {
  3009. -    LinkElement linkElem = Document.get().createLinkElement();
  3010. -    linkElem.setRel("stylesheet");
  3011. -    linkElem.setType("text/css");
  3012. -    linkElem.setHref(href);
  3013. -    getHeadElement().appendChild(linkElem);
  3014. -  }
  3015. -
  3016. -  /**
  3017. -   * Load a style sheet onto the page and fire a callback when it has loaded.
  3018. -   * The style sheet should contain a style definition called refStyleName that
  3019. -   * defines a height and width greater than 0px.
  3020. -   *
  3021. -   * @param href the url of the style sheet
  3022. -   * @param refStyleName the style name of the reference element
  3023. -   * @param callback the callback executed when the style sheet has loaded
  3024. -   */
  3025. -  public static void loadStyleSheet(String href, String refStyleName,
  3026. -      Command callback) {
  3027. -    loadStyleSheet(href);
  3028. -    waitForStyleSheet(refStyleName, callback);
  3029. -  }
  3030. -
  3031. -  /**
  3032. -   * Detect when a style sheet has loaded by placing an element on the page that
  3033. -   * is affected by a rule in the style sheet, as described in
  3034. -   * {@link #loadStyleSheet(String, String, Command)}. When the style sheet has
  3035. -   * loaded, the callback will be executed.
  3036. -   *
  3037. -   * @param refStyleName the style name of the reference element
  3038. -   * @param callback the callback executed when the style sheet has loaded
  3039. -   */
  3040. -  public static void waitForStyleSheet(String refStyleName, Command callback) {
  3041. -    new StyleTesterTimer(refStyleName, callback).run();
  3042. -  }
  3043. -}
  3044. diff --git a/src/com/google/gwt/sample/showcase/client/blank.png b/src/com/google/gwt/sample/showcase/client/blank.png
  3045. deleted file mode 100644
  3046. index b3f90a1..0000000
  3047. Binary files a/src/com/google/gwt/sample/showcase/client/blank.png and /dev/null differ
  3048. 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
  3049. index 7c9e6ed..0635f7d 100644
  3050. --- a/src/com/google/gwt/sample/showcase/client/content/i18n/CwConstantsExample.java
  3051. +++ b/src/com/google/gwt/sample/showcase/client/content/i18n/CwConstantsExample.java
  3052. @@ -1,12 +1,12 @@
  3053.  /*
  3054.   * Copyright 2008 Google Inc.
  3055. - *
  3056. + *
  3057.   * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  3058.   * use this file except in compliance with the License. You may obtain a copy of
  3059.   * the License at
  3060. - *
  3061. + *
  3062.   * http://www.apache.org/licenses/LICENSE-2.0
  3063. - *
  3064. + *
  3065.   * Unless required by applicable law or agreed to in writing, software
  3066.   * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  3067.   * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  3068. @@ -19,21 +19,20 @@ import com.google.gwt.core.client.GWT;
  3069.  import com.google.gwt.core.client.RunAsyncCallback;
  3070.  import com.google.gwt.event.dom.client.ClickEvent;
  3071.  import com.google.gwt.event.dom.client.ClickHandler;
  3072. -import com.google.gwt.event.logical.shared.SelectionEvent;
  3073.  import com.google.gwt.i18n.client.Constants;
  3074.  import com.google.gwt.sample.showcase.client.ContentWidget;
  3075. -import com.google.gwt.sample.showcase.client.ShowcaseConstants;
  3076.  import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseData;
  3077.  import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseRaw;
  3078.  import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseSource;
  3079.  import com.google.gwt.user.client.rpc.AsyncCallback;
  3080. +import com.google.gwt.user.client.ui.Anchor;
  3081.  import com.google.gwt.user.client.ui.FlexTable;
  3082. +import com.google.gwt.user.client.ui.FlexTable.FlexCellFormatter;
  3083.  import com.google.gwt.user.client.ui.HTML;
  3084.  import com.google.gwt.user.client.ui.HorizontalPanel;
  3085.  import com.google.gwt.user.client.ui.ListBox;
  3086.  import com.google.gwt.user.client.ui.TextBox;
  3087.  import com.google.gwt.user.client.ui.Widget;
  3088. -import com.google.gwt.user.client.ui.FlexTable.FlexCellFormatter;
  3089.  
  3090.  import java.util.Map;
  3091.  
  3092. @@ -46,8 +45,7 @@ public class CwConstantsExample extends ContentWidget {
  3093.     * The constants used in this Content Widget.
  3094.     */
  3095.    @ShowcaseSource
  3096. -  public static interface CwConstants extends Constants,
  3097. -      ContentWidget.CwConstants {
  3098. +  public static interface CwConstants extends Constants {
  3099.      String cwConstantsExampleDescription();
  3100.  
  3101.      String cwConstantsExampleLinkText();
  3102. @@ -59,55 +57,20 @@ public class CwConstantsExample extends ContentWidget {
  3103.     * An instance of the constants.
  3104.     */
  3105.    @ShowcaseData
  3106. -  private CwConstants constants;
  3107. -
  3108. -  /**
  3109. -   * Indicates whether or not we have loaded the {@link ExampleConstants} java
  3110. -   * source yet.
  3111. -   */
  3112. -  private boolean javaLoaded = false;
  3113. -
  3114. -  /**
  3115. -   * The widget used to display {@link ExampleConstants} java source.
  3116. -   */
  3117. -  private HTML javaWidget = null;
  3118. -
  3119. -  /**
  3120. -   * Indicates whether or not we have loaded the {@link ExampleConstants}
  3121. -   * properties source yet.
  3122. -   */
  3123. -  private boolean propertiesLoaded = false;
  3124. -
  3125. -  /**
  3126. -   * The widget used to display {@link ExampleConstants} properties source.
  3127. -   */
  3128. -  private HTML propertiesWidget = null;
  3129. +  private final CwConstants constants;
  3130.  
  3131.    /**
  3132.     * Constructor.
  3133. -   *
  3134. +   *
  3135.     * @param constants the constants
  3136.     */
  3137.    public CwConstantsExample(CwConstants constants) {
  3138. -    super(constants);
  3139. +    super(constants.cwConstantsExampleName(),
  3140. +        constants.cwConstantsExampleDescription(), false,
  3141. +        "ExampleConstants.java", "ExampleConstants.properties");
  3142.      this.constants = constants;
  3143.    }
  3144.  
  3145. -  @Override
  3146. -  public String getDescription() {
  3147. -    return constants.cwConstantsExampleDescription();
  3148. -  }
  3149. -
  3150. -  @Override
  3151. -  public String getName() {
  3152. -    return constants.cwConstantsExampleName();
  3153. -  }
  3154. -
  3155. -  @Override
  3156. -  public boolean hasStyle() {
  3157. -    return false;
  3158. -  }
  3159. -
  3160.    /**
  3161.     * Initialize this example.
  3162.     */
  3163. @@ -123,11 +86,11 @@ public class CwConstantsExample extends ContentWidget {
  3164.      layout.setCellSpacing(5);
  3165.  
  3166.      // Add a link to the source code of the Interface
  3167. -    HTML link = new HTML(
  3168. -        " <a href=\"javascript:void(0);\">ExampleConstants</a>");
  3169. +    final String rawFile = getSimpleName(ExampleConstants.class);
  3170. +    Anchor link = new Anchor(rawFile);
  3171.      link.addClickHandler(new ClickHandler() {
  3172.        public void onClick(ClickEvent event) {
  3173. -        selectTab(2);
  3174. +        fireRawSourceRequest(rawFile + ".java");
  3175.        }
  3176.      });
  3177.      HorizontalPanel linkPanel = new HorizontalPanel();
  3178. @@ -167,35 +130,8 @@ public class CwConstantsExample extends ContentWidget {
  3179.    }
  3180.  
  3181.    @Override
  3182. -  public void onInitializeComplete() {
  3183. -    addConstantsTab();
  3184. -  }
  3185. -
  3186. -  @Override
  3187. -  public void onSelection(SelectionEvent<Integer> event) {
  3188. -    super.onSelection(event);
  3189. -
  3190. -    int tabIndex = event.getSelectedItem().intValue();
  3191. -    if (!javaLoaded && tabIndex == 2) {
  3192. -      // Load ErrorMessages.java
  3193. -      javaLoaded = true;
  3194. -      String className = ExampleConstants.class.getName();
  3195. -      className = className.substring(className.lastIndexOf(".") + 1);
  3196. -      requestSourceContents(ShowcaseConstants.DST_SOURCE_RAW + className
  3197. -          + ".java.html", javaWidget, null);
  3198. -    } else if (!propertiesLoaded && tabIndex == 3) {
  3199. -      // Load ErrorMessages.properties
  3200. -      propertiesLoaded = true;
  3201. -      String className = ExampleConstants.class.getName();
  3202. -      className = className.substring(className.lastIndexOf(".") + 1);
  3203. -      requestSourceContents(ShowcaseConstants.DST_SOURCE_RAW + className
  3204. -          + ".properties.html", propertiesWidget, null);
  3205. -    }
  3206. -  }
  3207. -
  3208. -  @Override
  3209.    protected void asyncOnInitialize(final AsyncCallback<Widget> callback) {
  3210. -    GWT.runAsync(new RunAsyncCallback() {
  3211. +    GWT.runAsync(CwConstantsExample.class, new RunAsyncCallback() {
  3212.  
  3213.        public void onFailure(Throwable caught) {
  3214.          callback.onFailure(caught);
  3215. @@ -206,17 +142,4 @@ public class CwConstantsExample extends ContentWidget {
  3216.        }
  3217.      });
  3218.    }
  3219. -
  3220. -  /**
  3221. -   * Add a tab to this example to show the messages interface.
  3222. -   */
  3223. -  private void addConstantsTab() {
  3224. -    // Add a tab to show the interface
  3225. -    javaWidget = new HTML();
  3226. -    add(javaWidget, "ExampleConstants.java");
  3227. -
  3228. -    // Add a tab to show the properties
  3229. -    propertiesWidget = new HTML();
  3230. -    add(propertiesWidget, "ExampleConstants.properties");
  3231. -  }
  3232.  }
  3233. 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
  3234. index 5d09515..b111120 100644
  3235. --- a/src/com/google/gwt/sample/showcase/client/content/i18n/CwConstantsWithLookupExample.java
  3236. +++ b/src/com/google/gwt/sample/showcase/client/content/i18n/CwConstantsWithLookupExample.java
  3237. @@ -1,12 +1,12 @@
  3238.  /*
  3239.   * Copyright 2008 Google Inc.
  3240. - *
  3241. + *
  3242.   * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  3243.   * use this file except in compliance with the License. You may obtain a copy of
  3244.   * the License at
  3245. - *
  3246. + *
  3247.   * http://www.apache.org/licenses/LICENSE-2.0
  3248. - *
  3249. + *
  3250.   * Unless required by applicable law or agreed to in writing, software
  3251.   * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  3252.   * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  3253. @@ -21,20 +21,19 @@ import com.google.gwt.event.dom.client.ClickEvent;
  3254.  import com.google.gwt.event.dom.client.ClickHandler;
  3255.  import com.google.gwt.event.dom.client.KeyUpEvent;
  3256.  import com.google.gwt.event.dom.client.KeyUpHandler;
  3257. -import com.google.gwt.event.logical.shared.SelectionEvent;
  3258.  import com.google.gwt.i18n.client.Constants;
  3259.  import com.google.gwt.sample.showcase.client.ContentWidget;
  3260. -import com.google.gwt.sample.showcase.client.ShowcaseConstants;
  3261.  import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseData;
  3262.  import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseRaw;
  3263.  import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseSource;
  3264.  import com.google.gwt.user.client.rpc.AsyncCallback;
  3265. +import com.google.gwt.user.client.ui.Anchor;
  3266.  import com.google.gwt.user.client.ui.FlexTable;
  3267. +import com.google.gwt.user.client.ui.FlexTable.FlexCellFormatter;
  3268.  import com.google.gwt.user.client.ui.HTML;
  3269.  import com.google.gwt.user.client.ui.HorizontalPanel;
  3270.  import com.google.gwt.user.client.ui.TextBox;
  3271.  import com.google.gwt.user.client.ui.Widget;
  3272. -import com.google.gwt.user.client.ui.FlexTable.FlexCellFormatter;
  3273.  
  3274.  import java.util.MissingResourceException;
  3275.  
  3276. @@ -47,8 +46,7 @@ public class CwConstantsWithLookupExample extends ContentWidget {
  3277.     * The constants used in this Content Widget.
  3278.     */
  3279.    @ShowcaseSource
  3280. -  public static interface CwConstants extends Constants,
  3281. -      ContentWidget.CwConstants {
  3282. +  public static interface CwConstants extends Constants {
  3283.      String cwConstantsWithLookupExampleDescription();
  3284.  
  3285.      String cwConstantsWithLookupExampleLinkText();
  3286. @@ -85,55 +83,20 @@ public class CwConstantsWithLookupExample extends ContentWidget {
  3287.     * An instance of the constants.
  3288.     */
  3289.    @ShowcaseData
  3290. -  private CwConstants constants;
  3291. -
  3292. -  /**
  3293. -   * Indicates whether or not we have loaded the {@link ExampleConstants} java
  3294. -   * source yet.
  3295. -   */
  3296. -  private boolean javaLoaded = false;
  3297. -
  3298. -  /**
  3299. -   * The widget used to display {@link ExampleConstants} java source.
  3300. -   */
  3301. -  private HTML javaWidget = null;
  3302. -
  3303. -  /**
  3304. -   * Indicates whether or not we have loaded the {@link ExampleConstants}
  3305. -   * properties source yet.
  3306. -   */
  3307. -  private boolean propertiesLoaded = false;
  3308. -
  3309. -  /**
  3310. -   * The widget used to display {@link ExampleConstants} properties source.
  3311. -   */
  3312. -  private HTML propertiesWidget = null;
  3313. +  private final CwConstants constants;
  3314.  
  3315.    /**
  3316.     * Constructor.
  3317. -   *
  3318. +   *
  3319.     * @param constants the constants
  3320.     */
  3321.    public CwConstantsWithLookupExample(CwConstants constants) {
  3322. -    super(constants);
  3323. +    super(constants.cwConstantsWithLookupExampleName(),
  3324. +        constants.cwConstantsWithLookupExampleDescription(), false,
  3325. +        "ColorConstants.java", "ColorConstants.properties");
  3326.      this.constants = constants;
  3327.    }
  3328.  
  3329. -  @Override
  3330. -  public String getDescription() {
  3331. -    return constants.cwConstantsWithLookupExampleDescription();
  3332. -  }
  3333. -
  3334. -  @Override
  3335. -  public String getName() {
  3336. -    return constants.cwConstantsWithLookupExampleName();
  3337. -  }
  3338. -
  3339. -  @Override
  3340. -  public boolean hasStyle() {
  3341. -    return false;
  3342. -  }
  3343. -
  3344.    /**
  3345.     * Initialize this example.
  3346.     */
  3347. @@ -149,10 +112,11 @@ public class CwConstantsWithLookupExample extends ContentWidget {
  3348.      layout.setCellSpacing(5);
  3349.  
  3350.      // Add a link to the source code of the Interface
  3351. -    HTML link = new HTML(" <a href=\"javascript:void(0);\">ColorConstants</a>");
  3352. +    final String rawFile = getSimpleName(ColorConstants.class);
  3353. +    Anchor link = new Anchor(rawFile);
  3354.      link.addClickHandler(new ClickHandler() {
  3355.        public void onClick(ClickEvent event) {
  3356. -        selectTab(2);
  3357. +        fireRawSourceRequest(rawFile + ".java");
  3358.        }
  3359.      });
  3360.      HorizontalPanel linkPanel = new HorizontalPanel();
  3361. @@ -189,35 +153,8 @@ public class CwConstantsWithLookupExample extends ContentWidget {
  3362.    }
  3363.  
  3364.    @Override
  3365. -  public void onInitializeComplete() {
  3366. -    addConstantsTab();
  3367. -  }
  3368. -
  3369. -  @Override
  3370. -  public void onSelection(SelectionEvent<Integer> event) {
  3371. -    super.onSelection(event);
  3372. -
  3373. -    int tabIndex = event.getSelectedItem().intValue();
  3374. -    if (!javaLoaded && tabIndex == 2) {
  3375. -      // Load ErrorMessages.java
  3376. -      javaLoaded = true;
  3377. -      String className = ColorConstants.class.getName();
  3378. -      className = className.substring(className.lastIndexOf(".") + 1);
  3379. -      requestSourceContents(ShowcaseConstants.DST_SOURCE_RAW + className
  3380. -          + ".java.html", javaWidget, null);
  3381. -    } else if (!propertiesLoaded && tabIndex == 3) {
  3382. -      // Load ErrorMessages.properties
  3383. -      propertiesLoaded = true;
  3384. -      String className = ColorConstants.class.getName();
  3385. -      className = className.substring(className.lastIndexOf(".") + 1);
  3386. -      requestSourceContents(ShowcaseConstants.DST_SOURCE_RAW + className
  3387. -          + ".properties.html", propertiesWidget, null);
  3388. -    }
  3389. -  }
  3390. -
  3391. -  @Override
  3392.    protected void asyncOnInitialize(final AsyncCallback<Widget> callback) {
  3393. -    GWT.runAsync(new RunAsyncCallback() {
  3394. +    GWT.runAsync(CwConstantsWithLookupExample.class, new RunAsyncCallback() {
  3395.  
  3396.        public void onFailure(Throwable caught) {
  3397.          callback.onFailure(caught);
  3398. @@ -230,19 +167,6 @@ public class CwConstantsWithLookupExample extends ContentWidget {
  3399.    }
  3400.  
  3401.    /**
  3402. -   * Add a tab to this example to show the messages interface.
  3403. -   */
  3404. -  private void addConstantsTab() {
  3405. -    // Add a tab to show the interface
  3406. -    javaWidget = new HTML();
  3407. -    add(javaWidget, "ColorConstants.java");
  3408. -
  3409. -    // Add a tab to show the properties
  3410. -    propertiesWidget = new HTML();
  3411. -    add(propertiesWidget, "ColorConstants.properties");
  3412. -  }
  3413. -
  3414. -  /**
  3415.     * Lookup the color based on the value the user entered.
  3416.     */
  3417.    @ShowcaseSource
  3418. @@ -255,7 +179,8 @@ public class CwConstantsWithLookupExample extends ContentWidget {
  3419.          String color = colorConstants.getString(key);
  3420.          colorResultsBox.setText(color);
  3421.        } catch (MissingResourceException e) {
  3422. -        colorResultsBox.setText(constants.cwConstantsWithLookupExampleNoMatches());
  3423. +        colorResultsBox.setText(
  3424. +            constants.cwConstantsWithLookupExampleNoMatches());
  3425.        }
  3426.      }
  3427.    }
  3428. 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
  3429. index 677bcb9..2a2a0dd 100644
  3430. --- a/src/com/google/gwt/sample/showcase/client/content/i18n/CwDateTimeFormat.java
  3431. +++ b/src/com/google/gwt/sample/showcase/client/content/i18n/CwDateTimeFormat.java
  3432. @@ -1,12 +1,12 @@
  3433.  /*
  3434.   * Copyright 2008 Google Inc.
  3435. - *
  3436. + *
  3437.   * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  3438.   * use this file except in compliance with the License. You may obtain a copy of
  3439.   * the License at
  3440. - *
  3441. + *
  3442.   * http://www.apache.org/licenses/LICENSE-2.0
  3443. - *
  3444. + *
  3445.   * Unless required by applicable law or agreed to in writing, software
  3446.   * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  3447.   * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  3448. @@ -23,6 +23,7 @@ import com.google.gwt.event.dom.client.KeyUpEvent;
  3449.  import com.google.gwt.event.dom.client.KeyUpHandler;
  3450.  import com.google.gwt.i18n.client.Constants;
  3451.  import com.google.gwt.i18n.client.DateTimeFormat;
  3452. +import com.google.gwt.i18n.client.DateTimeFormat.PredefinedFormat;
  3453.  import com.google.gwt.sample.showcase.client.ContentWidget;
  3454.  import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseData;
  3455.  import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseSource;
  3456. @@ -47,8 +48,7 @@ public class CwDateTimeFormat extends ContentWidget {
  3457.     * The constants used in this Content Widget.
  3458.     */
  3459.    @ShowcaseSource
  3460. -  public static interface CwConstants extends Constants,
  3461. -      ContentWidget.CwConstants {
  3462. +  public static interface CwConstants extends Constants {
  3463.      String cwDateTimeFormatDescription();
  3464.  
  3465.      String cwDateTimeFormatFailedToParseInput();
  3466. @@ -75,7 +75,7 @@ public class CwDateTimeFormat extends ContentWidget {
  3467.     * An instance of the constants.
  3468.     */
  3469.    @ShowcaseData
  3470. -  private CwConstants constants;
  3471. +  private final CwConstants constants;
  3472.  
  3473.    /**
  3474.     * The {@link Label} where the formatted value is displayed.
  3475. @@ -103,24 +103,15 @@ public class CwDateTimeFormat extends ContentWidget {
  3476.  
  3477.    /**
  3478.     * Constructor.
  3479. -   *
  3480. +   *
  3481.     * @param constants the constants
  3482.     */
  3483.    public CwDateTimeFormat(CwConstants constants) {
  3484. -    super(constants);
  3485. +    super(constants.cwDateTimeFormatName(),
  3486. +        constants.cwDateTimeFormatDescription(), true);
  3487.      this.constants = constants;
  3488.    }
  3489.  
  3490. -  @Override
  3491. -  public String getDescription() {
  3492. -    return constants.cwDateTimeFormatDescription();
  3493. -  }
  3494. -
  3495. -  @Override
  3496. -  public String getName() {
  3497. -    return constants.cwDateTimeFormatName();
  3498. -  }
  3499. -
  3500.    /**
  3501.     * Initialize this example.
  3502.     */
  3503. @@ -187,7 +178,7 @@ public class CwDateTimeFormat extends ContentWidget {
  3504.  
  3505.    @Override
  3506.    protected void asyncOnInitialize(final AsyncCallback<Widget> callback) {
  3507. -    GWT.runAsync(new RunAsyncCallback() {
  3508. +    GWT.runAsync(CwDateTimeFormat.class, new RunAsyncCallback() {
  3509.  
  3510.        public void onFailure(Throwable caught) {
  3511.          callback.onFailure(caught);
  3512. @@ -201,7 +192,7 @@ public class CwDateTimeFormat extends ContentWidget {
  3513.  
  3514.    /**
  3515.     * Show an error message. Pass in null to clear the error message.
  3516. -   *
  3517. +   *
  3518.     * @param errorMsg the error message
  3519.     */
  3520.    @ShowcaseSource
  3521. @@ -243,69 +234,73 @@ public class CwDateTimeFormat extends ContentWidget {
  3522.      switch (patternList.getSelectedIndex()) {
  3523.        // Date + Time
  3524.        case 0:
  3525. -        activeFormat = DateTimeFormat.getFullDateTimeFormat();
  3526. +        activeFormat = DateTimeFormat.getFormat(
  3527. +            PredefinedFormat.DATE_TIME_FULL);
  3528.          patternBox.setText(activeFormat.getPattern());
  3529.          patternBox.setEnabled(false);
  3530.          break;
  3531.  
  3532.        case 1:
  3533. -        activeFormat = DateTimeFormat.getLongDateTimeFormat();
  3534. +        activeFormat = DateTimeFormat.getFormat(
  3535. +            PredefinedFormat.DATE_TIME_LONG);
  3536.          patternBox.setText(activeFormat.getPattern());
  3537.          patternBox.setEnabled(false);
  3538.          break;
  3539.        case 2:
  3540. -        activeFormat = DateTimeFormat.getMediumDateTimeFormat();
  3541. +        activeFormat = DateTimeFormat.getFormat(
  3542. +            PredefinedFormat.DATE_TIME_MEDIUM);
  3543.          patternBox.setText(activeFormat.getPattern());
  3544.          patternBox.setEnabled(false);
  3545.          break;
  3546.        case 3:
  3547. -        activeFormat = DateTimeFormat.getShortDateTimeFormat();
  3548. +        activeFormat = DateTimeFormat.getFormat(
  3549. +            PredefinedFormat.DATE_TIME_SHORT);
  3550.          patternBox.setText(activeFormat.getPattern());
  3551.          patternBox.setEnabled(false);
  3552.          break;
  3553.  
  3554.        // Date only
  3555.        case 4:
  3556. -        activeFormat = DateTimeFormat.getFullDateFormat();
  3557. +        activeFormat = DateTimeFormat.getFormat(PredefinedFormat.DATE_FULL);
  3558.          patternBox.setText(activeFormat.getPattern());
  3559.          patternBox.setEnabled(false);
  3560.          break;
  3561.  
  3562.        case 5:
  3563. -        activeFormat = DateTimeFormat.getLongDateFormat();
  3564. +        activeFormat = DateTimeFormat.getFormat(PredefinedFormat.DATE_LONG);
  3565.          patternBox.setText(activeFormat.getPattern());
  3566.          patternBox.setEnabled(false);
  3567.          break;
  3568.        case 6:
  3569. -        activeFormat = DateTimeFormat.getMediumDateFormat();
  3570. +        activeFormat = DateTimeFormat.getFormat(PredefinedFormat.DATE_MEDIUM);
  3571.          patternBox.setText(activeFormat.getPattern());
  3572.          patternBox.setEnabled(false);
  3573.          break;
  3574.        case 7:
  3575. -        activeFormat = DateTimeFormat.getShortDateFormat();
  3576. +        activeFormat = DateTimeFormat.getFormat(PredefinedFormat.DATE_SHORT);
  3577.          patternBox.setText(activeFormat.getPattern());
  3578.          patternBox.setEnabled(false);
  3579.          break;
  3580.  
  3581.        // Time only
  3582.        case 8:
  3583. -        activeFormat = DateTimeFormat.getFullTimeFormat();
  3584. +        activeFormat = DateTimeFormat.getFormat(PredefinedFormat.TIME_FULL);
  3585.          patternBox.setText(activeFormat.getPattern());
  3586.          patternBox.setEnabled(false);
  3587.          break;
  3588.  
  3589.        case 9:
  3590. -        activeFormat = DateTimeFormat.getLongTimeFormat();
  3591. +        activeFormat = DateTimeFormat.getFormat(PredefinedFormat.TIME_LONG);
  3592.          patternBox.setText(activeFormat.getPattern());
  3593.          patternBox.setEnabled(false);
  3594.          break;
  3595.        case 10:
  3596. -        activeFormat = DateTimeFormat.getMediumTimeFormat();
  3597. +        activeFormat = DateTimeFormat.getFormat(PredefinedFormat.TIME_MEDIUM);
  3598.          patternBox.setText(activeFormat.getPattern());
  3599.          patternBox.setEnabled(false);
  3600.          break;
  3601.        case 11:
  3602. -        activeFormat = DateTimeFormat.getShortTimeFormat();
  3603. +        activeFormat = DateTimeFormat.getFormat(PredefinedFormat.TIME_SHORT);
  3604.          patternBox.setText(activeFormat.getPattern());
  3605.          patternBox.setEnabled(false);
  3606.          break;
  3607. 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
  3608. index 16a02bf..3bf4319 100644
  3609. --- a/src/com/google/gwt/sample/showcase/client/content/i18n/CwDictionaryExample.java
  3610. +++ b/src/com/google/gwt/sample/showcase/client/content/i18n/CwDictionaryExample.java
  3611. @@ -1,12 +1,12 @@
  3612.  /*
  3613.   * Copyright 2008 Google Inc.
  3614. - *
  3615. + *
  3616.   * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  3617.   * use this file except in compliance with the License. You may obtain a copy of
  3618.   * the License at
  3619. - *
  3620. + *
  3621.   * http://www.apache.org/licenses/LICENSE-2.0
  3622. - *
  3623. + *
  3624.   * Unless required by applicable law or agreed to in writing, software
  3625.   * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  3626.   * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  3627. @@ -26,6 +26,7 @@ import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseStyle;
  3628.  import com.google.gwt.user.client.rpc.AsyncCallback;
  3629.  import com.google.gwt.user.client.ui.FlexTable;
  3630.  import com.google.gwt.user.client.ui.HTML;
  3631. +import com.google.gwt.user.client.ui.HTMLTable.CellFormatter;
  3632.  import com.google.gwt.user.client.ui.VerticalPanel;
  3633.  import com.google.gwt.user.client.ui.Widget;
  3634.  
  3635. @@ -40,8 +41,7 @@ public class CwDictionaryExample extends ContentWidget {
  3636.     * The constants used in this Content Widget.
  3637.     */
  3638.    @ShowcaseSource
  3639. -  public static interface CwConstants extends Constants,
  3640. -      ContentWidget.CwConstants {
  3641. +  public static interface CwConstants extends Constants {
  3642.      String cwDictionaryExampleDescription();
  3643.  
  3644.      String cwDictionaryExampleLinkText();
  3645. @@ -53,28 +53,19 @@ public class CwDictionaryExample extends ContentWidget {
  3646.     * An instance of the constants.
  3647.     */
  3648.    @ShowcaseData
  3649. -  private CwConstants constants;
  3650. +  private final CwConstants constants;
  3651.  
  3652.    /**
  3653.     * Constructor.
  3654. -   *
  3655. +   *
  3656.     * @param constants the constants
  3657.     */
  3658.    public CwDictionaryExample(CwConstants constants) {
  3659. -    super(constants);
  3660. +    super(constants.cwDictionaryExampleName(),
  3661. +        constants.cwDictionaryExampleDescription(), true);
  3662.      this.constants = constants;
  3663.    }
  3664.  
  3665. -  @Override
  3666. -  public String getDescription() {
  3667. -    return constants.cwDictionaryExampleDescription();
  3668. -  }
  3669. -
  3670. -  @Override
  3671. -  public String getName() {
  3672. -    return constants.cwDictionaryExampleName();
  3673. -  }
  3674. -
  3675.    /**
  3676.     * Initialize this example.
  3677.     */
  3678. @@ -85,10 +76,11 @@ public class CwDictionaryExample extends ContentWidget {
  3679.      VerticalPanel layout = new VerticalPanel();
  3680.  
  3681.      // Show the HTML variable that defines the dictionary
  3682. -    HTML source = new HTML("<pre>var userInfo = {\n"
  3683. -        + "&nbsp;&nbsp;name: \"Amelie Crutcher\",\n"
  3684. -        + "&nbsp;&nbsp;timeZone: \"EST\",\n" + "&nbsp;&nbsp;userID: \"123\",\n"
  3685. -        + "&nbsp;&nbsp;lastLogOn: \"2/2/2006\"\n" + "};</pre>\n");
  3686. +    HTML source = new HTML(
  3687. +        "<pre>var userInfo = {\n" + "&nbsp;&nbsp;name: \"Amelie Crutcher\",\n"
  3688. +            + "&nbsp;&nbsp;timeZone: \"EST\",\n"
  3689. +            + "&nbsp;&nbsp;userID: \"123\",\n"
  3690. +            + "&nbsp;&nbsp;lastLogOn: \"2/2/2006\"\n" + "};</pre>\n");
  3691.      source.getElement().setDir("ltr");
  3692.      source.getElement().getStyle().setProperty("textAlign", "left");
  3693.      layout.add(new HTML(constants.cwDictionaryExampleLinkText()));
  3694. @@ -96,6 +88,7 @@ public class CwDictionaryExample extends ContentWidget {
  3695.  
  3696.      // Create the Dictionary of data
  3697.      FlexTable userInfoGrid = new FlexTable();
  3698. +    CellFormatter formatter = userInfoGrid.getCellFormatter();
  3699.      Dictionary userInfo = Dictionary.getDictionary("userInfo");
  3700.      Set<String> keySet = userInfo.keySet();
  3701.      int columnCount = 0;
  3702. @@ -105,15 +98,13 @@ public class CwDictionaryExample extends ContentWidget {
  3703.  
  3704.        // Add a column with the data
  3705.        userInfoGrid.setHTML(0, columnCount, key);
  3706. +      formatter.addStyleName(0, columnCount, "cw-DictionaryExample-header");
  3707.        userInfoGrid.setHTML(1, columnCount, value);
  3708. +      formatter.addStyleName(1, columnCount, "cw-DictionaryExample-data");
  3709.  
  3710.        // Go to the next column
  3711.        columnCount++;
  3712.      }
  3713. -    userInfoGrid.getRowFormatter().setStyleName(0,
  3714. -        "cw-DictionaryExample-headerRow");
  3715. -    userInfoGrid.getRowFormatter().setStyleName(1,
  3716. -        "cw-DictionaryExample-dataRow");
  3717.      layout.add(new HTML("<br><br>"));
  3718.      layout.add(userInfoGrid);
  3719.  
  3720. @@ -123,7 +114,7 @@ public class CwDictionaryExample extends ContentWidget {
  3721.  
  3722.    @Override
  3723.    protected void asyncOnInitialize(final AsyncCallback<Widget> callback) {
  3724. -    GWT.runAsync(new RunAsyncCallback() {
  3725. +    GWT.runAsync(CwDictionaryExample.class, new RunAsyncCallback() {
  3726.  
  3727.        public void onFailure(Throwable caught) {
  3728.          callback.onFailure(caught);
  3729. 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
  3730. index 6e58216..6e6bd29 100644
  3731. --- a/src/com/google/gwt/sample/showcase/client/content/i18n/CwMessagesExample.java
  3732. +++ b/src/com/google/gwt/sample/showcase/client/content/i18n/CwMessagesExample.java
  3733. @@ -1,12 +1,12 @@
  3734.  /*
  3735.   * Copyright 2008 Google Inc.
  3736. - *
  3737. + *
  3738.   * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  3739.   * use this file except in compliance with the License. You may obtain a copy of
  3740.   * the License at
  3741. - *
  3742. + *
  3743.   * http://www.apache.org/licenses/LICENSE-2.0
  3744. - *
  3745. + *
  3746.   * Unless required by applicable law or agreed to in writing, software
  3747.   * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  3748.   * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  3749. @@ -21,21 +21,20 @@ import com.google.gwt.event.dom.client.ClickEvent;
  3750.  import com.google.gwt.event.dom.client.ClickHandler;
  3751.  import com.google.gwt.event.dom.client.KeyUpEvent;
  3752.  import com.google.gwt.event.dom.client.KeyUpHandler;
  3753. -import com.google.gwt.event.logical.shared.SelectionEvent;
  3754.  import com.google.gwt.i18n.client.Constants;
  3755.  import com.google.gwt.sample.showcase.client.ContentWidget;
  3756. -import com.google.gwt.sample.showcase.client.ShowcaseConstants;
  3757.  import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseData;
  3758.  import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseRaw;
  3759.  import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseSource;
  3760.  import com.google.gwt.user.client.rpc.AsyncCallback;
  3761. +import com.google.gwt.user.client.ui.Anchor;
  3762.  import com.google.gwt.user.client.ui.FlexTable;
  3763. +import com.google.gwt.user.client.ui.FlexTable.FlexCellFormatter;
  3764.  import com.google.gwt.user.client.ui.HTML;
  3765.  import com.google.gwt.user.client.ui.HasVerticalAlignment;
  3766.  import com.google.gwt.user.client.ui.HorizontalPanel;
  3767.  import com.google.gwt.user.client.ui.TextBox;
  3768.  import com.google.gwt.user.client.ui.Widget;
  3769. -import com.google.gwt.user.client.ui.FlexTable.FlexCellFormatter;
  3770.  
  3771.  /**
  3772.   * Example file.
  3773. @@ -46,8 +45,7 @@ public class CwMessagesExample extends ContentWidget {
  3774.     * The constants used in this Content Widget.
  3775.     */
  3776.    @ShowcaseSource
  3777. -  public static interface CwConstants extends Constants,
  3778. -      ContentWidget.CwConstants {
  3779. +  public static interface CwConstants extends Constants {
  3780.      String cwMessagesExampleArg0Label();
  3781.  
  3782.      String cwMessagesExampleArg1Label();
  3783. @@ -87,7 +85,7 @@ public class CwMessagesExample extends ContentWidget {
  3784.     * An instance of the constants.
  3785.     */
  3786.    @ShowcaseData
  3787. -  private CwConstants constants;
  3788. +  private final CwConstants constants;
  3789.  
  3790.    /**
  3791.     * The error messages used in this example.
  3792. @@ -102,52 +100,17 @@ public class CwMessagesExample extends ContentWidget {
  3793.    private HTML formattedMessage = null;
  3794.  
  3795.    /**
  3796. -   * Indicates whether or not we have loaded the {@link ErrorMessages} java
  3797. -   * source yet.
  3798. -   */
  3799. -  private boolean javaLoaded = false;
  3800. -
  3801. -  /**
  3802. -   * The widget used to display {@link ErrorMessages} java source.
  3803. -   */
  3804. -  private HTML javaWidget = null;
  3805. -
  3806. -  /**
  3807. -   * Indicates whether or not we have loaded the {@link ErrorMessages}
  3808. -   * properties source yet.
  3809. -   */
  3810. -  private boolean propertiesLoaded = false;
  3811. -
  3812. -  /**
  3813. -   * The widget used to display {@link ErrorMessages} properties source.
  3814. -   */
  3815. -  private HTML propertiesWidget = null;
  3816. -
  3817. -  /**
  3818.     * Constructor.
  3819. -   *
  3820. +   *
  3821.     * @param constants the constants
  3822.     */
  3823.    public CwMessagesExample(CwConstants constants) {
  3824. -    super(constants);
  3825. +    super(constants.cwMessagesExampleName(),
  3826. +        constants.cwMessagesExampleDescription(), false, "ErrorMessages.java",
  3827. +        "ErrorMessages.properties");
  3828.      this.constants = constants;
  3829.    }
  3830.  
  3831. -  @Override
  3832. -  public String getDescription() {
  3833. -    return constants.cwMessagesExampleDescription();
  3834. -  }
  3835. -
  3836. -  @Override
  3837. -  public String getName() {
  3838. -    return constants.cwMessagesExampleName();
  3839. -  }
  3840. -
  3841. -  @Override
  3842. -  public boolean hasStyle() {
  3843. -    return false;
  3844. -  }
  3845. -
  3846.    /**
  3847.     * Initialize this example.
  3848.     */
  3849. @@ -163,10 +126,11 @@ public class CwMessagesExample extends ContentWidget {
  3850.      layout.setCellSpacing(5);
  3851.  
  3852.      // Add a link to the source code of the Interface
  3853. -    HTML link = new HTML(" <a href=\"javascript:void(0);\">ErrorMessages</a>");
  3854. +    final String rawFile = getSimpleName(ErrorMessages.class);
  3855. +    Anchor link = new Anchor(rawFile);
  3856.      link.addClickHandler(new ClickHandler() {
  3857.        public void onClick(ClickEvent event) {
  3858. -        selectTab(2);
  3859. +        fireRawSourceRequest(rawFile + ".java");
  3860.        }
  3861.      });
  3862.      HorizontalPanel linkPanel = new HorizontalPanel();
  3863. @@ -221,35 +185,8 @@ public class CwMessagesExample extends ContentWidget {
  3864.    }
  3865.  
  3866.    @Override
  3867. -  public void onInitializeComplete() {
  3868. -    addMessagesTab();
  3869. -  }
  3870. -
  3871. -  @Override
  3872. -  public void onSelection(SelectionEvent<Integer> event) {
  3873. -    super.onSelection(event);
  3874. -
  3875. -    int tabIndex = event.getSelectedItem().intValue();
  3876. -    if (!javaLoaded && tabIndex == 2) {
  3877. -      // Load ErrorMessages.java
  3878. -      javaLoaded = true;
  3879. -      String className = ErrorMessages.class.getName();
  3880. -      className = className.substring(className.lastIndexOf(".") + 1);
  3881. -      requestSourceContents(ShowcaseConstants.DST_SOURCE_RAW + className
  3882. -          + ".java.html", javaWidget, null);
  3883. -    } else if (!propertiesLoaded && tabIndex == 3) {
  3884. -      // Load ErrorMessages.properties
  3885. -      propertiesLoaded = true;
  3886. -      String className = ErrorMessages.class.getName();
  3887. -      className = className.substring(className.lastIndexOf(".") + 1);
  3888. -      requestSourceContents(ShowcaseConstants.DST_SOURCE_RAW + className
  3889. -          + ".properties.html", propertiesWidget, null);
  3890. -    }
  3891. -  }
  3892. -
  3893. -  @Override
  3894.    protected void asyncOnInitialize(final AsyncCallback<Widget> callback) {
  3895. -    GWT.runAsync(new RunAsyncCallback() {
  3896. +    GWT.runAsync(CwMessagesExample.class, new RunAsyncCallback() {
  3897.  
  3898.        public void onFailure(Throwable caught) {
  3899.          callback.onFailure(caught);
  3900. @@ -262,19 +199,6 @@ public class CwMessagesExample extends ContentWidget {
  3901.    }
  3902.  
  3903.    /**
  3904. -   * Add a tab to this example to show the {@link ErrorMessages} source code.
  3905. -   */
  3906. -  private void addMessagesTab() {
  3907. -    // Add a tab to show the interface
  3908. -    javaWidget = new HTML();
  3909. -    add(javaWidget, "ErrorMessages.java");
  3910. -
  3911. -    // Add a tab to show the properties
  3912. -    propertiesWidget = new HTML();
  3913. -    add(propertiesWidget, "ErrorMessages.properties");
  3914. -  }
  3915. -
  3916. -  /**
  3917.     * Update the formatted message.
  3918.     */
  3919.    @ShowcaseSource
  3920. 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
  3921. index b90490b..a759f2a 100644
  3922. --- a/src/com/google/gwt/sample/showcase/client/content/i18n/CwNumberFormat.java
  3923. +++ b/src/com/google/gwt/sample/showcase/client/content/i18n/CwNumberFormat.java
  3924. @@ -1,12 +1,12 @@
  3925.  /*
  3926.   * Copyright 2008 Google Inc.
  3927. - *
  3928. + *
  3929.   * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  3930.   * use this file except in compliance with the License. You may obtain a copy of
  3931.   * the License at
  3932. - *
  3933. + *
  3934.   * http://www.apache.org/licenses/LICENSE-2.0
  3935. - *
  3936. + *
  3937.   * Unless required by applicable law or agreed to in writing, software
  3938.   * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  3939.   * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  3940. @@ -43,8 +43,7 @@ public class CwNumberFormat extends ContentWidget {
  3941.     * The constants used in this Content Widget.
  3942.     */
  3943.    @ShowcaseSource
  3944. -  public static interface CwConstants extends Constants,
  3945. -      ContentWidget.CwConstants {
  3946. +  public static interface CwConstants extends Constants {
  3947.      String cwNumberFormatDescription();
  3948.  
  3949.      String cwNumberFormatFailedToParseInput();
  3950. @@ -71,7 +70,7 @@ public class CwNumberFormat extends ContentWidget {
  3951.     * An instance of the constants.
  3952.     */
  3953.    @ShowcaseData
  3954. -  private CwConstants constants;
  3955. +  private final CwConstants constants;
  3956.  
  3957.    /**
  3958.     * The {@link Label} where the formatted value is displayed.
  3959. @@ -99,24 +98,15 @@ public class CwNumberFormat extends ContentWidget {
  3960.  
  3961.    /**
  3962.     * Constructor.
  3963. -   *
  3964. +   *
  3965.     * @param constants the constants
  3966.     */
  3967.    public CwNumberFormat(CwConstants constants) {
  3968. -    super(constants);
  3969. +    super(constants.cwNumberFormatName(), constants.cwNumberFormatDescription(),
  3970. +        true);
  3971.      this.constants = constants;
  3972.    }
  3973.  
  3974. -  @Override
  3975. -  public String getDescription() {
  3976. -    return constants.cwNumberFormatDescription();
  3977. -  }
  3978. -
  3979. -  @Override
  3980. -  public String getName() {
  3981. -    return constants.cwNumberFormatName();
  3982. -  }
  3983. -
  3984.    /**
  3985.     * Initialize this example.
  3986.     */
  3987. @@ -177,7 +167,7 @@ public class CwNumberFormat extends ContentWidget {
  3988.  
  3989.    @Override
  3990.    protected void asyncOnInitialize(final AsyncCallback<Widget> callback) {
  3991. -    GWT.runAsync(new RunAsyncCallback() {
  3992. +    GWT.runAsync(CwNumberFormat.class, new RunAsyncCallback() {
  3993.  
  3994.        public void onFailure(Throwable caught) {
  3995.          callback.onFailure(caught);
  3996. @@ -191,7 +181,7 @@ public class CwNumberFormat extends ContentWidget {
  3997.  
  3998.    /**
  3999.     * Show an error message. Pass in null to clear the error message.
  4000. -   *
  4001. +   *
  4002.     * @param errorMsg the error message
  4003.     */
  4004.    @ShowcaseSource
  4005. 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
  4006. index c4f3696..d4017c8 100644
  4007. --- a/src/com/google/gwt/sample/showcase/client/content/i18n/CwPluralFormsExample.java
  4008. +++ b/src/com/google/gwt/sample/showcase/client/content/i18n/CwPluralFormsExample.java
  4009. @@ -1,12 +1,12 @@
  4010.  /*
  4011.   * Copyright 2009 Google Inc.
  4012. - *
  4013. + *
  4014.   * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  4015.   * use this file except in compliance with the License. You may obtain a copy of
  4016.   * the License at
  4017. - *
  4018. + *
  4019.   * http://www.apache.org/licenses/LICENSE-2.0
  4020. - *
  4021. + *
  4022.   * Unless required by applicable law or agreed to in writing, software
  4023.   * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  4024.   * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  4025. @@ -21,22 +21,21 @@ import com.google.gwt.event.dom.client.ClickEvent;
  4026.  import com.google.gwt.event.dom.client.ClickHandler;
  4027.  import com.google.gwt.event.dom.client.KeyUpEvent;
  4028.  import com.google.gwt.event.dom.client.KeyUpHandler;
  4029. -import com.google.gwt.event.logical.shared.SelectionEvent;
  4030.  import com.google.gwt.i18n.client.Constants;
  4031.  import com.google.gwt.sample.showcase.client.ContentWidget;
  4032. -import com.google.gwt.sample.showcase.client.ShowcaseConstants;
  4033.  import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseData;
  4034.  import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseRaw;
  4035.  import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseSource;
  4036.  import com.google.gwt.user.client.rpc.AsyncCallback;
  4037. +import com.google.gwt.user.client.ui.Anchor;
  4038.  import com.google.gwt.user.client.ui.FlexTable;
  4039. +import com.google.gwt.user.client.ui.FlexTable.FlexCellFormatter;
  4040.  import com.google.gwt.user.client.ui.HTML;
  4041.  import com.google.gwt.user.client.ui.HasVerticalAlignment;
  4042.  import com.google.gwt.user.client.ui.HorizontalPanel;
  4043.  import com.google.gwt.user.client.ui.Label;
  4044.  import com.google.gwt.user.client.ui.TextBox;
  4045.  import com.google.gwt.user.client.ui.Widget;
  4046. -import com.google.gwt.user.client.ui.FlexTable.FlexCellFormatter;
  4047.  
  4048.  /**
  4049.   * Example file.
  4050. @@ -47,8 +46,7 @@ public class CwPluralFormsExample extends ContentWidget {
  4051.     * The constants used in this Content Widget.
  4052.     */
  4053.    @ShowcaseSource
  4054. -  public static interface CwConstants extends Constants,
  4055. -      ContentWidget.CwConstants {
  4056. +  public static interface CwConstants extends Constants {
  4057.      String cwPluralFormsExampleArg0Label();
  4058.  
  4059.      String cwPluralFormsExampleDescription();
  4060. @@ -70,13 +68,7 @@ public class CwPluralFormsExample extends ContentWidget {
  4061.     * An instance of the constants.
  4062.     */
  4063.    @ShowcaseData
  4064. -  private CwConstants constants;
  4065. -
  4066. -  /**
  4067. -   * The plural messages used in this example.
  4068. -   */
  4069. -  @ShowcaseData
  4070. -  private PluralMessages pluralMessages = null;
  4071. +  private final CwConstants constants;
  4072.  
  4073.    /**
  4074.     * The {@link Label} used to display the message.
  4075. @@ -85,52 +77,23 @@ public class CwPluralFormsExample extends ContentWidget {
  4076.    private Label formattedMessage = null;
  4077.  
  4078.    /**
  4079. -   * Indicates whether or not we have loaded the {@link PluralMessages} java
  4080. -   * source yet.
  4081. -   */
  4082. -  private boolean javaLoaded = false;
  4083. -
  4084. -  /**
  4085. -   * The widget used to display {@link PluralMessages} java source.
  4086. -   */
  4087. -  private HTML javaWidget = null;
  4088. -
  4089. -  /**
  4090. -   * Indicates whether or not we have loaded the {@link ErrorMessages}
  4091. -   * properties source yet.
  4092. -   */
  4093. -  private boolean propertiesLoaded = false;
  4094. -
  4095. -  /**
  4096. -   * The widget used to display {@link ErrorMessages} properties source.
  4097. +   * The plural messages used in this example.
  4098.     */
  4099. -  private HTML propertiesWidget = null;
  4100. +  @ShowcaseData
  4101. +  private PluralMessages pluralMessages = null;
  4102.  
  4103.    /**
  4104.     * Constructor.
  4105. -   *
  4106. +   *
  4107.     * @param constants the constants
  4108.     */
  4109.    public CwPluralFormsExample(CwConstants constants) {
  4110. -    super(constants);
  4111. +    super(constants.cwPluralFormsExampleName(),
  4112. +        constants.cwPluralFormsExampleDescription(), false,
  4113. +        "PluralMessages.java", "PluralMessages_fr.properties");
  4114.      this.constants = constants;
  4115.    }
  4116.  
  4117. -  @Override
  4118. -  public String getDescription() {
  4119. -    return constants.cwPluralFormsExampleDescription();
  4120. -  }
  4121. -
  4122. -  @Override
  4123. -  public String getName() {
  4124. -    return constants.cwPluralFormsExampleName();
  4125. -  }
  4126. -
  4127. -  @Override
  4128. -  public boolean hasStyle() {
  4129. -    return false;
  4130. -  }
  4131. -
  4132.    /**
  4133.     * Initialize this example.
  4134.     */
  4135. @@ -146,10 +109,11 @@ public class CwPluralFormsExample extends ContentWidget {
  4136.      layout.setCellSpacing(5);
  4137.  
  4138.      // Add a link to the source code of the Interface
  4139. -    HTML link = new HTML(" <a href=\"javascript:void(0);\">PluralMessages</a>");
  4140. +    final String rawFile = getSimpleName(PluralMessages.class);
  4141. +    Anchor link = new Anchor(rawFile);
  4142.      link.addClickHandler(new ClickHandler() {
  4143.        public void onClick(ClickEvent event) {
  4144. -        selectTab(2);
  4145. +        fireRawSourceRequest(rawFile + ".java");
  4146.        }
  4147.      });
  4148.      HorizontalPanel linkPanel = new HorizontalPanel();
  4149. @@ -185,35 +149,8 @@ public class CwPluralFormsExample extends ContentWidget {
  4150.    }
  4151.  
  4152.    @Override
  4153. -  public void onInitializeComplete() {
  4154. -    addMessagesTab();
  4155. -  }
  4156. -
  4157. -  @Override
  4158. -  public void onSelection(SelectionEvent<Integer> event) {
  4159. -    super.onSelection(event);
  4160. -
  4161. -    int tabIndex = event.getSelectedItem().intValue();
  4162. -    if (!javaLoaded && tabIndex == 2) {
  4163. -      // Load PluralMessages.java
  4164. -      javaLoaded = true;
  4165. -      String className = PluralMessages.class.getName();
  4166. -      className = className.substring(className.lastIndexOf(".") + 1);
  4167. -      requestSourceContents(ShowcaseConstants.DST_SOURCE_RAW + className
  4168. -          + ".java.html", javaWidget, null);
  4169. -    } else if (!propertiesLoaded && tabIndex == 3) {
  4170. -      // Load ErrorMessages.properties
  4171. -      propertiesLoaded = true;
  4172. -      String className = PluralMessages.class.getName();
  4173. -      className = className.substring(className.lastIndexOf(".") + 1);
  4174. -      requestSourceContents(ShowcaseConstants.DST_SOURCE_RAW + className
  4175. -          + "_fr.properties.html", propertiesWidget, null);
  4176. -    }
  4177. -  }
  4178. -
  4179. -  @Override
  4180.    protected void asyncOnInitialize(final AsyncCallback<Widget> callback) {
  4181. -    GWT.runAsync(new RunAsyncCallback() {
  4182. +    GWT.runAsync(CwPluralFormsExample.class, new RunAsyncCallback() {
  4183.  
  4184.        public void onFailure(Throwable caught) {
  4185.          callback.onFailure(caught);
  4186. @@ -226,19 +163,6 @@ public class CwPluralFormsExample extends ContentWidget {
  4187.    }
  4188.  
  4189.    /**
  4190. -   * Add a tab to this example to show the {@link PluralMessages} source code.
  4191. -   */
  4192. -  private void addMessagesTab() {
  4193. -    // Add a tab to show the interface
  4194. -    javaWidget = new HTML();
  4195. -    add(javaWidget, "PluralMessages.java");
  4196. -
  4197. -    // Add a tab to show the properties
  4198. -    propertiesWidget = new HTML();
  4199. -    add(propertiesWidget, "PluralMessages_fr.properties");
  4200. -  }
  4201. -
  4202. -  /**
  4203.     * Update the formatted message.
  4204.     */
  4205.    @ShowcaseSource
  4206. @@ -250,5 +174,4 @@ public class CwPluralFormsExample extends ContentWidget {
  4207.        // Ignore.
  4208.      }
  4209.    }
  4210. -
  4211.  }
  4212. 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
  4213. index ced13b6..a9b1947 100644
  4214. --- a/src/com/google/gwt/sample/showcase/client/content/i18n/PluralMessages.java
  4215. +++ b/src/com/google/gwt/sample/showcase/client/content/i18n/PluralMessages.java
  4216. @@ -25,6 +25,7 @@ import com.google.gwt.i18n.client.LocalizableResource.DefaultLocale;
  4217.  @DefaultLocale("en")
  4218.  public interface PluralMessages extends Messages {
  4219.    @DefaultMessage("You have {0} trees.")
  4220. -  @PluralText({"one", "You have one tree."})
  4221. +  @PluralText({"one", "You have one tree.",
  4222. +      "=0", "You have no trees"})
  4223.    String treeCount(@PluralCount int count);
  4224.  }
  4225. 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
  4226. index ed632cc..a484a4f 100644
  4227. --- a/src/com/google/gwt/sample/showcase/client/content/lists/CwListBox.java
  4228. +++ b/src/com/google/gwt/sample/showcase/client/content/lists/CwListBox.java
  4229. @@ -1,12 +1,12 @@
  4230.  /*
  4231.   * Copyright 2008 Google Inc.
  4232. - *
  4233. + *
  4234.   * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  4235.   * use this file except in compliance with the License. You may obtain a copy of
  4236.   * the License at
  4237. - *
  4238. + *
  4239.   * http://www.apache.org/licenses/LICENSE-2.0
  4240. - *
  4241. + *
  4242.   * Unless required by applicable law or agreed to in writing, software
  4243.   * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  4244.   * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  4245. @@ -40,8 +40,7 @@ public class CwListBox extends ContentWidget {
  4246.     * The constants used in this Content Widget.
  4247.     */
  4248.    @ShowcaseSource
  4249. -  public static interface CwConstants extends Constants,
  4250. -      ContentWidget.CwConstants {
  4251. +  public static interface CwConstants extends Constants {
  4252.      String[] cwListBoxCars();
  4253.  
  4254.      String[] cwListBoxCategories();
  4255. @@ -63,28 +62,18 @@ public class CwListBox extends ContentWidget {
  4256.     * An instance of the constants.
  4257.     */
  4258.    @ShowcaseData
  4259. -  private CwConstants constants;
  4260. +  private final CwConstants constants;
  4261.  
  4262.    /**
  4263.     * Constructor.
  4264. -   *
  4265. +   *
  4266.     * @param constants the constants
  4267.     */
  4268.    public CwListBox(CwConstants constants) {
  4269. -    super(constants);
  4270. +    super(constants.cwListBoxName(), constants.cwListBoxDescription(), true);
  4271.      this.constants = constants;
  4272.    }
  4273.  
  4274. -  @Override
  4275. -  public String getDescription() {
  4276. -    return constants.cwListBoxDescription();
  4277. -  }
  4278. -
  4279. -  @Override
  4280. -  public String getName() {
  4281. -    return constants.cwListBoxName();
  4282. -  }
  4283. -
  4284.    /**
  4285.     * Initialize this example.
  4286.     */
  4287. @@ -137,7 +126,7 @@ public class CwListBox extends ContentWidget {
  4288.  
  4289.    @Override
  4290.    protected void asyncOnInitialize(final AsyncCallback<Widget> callback) {
  4291. -    GWT.runAsync(new RunAsyncCallback() {
  4292. +    GWT.runAsync(CwListBox.class, new RunAsyncCallback() {
  4293.  
  4294.        public void onFailure(Throwable caught) {
  4295.          callback.onFailure(caught);
  4296. @@ -151,7 +140,7 @@ public class CwListBox extends ContentWidget {
  4297.  
  4298.    /**
  4299.     * Display the options for a given category in the list box.
  4300. -   *
  4301. +   *
  4302.     * @param listBox the ListBox to add the options to
  4303.     * @param category the category index
  4304.     */
  4305. 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
  4306. index cc22c0d..ba121cc 100644
  4307. --- a/src/com/google/gwt/sample/showcase/client/content/lists/CwMenuBar.java
  4308. +++ b/src/com/google/gwt/sample/showcase/client/content/lists/CwMenuBar.java
  4309. @@ -1,12 +1,12 @@
  4310.  /*
  4311.   * Copyright 2008 Google Inc.
  4312. - *
  4313. + *
  4314.   * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  4315.   * use this file except in compliance with the License. You may obtain a copy of
  4316.   * the License at
  4317. - *
  4318. + *
  4319.   * http://www.apache.org/licenses/LICENSE-2.0
  4320. - *
  4321. + *
  4322.   * Unless required by applicable law or agreed to in writing, software
  4323.   * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  4324.   * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  4325. @@ -40,8 +40,7 @@ public class CwMenuBar extends ContentWidget {
  4326.     * The constants used in this Content Widget.
  4327.     */
  4328.    @ShowcaseSource
  4329. -  public static interface CwConstants extends Constants,
  4330. -      ContentWidget.CwConstants {
  4331. +  public static interface CwConstants extends Constants {
  4332.      String cwMenuBarDescription();
  4333.  
  4334.      String cwMenuBarEditCategory();
  4335. @@ -69,28 +68,18 @@ public class CwMenuBar extends ContentWidget {
  4336.     * An instance of the constants.
  4337.     */
  4338.    @ShowcaseData
  4339. -  private CwConstants constants;
  4340. +  private final CwConstants constants;
  4341.  
  4342.    /**
  4343.     * Constructor.
  4344. -   *
  4345. +   *
  4346.     * @param constants the constants
  4347.     */
  4348.    public CwMenuBar(CwConstants constants) {
  4349. -    super(constants);
  4350. +    super(constants.cwMenuBarName(), constants.cwMenuBarDescription(), true);
  4351.      this.constants = constants;
  4352.    }
  4353.  
  4354. -  @Override
  4355. -  public String getDescription() {
  4356. -    return constants.cwMenuBarDescription();
  4357. -  }
  4358. -
  4359. -  @Override
  4360. -  public String getName() {
  4361. -    return constants.cwMenuBarName();
  4362. -  }
  4363. -
  4364.    /**
  4365.     * Initialize this example.
  4366.     */
  4367. @@ -168,7 +157,7 @@ public class CwMenuBar extends ContentWidget {
  4368.  
  4369.    @Override
  4370.    protected void asyncOnInitialize(final AsyncCallback<Widget> callback) {
  4371. -    GWT.runAsync(new RunAsyncCallback() {
  4372. +    GWT.runAsync(CwMenuBar.class, new RunAsyncCallback() {
  4373.  
  4374.        public void onFailure(Throwable caught) {
  4375.          callback.onFailure(caught);
  4376. 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
  4377. index 493417b..610a011 100644
  4378. --- a/src/com/google/gwt/sample/showcase/client/content/lists/CwStackPanel.java
  4379. +++ b/src/com/google/gwt/sample/showcase/client/content/lists/CwStackPanel.java
  4380. @@ -1,12 +1,12 @@
  4381.  /*
  4382.   * Copyright 2008 Google Inc.
  4383. - *
  4384. + *
  4385.   * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  4386.   * use this file except in compliance with the License. You may obtain a copy of
  4387.   * the License at
  4388. - *
  4389. + *
  4390.   * http://www.apache.org/licenses/LICENSE-2.0
  4391. - *
  4392. + *
  4393.   * Unless required by applicable law or agreed to in writing, software
  4394.   * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  4395.   * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  4396. @@ -27,6 +27,7 @@ import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseSource;
  4397.  import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseStyle;
  4398.  import com.google.gwt.user.client.rpc.AsyncCallback;
  4399.  import com.google.gwt.user.client.ui.AbstractImagePrototype;
  4400. +import com.google.gwt.user.client.ui.Anchor;
  4401.  import com.google.gwt.user.client.ui.CheckBox;
  4402.  import com.google.gwt.user.client.ui.DecoratedStackPanel;
  4403.  import com.google.gwt.user.client.ui.HTML;
  4404. @@ -42,7 +43,7 @@ import com.google.gwt.user.client.ui.Widget;
  4405.  /**
  4406.   * Example file.
  4407.   */
  4408. -@ShowcaseStyle(value = {
  4409. +@ShowcaseStyle({
  4410.      ".gwt-DecoratedStackPanel", "html>body .gwt-DecoratedStackPanel",
  4411.      "* html .gwt-DecoratedStackPanel", ".cw-StackPanelHeader"})
  4412.  public class CwStackPanel extends ContentWidget {
  4413. @@ -50,8 +51,7 @@ public class CwStackPanel extends ContentWidget {
  4414.     * The constants used in this Content Widget.
  4415.     */
  4416.    @ShowcaseSource
  4417. -  public static interface CwConstants extends Constants,
  4418. -      ContentWidget.CwConstants {
  4419. +  public static interface CwConstants extends Constants {
  4420.      String[] cwStackPanelContacts();
  4421.  
  4422.      String[] cwStackPanelContactsEmails();
  4423. @@ -73,7 +73,7 @@ public class CwStackPanel extends ContentWidget {
  4424.  
  4425.    /**
  4426.     * Specifies the images that will be bundled for this example.
  4427. -   *
  4428. +   *
  4429.     * We will override the leaf image used in the tree. Instead of using a blank
  4430.     * 16x16 image, we will use a blank 1x1 image so it does not take up any
  4431.     * space. Each TreeItem will use its own custom image.
  4432. @@ -109,33 +109,19 @@ public class CwStackPanel extends ContentWidget {
  4433.     * An instance of the constants.
  4434.     */
  4435.    @ShowcaseData
  4436. -  private CwConstants constants;
  4437. +  private final CwConstants constants;
  4438.  
  4439.    /**
  4440.     * Constructor.
  4441. -   *
  4442. +   *
  4443.     * @param constants the constants
  4444.     */
  4445.    public CwStackPanel(CwConstants constants) {
  4446. -    super(constants);
  4447. +    super(constants.cwStackPanelName(), constants.cwStackPanelDescription(),
  4448. +        true);
  4449.      this.constants = constants;
  4450.    }
  4451.  
  4452. -  @Override
  4453. -  public String getDescription() {
  4454. -    return constants.cwStackPanelDescription();
  4455. -  }
  4456. -
  4457. -  @Override
  4458. -  public String getName() {
  4459. -    return constants.cwStackPanelName();
  4460. -  }
  4461. -
  4462. -  @Override
  4463. -  public boolean hasStyle() {
  4464. -    return true;
  4465. -  }
  4466. -
  4467.    /**
  4468.     * Initialize this example.
  4469.     */
  4470. @@ -150,8 +136,8 @@ public class CwStackPanel extends ContentWidget {
  4471.      stackPanel.setWidth("200px");
  4472.  
  4473.      // Add the Mail folders
  4474. -    String mailHeader = getHeaderString(constants.cwStackPanelMailHeader(),
  4475. -        images.mailgroup());
  4476. +    String mailHeader = getHeaderString(
  4477. +        constants.cwStackPanelMailHeader(), images.mailgroup());
  4478.      stackPanel.add(createMailItem(images), mailHeader, true);
  4479.  
  4480.      // Add a list of filters
  4481. @@ -171,7 +157,7 @@ public class CwStackPanel extends ContentWidget {
  4482.  
  4483.    @Override
  4484.    protected void asyncOnInitialize(final AsyncCallback<Widget> callback) {
  4485. -    GWT.runAsync(new RunAsyncCallback() {
  4486. +    GWT.runAsync(CwStackPanel.class, new RunAsyncCallback() {
  4487.  
  4488.        public void onFailure(Throwable caught) {
  4489.          callback.onFailure(caught);
  4490. @@ -189,7 +175,7 @@ public class CwStackPanel extends ContentWidget {
  4491.  
  4492.    /**
  4493.     * Create the list of Contacts.
  4494. -   *
  4495. +   *
  4496.     * @param images the {@link Images} used in the Contacts
  4497.     * @return the list of contacts
  4498.     */
  4499. @@ -212,8 +198,7 @@ public class CwStackPanel extends ContentWidget {
  4500.      for (int i = 0; i < contactNames.length; i++) {
  4501.        final String contactName = contactNames[i];
  4502.        final String contactEmail = contactEmails[i];
  4503. -      final HTML contactLink = new HTML("<a href=\"javascript:undefined;\">"
  4504. -          + contactName + "</a>");
  4505. +      final Anchor contactLink = new Anchor(contactName);
  4506.        contactsPanel.add(contactLink);
  4507.  
  4508.        // Open the contact info popup when the user clicks a contact
  4509. @@ -235,7 +220,7 @@ public class CwStackPanel extends ContentWidget {
  4510.  
  4511.    /**
  4512.     * Create the list of filters for the Filters item.
  4513. -   *
  4514. +   *
  4515.     * @return the list of filters
  4516.     */
  4517.    @ShowcaseSource
  4518. @@ -250,7 +235,7 @@ public class CwStackPanel extends ContentWidget {
  4519.  
  4520.    /**
  4521.     * Create the {@link Tree} of Mail options.
  4522. -   *
  4523. +   *
  4524.     * @param images the {@link Images} used in the Mail options
  4525.     * @return the {@link Tree} of mail options
  4526.     */
  4527. @@ -271,7 +256,7 @@ public class CwStackPanel extends ContentWidget {
  4528.    /**
  4529.     * Get a string representation of the header that includes an image and some
  4530.     * text.
  4531. -   *
  4532. +   *
  4533.     * @param text the header text
  4534.     * @param image the {@link ImageResource} to add next to the header
  4535.     * @return the header as a string
  4536. 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
  4537. index 1d720be..3b400e9 100644
  4538. --- a/src/com/google/gwt/sample/showcase/client/content/lists/CwSuggestBox.java
  4539. +++ b/src/com/google/gwt/sample/showcase/client/content/lists/CwSuggestBox.java
  4540. @@ -1,12 +1,12 @@
  4541.  /*
  4542.   * Copyright 2008 Google Inc.
  4543. - *
  4544. + *
  4545.   * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  4546.   * use this file except in compliance with the License. You may obtain a copy of
  4547.   * the License at
  4548. - *
  4549. + *
  4550.   * http://www.apache.org/licenses/LICENSE-2.0
  4551. - *
  4552. + *
  4553.   * Unless required by applicable law or agreed to in writing, software
  4554.   * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  4555.   * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  4556. @@ -33,15 +33,15 @@ import com.google.gwt.user.client.ui.Widget;
  4557.   * Example file.
  4558.   */
  4559.  @ShowcaseStyle({
  4560. -    ".gwt-SuggestBox", ".gwt-SuggestBoxPopup",
  4561. -    "html>body .gwt-SuggestBoxPopup", "* html .gwt-SuggestBoxPopup"})
  4562. +    ".gwt-SuggestBox", ".gwt-SuggestBoxPopup", "html>body .gwt-SuggestBoxPopup",
  4563. +    "* html .gwt-SuggestBoxPopup"})
  4564.  public class CwSuggestBox extends ContentWidget {
  4565. +
  4566.    /**
  4567.     * The constants used in this Content Widget.
  4568.     */
  4569.    @ShowcaseSource
  4570. -  public static interface CwConstants extends Constants,
  4571. -      ContentWidget.CwConstants {
  4572. +  public static interface CwConstants extends Constants {
  4573.      String cwSuggestBoxDescription();
  4574.  
  4575.      String cwSuggestBoxLabel();
  4576. @@ -55,28 +55,19 @@ public class CwSuggestBox extends ContentWidget {
  4577.     * An instance of the constants.
  4578.     */
  4579.    @ShowcaseData
  4580. -  private CwConstants constants;
  4581. +  private final CwConstants constants;
  4582.  
  4583.    /**
  4584.     * Constructor.
  4585. -   *
  4586. +   *
  4587.     * @param constants the constants
  4588.     */
  4589.    public CwSuggestBox(CwConstants constants) {
  4590. -    super(constants);
  4591. +    super(constants.cwSuggestBoxName(), constants.cwSuggestBoxDescription(),
  4592. +        true);
  4593.      this.constants = constants;
  4594.    }
  4595.  
  4596. -  @Override
  4597. -  public String getDescription() {
  4598. -    return constants.cwSuggestBoxDescription();
  4599. -  }
  4600. -
  4601. -  @Override
  4602. -  public String getName() {
  4603. -    return constants.cwSuggestBoxName();
  4604. -  }
  4605. -
  4606.    /**
  4607.     * Initialize this example.
  4608.     */
  4609. @@ -103,7 +94,7 @@ public class CwSuggestBox extends ContentWidget {
  4610.  
  4611.    @Override
  4612.    protected void asyncOnInitialize(final AsyncCallback<Widget> callback) {
  4613. -    GWT.runAsync(new RunAsyncCallback() {
  4614. +    GWT.runAsync(CwSuggestBox.class, new RunAsyncCallback() {
  4615.  
  4616.        public void onFailure(Throwable caught) {
  4617.          callback.onFailure(caught);
  4618. 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
  4619. index a17ae8a..9f4ce98 100644
  4620. --- a/src/com/google/gwt/sample/showcase/client/content/lists/CwTree.java
  4621. +++ b/src/com/google/gwt/sample/showcase/client/content/lists/CwTree.java
  4622. @@ -1,12 +1,12 @@
  4623.  /*
  4624.   * Copyright 2008 Google Inc.
  4625. - *
  4626. + *
  4627.   * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  4628.   * use this file except in compliance with the License. You may obtain a copy of
  4629.   * the License at
  4630. - *
  4631. + *
  4632.   * http://www.apache.org/licenses/LICENSE-2.0
  4633. - *
  4634. + *
  4635.   * Unless required by applicable law or agreed to in writing, software
  4636.   * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  4637.   * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  4638. @@ -43,8 +43,7 @@ public class CwTree extends ContentWidget {
  4639.     * The constants used in this Content Widget.
  4640.     */
  4641.    @ShowcaseSource
  4642. -  public static interface CwConstants extends Constants,
  4643. -      ContentWidget.CwConstants {
  4644. +  public static interface CwConstants extends Constants {
  4645.      String[] cwTreeBeethovenWorkConcertos();
  4646.  
  4647.      String[] cwTreeBeethovenWorkQuartets();
  4648. @@ -88,28 +87,18 @@ public class CwTree extends ContentWidget {
  4649.     * An instance of the constants.
  4650.     */
  4651.    @ShowcaseData
  4652. -  private CwConstants constants;
  4653. +  private final CwConstants constants;
  4654.  
  4655.    /**
  4656.     * Constructor.
  4657. -   *
  4658. +   *
  4659.     * @param constants the constants
  4660.     */
  4661.    public CwTree(CwConstants constants) {
  4662. -    super(constants);
  4663. +    super(constants.cwTreeName(), constants.cwTreeDescription(), true);
  4664.      this.constants = constants;
  4665.    }
  4666.  
  4667. -  @Override
  4668. -  public String getDescription() {
  4669. -    return constants.cwTreeDescription();
  4670. -  }
  4671. -
  4672. -  @Override
  4673. -  public String getName() {
  4674. -    return constants.cwTreeName();
  4675. -  }
  4676. -
  4677.    /**
  4678.     * Initialize this example.
  4679.     */
  4680. @@ -156,7 +145,7 @@ public class CwTree extends ContentWidget {
  4681.  
  4682.    @Override
  4683.    protected void asyncOnInitialize(final AsyncCallback<Widget> callback) {
  4684. -    GWT.runAsync(new RunAsyncCallback() {
  4685. +    GWT.runAsync(CwTree.class, new RunAsyncCallback() {
  4686.  
  4687.        public void onFailure(Throwable caught) {
  4688.          callback.onFailure(caught);
  4689. @@ -170,14 +159,14 @@ public class CwTree extends ContentWidget {
  4690.  
  4691.    /**
  4692.     * Add a new section of music created by a specific composer.
  4693. -   *
  4694. +   *
  4695.     * @param parent the parent {@link TreeItem} where the section will be added
  4696.     * @param label the label of the new section of music
  4697.     * @param composerWorks an array of works created by the composer
  4698.     */
  4699.    @ShowcaseSource
  4700. -  private void addMusicSection(TreeItem parent, String label,
  4701. -      String[] composerWorks) {
  4702. +  private void addMusicSection(
  4703. +      TreeItem parent, String label, String[] composerWorks) {
  4704.      TreeItem section = parent.addItem(label);
  4705.      for (String work : composerWorks) {
  4706.        section.addItem(work);
  4707. @@ -187,7 +176,7 @@ public class CwTree extends ContentWidget {
  4708.    /**
  4709.     * Create a dynamic tree that will add a random number of children to each
  4710.     * node as it is clicked.
  4711. -   *
  4712. +   *
  4713.     * @return the new tree
  4714.     */
  4715.    @ShowcaseSource
  4716. @@ -234,7 +223,7 @@ public class CwTree extends ContentWidget {
  4717.  
  4718.    /**
  4719.     * Create a static tree with some data in it.
  4720. -   *
  4721. +   *
  4722.     * @return the new tree
  4723.     */
  4724.    @ShowcaseSource
  4725. @@ -251,28 +240,28 @@ public class CwTree extends ContentWidget {
  4726.      TreeItem beethovenItem = staticTree.addItem(composers[0]);
  4727.      addMusicSection(beethovenItem, concertosLabel,
  4728.          constants.cwTreeBeethovenWorkConcertos());
  4729. -    addMusicSection(beethovenItem, quartetsLabel,
  4730. -        constants.cwTreeBeethovenWorkQuartets());
  4731. -    addMusicSection(beethovenItem, sonatasLabel,
  4732. -        constants.cwTreeBeethovenWorkSonatas());
  4733. +    addMusicSection(
  4734. +        beethovenItem, quartetsLabel, constants.cwTreeBeethovenWorkQuartets());
  4735. +    addMusicSection(
  4736. +        beethovenItem, sonatasLabel, constants.cwTreeBeethovenWorkSonatas());
  4737.      addMusicSection(beethovenItem, symphoniesLabel,
  4738.          constants.cwTreeBeethovenWorkSymphonies());
  4739.  
  4740.      // Add some of Brahms's music
  4741.      TreeItem brahmsItem = staticTree.addItem(composers[1]);
  4742. -    addMusicSection(brahmsItem, concertosLabel,
  4743. -        constants.cwTreeBrahmsWorkConcertos());
  4744. -    addMusicSection(brahmsItem, quartetsLabel,
  4745. -        constants.cwTreeBrahmsWorkQuartets());
  4746. -    addMusicSection(brahmsItem, sonatasLabel,
  4747. -        constants.cwTreeBrahmsWorkSonatas());
  4748. -    addMusicSection(brahmsItem, symphoniesLabel,
  4749. -        constants.cwTreeBrahmsWorkSymphonies());
  4750. +    addMusicSection(
  4751. +        brahmsItem, concertosLabel, constants.cwTreeBrahmsWorkConcertos());
  4752. +    addMusicSection(
  4753. +        brahmsItem, quartetsLabel, constants.cwTreeBrahmsWorkQuartets());
  4754. +    addMusicSection(
  4755. +        brahmsItem, sonatasLabel, constants.cwTreeBrahmsWorkSonatas());
  4756. +    addMusicSection(
  4757. +        brahmsItem, symphoniesLabel, constants.cwTreeBrahmsWorkSymphonies());
  4758.  
  4759.      // Add some of Mozart's music
  4760.      TreeItem mozartItem = staticTree.addItem(composers[2]);
  4761. -    addMusicSection(mozartItem, concertosLabel,
  4762. -        constants.cwTreeMozartWorkConcertos());
  4763. +    addMusicSection(
  4764. +        mozartItem, concertosLabel, constants.cwTreeMozartWorkConcertos());
  4765.  
  4766.      // Return the tree
  4767.      return staticTree;
  4768. 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
  4769. index d861a59..0fcb0df 100644
  4770. --- a/src/com/google/gwt/sample/showcase/client/content/other/CwAnimation.java
  4771. +++ b/src/com/google/gwt/sample/showcase/client/content/other/CwAnimation.java
  4772. @@ -1,12 +1,12 @@
  4773.  /*
  4774.   * Copyright 2008 Google Inc.
  4775. - *
  4776. + *
  4777.   * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  4778.   * use this file except in compliance with the License. You may obtain a copy of
  4779.   * the License at
  4780. - *
  4781. + *
  4782.   * http://www.apache.org/licenses/LICENSE-2.0
  4783. - *
  4784. + *
  4785.   * Unless required by applicable law or agreed to in writing, software
  4786.   * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  4787.   * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  4788. @@ -86,7 +86,7 @@ public class CwAnimation extends ContentWidget {
  4789.  
  4790.      /**
  4791.       * Update the position of the widget, adding a rotational offset.
  4792. -     *
  4793. +     *
  4794.       * @param w the widget to move
  4795.       * @param radian the progress in radian
  4796.       * @param offset the offset in radian
  4797. @@ -103,8 +103,7 @@ public class CwAnimation extends ContentWidget {
  4798.     * The constants used in this Content Widget.
  4799.     */
  4800.    @ShowcaseSource
  4801. -  public static interface CwConstants extends Constants,
  4802. -      ContentWidget.CwConstants {
  4803. +  public static interface CwConstants extends Constants {
  4804.      @DefaultStringValue("Cancel")
  4805.      String cwAnimationCancel();
  4806.  
  4807. @@ -165,7 +164,7 @@ public class CwAnimation extends ContentWidget {
  4808.     * An instance of the constants.
  4809.     */
  4810.    @ShowcaseData
  4811. -  private CwConstants constants;
  4812. +  private final CwConstants constants;
  4813.  
  4814.    /**
  4815.     * The {@link Button} used to start the {@link Animation}.
  4816. @@ -175,29 +174,15 @@ public class CwAnimation extends ContentWidget {
  4817.  
  4818.    /**
  4819.     * Constructor.
  4820. -   *
  4821. +   *
  4822.     * @param constants the constants
  4823.     */
  4824.    public CwAnimation(CwConstants constants) {
  4825. -    super(constants);
  4826. +    super(
  4827. +        constants.cwAnimationName(), constants.cwAnimationDescription(), false);
  4828.      this.constants = constants;
  4829.    }
  4830.  
  4831. -  @Override
  4832. -  public String getDescription() {
  4833. -    return constants.cwAnimationDescription();
  4834. -  }
  4835. -
  4836. -  @Override
  4837. -  public String getName() {
  4838. -    return constants.cwAnimationName();
  4839. -  }
  4840. -
  4841. -  @Override
  4842. -  public boolean hasStyle() {
  4843. -    return false;
  4844. -  }
  4845. -
  4846.    /**
  4847.     * Initialize this example.
  4848.     */
  4849. @@ -245,7 +230,7 @@ public class CwAnimation extends ContentWidget {
  4850.  
  4851.    @Override
  4852.    protected void asyncOnInitialize(final AsyncCallback<Widget> callback) {
  4853. -    GWT.runAsync(new RunAsyncCallback() {
  4854. +    GWT.runAsync(CwAnimation.class, new RunAsyncCallback() {
  4855.  
  4856.        public void onFailure(Throwable caught) {
  4857.          callback.onFailure(caught);
  4858. @@ -260,7 +245,7 @@ public class CwAnimation extends ContentWidget {
  4859.    /**
  4860.     * Create an options panel that allows users to select a widget and reposition
  4861.     * it.
  4862. -   *
  4863. +   *
  4864.     * @return the new options panel
  4865.     */
  4866.    @ShowcaseSource
  4867. 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
  4868. index 882b712..c432c6a 100644
  4869. --- a/src/com/google/gwt/sample/showcase/client/content/other/CwCookies.java
  4870. +++ b/src/com/google/gwt/sample/showcase/client/content/other/CwCookies.java
  4871. @@ -1,12 +1,12 @@
  4872.  /*
  4873.   * Copyright 2008 Google Inc.
  4874. - *
  4875. + *
  4876.   * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  4877.   * use this file except in compliance with the License. You may obtain a copy of
  4878.   * the License at
  4879. - *
  4880. + *
  4881.   * http://www.apache.org/licenses/LICENSE-2.0
  4882. - *
  4883. + *
  4884.   * Unless required by applicable law or agreed to in writing, software
  4885.   * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  4886.   * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  4887. @@ -17,6 +17,8 @@ package com.google.gwt.sample.showcase.client.content.other;
  4888.  
  4889.  import com.google.gwt.core.client.GWT;
  4890.  import com.google.gwt.core.client.RunAsyncCallback;
  4891. +import com.google.gwt.core.client.Scheduler;
  4892. +import com.google.gwt.core.client.Scheduler.ScheduledCommand;
  4893.  import com.google.gwt.event.dom.client.ChangeEvent;
  4894.  import com.google.gwt.event.dom.client.ChangeHandler;
  4895.  import com.google.gwt.event.dom.client.ClickEvent;
  4896. @@ -25,9 +27,7 @@ import com.google.gwt.i18n.client.Constants;
  4897.  import com.google.gwt.sample.showcase.client.ContentWidget;
  4898.  import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseData;
  4899.  import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseSource;
  4900. -import com.google.gwt.user.client.Command;
  4901.  import com.google.gwt.user.client.Cookies;
  4902. -import com.google.gwt.user.client.DeferredCommand;
  4903.  import com.google.gwt.user.client.Window;
  4904.  import com.google.gwt.user.client.rpc.AsyncCallback;
  4905.  import com.google.gwt.user.client.ui.Button;
  4906. @@ -47,8 +47,7 @@ public class CwCookies extends ContentWidget {
  4907.     * The constants used in this Content Widget.
  4908.     */
  4909.    @ShowcaseSource
  4910. -  public static interface CwConstants extends Constants,
  4911. -      ContentWidget.CwConstants {
  4912. +  public static interface CwConstants extends Constants {
  4913.      String cwCookiesDeleteCookie();
  4914.  
  4915.      String cwCookiesDescription();
  4916. @@ -76,7 +75,7 @@ public class CwCookies extends ContentWidget {
  4917.     * An instance of the constants.
  4918.     */
  4919.    @ShowcaseData
  4920. -  private CwConstants constants;
  4921. +  private final CwConstants constants;
  4922.  
  4923.    /**
  4924.     * A {@link TextBox} that holds the name of the cookie.
  4925. @@ -98,29 +97,14 @@ public class CwCookies extends ContentWidget {
  4926.  
  4927.    /**
  4928.     * Constructor.
  4929. -   *
  4930. +   *
  4931.     * @param constants the constants
  4932.     */
  4933.    public CwCookies(CwConstants constants) {
  4934. -    super(constants);
  4935. +    super(constants.cwCookiesName(), constants.cwCookiesDescription(), false);
  4936.      this.constants = constants;
  4937.    }
  4938.  
  4939. -  @Override
  4940. -  public String getDescription() {
  4941. -    return constants.cwCookiesDescription();
  4942. -  }
  4943. -
  4944. -  @Override
  4945. -  public String getName() {
  4946. -    return constants.cwCookiesName();
  4947. -  }
  4948. -
  4949. -  @Override
  4950. -  public boolean hasStyle() {
  4951. -    return false;
  4952. -  }
  4953. -
  4954.    /**
  4955.     * Initialize this example.
  4956.     */
  4957. @@ -134,8 +118,8 @@ public class CwCookies extends ContentWidget {
  4958.      existingCookiesBox = new ListBox();
  4959.      Button deleteCookieButton = new Button(constants.cwCookiesDeleteCookie());
  4960.      deleteCookieButton.addStyleName("sc-FixedWidthButton");
  4961. -    mainLayout.setHTML(0, 0, "<b>" + constants.cwCookiesExistingLabel()
  4962. -        + "</b>");
  4963. +    mainLayout.setHTML(
  4964. +        0, 0, "<b>" + constants.cwCookiesExistingLabel() + "</b>");
  4965.      mainLayout.setWidget(0, 1, existingCookiesBox);
  4966.      mainLayout.setWidget(0, 2, deleteCookieButton);
  4967.  
  4968. @@ -199,7 +183,7 @@ public class CwCookies extends ContentWidget {
  4969.  
  4970.    @Override
  4971.    protected void asyncOnInitialize(final AsyncCallback<Widget> callback) {
  4972. -    GWT.runAsync(new RunAsyncCallback() {
  4973. +    GWT.runAsync(CwCookies.class, new RunAsyncCallback() {
  4974.  
  4975.        public void onFailure(Throwable caught) {
  4976.          callback.onFailure(caught);
  4977. @@ -213,7 +197,7 @@ public class CwCookies extends ContentWidget {
  4978.  
  4979.    /**
  4980.     * Refresh the list of existing cookies.
  4981. -   *
  4982. +   *
  4983.     * @param selectedCookie the cookie to select by default
  4984.     */
  4985.    @ShowcaseSource
  4986. @@ -231,10 +215,10 @@ public class CwCookies extends ContentWidget {
  4987.        }
  4988.      }
  4989.  
  4990. -    // Select the index of the selectedCookie. Use a DeferredCommand to give
  4991. +    // Select the index of the selectedCookie. Use a ScheduledCommand to give
  4992.      // the options time to register in Opera.
  4993.      final int selectedIndexFinal = selectedIndex;
  4994. -    DeferredCommand.addCommand(new Command() {
  4995. +    Scheduler.get().scheduleDeferred(new ScheduledCommand() {
  4996.        public void execute() {
  4997.          // Select the default cookie
  4998.          if (selectedIndexFinal < existingCookiesBox.getItemCount()) {
  4999. 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
  5000. index 2e14568..aa38baa 100644
  5001. --- a/src/com/google/gwt/sample/showcase/client/content/other/CwFrame.java
  5002. +++ b/src/com/google/gwt/sample/showcase/client/content/other/CwFrame.java
  5003. @@ -1,12 +1,12 @@
  5004.  /*
  5005.   * Copyright 2008 Google Inc.
  5006. - *
  5007. + *
  5008.   * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  5009.   * use this file except in compliance with the License. You may obtain a copy of
  5010.   * the License at
  5011. - *
  5012. + *
  5013.   * http://www.apache.org/licenses/LICENSE-2.0
  5014. - *
  5015. + *
  5016.   * Unless required by applicable law or agreed to in writing, software
  5017.   * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  5018.   * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  5019. @@ -42,8 +42,7 @@ public class CwFrame extends ContentWidget {
  5020.     * The constants used in this Content Widget.
  5021.     */
  5022.    @ShowcaseSource
  5023. -  public static interface CwConstants extends Constants,
  5024. -      ContentWidget.CwConstants {
  5025. +  public static interface CwConstants extends Constants {
  5026.      String cwFrameDescription();
  5027.  
  5028.      String cwFrameName();
  5029. @@ -55,33 +54,18 @@ public class CwFrame extends ContentWidget {
  5030.     * An instance of the constants.
  5031.     */
  5032.    @ShowcaseData
  5033. -  private CwConstants constants;
  5034. +  private final CwConstants constants;
  5035.  
  5036.    /**
  5037.     * Constructor.
  5038. -   *
  5039. +   *
  5040.     * @param constants the constants
  5041.     */
  5042.    public CwFrame(CwConstants constants) {
  5043. -    super(constants);
  5044. +    super(constants.cwFrameName(), constants.cwFrameDescription(), false);
  5045.      this.constants = constants;
  5046.    }
  5047.  
  5048. -  @Override
  5049. -  public String getDescription() {
  5050. -    return constants.cwFrameDescription();
  5051. -  }
  5052. -
  5053. -  @Override
  5054. -  public String getName() {
  5055. -    return constants.cwFrameName();
  5056. -  }
  5057. -
  5058. -  @Override
  5059. -  public boolean hasStyle() {
  5060. -    return false;
  5061. -  }
  5062. -
  5063.    /**
  5064.     * Initialize this example.
  5065.     */
  5066. @@ -129,7 +113,7 @@ public class CwFrame extends ContentWidget {
  5067.  
  5068.    @Override
  5069.    protected void asyncOnInitialize(final AsyncCallback<Widget> callback) {
  5070. -    GWT.runAsync(new RunAsyncCallback() {
  5071. +    GWT.runAsync(CwFrame.class, new RunAsyncCallback() {
  5072.  
  5073.        public void onFailure(Throwable caught) {
  5074.          callback.onFailure(caught);
  5075. 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
  5076. index d775dcb..7de10ec 100644
  5077. --- a/src/com/google/gwt/sample/showcase/client/content/panels/CwAbsolutePanel.java
  5078. +++ b/src/com/google/gwt/sample/showcase/client/content/panels/CwAbsolutePanel.java
  5079. @@ -1,12 +1,12 @@
  5080.  /*
  5081.   * Copyright 2008 Google Inc.
  5082. - *
  5083. + *
  5084.   * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  5085.   * use this file except in compliance with the License. You may obtain a copy of
  5086.   * the License at
  5087. - *
  5088. + *
  5089.   * http://www.apache.org/licenses/LICENSE-2.0
  5090. - *
  5091. + *
  5092.   * Unless required by applicable law or agreed to in writing, software
  5093.   * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  5094.   * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  5095. @@ -17,6 +17,8 @@ package com.google.gwt.sample.showcase.client.content.panels;
  5096.  
  5097.  import com.google.gwt.core.client.GWT;
  5098.  import com.google.gwt.core.client.RunAsyncCallback;
  5099. +import com.google.gwt.core.client.Scheduler;
  5100. +import com.google.gwt.core.client.Scheduler.ScheduledCommand;
  5101.  import com.google.gwt.event.dom.client.ChangeEvent;
  5102.  import com.google.gwt.event.dom.client.ChangeHandler;
  5103.  import com.google.gwt.event.dom.client.KeyUpEvent;
  5104. @@ -26,8 +28,6 @@ import com.google.gwt.sample.showcase.client.ContentWidget;
  5105.  import com.google.gwt.sample.showcase.client.Showcase;
  5106.  import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseData;
  5107.  import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseSource;
  5108. -import com.google.gwt.user.client.Command;
  5109. -import com.google.gwt.user.client.DeferredCommand;
  5110.  import com.google.gwt.user.client.rpc.AsyncCallback;
  5111.  import com.google.gwt.user.client.ui.AbsolutePanel;
  5112.  import com.google.gwt.user.client.ui.Button;
  5113. @@ -52,8 +52,7 @@ public class CwAbsolutePanel extends ContentWidget {
  5114.     * The constants used in this Content Widget.
  5115.     */
  5116.    @ShowcaseSource
  5117. -  public static interface CwConstants extends Constants,
  5118. -      ContentWidget.CwConstants {
  5119. +  public static interface CwConstants extends Constants {
  5120.      String cwAbsolutePanelClickMe();
  5121.  
  5122.      String cwAbsolutePanelDescription();
  5123. @@ -80,7 +79,7 @@ public class CwAbsolutePanel extends ContentWidget {
  5124.     * An instance of the constants.
  5125.     */
  5126.    @ShowcaseData
  5127. -  private CwConstants constants;
  5128. +  private final CwConstants constants;
  5129.  
  5130.    /**
  5131.     * The input field used to set the left position of a {@link Widget}.
  5132. @@ -109,29 +108,15 @@ public class CwAbsolutePanel extends ContentWidget {
  5133.  
  5134.    /**
  5135.     * Constructor.
  5136. -   *
  5137. +   *
  5138.     * @param constants the constants
  5139.     */
  5140.    public CwAbsolutePanel(CwConstants constants) {
  5141. -    super(constants);
  5142. +    super(constants.cwAbsolutePanelName(),
  5143. +        constants.cwAbsolutePanelDescription(), false);
  5144.      this.constants = constants;
  5145.    }
  5146.  
  5147. -  @Override
  5148. -  public String getDescription() {
  5149. -    return constants.cwAbsolutePanelDescription();
  5150. -  }
  5151. -
  5152. -  @Override
  5153. -  public String getName() {
  5154. -    return constants.cwAbsolutePanelName();
  5155. -  }
  5156. -
  5157. -  @Override
  5158. -  public boolean hasStyle() {
  5159. -    return false;
  5160. -  }
  5161. -
  5162.    /**
  5163.     * Initialize this example.
  5164.     */
  5165. @@ -189,7 +174,7 @@ public class CwAbsolutePanel extends ContentWidget {
  5166.    @ShowcaseSource
  5167.    @Override
  5168.    public void onInitializeComplete() {
  5169. -    DeferredCommand.addCommand(new Command() {
  5170. +    Scheduler.get().scheduleDeferred(new ScheduledCommand() {
  5171.        public void execute() {
  5172.          updateSelectedItem();
  5173.        }
  5174. @@ -198,7 +183,7 @@ public class CwAbsolutePanel extends ContentWidget {
  5175.  
  5176.    @Override
  5177.    protected void asyncOnInitialize(final AsyncCallback<Widget> callback) {
  5178. -    GWT.runAsync(new RunAsyncCallback() {
  5179. +    GWT.runAsync(CwAbsolutePanel.class, new RunAsyncCallback() {
  5180.  
  5181.        public void onFailure(Throwable caught) {
  5182.          callback.onFailure(caught);
  5183. @@ -213,7 +198,7 @@ public class CwAbsolutePanel extends ContentWidget {
  5184.    /**
  5185.     * Create an options panel that allows users to select a widget and reposition
  5186.     * it.
  5187. -   *
  5188. +   *
  5189.     * @return the new options panel
  5190.     */
  5191.    @ShowcaseSource
  5192. 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
  5193. index 71bb6ee..0546e6c 100644
  5194. --- a/src/com/google/gwt/sample/showcase/client/content/panels/CwDecoratorPanel.java
  5195. +++ b/src/com/google/gwt/sample/showcase/client/content/panels/CwDecoratorPanel.java
  5196. @@ -1,12 +1,12 @@
  5197.  /*
  5198.   * Copyright 2008 Google Inc.
  5199. - *
  5200. + *
  5201.   * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  5202.   * use this file except in compliance with the License. You may obtain a copy of
  5203.   * the License at
  5204. - *
  5205. + *
  5206.   * http://www.apache.org/licenses/LICENSE-2.0
  5207. - *
  5208. + *
  5209.   * Unless required by applicable law or agreed to in writing, software
  5210.   * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  5211.   * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  5212. @@ -41,10 +41,9 @@ public class CwDecoratorPanel extends ContentWidget {
  5213.     * The constants used in this Content Widget.
  5214.     */
  5215.    @ShowcaseSource
  5216. -  public static interface CwConstants extends Constants,
  5217. -      ContentWidget.CwConstants {
  5218. -    @DefaultStringValue("Add rounded corners to any Widget using the Decorator Panel")
  5219. -    String cwDecoratorPanelDescription();
  5220. +  public static interface CwConstants extends Constants {
  5221. +        @DefaultStringValue("Add rounded corners to any Widget using the Decorator Panel")
  5222. +        String cwDecoratorPanelDescription();
  5223.  
  5224.      @DefaultStringValue("Description:")
  5225.      String cwDecoratorPanelFormDescription();
  5226. @@ -63,28 +62,19 @@ public class CwDecoratorPanel extends ContentWidget {
  5227.     * An instance of the constants.
  5228.     */
  5229.    @ShowcaseData
  5230. -  private CwConstants constants;
  5231. +  private final CwConstants constants;
  5232.  
  5233.    /**
  5234.     * Constructor.
  5235. -   *
  5236. +   *
  5237.     * @param constants the constants
  5238.     */
  5239.    public CwDecoratorPanel(CwConstants constants) {
  5240. -    super(constants);
  5241. +    super(constants.cwDecoratorPanelName(),
  5242. +        constants.cwDecoratorPanelDescription(), true);
  5243.      this.constants = constants;
  5244.    }
  5245.  
  5246. -  @Override
  5247. -  public String getDescription() {
  5248. -    return constants.cwDecoratorPanelDescription();
  5249. -  }
  5250. -
  5251. -  @Override
  5252. -  public String getName() {
  5253. -    return constants.cwDecoratorPanelName();
  5254. -  }
  5255. -
  5256.    /**
  5257.     * Initialize this example.
  5258.     */
  5259. @@ -99,8 +89,8 @@ public class CwDecoratorPanel extends ContentWidget {
  5260.      // Add a title to the form
  5261.      layout.setHTML(0, 0, constants.cwDecoratorPanelFormTitle());
  5262.      cellFormatter.setColSpan(0, 0, 2);
  5263. -    cellFormatter.setHorizontalAlignment(0, 0,
  5264. -        HasHorizontalAlignment.ALIGN_CENTER);
  5265. +    cellFormatter.setHorizontalAlignment(
  5266. +        0, 0, HasHorizontalAlignment.ALIGN_CENTER);
  5267.  
  5268.      // Add some standard form options
  5269.      layout.setHTML(1, 0, constants.cwDecoratorPanelFormName());
  5270. @@ -116,7 +106,7 @@ public class CwDecoratorPanel extends ContentWidget {
  5271.  
  5272.    @Override
  5273.    protected void asyncOnInitialize(final AsyncCallback<Widget> callback) {
  5274. -    GWT.runAsync(new RunAsyncCallback() {
  5275. +    GWT.runAsync(CwDecoratorPanel.class, new RunAsyncCallback() {
  5276.  
  5277.        public void onFailure(Throwable caught) {
  5278.          callback.onFailure(caught);
  5279. 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
  5280. index 4250a27..789a196 100644
  5281. --- a/src/com/google/gwt/sample/showcase/client/content/panels/CwDisclosurePanel.java
  5282. +++ b/src/com/google/gwt/sample/showcase/client/content/panels/CwDisclosurePanel.java
  5283. @@ -1,12 +1,12 @@
  5284.  /*
  5285.   * Copyright 2008 Google Inc.
  5286. - *
  5287. + *
  5288.   * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  5289.   * use this file except in compliance with the License. You may obtain a copy of
  5290.   * the License at
  5291. - *
  5292. + *
  5293.   * http://www.apache.org/licenses/LICENSE-2.0
  5294. - *
  5295. + *
  5296.   * Unless required by applicable law or agreed to in writing, software
  5297.   * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  5298.   * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  5299. @@ -44,8 +44,7 @@ public class CwDisclosurePanel extends ContentWidget {
  5300.     * The constants used in this Content Widget.
  5301.     */
  5302.    @ShowcaseSource
  5303. -  public static interface CwConstants extends Constants,
  5304. -      ContentWidget.CwConstants {
  5305. +  public static interface CwConstants extends Constants {
  5306.      String cwDisclosurePanelDescription();
  5307.  
  5308.      String cwDisclosurePanelFormAdvancedCriteria();
  5309. @@ -69,28 +68,19 @@ public class CwDisclosurePanel extends ContentWidget {
  5310.     * An instance of the constants.
  5311.     */
  5312.    @ShowcaseData
  5313. -  private CwConstants constants;
  5314. +  private final CwConstants constants;
  5315.  
  5316.    /**
  5317.     * Constructor.
  5318. -   *
  5319. +   *
  5320.     * @param constants the constants
  5321.     */
  5322.    public CwDisclosurePanel(CwConstants constants) {
  5323. -    super(constants);
  5324. +    super(constants.cwDisclosurePanelName(),
  5325. +        constants.cwDisclosurePanelDescription(), true);
  5326.      this.constants = constants;
  5327.    }
  5328.  
  5329. -  @Override
  5330. -  public String getDescription() {
  5331. -    return constants.cwDisclosurePanelDescription();
  5332. -  }
  5333. -
  5334. -  @Override
  5335. -  public String getName() {
  5336. -    return constants.cwDisclosurePanelName();
  5337. -  }
  5338. -
  5339.    /**
  5340.     * Initialize this example.
  5341.     */
  5342. @@ -108,7 +98,7 @@ public class CwDisclosurePanel extends ContentWidget {
  5343.  
  5344.    @Override
  5345.    protected void asyncOnInitialize(final AsyncCallback<Widget> callback) {
  5346. -    GWT.runAsync(new RunAsyncCallback() {
  5347. +    GWT.runAsync(CwDisclosurePanel.class, new RunAsyncCallback() {
  5348.  
  5349.        public void onFailure(Throwable caught) {
  5350.          callback.onFailure(caught);
  5351. @@ -134,8 +124,8 @@ public class CwDisclosurePanel extends ContentWidget {
  5352.      // Add a title to the form
  5353.      layout.setHTML(0, 0, constants.cwDisclosurePanelFormTitle());
  5354.      cellFormatter.setColSpan(0, 0, 2);
  5355. -    cellFormatter.setHorizontalAlignment(0, 0,
  5356. -        HasHorizontalAlignment.ALIGN_CENTER);
  5357. +    cellFormatter.setHorizontalAlignment(
  5358. +        0, 0, HasHorizontalAlignment.ALIGN_CENTER);
  5359.  
  5360.      // Add some standard form options
  5361.      layout.setHTML(1, 0, constants.cwDisclosurePanelFormName());
  5362. 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
  5363. index 60677f0..7a04c18 100644
  5364. --- a/src/com/google/gwt/sample/showcase/client/content/panels/CwDockPanel.java
  5365. +++ b/src/com/google/gwt/sample/showcase/client/content/panels/CwDockPanel.java
  5366. @@ -1,12 +1,12 @@
  5367.  /*
  5368.   * Copyright 2008 Google Inc.
  5369. - *
  5370. + *
  5371.   * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  5372.   * use this file except in compliance with the License. You may obtain a copy of
  5373.   * the License at
  5374. - *
  5375. + *
  5376.   * http://www.apache.org/licenses/LICENSE-2.0
  5377. - *
  5378. + *
  5379.   * Unless required by applicable law or agreed to in writing, software
  5380.   * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  5381.   * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  5382. @@ -37,8 +37,7 @@ public class CwDockPanel extends ContentWidget {
  5383.     * The constants used in this Content Widget.
  5384.     */
  5385.    @ShowcaseSource
  5386. -  public static interface CwConstants extends Constants,
  5387. -      ContentWidget.CwConstants {
  5388. +  public static interface CwConstants extends Constants {
  5389.  
  5390.      String cwDockPanelCenter();
  5391.  
  5392. @@ -63,28 +62,19 @@ public class CwDockPanel extends ContentWidget {
  5393.     * An instance of the constants.
  5394.     */
  5395.    @ShowcaseData
  5396. -  private CwConstants constants;
  5397. +  private final CwConstants constants;
  5398.  
  5399.    /**
  5400.     * Constructor.
  5401. -   *
  5402. +   *
  5403.     * @param constants the constants
  5404.     */
  5405.    public CwDockPanel(CwConstants constants) {
  5406. -    super(constants);
  5407. +    super(
  5408. +        constants.cwDockPanelName(), constants.cwDockPanelDescription(), true);
  5409.      this.constants = constants;
  5410.    }
  5411.  
  5412. -  @Override
  5413. -  public String getDescription() {
  5414. -    return constants.cwDockPanelDescription();
  5415. -  }
  5416. -
  5417. -  @Override
  5418. -  public String getName() {
  5419. -    return constants.cwDockPanelName();
  5420. -  }
  5421. -
  5422.    /**
  5423.     * Initialize this example.
  5424.     */
  5425. @@ -118,7 +108,7 @@ public class CwDockPanel extends ContentWidget {
  5426.  
  5427.    @Override
  5428.    protected void asyncOnInitialize(final AsyncCallback<Widget> callback) {
  5429. -    GWT.runAsync(new RunAsyncCallback() {
  5430. +    GWT.runAsync(CwDockPanel.class, new RunAsyncCallback() {
  5431.  
  5432.        public void onFailure(Throwable caught) {
  5433.          callback.onFailure(caught);
  5434. 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
  5435. index dd19fa5..b479ef9 100644
  5436. --- a/src/com/google/gwt/sample/showcase/client/content/panels/CwFlowPanel.java
  5437. +++ b/src/com/google/gwt/sample/showcase/client/content/panels/CwFlowPanel.java
  5438. @@ -1,12 +1,12 @@
  5439.  /*
  5440.   * Copyright 2008 Google Inc.
  5441. - *
  5442. + *
  5443.   * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  5444.   * use this file except in compliance with the License. You may obtain a copy of
  5445.   * the License at
  5446. - *
  5447. + *
  5448.   * http://www.apache.org/licenses/LICENSE-2.0
  5449. - *
  5450. + *
  5451.   * Unless required by applicable law or agreed to in writing, software
  5452.   * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  5453.   * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  5454. @@ -36,8 +36,7 @@ public class CwFlowPanel extends ContentWidget {
  5455.     * The constants used in this Content Widget.
  5456.     */
  5457.    @ShowcaseSource
  5458. -  public static interface CwConstants extends Constants,
  5459. -      ContentWidget.CwConstants {
  5460. +  public static interface CwConstants extends Constants {
  5461.      String cwFlowPanelDescription();
  5462.  
  5463.      String cwFlowPanelItem();
  5464. @@ -49,28 +48,19 @@ public class CwFlowPanel extends ContentWidget {
  5465.     * An instance of the constants.
  5466.     */
  5467.    @ShowcaseData
  5468. -  private CwConstants constants;
  5469. +  private final CwConstants constants;
  5470.  
  5471.    /**
  5472.     * Constructor.
  5473. -   *
  5474. +   *
  5475.     * @param constants the constants
  5476.     */
  5477.    public CwFlowPanel(CwConstants constants) {
  5478. -    super(constants);
  5479. +    super(
  5480. +        constants.cwFlowPanelName(), constants.cwFlowPanelDescription(), true);
  5481.      this.constants = constants;
  5482.    }
  5483.  
  5484. -  @Override
  5485. -  public String getDescription() {
  5486. -    return constants.cwFlowPanelDescription();
  5487. -  }
  5488. -
  5489. -  @Override
  5490. -  public String getName() {
  5491. -    return constants.cwFlowPanelName();
  5492. -  }
  5493. -
  5494.    /**
  5495.     * Initialize this example.
  5496.     */
  5497. @@ -94,7 +84,7 @@ public class CwFlowPanel extends ContentWidget {
  5498.  
  5499.    @Override
  5500.    protected void asyncOnInitialize(final AsyncCallback<Widget> callback) {
  5501. -    GWT.runAsync(new RunAsyncCallback() {
  5502. +    GWT.runAsync(CwFlowPanel.class, new RunAsyncCallback() {
  5503.  
  5504.        public void onFailure(Throwable caught) {
  5505.          callback.onFailure(caught);
  5506. 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
  5507. index 2f49674..8e0de29 100644
  5508. --- a/src/com/google/gwt/sample/showcase/client/content/panels/CwHorizontalPanel.java
  5509. +++ b/src/com/google/gwt/sample/showcase/client/content/panels/CwHorizontalPanel.java
  5510. @@ -1,12 +1,12 @@
  5511.  /*
  5512.   * Copyright 2008 Google Inc.
  5513. - *
  5514. + *
  5515.   * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  5516.   * use this file except in compliance with the License. You may obtain a copy of
  5517.   * the License at
  5518. - *
  5519. + *
  5520.   * http://www.apache.org/licenses/LICENSE-2.0
  5521. - *
  5522. + *
  5523.   * Unless required by applicable law or agreed to in writing, software
  5524.   * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  5525.   * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  5526. @@ -34,8 +34,7 @@ public class CwHorizontalPanel extends ContentWidget {
  5527.     * The constants used in this Content Widget.
  5528.     */
  5529.    @ShowcaseSource
  5530. -  public static interface CwConstants extends Constants,
  5531. -      ContentWidget.CwConstants {
  5532. +  public static interface CwConstants extends Constants {
  5533.      String cwHorizontalPanelButton();
  5534.  
  5535.      String cwHorizontalPanelDescription();
  5536. @@ -47,33 +46,19 @@ public class CwHorizontalPanel extends ContentWidget {
  5537.     * An instance of the constants.
  5538.     */
  5539.    @ShowcaseData
  5540. -  private CwConstants constants;
  5541. +  private final CwConstants constants;
  5542.  
  5543.    /**
  5544.     * Constructor.
  5545. -   *
  5546. +   *
  5547.     * @param constants the constants
  5548.     */
  5549.    public CwHorizontalPanel(CwConstants constants) {
  5550. -    super(constants);
  5551. +    super(constants.cwHorizontalPanelName(),
  5552. +        constants.cwHorizontalPanelDescription(), false);
  5553.      this.constants = constants;
  5554.    }
  5555.  
  5556. -  @Override
  5557. -  public String getDescription() {
  5558. -    return constants.cwHorizontalPanelDescription();
  5559. -  }
  5560. -
  5561. -  @Override
  5562. -  public String getName() {
  5563. -    return constants.cwHorizontalPanelName();
  5564. -  }
  5565. -
  5566. -  @Override
  5567. -  public boolean hasStyle() {
  5568. -    return false;
  5569. -  }
  5570. -
  5571.    /**
  5572.     * Initialize this example.
  5573.     */
  5574. @@ -96,7 +81,7 @@ public class CwHorizontalPanel extends ContentWidget {
  5575.  
  5576.    @Override
  5577.    protected void asyncOnInitialize(final AsyncCallback<Widget> callback) {
  5578. -    GWT.runAsync(new RunAsyncCallback() {
  5579. +    GWT.runAsync(CwHorizontalPanel.class, new RunAsyncCallback() {
  5580.  
  5581.        public void onFailure(Throwable caught) {
  5582.          callback.onFailure(caught);
  5583. 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
  5584. deleted file mode 100644
  5585. index b989453..0000000
  5586. --- a/src/com/google/gwt/sample/showcase/client/content/panels/CwHorizontalSplitPanel.java
  5587. +++ /dev/null
  5588. @@ -1,116 +0,0 @@
  5589. -/*
  5590. - * Copyright 2008 Google Inc.
  5591. - *
  5592. - * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  5593. - * use this file except in compliance with the License. You may obtain a copy of
  5594. - * the License at
  5595. - *
  5596. - * http://www.apache.org/licenses/LICENSE-2.0
  5597. - *
  5598. - * Unless required by applicable law or agreed to in writing, software
  5599. - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  5600. - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  5601. - * License for the specific language governing permissions and limitations under
  5602. - * the License.
  5603. - */
  5604. -package com.google.gwt.sample.showcase.client.content.panels;
  5605. -
  5606. -import com.google.gwt.core.client.GWT;
  5607. -import com.google.gwt.core.client.RunAsyncCallback;
  5608. -import com.google.gwt.i18n.client.Constants;
  5609. -import com.google.gwt.sample.showcase.client.ContentWidget;
  5610. -import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseData;
  5611. -import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseSource;
  5612. -import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseStyle;
  5613. -import com.google.gwt.user.client.rpc.AsyncCallback;
  5614. -import com.google.gwt.user.client.ui.DecoratorPanel;
  5615. -import com.google.gwt.user.client.ui.HTML;
  5616. -import com.google.gwt.user.client.ui.HorizontalSplitPanel;
  5617. -import com.google.gwt.user.client.ui.Widget;
  5618. -
  5619. -/**
  5620. - * Example file.
  5621. - */
  5622. -@ShowcaseStyle(".gwt-HorizontalSplitPanel")
  5623. -public class CwHorizontalSplitPanel extends ContentWidget {
  5624. -  /**
  5625. -   * The constants used in this Content Widget.
  5626. -   */
  5627. -  @ShowcaseSource
  5628. -  public static interface CwConstants extends Constants,
  5629. -      ContentWidget.CwConstants {
  5630. -    String cwHorizontalSplitPanelDescription();
  5631. -
  5632. -    String cwHorizontalSplitPanelName();
  5633. -
  5634. -    String cwHorizontalSplitPanelText();
  5635. -  }
  5636. -
  5637. -  /**
  5638. -   * An instance of the constants.
  5639. -   */
  5640. -  @ShowcaseData
  5641. -  private CwConstants constants;
  5642. -
  5643. -  /**
  5644. -   * Constructor.
  5645. -   *
  5646. -   * @param constants the constants
  5647. -   */
  5648. -  public CwHorizontalSplitPanel(CwConstants constants) {
  5649. -    super(constants);
  5650. -    this.constants = constants;
  5651. -  }
  5652. -
  5653. -  @Override
  5654. -  public String getDescription() {
  5655. -    return constants.cwHorizontalSplitPanelDescription();
  5656. -  }
  5657. -
  5658. -  @Override
  5659. -  public String getName() {
  5660. -    return constants.cwHorizontalSplitPanelName();
  5661. -  }
  5662. -
  5663. -  /**
  5664. -   * Initialize this example.
  5665. -   */
  5666. -  @ShowcaseSource
  5667. -  @Override
  5668. -  public Widget onInitialize() {
  5669. -    // Create a Horizontal Split Panel
  5670. -    HorizontalSplitPanel hSplit = new HorizontalSplitPanel();
  5671. -    hSplit.ensureDebugId("cwHorizontalSplitPanel");
  5672. -    hSplit.setSize("500px", "350px");
  5673. -    hSplit.setSplitPosition("30%");
  5674. -
  5675. -    // Add some content
  5676. -    String randomText = constants.cwHorizontalSplitPanelText();
  5677. -    for (int i = 0; i < 2; i++) {
  5678. -      randomText += randomText;
  5679. -    }
  5680. -    hSplit.setRightWidget(new HTML(randomText));
  5681. -    hSplit.setLeftWidget(new HTML(randomText));
  5682. -
  5683. -    // Wrap the split panel in a decorator panel
  5684. -    DecoratorPanel decPanel = new DecoratorPanel();
  5685. -    decPanel.setWidget(hSplit);
  5686. -
  5687. -    // Return the content
  5688. -    return decPanel;
  5689. -  }
  5690. -
  5691. -  @Override
  5692. -  protected void asyncOnInitialize(final AsyncCallback<Widget> callback) {
  5693. -    GWT.runAsync(new RunAsyncCallback() {
  5694. -
  5695. -      public void onFailure(Throwable caught) {
  5696. -        callback.onFailure(caught);
  5697. -      }
  5698. -
  5699. -      public void onSuccess() {
  5700. -        callback.onSuccess(onInitialize());
  5701. -      }
  5702. -    });
  5703. -  }
  5704. -}
  5705. 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
  5706. deleted file mode 100644
  5707. index e8c8234..0000000
  5708. --- a/src/com/google/gwt/sample/showcase/client/content/panels/CwTabPanel.java
  5709. +++ /dev/null
  5710. @@ -1,127 +0,0 @@
  5711. -/*
  5712. - * Copyright 2008 Google Inc.
  5713. - *
  5714. - * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  5715. - * use this file except in compliance with the License. You may obtain a copy of
  5716. - * the License at
  5717. - *
  5718. - * http://www.apache.org/licenses/LICENSE-2.0
  5719. - *
  5720. - * Unless required by applicable law or agreed to in writing, software
  5721. - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  5722. - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  5723. - * License for the specific language governing permissions and limitations under
  5724. - * the License.
  5725. - */
  5726. -package com.google.gwt.sample.showcase.client.content.panels;
  5727. -
  5728. -import com.google.gwt.core.client.GWT;
  5729. -import com.google.gwt.core.client.RunAsyncCallback;
  5730. -import com.google.gwt.i18n.client.Constants;
  5731. -import com.google.gwt.sample.showcase.client.ContentWidget;
  5732. -import com.google.gwt.sample.showcase.client.Showcase;
  5733. -import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseData;
  5734. -import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseSource;
  5735. -import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseStyle;
  5736. -import com.google.gwt.user.client.rpc.AsyncCallback;
  5737. -import com.google.gwt.user.client.ui.DecoratedTabPanel;
  5738. -import com.google.gwt.user.client.ui.HTML;
  5739. -import com.google.gwt.user.client.ui.Image;
  5740. -import com.google.gwt.user.client.ui.VerticalPanel;
  5741. -import com.google.gwt.user.client.ui.Widget;
  5742. -
  5743. -/**
  5744. - * Example file.
  5745. - */
  5746. -@ShowcaseStyle({
  5747. -    ".gwt-DecoratedTabBar", "html>body .gwt-DecoratedTabBar",
  5748. -    "* html .gwt-DecoratedTabBar", ".gwt-TabPanel"})
  5749. -public class CwTabPanel extends ContentWidget {
  5750. -  /**
  5751. -   * The constants used in this Content Widget.
  5752. -   */
  5753. -  @ShowcaseSource
  5754. -  public static interface CwConstants extends Constants,
  5755. -      ContentWidget.CwConstants {
  5756. -    String cwTabPanelDescription();
  5757. -
  5758. -    String cwTabPanelName();
  5759. -
  5760. -    String cwTabPanelTab0();
  5761. -
  5762. -    String cwTabPanelTab2();
  5763. -
  5764. -    String[] cwTabPanelTabs();
  5765. -  }
  5766. -
  5767. -  /**
  5768. -   * An instance of the constants.
  5769. -   */
  5770. -  @ShowcaseData
  5771. -  private CwConstants constants;
  5772. -
  5773. -  /**
  5774. -   * Constructor.
  5775. -   *
  5776. -   * @param constants the constants
  5777. -   */
  5778. -  public CwTabPanel(CwConstants constants) {
  5779. -    super(constants);
  5780. -    this.constants = constants;
  5781. -  }
  5782. -
  5783. -  @Override
  5784. -  public String getDescription() {
  5785. -    return constants.cwTabPanelDescription();
  5786. -  }
  5787. -
  5788. -  @Override
  5789. -  public String getName() {
  5790. -    return constants.cwTabPanelName();
  5791. -  }
  5792. -
  5793. -  /**
  5794. -   * Initialize this example.
  5795. -   */
  5796. -  @ShowcaseSource
  5797. -  @Override
  5798. -  public Widget onInitialize() {
  5799. -    // Create a tab panel
  5800. -    DecoratedTabPanel tabPanel = new DecoratedTabPanel();
  5801. -    tabPanel.setWidth("400px");
  5802. -    tabPanel.setAnimationEnabled(true);
  5803. -
  5804. -    // Add a home tab
  5805. -    String[] tabTitles = constants.cwTabPanelTabs();
  5806. -    HTML homeText = new HTML(constants.cwTabPanelTab0());
  5807. -    tabPanel.add(homeText, tabTitles[0]);
  5808. -
  5809. -    // Add a tab with an image
  5810. -    VerticalPanel vPanel = new VerticalPanel();
  5811. -    vPanel.add(new Image(Showcase.images.gwtLogo()));
  5812. -    tabPanel.add(vPanel, tabTitles[1]);
  5813. -
  5814. -    // Add a tab
  5815. -    HTML moreInfo = new HTML(constants.cwTabPanelTab2());
  5816. -    tabPanel.add(moreInfo, tabTitles[2]);
  5817. -
  5818. -    // Return the content
  5819. -    tabPanel.selectTab(0);
  5820. -    tabPanel.ensureDebugId("cwTabPanel");
  5821. -    return tabPanel;
  5822. -  }
  5823. -
  5824. -  @Override
  5825. -  protected void asyncOnInitialize(final AsyncCallback<Widget> callback) {
  5826. -    GWT.runAsync(new RunAsyncCallback() {
  5827. -
  5828. -      public void onFailure(Throwable caught) {
  5829. -        callback.onFailure(caught);
  5830. -      }
  5831. -
  5832. -      public void onSuccess() {
  5833. -        callback.onSuccess(onInitialize());
  5834. -      }
  5835. -    });
  5836. -  }
  5837. -}
  5838. 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
  5839. index 01446bd..80f7b13 100644
  5840. --- a/src/com/google/gwt/sample/showcase/client/content/panels/CwVerticalPanel.java
  5841. +++ b/src/com/google/gwt/sample/showcase/client/content/panels/CwVerticalPanel.java
  5842. @@ -1,12 +1,12 @@
  5843.  /*
  5844.   * Copyright 2008 Google Inc.
  5845. - *
  5846. + *
  5847.   * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  5848.   * use this file except in compliance with the License. You may obtain a copy of
  5849.   * the License at
  5850. - *
  5851. + *
  5852.   * http://www.apache.org/licenses/LICENSE-2.0
  5853. - *
  5854. + *
  5855.   * Unless required by applicable law or agreed to in writing, software
  5856.   * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  5857.   * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  5858. @@ -34,8 +34,7 @@ public class CwVerticalPanel extends ContentWidget {
  5859.     * The constants used in this Content Widget.
  5860.     */
  5861.    @ShowcaseSource
  5862. -  public static interface CwConstants extends Constants,
  5863. -      ContentWidget.CwConstants {
  5864. +  public static interface CwConstants extends Constants {
  5865.      String cwVerticalPanelButton();
  5866.  
  5867.      String cwVerticalPanelDescription();
  5868. @@ -47,33 +46,19 @@ public class CwVerticalPanel extends ContentWidget {
  5869.     * An instance of the constants.
  5870.     */
  5871.    @ShowcaseData
  5872. -  private CwConstants constants;
  5873. +  private final CwConstants constants;
  5874.  
  5875.    /**
  5876.     * Constructor.
  5877. -   *
  5878. +   *
  5879.     * @param constants the constants
  5880.     */
  5881.    public CwVerticalPanel(CwConstants constants) {
  5882. -    super(constants);
  5883. +    super(constants.cwVerticalPanelName(),
  5884. +        constants.cwVerticalPanelDescription(), false);
  5885.      this.constants = constants;
  5886.    }
  5887.  
  5888. -  @Override
  5889. -  public String getDescription() {
  5890. -    return constants.cwVerticalPanelDescription();
  5891. -  }
  5892. -
  5893. -  @Override
  5894. -  public String getName() {
  5895. -    return constants.cwVerticalPanelName();
  5896. -  }
  5897. -
  5898. -  @Override
  5899. -  public boolean hasStyle() {
  5900. -    return false;
  5901. -  }
  5902. -
  5903.    /**
  5904.     * Initialize this example.
  5905.     */
  5906. @@ -96,7 +81,7 @@ public class CwVerticalPanel extends ContentWidget {
  5907.  
  5908.    @Override
  5909.    protected void asyncOnInitialize(final AsyncCallback<Widget> callback) {
  5910. -    GWT.runAsync(new RunAsyncCallback() {
  5911. +    GWT.runAsync(CwVerticalPanel.class, new RunAsyncCallback() {
  5912.  
  5913.        public void onFailure(Throwable caught) {
  5914.          callback.onFailure(caught);
  5915. 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
  5916. deleted file mode 100644
  5917. index 0f60296..0000000
  5918. --- a/src/com/google/gwt/sample/showcase/client/content/panels/CwVerticalSplitPanel.java
  5919. +++ /dev/null
  5920. @@ -1,116 +0,0 @@
  5921. -/*
  5922. - * Copyright 2008 Google Inc.
  5923. - *
  5924. - * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  5925. - * use this file except in compliance with the License. You may obtain a copy of
  5926. - * the License at
  5927. - *
  5928. - * http://www.apache.org/licenses/LICENSE-2.0
  5929. - *
  5930. - * Unless required by applicable law or agreed to in writing, software
  5931. - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  5932. - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  5933. - * License for the specific language governing permissions and limitations under
  5934. - * the License.
  5935. - */
  5936. -package com.google.gwt.sample.showcase.client.content.panels;
  5937. -
  5938. -import com.google.gwt.core.client.GWT;
  5939. -import com.google.gwt.core.client.RunAsyncCallback;
  5940. -import com.google.gwt.i18n.client.Constants;
  5941. -import com.google.gwt.sample.showcase.client.ContentWidget;
  5942. -import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseData;
  5943. -import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseSource;
  5944. -import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseStyle;
  5945. -import com.google.gwt.user.client.rpc.AsyncCallback;
  5946. -import com.google.gwt.user.client.ui.DecoratorPanel;
  5947. -import com.google.gwt.user.client.ui.HTML;
  5948. -import com.google.gwt.user.client.ui.VerticalSplitPanel;
  5949. -import com.google.gwt.user.client.ui.Widget;
  5950. -
  5951. -/**
  5952. - * Example file.
  5953. - */
  5954. -@ShowcaseStyle(".gwt-VerticalSplitPanel")
  5955. -public class CwVerticalSplitPanel extends ContentWidget {
  5956. -  /**
  5957. -   * The constants used in this Content Widget.
  5958. -   */
  5959. -  @ShowcaseSource
  5960. -  public static interface CwConstants extends Constants,
  5961. -      ContentWidget.CwConstants {
  5962. -    String cwVerticalSplitPanelDescription();
  5963. -
  5964. -    String cwVerticalSplitPanelName();
  5965. -
  5966. -    String cwVerticalSplitPanelText();
  5967. -  }
  5968. -
  5969. -  /**
  5970. -   * An instance of the constants.
  5971. -   */
  5972. -  @ShowcaseData
  5973. -  private CwConstants constants;
  5974. -
  5975. -  /**
  5976. -   * Constructor.
  5977. -   *
  5978. -   * @param constants the constants
  5979. -   */
  5980. -  public CwVerticalSplitPanel(CwConstants constants) {
  5981. -    super(constants);
  5982. -    this.constants = constants;
  5983. -  }
  5984. -
  5985. -  @Override
  5986. -  public String getDescription() {
  5987. -    return constants.cwVerticalSplitPanelDescription();
  5988. -  }
  5989. -
  5990. -  @Override
  5991. -  public String getName() {
  5992. -    return constants.cwVerticalSplitPanelName();
  5993. -  }
  5994. -
  5995. -  /**
  5996. -   * Initialize this example.
  5997. -   */
  5998. -  @ShowcaseSource
  5999. -  @Override
  6000. -  public Widget onInitialize() {
  6001. -    // Create a Vertical Split Panel
  6002. -    VerticalSplitPanel vSplit = new VerticalSplitPanel();
  6003. -    vSplit.ensureDebugId("cwVerticalSplitPanel");
  6004. -    vSplit.setSize("500px", "350px");
  6005. -    vSplit.setSplitPosition("30%");
  6006. -
  6007. -    // Add some content
  6008. -    String randomText = constants.cwVerticalSplitPanelText() + " ";
  6009. -    for (int i = 0; i < 2; i++) {
  6010. -      randomText += randomText;
  6011. -    }
  6012. -    vSplit.setTopWidget(new HTML(randomText));
  6013. -    vSplit.setBottomWidget(new HTML(randomText));
  6014. -
  6015. -    // Wrap the split panel in a decorator panel
  6016. -    DecoratorPanel decPanel = new DecoratorPanel();
  6017. -    decPanel.setWidget(vSplit);
  6018. -
  6019. -    // Return the content
  6020. -    return decPanel;
  6021. -  }
  6022. -
  6023. -  @Override
  6024. -  protected void asyncOnInitialize(final AsyncCallback<Widget> callback) {
  6025. -    GWT.runAsync(new RunAsyncCallback() {
  6026. -
  6027. -      public void onFailure(Throwable caught) {
  6028. -        callback.onFailure(caught);
  6029. -      }
  6030. -
  6031. -      public void onSuccess() {
  6032. -        callback.onSuccess(onInitialize());
  6033. -      }
  6034. -    });
  6035. -  }
  6036. -}
  6037. 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
  6038. index 2f81461..88b4f35 100644
  6039. --- a/src/com/google/gwt/sample/showcase/client/content/popups/CwBasicPopup.java
  6040. +++ b/src/com/google/gwt/sample/showcase/client/content/popups/CwBasicPopup.java
  6041. @@ -1,12 +1,12 @@
  6042.  /*
  6043.   * Copyright 2008 Google Inc.
  6044. - *
  6045. + *
  6046.   * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  6047.   * use this file except in compliance with the License. You may obtain a copy of
  6048.   * the License at
  6049. - *
  6050. + *
  6051.   * http://www.apache.org/licenses/LICENSE-2.0
  6052. - *
  6053. + *
  6054.   * Unless required by applicable law or agreed to in writing, software
  6055.   * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  6056.   * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  6057. @@ -37,7 +37,7 @@ import com.google.gwt.user.client.ui.Widget;
  6058.  /**
  6059.   * Example file.
  6060.   */
  6061. -@ShowcaseStyle(value = {
  6062. +@ShowcaseStyle({
  6063.      ".gwt-PopupPanel", "html>body .gwt-PopupPanel", "* html .gwt-PopupPanel",
  6064.      ".gwt-DecoratedPopupPanel", "html>body .gwt-DecoratedPopupPanel",
  6065.      "* html .gwt-DecoratedPopupPanel"})
  6066. @@ -46,8 +46,7 @@ public class CwBasicPopup extends ContentWidget {
  6067.     * The constants used in this Content Widget.
  6068.     */
  6069.    @ShowcaseSource
  6070. -  public static interface CwConstants extends Constants,
  6071. -      ContentWidget.CwConstants {
  6072. +  public static interface CwConstants extends Constants {
  6073.      String cwBasicPopupClickOutsideInstructions();
  6074.  
  6075.      String cwBasicPopupDescription();
  6076. @@ -63,28 +62,19 @@ public class CwBasicPopup extends ContentWidget {
  6077.     * An instance of the constants.
  6078.     */
  6079.    @ShowcaseData
  6080. -  private CwConstants constants;
  6081. +  private final CwConstants constants;
  6082.  
  6083.    /**
  6084.     * Constructor.
  6085. -   *
  6086. +   *
  6087.     * @param constants the constants
  6088.     */
  6089.    public CwBasicPopup(CwConstants constants) {
  6090. -    super(constants);
  6091. +    super(constants.cwBasicPopupName(), constants.cwBasicPopupDescription(),
  6092. +        true);
  6093.      this.constants = constants;
  6094.    }
  6095.  
  6096. -  @Override
  6097. -  public String getDescription() {
  6098. -    return constants.cwBasicPopupDescription();
  6099. -  }
  6100. -
  6101. -  @Override
  6102. -  public String getName() {
  6103. -    return constants.cwBasicPopupName();
  6104. -  }
  6105. -
  6106.    /**
  6107.     * Initialize this example.
  6108.     */
  6109. @@ -95,12 +85,12 @@ public class CwBasicPopup extends ContentWidget {
  6110.      final DecoratedPopupPanel simplePopup = new DecoratedPopupPanel(true);
  6111.      simplePopup.ensureDebugId("cwBasicPopup-simplePopup");
  6112.      simplePopup.setWidth("150px");
  6113. -    simplePopup.setWidget(new HTML(
  6114. -        constants.cwBasicPopupClickOutsideInstructions()));
  6115. +    simplePopup.setWidget(
  6116. +        new HTML(constants.cwBasicPopupClickOutsideInstructions()));
  6117.  
  6118.      // Create a button to show the popup
  6119. -    Button openButton = new Button(constants.cwBasicPopupShowButton(),
  6120. -        new ClickHandler() {
  6121. +    Button openButton = new Button(
  6122. +        constants.cwBasicPopupShowButton(), new ClickHandler() {
  6123.            public void onClick(ClickEvent event) {
  6124.              // Reposition the popup relative to the button
  6125.              Widget source = (Widget) event.getSource();
  6126. @@ -148,7 +138,7 @@ public class CwBasicPopup extends ContentWidget {
  6127.  
  6128.    @Override
  6129.    protected void asyncOnInitialize(final AsyncCallback<Widget> callback) {
  6130. -    GWT.runAsync(new RunAsyncCallback() {
  6131. +    GWT.runAsync(CwBasicPopup.class, new RunAsyncCallback() {
  6132.  
  6133.        public void onFailure(Throwable caught) {
  6134.          callback.onFailure(caught);
  6135. 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
  6136. index b13b6f2..5e19c3b 100644
  6137. --- a/src/com/google/gwt/sample/showcase/client/content/popups/CwDialogBox.java
  6138. +++ b/src/com/google/gwt/sample/showcase/client/content/popups/CwDialogBox.java
  6139. @@ -1,12 +1,12 @@
  6140.  /*
  6141.   * Copyright 2008 Google Inc.
  6142. - *
  6143. + *
  6144.   * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  6145.   * use this file except in compliance with the License. You may obtain a copy of
  6146.   * the License at
  6147. - *
  6148. + *
  6149.   * http://www.apache.org/licenses/LICENSE-2.0
  6150. - *
  6151. + *
  6152.   * Unless required by applicable law or agreed to in writing, software
  6153.   * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  6154.   * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  6155. @@ -47,8 +47,7 @@ public class CwDialogBox extends ContentWidget {
  6156.     * The constants used in this Content Widget.
  6157.     */
  6158.    @ShowcaseSource
  6159. -  public static interface CwConstants extends Constants,
  6160. -      ContentWidget.CwConstants {
  6161. +  public static interface CwConstants extends Constants {
  6162.      String cwDialogBoxCaption();
  6163.  
  6164.      String cwDialogBoxClose();
  6165. @@ -72,28 +71,19 @@ public class CwDialogBox extends ContentWidget {
  6166.     * An instance of the constants.
  6167.     */
  6168.    @ShowcaseData
  6169. -  private CwConstants constants;
  6170. +  private final CwConstants constants;
  6171.  
  6172.    /**
  6173.     * Constructor.
  6174. -   *
  6175. +   *
  6176.     * @param constants the constants
  6177.     */
  6178.    public CwDialogBox(CwConstants constants) {
  6179. -    super(constants);
  6180. +    super(
  6181. +        constants.cwDialogBoxName(), constants.cwDialogBoxDescription(), true);
  6182.      this.constants = constants;
  6183.    }
  6184.  
  6185. -  @Override
  6186. -  public String getDescription() {
  6187. -    return constants.cwDialogBoxDescription();
  6188. -  }
  6189. -
  6190. -  @Override
  6191. -  public String getName() {
  6192. -    return constants.cwDialogBoxName();
  6193. -  }
  6194. -
  6195.    /**
  6196.     * Initialize this example.
  6197.     */
  6198. @@ -106,8 +96,8 @@ public class CwDialogBox extends ContentWidget {
  6199.      dialogBox.setAnimationEnabled(true);
  6200.  
  6201.      // Create a button to show the dialog Box
  6202. -    Button openButton = new Button(constants.cwDialogBoxShowButton(),
  6203. -        new ClickHandler() {
  6204. +    Button openButton = new Button(
  6205. +        constants.cwDialogBoxShowButton(), new ClickHandler() {
  6206.            public void onClick(ClickEvent sender) {
  6207.              dialogBox.center();
  6208.              dialogBox.show();
  6209. @@ -115,8 +105,8 @@ public class CwDialogBox extends ContentWidget {
  6210.          });
  6211.  
  6212.      // Create a ListBox
  6213. -    HTML listDesc = new HTML("<br><br><br>"
  6214. -        + constants.cwDialogBoxListBoxInfo());
  6215. +    HTML listDesc = new HTML(
  6216. +        "<br><br><br>" + constants.cwDialogBoxListBoxInfo());
  6217.  
  6218.      ListBox list = new ListBox();
  6219.      list.setVisibleItemCount(1);
  6220. @@ -137,7 +127,7 @@ public class CwDialogBox extends ContentWidget {
  6221.  
  6222.    @Override
  6223.    protected void asyncOnInitialize(final AsyncCallback<Widget> callback) {
  6224. -    GWT.runAsync(new RunAsyncCallback() {
  6225. +    GWT.runAsync(CwDialogBox.class, new RunAsyncCallback() {
  6226.  
  6227.        public void onFailure(Throwable caught) {
  6228.          callback.onFailure(caught);
  6229. @@ -151,7 +141,7 @@ public class CwDialogBox extends ContentWidget {
  6230.  
  6231.    /**
  6232.     * Create the dialog box for this example.
  6233. -   *
  6234. +   *
  6235.     * @return the new dialog box
  6236.     */
  6237.    @ShowcaseSource
  6238. @@ -169,30 +159,30 @@ public class CwDialogBox extends ContentWidget {
  6239.      // Add some text to the top of the dialog
  6240.      HTML details = new HTML(constants.cwDialogBoxDetails());
  6241.      dialogContents.add(details);
  6242. -    dialogContents.setCellHorizontalAlignment(details,
  6243. -        HasHorizontalAlignment.ALIGN_CENTER);
  6244. +    dialogContents.setCellHorizontalAlignment(
  6245. +        details, HasHorizontalAlignment.ALIGN_CENTER);
  6246.  
  6247.      // Add an image to the dialog
  6248.      Image image = new Image(Showcase.images.jimmy());
  6249.      dialogContents.add(image);
  6250. -    dialogContents.setCellHorizontalAlignment(image,
  6251. -        HasHorizontalAlignment.ALIGN_CENTER);
  6252. +    dialogContents.setCellHorizontalAlignment(
  6253. +        image, HasHorizontalAlignment.ALIGN_CENTER);
  6254.  
  6255.      // Add a close button at the bottom of the dialog
  6256. -    Button closeButton = new Button(constants.cwDialogBoxClose(),
  6257. -        new ClickHandler() {
  6258. +    Button closeButton = new Button(
  6259. +        constants.cwDialogBoxClose(), new ClickHandler() {
  6260.            public void onClick(ClickEvent event) {
  6261.              dialogBox.hide();
  6262.            }
  6263.          });
  6264.      dialogContents.add(closeButton);
  6265.      if (LocaleInfo.getCurrentLocale().isRTL()) {
  6266. -      dialogContents.setCellHorizontalAlignment(closeButton,
  6267. -          HasHorizontalAlignment.ALIGN_LEFT);
  6268. +      dialogContents.setCellHorizontalAlignment(
  6269. +          closeButton, HasHorizontalAlignment.ALIGN_LEFT);
  6270.  
  6271.      } else {
  6272. -      dialogContents.setCellHorizontalAlignment(closeButton,
  6273. -          HasHorizontalAlignment.ALIGN_RIGHT);
  6274. +      dialogContents.setCellHorizontalAlignment(
  6275. +          closeButton, HasHorizontalAlignment.ALIGN_RIGHT);
  6276.      }
  6277.  
  6278.      // Return the dialog box
  6279. 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
  6280. index 7e4422a..0c2a294 100644
  6281. --- a/src/com/google/gwt/sample/showcase/client/content/tables/CwFlexTable.java
  6282. +++ b/src/com/google/gwt/sample/showcase/client/content/tables/CwFlexTable.java
  6283. @@ -1,12 +1,12 @@
  6284.  /*
  6285.   * Copyright 2008 Google Inc.
  6286. - *
  6287. + *
  6288.   * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  6289.   * use this file except in compliance with the License. You may obtain a copy of
  6290.   * the License at
  6291. - *
  6292. + *
  6293.   * http://www.apache.org/licenses/LICENSE-2.0
  6294. - *
  6295. + *
  6296.   * Unless required by applicable law or agreed to in writing, software
  6297.   * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  6298.   * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  6299. @@ -44,8 +44,7 @@ public class CwFlexTable extends ContentWidget {
  6300.     * The constants used in this Content Widget.
  6301.     */
  6302.    @ShowcaseSource
  6303. -  public static interface CwConstants extends Constants,
  6304. -      ContentWidget.CwConstants {
  6305. +  public static interface CwConstants extends Constants {
  6306.      String cwFlexTableAddRow();
  6307.  
  6308.      String cwFlexTableDescription();
  6309. @@ -61,28 +60,19 @@ public class CwFlexTable extends ContentWidget {
  6310.     * An instance of the constants.
  6311.     */
  6312.    @ShowcaseData
  6313. -  private CwConstants constants;
  6314. +  private final CwConstants constants;
  6315.  
  6316.    /**
  6317.     * Constructor.
  6318. -   *
  6319. +   *
  6320.     * @param constants the constants
  6321.     */
  6322.    public CwFlexTable(CwConstants constants) {
  6323. -    super(constants);
  6324. +    super(
  6325. +        constants.cwFlexTableName(), constants.cwFlexTableDescription(), true);
  6326.      this.constants = constants;
  6327.    }
  6328.  
  6329. -  @Override
  6330. -  public String getDescription() {
  6331. -    return constants.cwFlexTableDescription();
  6332. -  }
  6333. -
  6334. -  @Override
  6335. -  public String getName() {
  6336. -    return constants.cwFlexTableName();
  6337. -  }
  6338. -
  6339.    /**
  6340.     * Initialize this example.
  6341.     */
  6342. @@ -98,22 +88,22 @@ public class CwFlexTable extends ContentWidget {
  6343.      flexTable.setCellPadding(3);
  6344.  
  6345.      // Add some text
  6346. -    cellFormatter.setHorizontalAlignment(0, 1,
  6347. -        HasHorizontalAlignment.ALIGN_LEFT);
  6348. +    cellFormatter.setHorizontalAlignment(
  6349. +        0, 1, HasHorizontalAlignment.ALIGN_LEFT);
  6350.      flexTable.setHTML(0, 0, constants.cwFlexTableDetails());
  6351.      cellFormatter.setColSpan(0, 0, 2);
  6352.  
  6353.      // Add a button that will add more rows to the table
  6354. -    Button addRowButton = new Button(constants.cwFlexTableAddRow(),
  6355. -        new ClickHandler() {
  6356. +    Button addRowButton = new Button(
  6357. +        constants.cwFlexTableAddRow(), new ClickHandler() {
  6358.            public void onClick(ClickEvent event) {
  6359.              addRow(flexTable);
  6360.            }
  6361.          });
  6362.      addRowButton.addStyleName("sc-FixedWidthButton");
  6363.  
  6364. -    Button removeRowButton = new Button(constants.cwFlexTableRemoveRow(),
  6365. -        new ClickHandler() {
  6366. +    Button removeRowButton = new Button(
  6367. +        constants.cwFlexTableRemoveRow(), new ClickHandler() {
  6368.            public void onClick(ClickEvent event) {
  6369.              removeRow(flexTable);
  6370.            }
  6371. @@ -137,7 +127,7 @@ public class CwFlexTable extends ContentWidget {
  6372.  
  6373.    @Override
  6374.    protected void asyncOnInitialize(final AsyncCallback<Widget> callback) {
  6375. -    GWT.runAsync(new RunAsyncCallback() {
  6376. +    GWT.runAsync(CwFlexTable.class, new RunAsyncCallback() {
  6377.  
  6378.        public void onFailure(Throwable caught) {
  6379.          callback.onFailure(caught);
  6380. 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
  6381. index beea730..3077b31 100644
  6382. --- a/src/com/google/gwt/sample/showcase/client/content/tables/CwGrid.java
  6383. +++ b/src/com/google/gwt/sample/showcase/client/content/tables/CwGrid.java
  6384. @@ -1,12 +1,12 @@
  6385.  /*
  6386.   * Copyright 2008 Google Inc.
  6387. - *
  6388. + *
  6389.   * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  6390.   * use this file except in compliance with the License. You may obtain a copy of
  6391.   * the License at
  6392. - *
  6393. + *
  6394.   * http://www.apache.org/licenses/LICENSE-2.0
  6395. - *
  6396. + *
  6397.   * Unless required by applicable law or agreed to in writing, software
  6398.   * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  6399.   * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  6400. @@ -20,7 +20,6 @@ import com.google.gwt.core.client.RunAsyncCallback;
  6401.  import com.google.gwt.i18n.client.Constants;
  6402.  import com.google.gwt.sample.showcase.client.ContentWidget;
  6403.  import com.google.gwt.sample.showcase.client.Showcase;
  6404. -import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseData;
  6405.  import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseSource;
  6406.  import com.google.gwt.user.client.rpc.AsyncCallback;
  6407.  import com.google.gwt.user.client.ui.Grid;
  6408. @@ -35,42 +34,19 @@ public class CwGrid extends ContentWidget {
  6409.     * The constants used in this Content Widget.
  6410.     */
  6411.    @ShowcaseSource
  6412. -  public static interface CwConstants extends Constants,
  6413. -      ContentWidget.CwConstants {
  6414. +  public static interface CwConstants extends Constants {
  6415.      String cwGridDescription();
  6416.  
  6417.      String cwGridName();
  6418.    }
  6419.  
  6420.    /**
  6421. -   * An instance of the constants.
  6422. -   */
  6423. -  @ShowcaseData
  6424. -  private CwConstants constants;
  6425. -
  6426. -  /**
  6427.     * Constructor.
  6428. -   *
  6429. +   *
  6430.     * @param constants the constants
  6431.     */
  6432.    public CwGrid(CwConstants constants) {
  6433. -    super(constants);
  6434. -    this.constants = constants;
  6435. -  }
  6436. -
  6437. -  @Override
  6438. -  public String getDescription() {
  6439. -    return constants.cwGridDescription();
  6440. -  }
  6441. -
  6442. -  @Override
  6443. -  public String getName() {
  6444. -    return constants.cwGridName();
  6445. -  }
  6446. -
  6447. -  @Override
  6448. -  public boolean hasStyle() {
  6449. -    return false;
  6450. +    super(constants.cwGridName(), constants.cwGridDescription(), false);
  6451.    }
  6452.  
  6453.    /**
  6454. @@ -98,7 +74,7 @@ public class CwGrid extends ContentWidget {
  6455.  
  6456.    @Override
  6457.    protected void asyncOnInitialize(final AsyncCallback<Widget> callback) {
  6458. -    GWT.runAsync(new RunAsyncCallback() {
  6459. +    GWT.runAsync(CwGrid.class, new RunAsyncCallback() {
  6460.  
  6461.        public void onFailure(Throwable caught) {
  6462.          callback.onFailure(caught);
  6463. 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
  6464. index 9829e3e..bddeb35 100644
  6465. --- a/src/com/google/gwt/sample/showcase/client/content/text/CwBasicText.java
  6466. +++ b/src/com/google/gwt/sample/showcase/client/content/text/CwBasicText.java
  6467. @@ -1,12 +1,12 @@
  6468.  /*
  6469.   * Copyright 2008 Google Inc.
  6470. - *
  6471. + *
  6472.   * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  6473.   * use this file except in compliance with the License. You may obtain a copy of
  6474.   * the License at
  6475. - *
  6476. + *
  6477.   * http://www.apache.org/licenses/LICENSE-2.0
  6478. - *
  6479. + *
  6480.   * Unless required by applicable law or agreed to in writing, software
  6481.   * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  6482.   * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  6483. @@ -22,6 +22,7 @@ import com.google.gwt.event.dom.client.ClickHandler;
  6484.  import com.google.gwt.event.dom.client.KeyUpEvent;
  6485.  import com.google.gwt.event.dom.client.KeyUpHandler;
  6486.  import com.google.gwt.i18n.client.Constants;
  6487. +import com.google.gwt.i18n.shared.AnyRtlDirectionEstimator;
  6488.  import com.google.gwt.sample.showcase.client.ContentWidget;
  6489.  import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseData;
  6490.  import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseSource;
  6491. @@ -47,8 +48,7 @@ public class CwBasicText extends ContentWidget {
  6492.     * The constants used in this Content Widget.
  6493.     */
  6494.    @ShowcaseSource
  6495. -  public static interface CwConstants extends Constants,
  6496. -      ContentWidget.CwConstants {
  6497. +  public static interface CwConstants extends Constants {
  6498.      String cwBasicTextAreaLabel();
  6499.  
  6500.      String cwBasicTextDescription();
  6501. @@ -68,28 +68,19 @@ public class CwBasicText extends ContentWidget {
  6502.     * An instance of the constants.
  6503.     */
  6504.    @ShowcaseData
  6505. -  private CwConstants constants;
  6506. +  private final CwConstants constants;
  6507.  
  6508.    /**
  6509.     * Constructor.
  6510. -   *
  6511. +   *
  6512.     * @param constants the constants
  6513.     */
  6514.    public CwBasicText(CwConstants constants) {
  6515. -    super(constants);
  6516. +    super(
  6517. +        constants.cwBasicTextName(), constants.cwBasicTextDescription(), true);
  6518.      this.constants = constants;
  6519.    }
  6520.  
  6521. -  @Override
  6522. -  public String getDescription() {
  6523. -    return constants.cwBasicTextDescription();
  6524. -  }
  6525. -
  6526. -  @Override
  6527. -  public String getName() {
  6528. -    return constants.cwBasicTextName();
  6529. -  }
  6530. -
  6531.    /**
  6532.     * Initialize this example.
  6533.     */
  6534. @@ -103,6 +94,10 @@ public class CwBasicText extends ContentWidget {
  6535.      // Add a normal and disabled text box
  6536.      TextBox normalText = new TextBox();
  6537.      normalText.ensureDebugId("cwBasicText-textbox");
  6538. +    // Set the normal text box to automatically adjust its direction according
  6539. +    // to the input text. Use the Any-RTL heuristic, which sets an RTL direction
  6540. +    // iff the text contains at least one RTL character.
  6541. +    normalText.setDirectionEstimator(AnyRtlDirectionEstimator.get());
  6542.      TextBox disabledText = new TextBox();
  6543.      disabledText.ensureDebugId("cwBasicText-textbox-disabled");
  6544.      disabledText.setText(constants.cwBasicTextReadOnly());
  6545. @@ -135,7 +130,7 @@ public class CwBasicText extends ContentWidget {
  6546.  
  6547.    @Override
  6548.    protected void asyncOnInitialize(final AsyncCallback<Widget> callback) {
  6549. -    GWT.runAsync(new RunAsyncCallback() {
  6550. +    GWT.runAsync(CwBasicText.class, new RunAsyncCallback() {
  6551.  
  6552.        public void onFailure(Throwable caught) {
  6553.          callback.onFailure(caught);
  6554. @@ -148,16 +143,16 @@ public class CwBasicText extends ContentWidget {
  6555.    }
  6556.  
  6557.    /**
  6558. -   * Create a TextBox example that includes the text box and an optional
  6559. -   * handler that updates a Label with the currently selected text.
  6560. -   *
  6561. +   * Create a TextBox example that includes the text box and an optional handler
  6562. +   * that updates a Label with the currently selected text.
  6563. +   *
  6564.     * @param textBox the text box to handle
  6565.     * @param addSelection add handlers to update label
  6566.     * @return the Label that will be updated
  6567.     */
  6568.    @ShowcaseSource
  6569. -  private HorizontalPanel createTextExample(final TextBoxBase textBox,
  6570. -      boolean addSelection) {
  6571. +  private HorizontalPanel createTextExample(
  6572. +      final TextBoxBase textBox, boolean addSelection) {
  6573.      // Add the text box and label to a panel
  6574.      HorizontalPanel hPanel = new HorizontalPanel();
  6575.      hPanel.setSpacing(4);
  6576. @@ -192,13 +187,14 @@ public class CwBasicText extends ContentWidget {
  6577.  
  6578.    /**
  6579.     * Update the text in one of the selection labels.
  6580. -   *
  6581. +   *
  6582.     * @param textBox the text box
  6583.     * @param label the label to update
  6584.     */
  6585.    @ShowcaseSource
  6586.    private void updateSelectionLabel(TextBoxBase textBox, Label label) {
  6587. -    label.setText(constants.cwBasicTextSelected() + ": "
  6588. -        + textBox.getCursorPos() + ", " + textBox.getSelectionLength());
  6589. +    label.setText(
  6590. +        constants.cwBasicTextSelected() + ": " + textBox.getCursorPos() + ", "
  6591. +            + textBox.getSelectionLength());
  6592.    }
  6593.  }
  6594. 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
  6595. index 2e15e28..e85e338 100644
  6596. --- a/src/com/google/gwt/sample/showcase/client/content/text/CwRichText.java
  6597. +++ b/src/com/google/gwt/sample/showcase/client/content/text/CwRichText.java
  6598. @@ -1,12 +1,12 @@
  6599.  /*
  6600.   * Copyright 2008 Google Inc.
  6601. - *
  6602. + *
  6603.   * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  6604.   * use this file except in compliance with the License. You may obtain a copy of
  6605.   * the License at
  6606. - *
  6607. + *
  6608.   * http://www.apache.org/licenses/LICENSE-2.0
  6609. - *
  6610. + *
  6611.   * Unless required by applicable law or agreed to in writing, software
  6612.   * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  6613.   * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  6614. @@ -19,7 +19,6 @@ import com.google.gwt.core.client.GWT;
  6615.  import com.google.gwt.core.client.RunAsyncCallback;
  6616.  import com.google.gwt.i18n.client.Constants;
  6617.  import com.google.gwt.sample.showcase.client.ContentWidget;
  6618. -import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseData;
  6619.  import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseSource;
  6620.  import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseStyle;
  6621.  import com.google.gwt.user.client.rpc.AsyncCallback;
  6622. @@ -38,37 +37,19 @@ public class CwRichText extends ContentWidget {
  6623.     * The constants used in this Content Widget.
  6624.     */
  6625.    @ShowcaseSource
  6626. -  public static interface CwConstants extends Constants,
  6627. -      ContentWidget.CwConstants {
  6628. +  public static interface CwConstants extends Constants {
  6629.      String cwRichTextDescription();
  6630.  
  6631.      String cwRichTextName();
  6632.    }
  6633.  
  6634.    /**
  6635. -   * An instance of the constants.
  6636. -   */
  6637. -  @ShowcaseData
  6638. -  private CwConstants constants;
  6639. -
  6640. -  /**
  6641.     * Constructor.
  6642. -   *
  6643. +   *
  6644.     * @param constants the constants
  6645.     */
  6646.    public CwRichText(CwConstants constants) {
  6647. -    super(constants);
  6648. -    this.constants = constants;
  6649. -  }
  6650. -
  6651. -  @Override
  6652. -  public String getDescription() {
  6653. -    return constants.cwRichTextDescription();
  6654. -  }
  6655. -
  6656. -  @Override
  6657. -  public String getName() {
  6658. -    return constants.cwRichTextName();
  6659. +    super(constants.cwRichTextName(), constants.cwRichTextDescription(), true);
  6660.    }
  6661.  
  6662.    /**
  6663. @@ -95,7 +76,7 @@ public class CwRichText extends ContentWidget {
  6664.  
  6665.    @Override
  6666.    protected void asyncOnInitialize(final AsyncCallback<Widget> callback) {
  6667. -    GWT.runAsync(new RunAsyncCallback() {
  6668. +    GWT.runAsync(CwRichText.class, new RunAsyncCallback() {
  6669.  
  6670.        public void onFailure(Throwable caught) {
  6671.          callback.onFailure(caught);
  6672. 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
  6673. deleted file mode 100644
  6674. index 363b704..0000000
  6675. --- a/src/com/google/gwt/sample/showcase/client/content/text/RichTextToolbar$Strings.properties
  6676. +++ /dev/null
  6677. @@ -1,35 +0,0 @@
  6678. -bold = Toggle Bold
  6679. -createLink = Create Link
  6680. -hr = Insert Horizontal Rule
  6681. -indent = Indent Right
  6682. -insertImage = Insert Image
  6683. -italic = Toggle Italic
  6684. -justifyCenter = Center
  6685. -justifyLeft = Left Justify
  6686. -justifyRight = Right Justify
  6687. -ol = Insert Ordered List
  6688. -outdent = Indent Left
  6689. -removeFormat = Remove Formatting
  6690. -removeLink = Remove Link
  6691. -strikeThrough = Toggle Strikethrough
  6692. -subscript = Toggle Subscript
  6693. -superscript = Toggle Superscript
  6694. -ul = Insert Unordered List
  6695. -underline = Toggle Underline
  6696. -color = Color
  6697. -black = Black
  6698. -white = White
  6699. -red = Red
  6700. -green = Green
  6701. -yellow = Yellow
  6702. -blue = Blue
  6703. -font = Font
  6704. -normal = Normal
  6705. -size = Size
  6706. -xxsmall = XX-Small
  6707. -xsmall = X-Small
  6708. -small = Small
  6709. -medium = Medium
  6710. -large = Large
  6711. -xlarge = X-Large
  6712. -xxlarge = XX-Large
  6713. \ No newline at end of file
  6714. 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
  6715. index da6bfc9..d89dec8 100644
  6716. --- a/src/com/google/gwt/sample/showcase/client/content/text/RichTextToolbar.java
  6717. +++ b/src/com/google/gwt/sample/showcase/client/content/text/RichTextToolbar.java
  6718. @@ -41,6 +41,7 @@ import com.google.gwt.user.client.ui.Widget;
  6719.   * for all rich text formatting, dynamically displayed only for the available
  6720.   * functionality.
  6721.   */
  6722. +@SuppressWarnings("deprecation")
  6723.  public class RichTextToolbar extends Composite {
  6724.  
  6725.    /**
  6726. 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
  6727. index 1217cd3..22ccb1e 100644
  6728. --- a/src/com/google/gwt/sample/showcase/client/content/widgets/CwBasicButton.java
  6729. +++ b/src/com/google/gwt/sample/showcase/client/content/widgets/CwBasicButton.java
  6730. @@ -1,12 +1,12 @@
  6731.  /*
  6732.   * Copyright 2008 Google Inc.
  6733. - *
  6734. + *
  6735.   * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  6736.   * use this file except in compliance with the License. You may obtain a copy of
  6737.   * the License at
  6738. - *
  6739. + *
  6740.   * http://www.apache.org/licenses/LICENSE-2.0
  6741. - *
  6742. + *
  6743.   * Unless required by applicable law or agreed to in writing, software
  6744.   * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  6745.   * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  6746. @@ -39,8 +39,7 @@ public class CwBasicButton extends ContentWidget {
  6747.     * The constants used in this Content Widget.
  6748.     */
  6749.    @ShowcaseSource
  6750. -  public static interface CwConstants extends Constants,
  6751. -      ContentWidget.CwConstants {
  6752. +  public static interface CwConstants extends Constants {
  6753.      String cwBasicButtonClickMessage();
  6754.  
  6755.      String cwBasicButtonDescription();
  6756. @@ -56,28 +55,19 @@ public class CwBasicButton extends ContentWidget {
  6757.     * An instance of the constants.
  6758.     */
  6759.    @ShowcaseData
  6760. -  private CwConstants constants;
  6761. +  private final CwConstants constants;
  6762.  
  6763.    /**
  6764.     * Constructor.
  6765. -   *
  6766. +   *
  6767.     * @param constants the constants
  6768.     */
  6769.    public CwBasicButton(CwConstants constants) {
  6770. -    super(constants);
  6771. +    super(constants.cwBasicButtonName(), constants.cwBasicButtonDescription(),
  6772. +        true);
  6773.      this.constants = constants;
  6774.    }
  6775.  
  6776. -  @Override
  6777. -  public String getDescription() {
  6778. -    return constants.cwBasicButtonDescription();
  6779. -  }
  6780. -
  6781. -  @Override
  6782. -  public String getName() {
  6783. -    return constants.cwBasicButtonName();
  6784. -  }
  6785. -
  6786.    /**
  6787.     * Initialize this example.
  6788.     */
  6789. @@ -89,8 +79,8 @@ public class CwBasicButton extends ContentWidget {
  6790.      hPanel.setSpacing(10);
  6791.  
  6792.      // Add a normal button
  6793. -    Button normalButton = new Button(constants.cwBasicButtonNormal(),
  6794. -        new ClickHandler() {
  6795. +    Button normalButton = new Button(
  6796. +        constants.cwBasicButtonNormal(), new ClickHandler() {
  6797.            public void onClick(ClickEvent event) {
  6798.              Window.alert(constants.cwBasicButtonClickMessage());
  6799.            }
  6800. @@ -110,7 +100,7 @@ public class CwBasicButton extends ContentWidget {
  6801.  
  6802.    @Override
  6803.    protected void asyncOnInitialize(final AsyncCallback<Widget> callback) {
  6804. -    GWT.runAsync(new RunAsyncCallback() {
  6805. +    GWT.runAsync(CwBasicButton.class, new RunAsyncCallback() {
  6806.  
  6807.        public void onFailure(Throwable caught) {
  6808.          callback.onFailure(caught);
  6809. 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
  6810. index 1322790..be1c8eb 100644
  6811. --- a/src/com/google/gwt/sample/showcase/client/content/widgets/CwCheckBox.java
  6812. +++ b/src/com/google/gwt/sample/showcase/client/content/widgets/CwCheckBox.java
  6813. @@ -1,12 +1,12 @@
  6814.  /*
  6815.   * Copyright 2008 Google Inc.
  6816. - *
  6817. + *
  6818.   * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  6819.   * use this file except in compliance with the License. You may obtain a copy of
  6820.   * the License at
  6821. - *
  6822. + *
  6823.   * http://www.apache.org/licenses/LICENSE-2.0
  6824. - *
  6825. + *
  6826.   * Unless required by applicable law or agreed to in writing, software
  6827.   * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  6828.   * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  6829. @@ -35,8 +35,7 @@ public class CwCheckBox extends ContentWidget {
  6830.     * The constants used in this Content Widget.
  6831.     */
  6832.    @ShowcaseSource
  6833. -  public static interface CwConstants extends Constants,
  6834. -      ContentWidget.CwConstants {
  6835. +  public static interface CwConstants extends Constants {
  6836.      String cwCheckBoxCheckAll();
  6837.  
  6838.      String[] cwCheckBoxDays();
  6839. @@ -50,28 +49,18 @@ public class CwCheckBox extends ContentWidget {
  6840.     * An instance of the constants.
  6841.     */
  6842.    @ShowcaseData
  6843. -  private CwConstants constants;
  6844. +  private final CwConstants constants;
  6845.  
  6846.    /**
  6847.     * Constructor.
  6848. -   *
  6849. +   *
  6850.     * @param constants the constants
  6851.     */
  6852.    public CwCheckBox(CwConstants constants) {
  6853. -    super(constants);
  6854. +    super(constants.cwCheckBoxName(), constants.cwCheckBoxDescription(), true);
  6855.      this.constants = constants;
  6856.    }
  6857.  
  6858. -  @Override
  6859. -  public String getDescription() {
  6860. -    return constants.cwCheckBoxDescription();
  6861. -  }
  6862. -
  6863. -  @Override
  6864. -  public String getName() {
  6865. -    return constants.cwCheckBoxName();
  6866. -  }
  6867. -
  6868.    /**
  6869.     * Initialize this example.
  6870.     */
  6871. 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
  6872. index f8ce454..5256809 100644
  6873. --- a/src/com/google/gwt/sample/showcase/client/content/widgets/CwCustomButton.java
  6874. +++ b/src/com/google/gwt/sample/showcase/client/content/widgets/CwCustomButton.java
  6875. @@ -1,12 +1,12 @@
  6876.  /*
  6877.   * Copyright 2008 Google Inc.
  6878. - *
  6879. + *
  6880.   * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  6881.   * use this file except in compliance with the License. You may obtain a copy of
  6882.   * the License at
  6883. - *
  6884. + *
  6885.   * http://www.apache.org/licenses/LICENSE-2.0
  6886. - *
  6887. + *
  6888.   * Unless required by applicable law or agreed to in writing, software
  6889.   * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  6890.   * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  6891. @@ -41,8 +41,7 @@ public class CwCustomButton extends ContentWidget {
  6892.     * The constants used in this Content Widget.
  6893.     */
  6894.    @ShowcaseSource
  6895. -  public static interface CwConstants extends Constants,
  6896. -      ContentWidget.CwConstants {
  6897. +  public static interface CwConstants extends Constants {
  6898.      String cwCustomButtonDescription();
  6899.  
  6900.      String cwCustomButtonName();
  6901. @@ -56,28 +55,19 @@ public class CwCustomButton extends ContentWidget {
  6902.     * An instance of the constants.
  6903.     */
  6904.    @ShowcaseData
  6905. -  private CwConstants constants;
  6906. +  private final CwConstants constants;
  6907.  
  6908.    /**
  6909.     * Constructor.
  6910. -   *
  6911. +   *
  6912.     * @param constants the constants
  6913.     */
  6914.    public CwCustomButton(CwConstants constants) {
  6915. -    super(constants);
  6916. +    super(constants.cwCustomButtonName(), constants.cwCustomButtonDescription(),
  6917. +        true);
  6918.      this.constants = constants;
  6919.    }
  6920.  
  6921. -  @Override
  6922. -  public String getDescription() {
  6923. -    return constants.cwCustomButtonDescription();
  6924. -  }
  6925. -
  6926. -  @Override
  6927. -  public String getName() {
  6928. -    return constants.cwCustomButtonName();
  6929. -  }
  6930. -
  6931.    /**
  6932.     * Initialize this example.
  6933.     */
  6934. @@ -129,7 +119,7 @@ public class CwCustomButton extends ContentWidget {
  6935.  
  6936.    @Override
  6937.    protected void asyncOnInitialize(final AsyncCallback<Widget> callback) {
  6938. -    GWT.runAsync(new RunAsyncCallback() {
  6939. +    GWT.runAsync(CwCustomButton.class, new RunAsyncCallback() {
  6940.  
  6941.        public void onFailure(Throwable caught) {
  6942.          callback.onFailure(caught);
  6943. 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
  6944. index d645b90..8c3b5e7 100644
  6945. --- a/src/com/google/gwt/sample/showcase/client/content/widgets/CwDatePicker.java
  6946. +++ b/src/com/google/gwt/sample/showcase/client/content/widgets/CwDatePicker.java
  6947. @@ -1,12 +1,12 @@
  6948.  /*
  6949.   * Copyright 2008 Google Inc.
  6950. - *
  6951. + *
  6952.   * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  6953.   * use this file except in compliance with the License. You may obtain a copy of
  6954.   * the License at
  6955. - *
  6956. + *
  6957.   * http://www.apache.org/licenses/LICENSE-2.0
  6958. - *
  6959. + *
  6960.   * Unless required by applicable law or agreed to in writing, software
  6961.   * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  6962.   * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  6963. @@ -42,12 +42,12 @@ import java.util.Date;
  6964.      ".gwt-DatePicker", ".datePicker", "td.datePickerMonth", ".gwt-DateBox",
  6965.      ".dateBox"})
  6966.  public class CwDatePicker extends ContentWidget {
  6967. +
  6968.    /**
  6969.     * The constants used in this Content Widget.
  6970.     */
  6971.    @ShowcaseSource
  6972. -  public static interface CwConstants extends Constants,
  6973. -      ContentWidget.CwConstants {
  6974. +  public static interface CwConstants extends Constants {
  6975.      String cwDatePickerBoxLabel();
  6976.  
  6977.      String cwDatePickerDescription();
  6978. @@ -61,31 +61,23 @@ public class CwDatePicker extends ContentWidget {
  6979.     * An instance of the constants.
  6980.     */
  6981.    @ShowcaseData
  6982. -  private CwConstants constants;
  6983. +  private final CwConstants constants;
  6984.  
  6985.    /**
  6986.     * Constructor.
  6987. -   *
  6988. +   *
  6989.     * @param constants the constants
  6990.     */
  6991.    public CwDatePicker(CwConstants constants) {
  6992. -    super(constants);
  6993. +    super(constants.cwDatePickerName(), constants.cwDatePickerDescription(),
  6994. +        true);
  6995.      this.constants = constants;
  6996.    }
  6997.  
  6998. -  @Override
  6999. -  public String getDescription() {
  7000. -    return constants.cwDatePickerDescription();
  7001. -  }
  7002. -
  7003. -  @Override
  7004. -  public String getName() {
  7005. -    return constants.cwDatePickerName();
  7006. -  }
  7007. -
  7008.    /**
  7009.     * Initialize this example.
  7010.     */
  7011. +  @SuppressWarnings("deprecation")
  7012.    @ShowcaseSource
  7013.    @Override
  7014.    public Widget onInitialize() {
  7015. @@ -122,7 +114,7 @@ public class CwDatePicker extends ContentWidget {
  7016.  
  7017.    @Override
  7018.    protected void asyncOnInitialize(final AsyncCallback<Widget> callback) {
  7019. -    GWT.runAsync(new RunAsyncCallback() {
  7020. +    GWT.runAsync(CwDatePicker.class, new RunAsyncCallback() {
  7021.  
  7022.        public void onFailure(Throwable caught) {
  7023.          callback.onFailure(caught);
  7024. 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
  7025. index f6b84f7..7f91c4c 100644
  7026. --- a/src/com/google/gwt/sample/showcase/client/content/widgets/CwFileUpload.java
  7027. +++ b/src/com/google/gwt/sample/showcase/client/content/widgets/CwFileUpload.java
  7028. @@ -1,12 +1,12 @@
  7029.  /*
  7030.   * Copyright 2008 Google Inc.
  7031. - *
  7032. + *
  7033.   * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  7034.   * use this file except in compliance with the License. You may obtain a copy of
  7035.   * the License at
  7036. - *
  7037. + *
  7038.   * http://www.apache.org/licenses/LICENSE-2.0
  7039. - *
  7040. + *
  7041.   * Unless required by applicable law or agreed to in writing, software
  7042.   * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  7043.   * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  7044. @@ -41,8 +41,7 @@ public class CwFileUpload extends ContentWidget {
  7045.     * The constants used in this Content Widget.
  7046.     */
  7047.    @ShowcaseSource
  7048. -  public static interface CwConstants extends Constants,
  7049. -      ContentWidget.CwConstants {
  7050. +  public static interface CwConstants extends Constants {
  7051.      String cwFileUploadButton();
  7052.  
  7053.      String cwFileUploadDescription();
  7054. @@ -60,28 +59,19 @@ public class CwFileUpload extends ContentWidget {
  7055.     * An instance of the constants.
  7056.     */
  7057.    @ShowcaseData
  7058. -  private CwConstants constants;
  7059. +  private final CwConstants constants;
  7060.  
  7061.    /**
  7062.     * Constructor.
  7063. -   *
  7064. +   *
  7065.     * @param constants the constants
  7066.     */
  7067.    public CwFileUpload(CwConstants constants) {
  7068. -    super(constants);
  7069. +    super(constants.cwFileUploadName(), constants.cwFileUploadDescription(),
  7070. +        true);
  7071.      this.constants = constants;
  7072.    }
  7073.  
  7074. -  @Override
  7075. -  public String getDescription() {
  7076. -    return constants.cwFileUploadDescription();
  7077. -  }
  7078. -
  7079. -  @Override
  7080. -  public String getName() {
  7081. -    return constants.cwFileUploadName();
  7082. -  }
  7083. -
  7084.    /**
  7085.     * Initialize this example.
  7086.     */
  7087. @@ -120,7 +110,7 @@ public class CwFileUpload extends ContentWidget {
  7088.  
  7089.    @Override
  7090.    protected void asyncOnInitialize(final AsyncCallback<Widget> callback) {
  7091. -    GWT.runAsync(new RunAsyncCallback() {
  7092. +    GWT.runAsync(CwFileUpload.class, new RunAsyncCallback() {
  7093.  
  7094.        public void onFailure(Throwable caught) {
  7095.          callback.onFailure(caught);
  7096. 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
  7097. index 2ed3d5a..3c9c2e6 100644
  7098. --- a/src/com/google/gwt/sample/showcase/client/content/widgets/CwHyperlink.java
  7099. +++ b/src/com/google/gwt/sample/showcase/client/content/widgets/CwHyperlink.java
  7100. @@ -1,12 +1,12 @@
  7101.  /*
  7102.   * Copyright 2008 Google Inc.
  7103. - *
  7104. + *
  7105.   * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  7106.   * use this file except in compliance with the License. You may obtain a copy of
  7107.   * the License at
  7108. - *
  7109. + *
  7110.   * http://www.apache.org/licenses/LICENSE-2.0
  7111. - *
  7112. + *
  7113.   * Unless required by applicable law or agreed to in writing, software
  7114.   * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  7115.   * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  7116. @@ -19,6 +19,7 @@ import com.google.gwt.core.client.GWT;
  7117.  import com.google.gwt.core.client.RunAsyncCallback;
  7118.  import com.google.gwt.i18n.client.Constants;
  7119.  import com.google.gwt.sample.showcase.client.ContentWidget;
  7120. +import com.google.gwt.sample.showcase.client.Showcase;
  7121.  import com.google.gwt.sample.showcase.client.ShowcaseConstants;
  7122.  import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseData;
  7123.  import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseSource;
  7124. @@ -38,8 +39,7 @@ public class CwHyperlink extends ContentWidget {
  7125.     * The constants used in this Content Widget.
  7126.     */
  7127.    @ShowcaseSource
  7128. -  public static interface CwConstants extends Constants,
  7129. -      ContentWidget.CwConstants {
  7130. +  public static interface CwConstants extends Constants {
  7131.      String cwHyperlinkChoose();
  7132.  
  7133.      String cwHyperlinkDescription();
  7134. @@ -51,28 +51,19 @@ public class CwHyperlink extends ContentWidget {
  7135.     * An instance of the constants.
  7136.     */
  7137.    @ShowcaseData
  7138. -  private CwConstants constants;
  7139. +  private final CwConstants constants;
  7140.  
  7141.    /**
  7142.     * Constructor.
  7143. -   *
  7144. +   *
  7145.     * @param constants the constants
  7146.     */
  7147.    public CwHyperlink(CwConstants constants) {
  7148. -    super(constants);
  7149. +    super(
  7150. +        constants.cwHyperlinkName(), constants.cwHyperlinkDescription(), true);
  7151.      this.constants = constants;
  7152.    }
  7153.  
  7154. -  @Override
  7155. -  public String getDescription() {
  7156. -    return constants.cwHyperlinkDescription();
  7157. -  }
  7158. -
  7159. -  @Override
  7160. -  public String getName() {
  7161. -    return constants.cwHyperlinkName();
  7162. -  }
  7163. -
  7164.    /**
  7165.     * Initialize this example.
  7166.     */
  7167. @@ -87,14 +78,16 @@ public class CwHyperlink extends ContentWidget {
  7168.      // Add a hyper link to each section in the Widgets category
  7169.      ShowcaseConstants allConstants = (ShowcaseConstants) constants;
  7170.      vPanel.add(getHyperlink(CwCheckBox.class, allConstants.cwCheckBoxName()));
  7171. -    vPanel.add(getHyperlink(CwRadioButton.class,
  7172. -        allConstants.cwRadioButtonName()));
  7173. -    vPanel.add(getHyperlink(CwBasicButton.class,
  7174. -        allConstants.cwBasicButtonName()));
  7175. -    vPanel.add(getHyperlink(CwCustomButton.class,
  7176. -        allConstants.cwCustomButtonName()));
  7177. -    vPanel.add(getHyperlink(CwFileUpload.class, allConstants.cwFileUploadName()));
  7178. -    vPanel.add(getHyperlink(CwDatePicker.class, allConstants.cwDatePickerName()));
  7179. +    vPanel.add(
  7180. +        getHyperlink(CwRadioButton.class, allConstants.cwRadioButtonName()));
  7181. +    vPanel.add(
  7182. +        getHyperlink(CwBasicButton.class, allConstants.cwBasicButtonName()));
  7183. +    vPanel.add(
  7184. +        getHyperlink(CwCustomButton.class, allConstants.cwCustomButtonName()));
  7185. +    vPanel.add(
  7186. +        getHyperlink(CwFileUpload.class, allConstants.cwFileUploadName()));
  7187. +    vPanel.add(
  7188. +        getHyperlink(CwDatePicker.class, allConstants.cwDatePickerName()));
  7189.  
  7190.      // Return the panel
  7191.      return vPanel;
  7192. @@ -102,7 +95,7 @@ public class CwHyperlink extends ContentWidget {
  7193.  
  7194.    @Override
  7195.    protected void asyncOnInitialize(final AsyncCallback<Widget> callback) {
  7196. -    GWT.runAsync(new RunAsyncCallback() {
  7197. +    GWT.runAsync(CwHyperlink.class, new RunAsyncCallback() {
  7198.  
  7199.        public void onFailure(Throwable caught) {
  7200.          callback.onFailure(caught);
  7201. @@ -117,19 +110,17 @@ public class CwHyperlink extends ContentWidget {
  7202.    /**
  7203.     * Get a {@link Hyperlink} to a section based on the name of the
  7204.     * {@link ContentWidget} example.
  7205. -   *
  7206. +   *
  7207.     * @param cwClass the {@link ContentWidget} class
  7208.     * @param name the name to display for the link
  7209.     * @return a {@link Hyperlink}
  7210.     */
  7211. -  private Hyperlink getHyperlink(Class<?> cwClass, String name) {
  7212. -    // Get the class name of the content widget
  7213. -    String className = cwClass.getName();
  7214. -    className = className.substring(className.lastIndexOf('.') + 1);
  7215. -
  7216. -    // Convert to a hyper link
  7217. -    Hyperlink link = new Hyperlink(name, className);
  7218. -    link.ensureDebugId("cwHyperlink-" + className);
  7219. +  @ShowcaseSource
  7220. +  private <C extends ContentWidget> Hyperlink getHyperlink(
  7221. +      Class<C> cwClass, String name) {
  7222. +    Hyperlink link = new Hyperlink(
  7223. +        name, Showcase.getContentWidgetToken(cwClass));
  7224. +    link.ensureDebugId("cwHyperlink-" + cwClass.getName());
  7225.      return link;
  7226.    }
  7227.  }
  7228. 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
  7229. index c59aa79..ff35798 100644
  7230. --- a/src/com/google/gwt/sample/showcase/client/content/widgets/CwRadioButton.java
  7231. +++ b/src/com/google/gwt/sample/showcase/client/content/widgets/CwRadioButton.java
  7232. @@ -1,12 +1,12 @@
  7233.  /*
  7234.   * Copyright 2008 Google Inc.
  7235. - *
  7236. + *
  7237.   * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  7238.   * use this file except in compliance with the License. You may obtain a copy of
  7239.   * the License at
  7240. - *
  7241. + *
  7242.   * http://www.apache.org/licenses/LICENSE-2.0
  7243. - *
  7244. + *
  7245.   * Unless required by applicable law or agreed to in writing, software
  7246.   * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  7247.   * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  7248. @@ -37,8 +37,7 @@ public class CwRadioButton extends ContentWidget {
  7249.     * The constants used in this Content Widget.
  7250.     */
  7251.    @ShowcaseSource
  7252. -  public static interface CwConstants extends Constants,
  7253. -      ContentWidget.CwConstants {
  7254. +  public static interface CwConstants extends Constants {
  7255.      String[] cwRadioButtonColors();
  7256.  
  7257.      String cwRadioButtonDescription();
  7258. @@ -56,28 +55,19 @@ public class CwRadioButton extends ContentWidget {
  7259.     * An instance of the constants.
  7260.     */
  7261.    @ShowcaseData
  7262. -  private CwConstants constants;
  7263. +  private final CwConstants constants;
  7264.  
  7265.    /**
  7266.     * Constructor.
  7267. -   *
  7268. +   *
  7269.     * @param constants the constants
  7270.     */
  7271.    public CwRadioButton(CwConstants constants) {
  7272. -    super(constants);
  7273. +    super(constants.cwRadioButtonName(), constants.cwRadioButtonDescription(),
  7274. +        true);
  7275.      this.constants = constants;
  7276.    }
  7277.  
  7278. -  @Override
  7279. -  public String getDescription() {
  7280. -    return constants.cwRadioButtonDescription();
  7281. -  }
  7282. -
  7283. -  @Override
  7284. -  public String getName() {
  7285. -    return constants.cwRadioButtonName();
  7286. -  }
  7287. -
  7288.    /**
  7289.     * Initialize this example.
  7290.     */
  7291. @@ -108,8 +98,8 @@ public class CwRadioButton extends ContentWidget {
  7292.      for (int i = 0; i < sports.length; i++) {
  7293.        String sport = sports[i];
  7294.        RadioButton radioButton = new RadioButton("sport", sport);
  7295. -      radioButton.ensureDebugId("cwRadioButton-sport-"
  7296. -          + sport.replaceAll(" ", ""));
  7297. +      radioButton.ensureDebugId(
  7298. +          "cwRadioButton-sport-" + sport.replaceAll(" ", ""));
  7299.        if (i == 2) {
  7300.          radioButton.setValue(true);
  7301.        }
  7302. @@ -121,7 +111,7 @@ public class CwRadioButton extends ContentWidget {
  7303.  
  7304.    @Override
  7305.    protected void asyncOnInitialize(final AsyncCallback<Widget> callback) {
  7306. -    GWT.runAsync(new RunAsyncCallback() {
  7307. +    GWT.runAsync(CwRadioButton.class, new RunAsyncCallback() {
  7308.  
  7309.        public void onFailure(Throwable caught) {
  7310.          callback.onFailure(caught);
  7311. diff --git a/src/com/google/gwt/sample/showcase/generator/ShowcaseGenerator.java b/src/com/google/gwt/sample/showcase/generator/ShowcaseGenerator.java
  7312. index 2d5b079..019347c 100644
  7313. --- a/src/com/google/gwt/sample/showcase/generator/ShowcaseGenerator.java
  7314. +++ b/src/com/google/gwt/sample/showcase/generator/ShowcaseGenerator.java
  7315. @@ -1,12 +1,12 @@
  7316.  /*
  7317.   * Copyright 2008 Google Inc.
  7318. - *
  7319. + *
  7320.   * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  7321.   * use this file except in compliance with the License. You may obtain a copy of
  7322.   * the License at
  7323. - *
  7324. + *
  7325.   * http://www.apache.org/licenses/LICENSE-2.0
  7326. - *
  7327. + *
  7328.   * Unless required by applicable law or agreed to in writing, software
  7329.   * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  7330.   * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  7331. @@ -22,6 +22,7 @@ import com.google.gwt.core.ext.UnableToCompleteException;
  7332.  import com.google.gwt.core.ext.typeinfo.JClassType;
  7333.  import com.google.gwt.core.ext.typeinfo.NotFoundException;
  7334.  import com.google.gwt.sample.showcase.client.ContentWidget;
  7335. +import com.google.gwt.sample.showcase.client.Showcase;
  7336.  import com.google.gwt.sample.showcase.client.ShowcaseConstants;
  7337.  import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseData;
  7338.  import com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseRaw;
  7339. @@ -33,8 +34,10 @@ import java.io.IOException;
  7340.  import java.io.InputStream;
  7341.  import java.io.InputStreamReader;
  7342.  import java.io.OutputStream;
  7343. +import java.util.HashSet;
  7344.  import java.util.LinkedHashMap;
  7345.  import java.util.Map;
  7346. +import java.util.Set;
  7347.  
  7348.  /**
  7349.   * Generate the source code, css styles, and raw source used in the Showcase
  7350. @@ -44,12 +47,12 @@ public class ShowcaseGenerator extends Generator {
  7351.    /**
  7352.     * The paths to the CSS style sheets used in Showcase. The paths are relative
  7353.     * to the root path of the {@link ClassLoader}. The variable $THEME will be
  7354. -   * replaced by the current theme. An extension of "_rtl.css" will be used for
  7355. -   * RTL mode.
  7356. +   * replaced by the current theme. The variable $RTL will be replaced by "_rtl"
  7357. +   * for RTL locales.
  7358.     */
  7359.    private static final String[] SRC_CSS = {
  7360. -      "com/google/gwt/user/theme/$THEME/public/gwt/$THEME/$THEME.css",
  7361. -      "com/google/gwt/sample/showcase/public/$THEME/Showcase.css"};
  7362. +      "com/google/gwt/user/theme/$THEME/public/gwt/$THEME/$THEME$RTL.css",
  7363. +      "com/google/gwt/sample/showcase/client/Showcase.css"};
  7364.  
  7365.    /**
  7366.     * The class loader used to get resources.
  7367. @@ -66,9 +69,16 @@ public class ShowcaseGenerator extends Generator {
  7368.     */
  7369.    private TreeLogger logger = null;
  7370.  
  7371. +  /**
  7372. +   * The set of raw files that have already been generated. Raw files can be
  7373. +   * reused by different examples, but we only generate them once.
  7374. +   */
  7375. +  private Set<String> rawFiles = new HashSet<String>();
  7376. +
  7377.    @Override
  7378. -  public String generate(TreeLogger logger, GeneratorContext context,
  7379. -      String typeName) throws UnableToCompleteException {
  7380. +  public String generate(
  7381. +      TreeLogger logger, GeneratorContext context, String typeName)
  7382. +      throws UnableToCompleteException {
  7383.      this.logger = logger;
  7384.      this.context = context;
  7385.      this.classLoader = Thread.currentThread().getContextClassLoader();
  7386. @@ -95,7 +105,8 @@ public class ShowcaseGenerator extends Generator {
  7387.      }
  7388.  
  7389.      // Generate the CSS source files
  7390. -    for (String theme : ShowcaseConstants.STYLE_THEMES) {
  7391. +    String[] themes = new String[]{Showcase.THEME};
  7392. +    for (String theme : themes) {
  7393.        String styleDefsLTR = getStyleDefinitions(theme, false);
  7394.        String styleDefsRTL = getStyleDefinitions(theme, true);
  7395.        String outDirLTR = ShowcaseConstants.DST_SOURCE_STYLE + theme + "/";
  7396. @@ -111,25 +122,32 @@ public class ShowcaseGenerator extends Generator {
  7397.  
  7398.    /**
  7399.     * Set the full contents of a resource in the public directory.
  7400. -   *
  7401. +   *
  7402.     * @param partialPath the path to the file relative to the public directory
  7403.     * @param contents the file contents
  7404.     */
  7405. -  private void createPublicResource(String partialPath, String contents) {
  7406. +  private void createPublicResource(String partialPath, String contents)
  7407. +      throws UnableToCompleteException {
  7408.      try {
  7409.        OutputStream outStream = context.tryCreateResource(logger, partialPath);
  7410. +      if (outStream == null) {
  7411. +        String message = "Attempting to generate duplicate public resource: "
  7412. +            + partialPath
  7413. +            + ".\nAll generated source files must have unique names.";
  7414. +        logger.log(TreeLogger.ERROR, message);
  7415. +        throw new UnableToCompleteException();
  7416. +      }
  7417.        outStream.write(contents.getBytes());
  7418.        context.commitResource(logger, outStream);
  7419. -    } catch (UnableToCompleteException e) {
  7420. -      logger.log(TreeLogger.ERROR, "Failed while writing", e);
  7421.      } catch (IOException e) {
  7422. -      logger.log(TreeLogger.ERROR, "Failed while writing", e);
  7423. +      logger.log(TreeLogger.ERROR, "Error writing file: " + partialPath, e);
  7424. +      throw new UnableToCompleteException();
  7425.      }
  7426.    }
  7427.  
  7428.    /**
  7429.     * Generate the raw files used by a {@link ContentWidget}.
  7430. -   *
  7431. +   *
  7432.     * @param type the {@link ContentWidget} subclass
  7433.     */
  7434.    private void generateRawFiles(JClassType type)
  7435. @@ -146,6 +164,13 @@ public class ShowcaseGenerator extends Generator {
  7436.      // Generate each raw source file
  7437.      String[] filenames = type.getAnnotation(ShowcaseRaw.class).value();
  7438.      for (String filename : filenames) {
  7439. +      // Check if the file has already been generated.
  7440. +      String path = pkgName + filename;
  7441. +      if (rawFiles.contains(path)) {
  7442. +        continue;
  7443. +      }
  7444. +      rawFiles.add(path);
  7445. +
  7446.        // Get the file contents
  7447.        String fileContents = getResourceContents(pkgPath + filename);
  7448.  
  7449. @@ -163,7 +188,7 @@ public class ShowcaseGenerator extends Generator {
  7450.  
  7451.    /**
  7452.     * Generate the formatted source code for a {@link ContentWidget}.
  7453. -   *
  7454. +   *
  7455.     * @param type the {@link ContentWidget} subclass
  7456.     */
  7457.    private void generateSourceFiles(JClassType type)
  7458. @@ -179,7 +204,8 @@ public class ShowcaseGenerator extends Generator {
  7459.      int dataTagIndex = fileContents.indexOf(dataTag);
  7460.      int srcTagIndex = fileContents.indexOf(sourceTag);
  7461.      while (dataTagIndex >= 0 || srcTagIndex >= 0) {
  7462. -      if (dataTagIndex >= 0 && (dataTagIndex < srcTagIndex || srcTagIndex < 0)) {
  7463. +      if (dataTagIndex >= 0
  7464. +          && (dataTagIndex < srcTagIndex || srcTagIndex < 0)) {
  7465.          // Get the boundaries of a DATA tag
  7466.          int beginIndex = fileContents.lastIndexOf("  /*", dataTagIndex);
  7467.          int beginTagIndex = fileContents.lastIndexOf("\n", dataTagIndex) + 1;
  7468. @@ -224,13 +250,14 @@ public class ShowcaseGenerator extends Generator {
  7469.  
  7470.    /**
  7471.     * Generate the styles used by a {@link ContentWidget}.
  7472. -   *
  7473. +   *
  7474.     * @param type the {@link ContentWidget} subclass
  7475.     * @param styleDefs the concatenated style definitions
  7476.     * @param outDir the output directory
  7477.     */
  7478. -  private void generateStyleFiles(JClassType type, String styleDefs,
  7479. -      String outDir) {
  7480. +  private void generateStyleFiles(
  7481. +      JClassType type, String styleDefs, String outDir)
  7482. +      throws UnableToCompleteException {
  7483.      // Look for annotation
  7484.      if (!type.isAnnotationPresent(ShowcaseStyle.class)) {
  7485.        return;
  7486. @@ -277,7 +304,7 @@ public class ShowcaseGenerator extends Generator {
  7487.  
  7488.    /**
  7489.     * Get the full contents of a resource.
  7490. -   *
  7491. +   *
  7492.     * @param path the path to the resource
  7493.     * @return the contents of the resource
  7494.     */
  7495. @@ -316,7 +343,7 @@ public class ShowcaseGenerator extends Generator {
  7496.    /**
  7497.     * Load the contents of all CSS files used in the Showcase for a given
  7498.     * theme/RTL mode, concatenated into one string.
  7499. -   *
  7500. +   *
  7501.     * @param theme the style theme
  7502.     * @param isRTL true if RTL mode
  7503.     * @return the concatenated styles
  7504. @@ -327,7 +354,9 @@ public class ShowcaseGenerator extends Generator {
  7505.      for (String path : SRC_CSS) {
  7506.        path = path.replace("$THEME", theme);
  7507.        if (isRTL) {
  7508. -        path = path.replace(".css", "_rtl.css");
  7509. +        path = path.replace("$RTL", "_rtl");
  7510. +      } else {
  7511. +        path = path.replace("$RTL", "");
  7512.        }
  7513.        cssContents += getResourceContents(path) + "\n\n";
  7514.      }
  7515. @@ -337,7 +366,7 @@ public class ShowcaseGenerator extends Generator {
  7516.    /**
  7517.     * Ensure that we only generate files once by creating a placeholder file,
  7518.     * then looking for it on subsequent generates.
  7519. -   *
  7520. +   *
  7521.     * @return true if this is the first pass, false if not
  7522.     */
  7523.    private boolean isFirstPass() {
  7524. diff --git a/src/com/google/gwt/sample/showcase/public/chrome/Showcase.css b/src/com/google/gwt/sample/showcase/public/chrome/Showcase.css
  7525. deleted file mode 100644
  7526. index 954979a..0000000
  7527. --- a/src/com/google/gwt/sample/showcase/public/chrome/Showcase.css
  7528. +++ /dev/null
  7529. @@ -1,168 +0,0 @@
  7530. -/**
  7531. - * Applied to the main layout of the page.
  7532. - */
  7533. -.Application-Reference-chrome {
  7534. -  height: 5px;
  7535. -  width: 5px;
  7536. -  zoom: 1;
  7537. -}
  7538. -.Application-top {
  7539. -  width: 100%;
  7540. -  margin-bottom: 10px;
  7541. -}
  7542. -.Application-title {
  7543. -  padding: 0px 0px 0px 10px;
  7544. -}
  7545. -.Application-title h1 {
  7546. -  color: #666;
  7547. -  margin: 0px;
  7548. -  padding: 0px 0px 0px 4px;
  7549. -  font-size: 22px;
  7550. -}
  7551. -.Application-title h2 {
  7552. -  color: #333;
  7553. -  margin: 0px;
  7554. -  padding: 0px 0px 0px 4px;
  7555. -  font-size: 16px;
  7556. -}
  7557. -.Application-links {
  7558. -  padding: 2px 13px 2px 0px;
  7559. -  background: #eee;
  7560. -}
  7561. -.Application-links .gwt-HTML{
  7562. -  font-size: 12px;
  7563. -}
  7564. -.Application-options {
  7565. -  padding: 6px 10px 0px 0px;
  7566. -}
  7567. -.Application-options .gwt-ListBox {
  7568. -  font-size: 11px;
  7569. -  color: blue;
  7570. -  margin-left: 4px;
  7571. -}
  7572. -.Application-options td {
  7573. -  font-size: 12px;
  7574. -}
  7575. -.Application-options .gwt-ToggleButton {
  7576. -  width: 36px;
  7577. -  height: 16px;
  7578. -  margin: 3px 0px 0px 10px;
  7579. -  padding: 0px;
  7580. -}
  7581. -.Application-options .gwt-ToggleButton-down,
  7582. -.Application-options .gwt-ToggleButton-down-hovering {
  7583. -  cursor: default;
  7584. -}
  7585. -.Application-options .sc-ThemeButton-standard {
  7586. -  background: #d0e4f6;
  7587. -}
  7588. -.Application-options .sc-ThemeButton-chrome {
  7589. -  background: #ccc;
  7590. -}
  7591. -.Application-options .sc-ThemeButton-dark {
  7592. -  background: #3d3d3d;
  7593. -}
  7594. -.Application-menu {
  7595. -  width: 18em;
  7596. -  text-align: left;
  7597. -}
  7598. -
  7599. -/**
  7600. - * Applied to widgets in the content area.
  7601. - */
  7602. -.Application-content-decorator {
  7603. -  margin-right: 8px;
  7604. -}
  7605. -.Application-content-title {
  7606. -  padding: 4px 0px 3px 6px;
  7607. -  text-align: left;
  7608. -  background: #530a0a url(../gwt/chrome/images/hborder.png) repeat-x 0px -2003px;
  7609. -  border-bottom: 2px solid #e3e3e3;
  7610. -}
  7611. -.Application-content-title .gwt-TabBarItem {
  7612. -  background: none;
  7613. -  padding: 0px;
  7614. -}
  7615. -.Application-content-title  .gwt-TabBarItem .gwt-Label {
  7616. -  padding-right: 20px;
  7617. -  color: #888888;
  7618. -}
  7619. -.Application-content-title  .gwt-TabBarItem-selected .gwt-Label {
  7620. -  color: black;
  7621. -}
  7622. -.Application-content-wrapper {
  7623. -  text-align: left;
  7624. -}
  7625. -.sc-ContentWidget {
  7626. -  padding: 10px 20px;
  7627. -}
  7628. -.sc-ContentWidget-name {
  7629. -  font-size: 1.5em;
  7630. -  font-weight: bold;
  7631. -  padding-bottom: 15px;
  7632. -}
  7633. -.sc-ContentWidget-description {
  7634. -  padding-bottom: 15px;
  7635. -  border-bottom: 1px solid #CDCDCD;
  7636. -  margin-bottom: 15px;
  7637. -}
  7638. -.sc-ContentWidget pre {
  7639. -  border: 1px solid #888;
  7640. -  background: #eeeeee;
  7641. -  padding: 10px 2px;
  7642. -  margin: 10px 0px;
  7643. -}
  7644. -.sc-FixedWidthButton {
  7645. -  width: 10em;
  7646. -}
  7647. -
  7648. -/**
  7649. - * Applied to specific components in Content Widgets.
  7650. - */
  7651. -.cw-BasicPopup-thumb {
  7652. -  cursor: pointer;
  7653. -  cursor: hand;
  7654. -}
  7655. -
  7656. -.cw-DictionaryExample-headerRow td {
  7657. -  color: #7aa5d6;
  7658. -  text-decoration: underline;
  7659. -  font-weight: bold;
  7660. -  padding-left: 20px;
  7661. -}
  7662. -.cw-DictionaryExample-dataRow td {
  7663. -  padding-left: 20px;
  7664. -}
  7665. -
  7666. -.cw-DockPanel td {
  7667. -  border: 1px solid #BBBBBB;
  7668. -  padding: 3px;
  7669. -}
  7670. -
  7671. -.cw-FlexTable td {
  7672. -  border: 1px solid #BBBBBB;
  7673. -  padding: 3px;
  7674. -}
  7675. -
  7676. -.cw-FlexTable-buttonPanel td {
  7677. -  border: 0px;
  7678. -}
  7679. -
  7680. -.cw-FlowPanel-checkBox {
  7681. -  margin-right: 20px;
  7682. -}
  7683. -
  7684. -.cw-RedText {
  7685. -  color: red;
  7686. -}
  7687. -
  7688. -.cw-RichText {
  7689. -  border: 1px solid #BBBBBB;
  7690. -  border-spacing: 0px;
  7691. -}
  7692. -
  7693. -.cw-StackPanelHeader {
  7694. -  padding-left: 7px;
  7695. -  font-weight: bold;
  7696. -  font-size: 1.4em;
  7697. -}
  7698. 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
  7699. deleted file mode 100644
  7700. index c52b33e..0000000
  7701. --- a/src/com/google/gwt/sample/showcase/public/chrome/Showcase_rtl.css
  7702. +++ /dev/null
  7703. @@ -1,168 +0,0 @@
  7704. -/**
  7705. - * Applied to the main layout of the page.
  7706. - */
  7707. -.Application-Reference-chrome-rtl {
  7708. -  height: 5px;
  7709. -  width: 5px;
  7710. -  zoom: 1;
  7711. -}
  7712. -.Application-top {
  7713. -  width: 100%;
  7714. -  margin-bottom: 10px;
  7715. -}
  7716. -.Application-title {
  7717. -  padding: 0px 10px 0px 0px;
  7718. -}
  7719. -.Application-title h1 {
  7720. -  color: #666;
  7721. -  margin: 0px;
  7722. -  padding: 0px 4px 0px 0px;
  7723. -  font-size: 22px;
  7724. -}
  7725. -.Application-title h2 {
  7726. -  color: #333;
  7727. -  margin: 0px;
  7728. -  padding: 0px 4px 0px 0px;
  7729. -  font-size: 16px;
  7730. -}
  7731. -.Application-links {
  7732. -  padding: 2px 0px 2px 13px;
  7733. -  background: #eee;
  7734. -}
  7735. -.Application-links .gwt-HTML{
  7736. -  font-size: 12px;
  7737. -}
  7738. -.Application-options {
  7739. -  padding: 6px 0px 0px 10px;
  7740. -}
  7741. -.Application-options .gwt-ListBox {
  7742. -  font-size: 11px;
  7743. -  color: blue;
  7744. -  margin-right: 4px;
  7745. -}
  7746. -.Application-options td {
  7747. -  font-size: 12px;
  7748. -}
  7749. -.Application-options .gwt-ToggleButton {
  7750. -  width: 36px;
  7751. -  height: 16px;
  7752. -  margin: 3px 10px 0px 0px;
  7753. -  padding: 0px;
  7754. -}
  7755. -.Application-options .gwt-ToggleButton-down,
  7756. -.Application-options .gwt-ToggleButton-down-hovering {
  7757. -  cursor: default;
  7758. -}
  7759. -.Application-options .sc-ThemeButton-standard {
  7760. -  background: #d0e4f6;
  7761. -}
  7762. -.Application-options .sc-ThemeButton-chrome {
  7763. -  background: #ccc;
  7764. -}
  7765. -.Application-options .sc-ThemeButton-dark {
  7766. -  background: #3d3d3d;
  7767. -}
  7768. -.Application-menu {
  7769. -  width: 18em;
  7770. -  text-align: right;
  7771. -}
  7772. -
  7773. -/**
  7774. - * Applied to widgets in the content area.
  7775. - */
  7776. -.Application-content-decorator {
  7777. -  margin-left: 8px;
  7778. -}
  7779. -.Application-content-title {
  7780. -  padding: 4px 6px 3px 0px;
  7781. -  text-align: right;
  7782. -  background: #530a0a url(../gwt/chrome/images/hborder.png) repeat-x 0px -2003px;
  7783. -  border-bottom: 2px solid #e3e3e3;
  7784. -}
  7785. -.Application-content-title .gwt-TabBarItem {
  7786. -  background: none;
  7787. -  padding: 0px;
  7788. -}
  7789. -.Application-content-title  .gwt-TabBarItem .gwt-Label {
  7790. -  padding-left: 20px;
  7791. -  color: #888888;
  7792. -}
  7793. -.Application-content-title  .gwt-TabBarItem-selected .gwt-Label {
  7794. -  color: black;
  7795. -}
  7796. -.Application-content-wrapper {
  7797. -  text-align: right;
  7798. -}
  7799. -.sc-ContentWidget {
  7800. -  padding: 10px 20px;
  7801. -}
  7802. -.sc-ContentWidget-name {
  7803. -  font-size: 1.5em;
  7804. -  font-weight: bold;
  7805. -  padding-bottom: 15px;
  7806. -}
  7807. -.sc-ContentWidget-description {
  7808. -  padding-bottom: 15px;
  7809. -  border-bottom: 1px solid #CDCDCD;
  7810. -  margin-bottom: 15px;
  7811. -}
  7812. -.sc-ContentWidget pre {
  7813. -  border: 1px solid #888;
  7814. -  background: #eeeeee;
  7815. -  padding: 10px 2px;
  7816. -  margin: 10px 0px;
  7817. -}
  7818. -.sc-FixedWidthButton {
  7819. -  width: 10em;
  7820. -}
  7821. -
  7822. -/**
  7823. - * Applied to specific components in Content Widgets.
  7824. - */
  7825. -.cw-BasicPopup-thumb {
  7826. -  cursor: pointer;
  7827. -  cursor: hand;
  7828. -}
  7829. -
  7830. -.cw-DictionaryExample-headerRow td {
  7831. -  color: #7aa5d6;
  7832. -  text-decoration: underline;
  7833. -  font-weight: bold;
  7834. -  padding-right: 20px;
  7835. -}
  7836. -.cw-DictionaryExample-dataRow td {
  7837. -  padding-right: 20px;
  7838. -}
  7839. -
  7840. -.cw-DockPanel td {
  7841. -  border: 1px solid #BBBBBB;
  7842. -  padding: 3px;
  7843. -}
  7844. -
  7845. -.cw-FlexTable td {
  7846. -  border: 1px solid #BBBBBB;
  7847. -  padding: 3px;
  7848. -}
  7849. -
  7850. -.cw-FlexTable-buttonPanel td {
  7851. -  border: 0px;
  7852. -}
  7853. -
  7854. -.cw-FlowPanel-checkBox {
  7855. -  margin-left: 20px;
  7856. -}
  7857. -
  7858. -.cw-RedText {
  7859. -  color: red;
  7860. -}
  7861. -
  7862. -.cw-RichText {
  7863. -  border: 1px solid #BBBBBB;
  7864. -  border-spacing: 0px;
  7865. -}
  7866. -
  7867. -.cw-StackPanelHeader {
  7868. -  padding-right: 7px;
  7869. -  font-weight: bold;
  7870. -  font-size: 1.4em;
  7871. -}
  7872. diff --git a/src/com/google/gwt/sample/showcase/public/dark/Showcase.css b/src/com/google/gwt/sample/showcase/public/dark/Showcase.css
  7873. deleted file mode 100644
  7874. index bdc375a..0000000
  7875. --- a/src/com/google/gwt/sample/showcase/public/dark/Showcase.css
  7876. +++ /dev/null
  7877. @@ -1,175 +0,0 @@
  7878. -/**
  7879. - * Applied to the main layout of the page.
  7880. - */
  7881. -.Application-Reference-dark {
  7882. -  height: 5px;
  7883. -  width: 5px;
  7884. -  zoom: 1;
  7885. -}
  7886. -.Application-top {
  7887. -  width: 100%;
  7888. -  margin-bottom: 10px;
  7889. -}
  7890. -.Application-title {
  7891. -  padding: 0px 0px 0px 10px;
  7892. -}
  7893. -.Application-title h1 {
  7894. -  color: #67A7E3;
  7895. -  margin: 0px;
  7896. -  padding: 0px 0px 0px 4px;
  7897. -  font-size: 22px;
  7898. -}
  7899. -.Application-title h2 {
  7900. -  color: #888;
  7901. -  margin: 0px;
  7902. -  padding: 0px 0px 0px 4px;
  7903. -  font-size: 16px;
  7904. -}
  7905. -.Application-links {
  7906. -  padding: 2px 13px 2px 0px;
  7907. -  background: #888888;
  7908. -}
  7909. -.Application-links .gwt-HTML{
  7910. -  font-size: 12px;
  7911. -}
  7912. -.Application-options {
  7913. -  padding: 6px 10px 0px 0px;
  7914. -}
  7915. -.Application-options .gwt-ListBox {
  7916. -  font-size: 11px;
  7917. -  color: blue;
  7918. -  margin-left: 4px;
  7919. -}
  7920. -.Application-options td {
  7921. -  font-size: 12px;
  7922. -}
  7923. -.Application-options .gwt-ToggleButton {
  7924. -  width: 36px;
  7925. -  height: 16px;
  7926. -  margin: 3px 0px 0px 10px;
  7927. -  padding: 0px;
  7928. -}
  7929. -.Application-options .gwt-ToggleButton-down,
  7930. -.Application-options .gwt-ToggleButton-down-hovering {
  7931. -  cursor: default;
  7932. -}
  7933. -.Application-options .sc-ThemeButton-standard {
  7934. -  background: #d0e4f6;
  7935. -}
  7936. -.Application-options .sc-ThemeButton-chrome {
  7937. -  background: #ccc;
  7938. -}
  7939. -.Application-options .sc-ThemeButton-dark {
  7940. -  background: #3d3d3d;
  7941. -}
  7942. -.Application-menu {
  7943. -  width: 18em;
  7944. -  text-align: left;
  7945. -}
  7946. -
  7947. -/**
  7948. - * Applied to widgets in the content area.
  7949. - */
  7950. -.Application-content-decorator {
  7951. -  margin-right: 8px;
  7952. -}
  7953. -.Application-content-title {
  7954. -  padding: 4px 0px 3px 6px;
  7955. -  text-align: left;
  7956. -  background: #222;
  7957. -  border-bottom: 2px solid #000;
  7958. -}
  7959. -.Application-content-title .gwt-TabBarItem {
  7960. -  background: none;
  7961. -  padding: 0px;
  7962. -}
  7963. -.Application-content-title  .gwt-TabBarItem .gwt-Label {
  7964. -  padding-right: 20px;
  7965. -}
  7966. -.Application-content-title  .gwt-TabBarItem-selected .gwt-Label {
  7967. -  color: #0cf;
  7968. -}
  7969. -.Application-content-wrapper {
  7970. -  text-align: left;
  7971. -}
  7972. -.sc-ContentWidget {
  7973. -  padding: 10px 20px;
  7974. -}
  7975. -.sc-ContentWidget-name {
  7976. -  color: #BEC7CC;
  7977. -  font-size: 1.5em;
  7978. -  font-weight: bold;
  7979. -  padding-bottom: 15px;
  7980. -}
  7981. -.sc-ContentWidget-description {
  7982. -  color: #fff;
  7983. -  padding-bottom: 15px;
  7984. -  border-bottom: 1px solid #999;
  7985. -  margin-bottom: 15px;
  7986. -}
  7987. -.sc-ContentWidget pre {
  7988. -  border: 1px solid #000;
  7989. -  background: #fff;
  7990. -  color: #000;
  7991. -  padding: 10px 2px;
  7992. -  margin: 10px 0px;
  7993. -}
  7994. -.sc-FixedWidthButton {
  7995. -  width: 10em;
  7996. -}
  7997. -
  7998. -/**
  7999. - * Applied to specific components in Content Widgets.
  8000. - */
  8001. -.cw-BasicPopup-thumb {
  8002. -  cursor: pointer;
  8003. -  cursor: hand;
  8004. -}
  8005. -
  8006. -.cw-DictionaryExample-headerRow td {
  8007. -  color: #7aa5d6;
  8008. -  text-decoration: underline;
  8009. -  font-weight: bold;
  8010. -  padding-left: 20px;
  8011. -}
  8012. -.cw-DictionaryExample-dataRow td {
  8013. -  padding-left: 20px;
  8014. -}
  8015. -
  8016. -.cw-DockPanel td {
  8017. -  border: 1px solid #BBBBBB;
  8018. -  padding: 3px;
  8019. -}
  8020. -
  8021. -.cw-FlexTable td {
  8022. -  border: 1px solid #BBBBBB;
  8023. -  padding: 3px;
  8024. -}
  8025. -
  8026. -.cw-FlexTable-buttonPanel td {
  8027. -  border: 0px;
  8028. -}
  8029. -
  8030. -.cw-FlowPanel-checkBox {
  8031. -  margin-right: 20px;
  8032. -}
  8033. -
  8034. -.cw-RedText {
  8035. -  color: red;
  8036. -}
  8037. -
  8038. -.cw-RichText {
  8039. -  background-color: #fff;
  8040. -  border: 1px solid #fff;
  8041. -  border-spacing: 0px;
  8042. -  padding: 0px;
  8043. -}
  8044. -.cw-RichText td {
  8045. -  padding: 0px;
  8046. -}
  8047. -
  8048. -.cw-StackPanelHeader {
  8049. -  padding-left: 7px;
  8050. -  font-weight: bold;
  8051. -  font-size: 1.4em;
  8052. -}
  8053. 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
  8054. deleted file mode 100644
  8055. index 126312a..0000000
  8056. --- a/src/com/google/gwt/sample/showcase/public/dark/Showcase_rtl.css
  8057. +++ /dev/null
  8058. @@ -1,175 +0,0 @@
  8059. -/**
  8060. - * Applied to the main layout of the page.
  8061. - */
  8062. -.Application-Reference-dark-rtl {
  8063. -  height: 5px;
  8064. -  width: 5px;
  8065. -  zoom: 1;
  8066. -}
  8067. -.Application-top {
  8068. -  width: 100%;
  8069. -  margin-bottom: 10px;
  8070. -}
  8071. -.Application-title {
  8072. -  padding: 0px 10px 0px 0px;
  8073. -}
  8074. -.Application-title h1 {
  8075. -  color: #67A7E3;
  8076. -  margin: 0px;
  8077. -  padding: 0px 4px 0px 0px;
  8078. -  font-size: 22px;
  8079. -}
  8080. -.Application-title h2 {
  8081. -  color: #888;
  8082. -  margin: 0px;
  8083. -  padding: 0px 4px 0px 0px;
  8084. -  font-size: 16px;
  8085. -}
  8086. -.Application-links {
  8087. -  padding: 2px 0px 2px 13px;
  8088. -  background: #888888;
  8089. -}
  8090. -.Application-links .gwt-HTML{
  8091. -  font-size: 12px;
  8092. -}
  8093. -.Application-options {
  8094. -  padding: 6px 0px 0px 10px;
  8095. -}
  8096. -.Application-options .gwt-ListBox {
  8097. -  font-size: 11px;
  8098. -  color: blue;
  8099. -  margin-right: 4px;
  8100. -}
  8101. -.Application-options td {
  8102. -  font-size: 12px;
  8103. -}
  8104. -.Application-options .gwt-ToggleButton {
  8105. -  width: 36px;
  8106. -  height: 16px;
  8107. -  margin: 3px 10px 0px 0px;
  8108. -  padding: 0px;
  8109. -}
  8110. -.Application-options .gwt-ToggleButton-down,
  8111. -.Application-options .gwt-ToggleButton-down-hovering {
  8112. -  cursor: default;
  8113. -}
  8114. -.Application-options .sc-ThemeButton-standard {
  8115. -  background: #d0e4f6;
  8116. -}
  8117. -.Application-options .sc-ThemeButton-chrome {
  8118. -  background: #ccc;
  8119. -}
  8120. -.Application-options .sc-ThemeButton-dark {
  8121. -  background: #3d3d3d;
  8122. -}
  8123. -.Application-menu {
  8124. -  width: 18em;
  8125. -  text-align: right;
  8126. -}
  8127. -
  8128. -/**
  8129. - * Applied to widgets in the content area.
  8130. - */
  8131. -.Application-content-decorator {
  8132. -  margin-left: 8px;
  8133. -}
  8134. -.Application-content-title {
  8135. -  padding: 4px 6px 3px 0px;
  8136. -  text-align: right;
  8137. -  background: #222;
  8138. -  border-bottom: 2px solid #000;
  8139. -}
  8140. -.Application-content-title .gwt-TabBarItem {
  8141. -  background: none;
  8142. -  padding: 0px;
  8143. -}
  8144. -.Application-content-title  .gwt-TabBarItem .gwt-Label {
  8145. -  padding-left: 20px;
  8146. -}
  8147. -.Application-content-title  .gwt-TabBarItem-selected .gwt-Label {
  8148. -  color: #0cf;
  8149. -}
  8150. -.Application-content-wrapper {
  8151. -  text-align: right;
  8152. -}
  8153. -.sc-ContentWidget {
  8154. -  padding: 10px 20px;
  8155. -}
  8156. -.sc-ContentWidget-name {
  8157. -  color: #BEC7CC;
  8158. -  font-size: 1.5em;
  8159. -  font-weight: bold;
  8160. -  padding-bottom: 15px;
  8161. -}
  8162. -.sc-ContentWidget-description {
  8163. -  color: #fff;
  8164. -  padding-bottom: 15px;
  8165. -  border-bottom: 1px solid #999;
  8166. -  margin-bottom: 15px;
  8167. -}
  8168. -.sc-ContentWidget pre {
  8169. -  border: 1px solid #000;
  8170. -  background: #fff;
  8171. -  color: #000;
  8172. -  padding: 10px 2px;
  8173. -  margin: 10px 0px;
  8174. -}
  8175. -.sc-FixedWidthButton {
  8176. -  width: 10em;
  8177. -}
  8178. -
  8179. -/**
  8180. - * Applied to specific components in Content Widgets.
  8181. - */
  8182. -.cw-BasicPopup-thumb {
  8183. -  cursor: pointer;
  8184. -  cursor: hand;
  8185. -}
  8186. -
  8187. -.cw-DictionaryExample-headerRow td {
  8188. -  color: #7aa5d6;
  8189. -  text-decoration: underline;
  8190. -  font-weight: bold;
  8191. -  padding-right: 20px;
  8192. -}
  8193. -.cw-DictionaryExample-dataRow td {
  8194. -  padding-right: 20px;
  8195. -}
  8196. -
  8197. -.cw-DockPanel td {
  8198. -  border: 1px solid #BBBBBB;
  8199. -  padding: 3px;
  8200. -}
  8201. -
  8202. -.cw-FlexTable td {
  8203. -  border: 1px solid #BBBBBB;
  8204. -  padding: 3px;
  8205. -}
  8206. -
  8207. -.cw-FlexTable-buttonPanel td {
  8208. -  border: 0px;
  8209. -}
  8210. -
  8211. -.cw-FlowPanel-checkBox {
  8212. -  margin-left: 20px;
  8213. -}
  8214. -
  8215. -.cw-RedText {
  8216. -  color: red;
  8217. -}
  8218. -
  8219. -.cw-RichText {
  8220. -  background-color: #fff;
  8221. -  border: 1px solid #fff;
  8222. -  border-spacing: 0px;
  8223. -  padding: 0px;
  8224. -}
  8225. -.cw-RichText td {
  8226. -  padding: 0px;
  8227. -}
  8228. -
  8229. -.cw-StackPanelHeader {
  8230. -  padding-right: 7px;
  8231. -  font-weight: bold;
  8232. -  font-size: 1.4em;
  8233. -}
  8234. diff --git a/src/com/google/gwt/sample/showcase/public/images/loading.gif b/src/com/google/gwt/sample/showcase/public/images/loading.gif
  8235. deleted file mode 100644
  8236. index a0e7007..0000000
  8237. Binary files a/src/com/google/gwt/sample/showcase/public/images/loading.gif and /dev/null differ
  8238. diff --git a/src/com/google/gwt/sample/showcase/public/standard/Showcase.css b/src/com/google/gwt/sample/showcase/public/standard/Showcase.css
  8239. deleted file mode 100644
  8240. index 674b029..0000000
  8241. --- a/src/com/google/gwt/sample/showcase/public/standard/Showcase.css
  8242. +++ /dev/null
  8243. @@ -1,168 +0,0 @@
  8244. -/**
  8245. - * Applied to the main layout of the page.
  8246. - */
  8247. -.Application-Reference-standard {
  8248. -  height: 5px;
  8249. -  width: 5px;
  8250. -  zoom: 1;
  8251. -}
  8252. -.Application-top {
  8253. -  width: 100%;
  8254. -  margin-bottom: 10px;
  8255. -}
  8256. -.Application-title {
  8257. -  padding: 0px 0px 0px 10px;
  8258. -}
  8259. -.Application-title h1 {
  8260. -  color: #67A7E3;
  8261. -  margin: 0px;
  8262. -  padding: 0px 0px 0px 4px;
  8263. -  font-size: 22px;
  8264. -}
  8265. -.Application-title h2 {
  8266. -  color: #888;
  8267. -  margin: 0px;
  8268. -  padding: 0px 0px 0px 4px;
  8269. -  font-size: 16px;
  8270. -}
  8271. -.Application-links {
  8272. -  padding: 2px 13px 2px 0px;
  8273. -  background: #C3D9FF;
  8274. -}
  8275. -.Application-links .gwt-HTML{
  8276. -  font-size: 12px;
  8277. -}
  8278. -.Application-options {
  8279. -  padding: 6px 10px 0px 0px;
  8280. -}
  8281. -.Application-options .gwt-ListBox {
  8282. -  font-size: 11px;
  8283. -  color: blue;
  8284. -  margin-left: 4px;
  8285. -}
  8286. -.Application-options td {
  8287. -  font-size: 12px;
  8288. -}
  8289. -.Application-options .gwt-ToggleButton {
  8290. -  width: 36px;
  8291. -  height: 16px;
  8292. -  margin: 3px 0px 0px 10px;
  8293. -  padding: 0px;
  8294. -}
  8295. -.Application-options .gwt-ToggleButton-down,
  8296. -.Application-options .gwt-ToggleButton-down-hovering {
  8297. -  cursor: default;
  8298. -}
  8299. -.Application-options .sc-ThemeButton-standard {
  8300. -  background: #d0e4f6;
  8301. -}
  8302. -.Application-options .sc-ThemeButton-chrome {
  8303. -  background: #ccc;
  8304. -}
  8305. -.Application-options .sc-ThemeButton-dark {
  8306. -  background: #3d3d3d;
  8307. -}
  8308. -.Application-menu {
  8309. -  width: 18em;
  8310. -  text-align: left;
  8311. -}
  8312. -
  8313. -/**
  8314. - * Applied to widgets in the content area.
  8315. - */
  8316. -.Application-content-decorator {
  8317. -  margin-right: 8px;
  8318. -}
  8319. -.Application-content-title {
  8320. -  padding: 4px 0px 3px 6px;
  8321. -  text-align: left;
  8322. -  background: #e3e8f3 url(../gwt/standard/images/hborder.png) repeat-x 0px -2003px;
  8323. -  border-bottom: 2px solid #bbcdf3;
  8324. -}
  8325. -.Application-content-title .gwt-TabBarItem {
  8326. -  background: none;
  8327. -  padding: 0px;
  8328. -}
  8329. -.Application-content-title  .gwt-TabBarItem .gwt-Label {
  8330. -  padding-right: 20px;
  8331. -  color: #888888;
  8332. -}
  8333. -.Application-content-title  .gwt-TabBarItem-selected .gwt-Label {
  8334. -  color: black;
  8335. -}
  8336. -.Application-content-wrapper {
  8337. -  text-align: left;
  8338. -}
  8339. -.sc-ContentWidget {
  8340. -  padding: 10px 20px;
  8341. -}
  8342. -.sc-ContentWidget-name {
  8343. -  font-size: 1.5em;
  8344. -  font-weight: bold;
  8345. -  padding-bottom: 15px;
  8346. -}
  8347. -.sc-ContentWidget-description {
  8348. -  padding-bottom: 15px;
  8349. -  border-bottom: 1px solid #7aa5d6;
  8350. -  margin-bottom: 15px;
  8351. -}
  8352. -.sc-ContentWidget pre {
  8353. -  border: 1px solid #888;
  8354. -  background: #eeeeee;
  8355. -  padding: 10px 2px;
  8356. -  margin: 10px 0px;
  8357. -}
  8358. -.sc-FixedWidthButton {
  8359. -  width: 10em;
  8360. -}
  8361. -
  8362. -/**
  8363. - * Applied to specific components in Content Widgets.
  8364. - */
  8365. -.cw-BasicPopup-thumb {
  8366. -  cursor: pointer;
  8367. -  cursor: hand;
  8368. -}
  8369. -
  8370. -.cw-DictionaryExample-headerRow td {
  8371. -  color: #7aa5d6;
  8372. -  text-decoration: underline;
  8373. -  font-weight: bold;
  8374. -  padding-left: 20px;
  8375. -}
  8376. -.cw-DictionaryExample-dataRow td {
  8377. -  padding-left: 20px;
  8378. -}
  8379. -
  8380. -.cw-DockPanel td {
  8381. -  border: 1px solid #BBBBBB;
  8382. -  padding: 3px;
  8383. -}
  8384. -
  8385. -.cw-FlexTable td {
  8386. -  border: 1px solid #BBBBBB;
  8387. -  padding: 3px;
  8388. -}
  8389. -
  8390. -.cw-FlexTable-buttonPanel td {
  8391. -  border: 0px;
  8392. -}
  8393. -
  8394. -.cw-FlowPanel-checkBox {
  8395. -  margin-right: 20px;
  8396. -}
  8397. -
  8398. -.cw-RedText {
  8399. -  color: red;
  8400. -}
  8401. -
  8402. -.cw-RichText {
  8403. -  border: 1px solid #BBBBBB;
  8404. -  border-spacing: 0px;
  8405. -}
  8406. -
  8407. -.cw-StackPanelHeader {
  8408. -  padding-left: 7px;
  8409. -  font-weight: bold;
  8410. -  font-size: 1.4em;
  8411. -}
  8412. 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
  8413. deleted file mode 100644
  8414. index 597c6b0..0000000
  8415. --- a/src/com/google/gwt/sample/showcase/public/standard/Showcase_rtl.css
  8416. +++ /dev/null
  8417. @@ -1,168 +0,0 @@
  8418. -/**
  8419. - * Applied to the main layout of the page.
  8420. - */
  8421. -.Application-Reference-standard-rtl {
  8422. -  height: 5px;
  8423. -  width: 5px;
  8424. -  zoom: 1;
  8425. -}
  8426. -.Application-top {
  8427. -  width: 100%;
  8428. -  margin-bottom: 10px;
  8429. -}
  8430. -.Application-title {
  8431. -  padding: 0px 10px 0px 0px;
  8432. -}
  8433. -.Application-title h1 {
  8434. -  color: #67A7E3;
  8435. -  margin: 0px;
  8436. -  padding: 0px 4px 0px 0px;
  8437. -  font-size: 22px;
  8438. -}
  8439. -.Application-title h2 {
  8440. -  color: #888;
  8441. -  margin: 0px;
  8442. -  padding: 0px 4px 0px 0px;
  8443. -  font-size: 16px;
  8444. -}
  8445. -.Application-links {
  8446. -  padding: 2px 0px 2px 13px;
  8447. -  background: #C3D9FF;
  8448. -}
  8449. -.Application-links .gwt-HTML{
  8450. -  font-size: 12px;
  8451. -}
  8452. -.Application-options {
  8453. -  padding: 6px 0px 0px 10px;
  8454. -}
  8455. -.Application-options .gwt-ListBox {
  8456. -  font-size: 11px;
  8457. -  color: blue;
  8458. -  margin-right: 4px;
  8459. -}
  8460. -.Application-options td {
  8461. -  font-size: 12px;
  8462. -}
  8463. -.Application-options .gwt-ToggleButton {
  8464. -  width: 36px;
  8465. -  height: 16px;
  8466. -  margin: 3px 10px 0px 0px;
  8467. -  padding: 0px;
  8468. -}
  8469. -.Application-options .gwt-ToggleButton-down,
  8470. -.Application-options .gwt-ToggleButton-down-hovering {
  8471. -  cursor: default;
  8472. -}
  8473. -.Application-options .sc-ThemeButton-standard {
  8474. -  background: #d0e4f6;
  8475. -}
  8476. -.Application-options .sc-ThemeButton-chrome {
  8477. -  background: #ccc;
  8478. -}
  8479. -.Application-options .sc-ThemeButton-dark {
  8480. -  background: #3d3d3d;
  8481. -}
  8482. -.Application-menu {
  8483. -  width: 18em;
  8484. -  text-align: right;
  8485. -}
  8486. -
  8487. -/**
  8488. - * Applied to widgets in the content area.
  8489. - */
  8490. -.Application-content-decorator {
  8491. -  margin-left: 8px;
  8492. -}
  8493. -.Application-content-title {
  8494. -  padding: 4px 6px 3px 0px;
  8495. -  text-align: right;
  8496. -  background: #e3e8f3 url(../gwt/standard/images/hborder.png) repeat-x 0px -2003px;
  8497. -  border-bottom: 2px solid #bbcdf3;
  8498. -}
  8499. -.Application-content-title .gwt-TabBarItem {
  8500. -  background: none;
  8501. -  padding: 0px;
  8502. -}
  8503. -.Application-content-title  .gwt-TabBarItem .gwt-Label {
  8504. -  padding-left: 20px;
  8505. -  color: #888888;
  8506. -}
  8507. -.Application-content-title  .gwt-TabBarItem-selected .gwt-Label {
  8508. -  color: black;
  8509. -}
  8510. -.Application-content-wrapper {
  8511. -  text-align: right;
  8512. -}
  8513. -.sc-ContentWidget {
  8514. -  padding: 10px 20px;
  8515. -}
  8516. -.sc-ContentWidget-name {
  8517. -  font-size: 1.5em;
  8518. -  font-weight: bold;
  8519. -  padding-bottom: 15px;
  8520. -}
  8521. -.sc-ContentWidget-description {
  8522. -  padding-bottom: 15px;
  8523. -  border-bottom: 1px solid #7aa5d6;
  8524. -  margin-bottom: 15px;
  8525. -}
  8526. -.sc-ContentWidget pre {
  8527. -  border: 1px solid #888;
  8528. -  background: #eeeeee;
  8529. -  padding: 10px 2px;
  8530. -  margin: 10px 0px;
  8531. -}
  8532. -.sc-FixedWidthButton {
  8533. -  width: 10em;
  8534. -}
  8535. -
  8536. -/**
  8537. - * Applied to specific components in Content Widgets.
  8538. - */
  8539. -.cw-BasicPopup-thumb {
  8540. -  cursor: pointer;
  8541. -  cursor: hand;
  8542. -}
  8543. -
  8544. -.cw-DictionaryExample-headerRow td {
  8545. -  color: #7aa5d6;
  8546. -  text-decoration: underline;
  8547. -  font-weight: bold;
  8548. -  padding-right: 20px;
  8549. -}
  8550. -.cw-DictionaryExample-dataRow td {
  8551. -  padding-right: 20px;
  8552. -}
  8553. -
  8554. -.cw-DockPanel td {
  8555. -  border: 1px solid #BBBBBB;
  8556. -  padding: 3px;
  8557. -}
  8558. -
  8559. -.cw-FlexTable td {
  8560. -  border: 1px solid #BBBBBB;
  8561. -  padding: 3px;
  8562. -}
  8563. -
  8564. -.cw-FlexTable-buttonPanel td {
  8565. -  border: 0px;
  8566. -}
  8567. -
  8568. -.cw-FlowPanel-checkBox {
  8569. -  margin-left: 20px;
  8570. -}
  8571. -
  8572. -.cw-RedText {
  8573. -  color: red;
  8574. -}
  8575. -
  8576. -.cw-RichText {
  8577. -  border: 1px solid #BBBBBB;
  8578. -  border-spacing: 0px;
  8579. -}
  8580. -
  8581. -.cw-StackPanelHeader {
  8582. -  padding-right: 7px;
  8583. -  font-weight: bold;
  8584. -  font-size: 1.4em;
  8585. -}