      /**
       * The constants used in this Content Widget.
       */
      public static interface CwConstants extends Constants,
          ContentWidget.CwConstants {
        String cwDialogBoxCaption();

        String cwDialogBoxClose();

        String cwDialogBoxDescription();

        String cwDialogBoxDetails();

        String cwDialogBoxItem();

        String cwDialogBoxListBoxInfo();

        String cwDialogBoxMakeTransparent();

        String cwDialogBoxName();

        String cwDialogBoxShowButton();
      }

      /**
       * An instance of the constants.
       */
      private CwConstants constants;

      /**
       * Initialize this example.
       */
      @Override
      public Widget onInitialize() {
        // Create the dialog box
        final DialogBox dialogBox = createDialogBox();
        dialogBox.setAnimationEnabled(true);

        // Create a button to show the dialog Box
        Button openButton = new Button(constants.cwDialogBoxShowButton(),
            new ClickListener() {
              public void onClick(Widget sender) {
                dialogBox.center();
                dialogBox.show();
              }
            });

        // Create a ListBox
        HTML listDesc = new HTML("<br><br><br>"
            + constants.cwDialogBoxListBoxInfo());

        ListBox list = new ListBox();
        list.setVisibleItemCount(1);
        for (int i = 10; i > 0; i--) {
          list.addItem(constants.cwDialogBoxItem() + " " + i);
        }

        // Add the button and list to a panel
        VerticalPanel vPanel = new VerticalPanel();
        vPanel.setSpacing(8);
        vPanel.add(openButton);
        vPanel.add(listDesc);
        vPanel.add(list);

        // Return the panel
        return vPanel;
      }

      /**
       * Create the dialog box for this example.
       *
       * @return the new dialog box
       */
      private DialogBox createDialogBox() {
        // Create a dialog box and set the caption text
        final DialogBox dialogBox = new DialogBox();
        dialogBox.ensureDebugId("cwDialogBox");
        dialogBox.setText(constants.cwDialogBoxCaption());

        // Create a table to layout the content
        VerticalPanel dialogContents = new VerticalPanel();
        dialogContents.setWidth("100%");
        dialogContents.setSpacing(4);
        dialogBox.setWidget(dialogContents);

        // Add some text to the top of the dialog
        HTML details = new HTML(constants.cwDialogBoxDetails());
        dialogContents.add(details);
        dialogContents.setCellHorizontalAlignment(details,
            HasHorizontalAlignment.ALIGN_CENTER);

        // Add an image to the dialog
        Image image = Showcase.images.jimmy().createImage();
        dialogContents.add(image);
        dialogContents.setCellHorizontalAlignment(image,
            HasHorizontalAlignment.ALIGN_CENTER);

        // Add option to make transparent
        final CheckBox opacityOption = new CheckBox(
            constants.cwDialogBoxMakeTransparent());
        dialogContents.add(opacityOption);

        // Listen for changes in opacity option
        opacityOption.addClickListener(new ClickListener() {
          public void onClick(Widget sender) {
            if (opacityOption.isChecked()) {
              dialogBox.addStyleName("cw-DialogBox");
            } else {
              dialogBox.removeStyleName("cw-DialogBox");
            }
          }
        });

        // Add a close button at the bottom of the dialog
        Button closeButton = new Button(constants.cwDialogBoxClose(),
            new ClickListener() {
              public void onClick(Widget sender) {
                dialogBox.hide();
              }
            });
        dialogContents.add(closeButton);
        dialogContents.setCellHorizontalAlignment(closeButton,
            HasHorizontalAlignment.ALIGN_RIGHT);

        // Return the dialog box
        return dialogBox;
      }